0% found this document useful (0 votes)
7 views13 pages

Css QB

The document explains various concepts in cryptography, including active and passive attacks, the Data Encryption Standard (DES) algorithm, classical encryption techniques, and the principles of block ciphers. It details the goals of security in cryptography, the Euclidean algorithm for finding the GCD, and differences between various cipher types. Additionally, it outlines the importance of confidentiality, integrity, availability, authentication, non-repudiation, and access control in securing data.

Uploaded by

aniketmm21hcompe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views13 pages

Css QB

The document explains various concepts in cryptography, including active and passive attacks, the Data Encryption Standard (DES) algorithm, classical encryption techniques, and the principles of block ciphers. It details the goals of security in cryptography, the Euclidean algorithm for finding the GCD, and differences between various cipher types. Additionally, it outlines the importance of confidentiality, integrity, availability, authentication, non-repudiation, and access control in securing data.

Uploaded by

aniketmm21hcompe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

1 EXPLAIN ACTIVE AND PASSIVE ATTACK

In cryptography and system security, attacks on a system or network can be classified into
active and passive attacks.

1. Passive Attack

●​ The attacker monitors or intercepts data without modifying it.


●​ The goal is to gather information (e.g., passwords, messages) without detection.
●​ It does not affect the system's normal operation.
●​ Examples:
○​ Eavesdropping: Listening to private conversations.
○​ Traffic Analysis: Observing data flow patterns.

2. Active Attack

●​ The attacker modifies, disrupts, or injects malicious data into the system.
●​ The goal is to alter, destroy, or steal data.
●​ It affects the system’s normal operations and is easier to detect.
●​ Examples:
○​ Man-in-the-Middle (MITM): Attacker intercepts and alters communication.
○​ Denial of Service (DoS): Overloading a system to make it unavailable.


In short:​


Passive attack = Spying (secretly watching without changes)​
Active attack = Direct interference (changing or disrupting data)

2 Explain data encryption standard algorithm​


Data Encryption Standard (DES) Algorithm

The Data Encryption Standard (DES) is a symmetric-key encryption algorithm developed by


IBM and adopted by the U.S. government in 1977. It encrypts data in 64-bit blocks using a
56-bit key and follows the Feistel structure for encryption and decryption.

Steps of DES Algorithm:

1.​ Initial Permutation (IP):


○​ The 64-bit plaintext is rearranged using a fixed permutation table.
2.​ 16 Rounds of Encryption:
○​ The data is divided into two halves: Left (L) and Right (R) (32 bits each).
○​ Each round consists of:
■​ Expansion (E) of R (from 32 to 48 bits).
■​ XOR with a 48-bit subkey (generated from the main key).
■​ Substitution (S-Box) reduces it back to 32 bits.
■​ Permutation (P-Box) for further scrambling.
■​ XOR with the left half (L).
■​ Swap L and R for the next round.
3.​ Final Permutation (FP):
○​ After 16 rounds, the final L and R are combined and passed through another
permutation to get the ciphertext.

Decryption Process:

●​ Same steps as encryption but in reverse order using the same key.

Limitations of DES:

●​ Weak security (56-bit key is easy to crack with brute force).


●​ Replaced by AES (Advanced Encryption Standard) for better security.

3 Explain classical encryption technique of cryptography(substitution and trasposition)

Classical encryption techniques are old methods used for securing data before modern
cryptography. They mainly use substitution and transposition to hide the original message.

1. Substitution Cipher

●​ Each letter in the plaintext is replaced with another letter, number, or symbol.
●​ Examples:
○​ Caesar Cipher: Shift letters by a fixed number (e.g., A → D, B → E, etc.).
○​ Monoalphabetic Cipher: Uses a random substitution for each letter (e.g., A →
Q, B → X).
○​ Playfair Cipher: Uses a 5×5 matrix to encrypt letter pairs.
○​ Vigenère Cipher: Uses multiple Caesar shifts based on a keyword.

Transposition Cipher: Keyed & Keyless

A transposition cipher scrambles the original message by rearranging its letters without
changing them. There are two types:

1. Keyless Transposition Cipher


👉 Rearrangement follows a fixed pattern without a key.
Example: Rail Fence Cipher

🔹 Plaintext: HELLO WORLD​


🔹 Depth: 2 rows​
🔹 Writing in a zigzag pattern:
mathematica
CopyEdit
H L O O L
E L W R D

🔹 Reading row-wise: HLOOL ELWRD (Ciphertext)

2. Keyed Transposition Cipher


👉 Rearrangement depends on a specific key.
Example: Columnar Transposition

🔹 Plaintext: HELLO WORLD​


