Css QB
Css QB
In cryptography and system security, attacks on a system or network can be classified into
active and passive attacks.
1. Passive Attack
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)
Decryption Process:
● Same steps as encryption but in reverse order using the same key.
Limitations of DES:
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.
A transposition cipher scrambles the original message by rearranging its letters without
changing them. There are two types:
H E L L O
W O R L D
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.
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.
✅
2. 18 ÷ 12 = 1, remainder 6 → (Replace: A = 12, B = 6)
3. 12 ÷ 6 = 2, remainder 0 → GCD = 6
Application:
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
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”