🔹 Key: 31452 (Numbers show column order)​
🔹 Writing in a table (Columns based on key length):
3 1 4 5 2

H E L L O
W O R L D

🔹 Read column-wise based on the key order:​


🔹 Ciphertext: ELDHL OWLRO
🔑 Keyless = Fixed pattern, easy to break​
🔑 Keyed = Uses a secret key, harder to break
4 Explain Affine Cypher

5 Difference between Symmentric and asymmetric cryptography


6 Explain goals of security

Goals of Security in Cryptography

Security in cryptography is based on three main goals known as the CIA Triad and additional
supporting principles.

1. Confidentiality (Secrecy) 🔒
●​ Ensures that only authorized users can access sensitive data.
●​ Prevents unauthorized access or disclosure.
●​ Example: Encrypting emails so only the recipient can read them.

2. Integrity 🛡️
●​ Ensures that data is not altered during transmission or storage.
●​ Protects against modification, deletion, or corruption by attackers.
●​ Example: Checksums and hash functions (like SHA-256) ensure data is not tampered
with.

3. Availability ⚡
●​ Ensures that data and systems are available when needed.
●​ Protects against Denial of Service (DoS) attacks or system failures.
●​ Example: Redundant servers and backup systems prevent downtime.
●​
Additional Security Goals

4. Authentication ✅
●​ Verifies the identity of users or devices before granting access.
●​ Example: Passwords, biometrics, and two-factor authentication (2FA).

5. Non-Repudiation 📜
●​ Prevents a sender from denying they sent a message.
●​ Example: Digital signatures in emails ensure the sender’s identity.

6. Access Control 🔐
●​ Restricts who can access what data based on roles and permissions.
●​ Example: Only managers can access confidential company reports.

7 Explain euclidean algorithm

Euclidean Algorithm (For Finding GCD) - Detailed Theory

The Euclidean Algorithm is one of the oldest and most efficient algorithms for computing the
Greatest Common Divisor (GCD) of two positive integers. The GCD (also called the greatest
common factor) of two numbers is the largest positive integer that exactly divides both
numbers without leaving a remainder.

Steps of the Euclidean Algorithm:

1.​ Take two numbers A and B (A > B).


2.​ Divide A by B and find the remainder R (A mod B).
3.​ Replace A with B and B with R.
4.​ Repeat steps until R = 0.
5.​ The last non-zero remainder is the GCD.

Example: Find GCD(48, 18)

1.​ 48 ÷ 18 = 2, remainder 12 → (Replace: A = 18, B = 12)


2.​ 18 ÷ 12 = 1, remainder 6 → (Replace: A = 12, B = 6)
3.​ 12 ÷ 6 = 2, remainder 0 → GCD = 6

Application:

●​ Used in cryptography (e.g., RSA algorithm).


●​ Helps in reducing fractions.
●​ Used in computer algorithms for optimization.

8 Types of attack
9 Difference Between Monoalphabetic and Polyalphabetic Substitution Ciphers
10 Difference Between Substitution and Transposition Ciphers



11 Explain principle of block cipher

Block Cipher Principles

A Block Cipher encrypts data in fixed-size blocks (e.g., AES uses 128-bit blocks). The
security of a block cipher depends on several key principles, including number of rounds,
design of function F, and key scheduling.

1. Number of Rounds 🔄
●​ A block cipher applies multiple rounds of encryption to increase security.
●​ Each round involves substitution, permutation, and mixing with a round key.
●​ More rounds = stronger security (but also slower performance).
●​ Example:
○​ DES → 16 rounds
○​ AES-128 → 10 rounds
○​ AES-192 → 12 rounds
○​ AES-256 → 14 rounds
2. Design of Function F 🔐
●​ The function F is the core component of each encryption round.
●​ It applies confusion (substitution) and diffusion (permutation) to the data.
●​ Must be complex enough to resist cryptanalysis but efficient to compute.
●​ Example (in DES):
○​ Takes half of the block and a subkey.
○​ Uses S-Boxes (Substitution Boxes) for non-linearity.
○​ Uses P-Box (Permutation) for diffusion.
○​ Produces output mixed with the other half of the data block.

3. Key Scheduling 🔑
●​ Generates a set of round keys from the original encryption key.
●​ Ensures each round key is different to prevent attacks.
●​ Methods of key scheduling:
○​ DES: Uses a 56-bit key, applies permutations & shifts to derive 16 round
keys.
○​ AES: Uses a 128/192/256-bit key, expands it using the Rijndael key schedule
to produce 10, 12, or 14 round keys.
8 Use hill cipher to encrypt the text “Attack is tonight”

7 Explain with example key and keyless transposition cipher

You might also like