- Encryption/decryption → foundations → classical ciphers → block ciphers → modes → attacks.
- Cryptography = “secret writing”: the science and art of transforming messages to make them secure.
- Encryption in a nutshell: plaintext + key → ciphertext → (key) → plaintext.
- Encryption converts a message into a form unreadable by unauthorized people, giving confidential communication over an insecure channel.
- Plaintext, ciphertext, cipher (algorithm), key, encipher/decipher, cryptanalysis, cryptology.
- Notation: C = E_K(P), P = D_K(C).
- Cryptography protects confidentiality and integrity, NOT availability.
🎯 How this can come up · 1 question
Cryptography can protect availability.
False. Confidentiality and integrity only.
- Kerckhoffs’s principle: a cryptosystem must stay secure even if everything except the KEY is public. Assume Eve knows the algorithm.
🎯 How this can come up · 1 question
Kerckhoffs’s principle says the security of a cryptosystem should depend only on:
Correct: The secrecy of the key.
- Three dimensions: operations used (substitution, transposition), number of keys (symmetric, asymmetric), how plaintext is processed (block, stream).
- Same key for both = symmetric (conventional). Different keys = asymmetric (public-key).
- Cipher classification tree.
- Symmetric cryptosystems use substitution (replace) and transposition (rearrange).
- Symmetric key: one shared key encrypts and decrypts.
- Proof that decryption recovers P.
- Same key locks and unlocks.
- Symmetric needs: efficient E and D, and the ciphertext must be hard to invert without the key. Problem: secure key distribution.
Asked in a real exam
🎯 How this can come up · 2 questions
The classic problem with symmetric encryption is:
Major 181.
Why is symmetric encryption preferred for large amounts of data? (Major C)
It uses one shared key and simple, fast operations (substitution, permutation, XOR), so it is far faster and lighter than asymmetric algorithms, which do heavy maths on huge numbers. Asymmetric is used only to exchange the symmetric key or to sign (hybrid encryption).
- Caesar: shift every letter by k: C = (P + k) mod 26.
Asked in a real exam
🎯 How this can come up · 2 questions
Plaintext GLOBAL… becomes QVYLKV…. What is the Caesar key?
Major A: G(6) → Q(16).
Caesar with shift 3 encrypts HELLO as:
Correct: KHOOR.
- Shift 3 example.
- Shift 1 example.
- ROT13; a general substitution cipher has 26! keys.
- Keyword cipher: write the keyword (no repeats) then the rest of the alphabet as the cipher alphabet.
- Keyword example (“zebras”).
- Keyword example, continued.
- Monoalphabetic ciphers fall to frequency analysis → encrypt pairs of letters (Playfair).
- Playfair 5×5 matrix: keyword letters (no repeats), then the remaining letters; I/J share a cell.
- Rules: pairs; X between doubled letters; same row → right; same column → below; rectangle → own row, other letter’s column.
Asked in a real exam
🎯 How this can come up · 2 questions
Encrypt COMMITTEES with Playfair, keyword EFFECTIVENESS (I/J together). (Major B)
Matrix rows: E F C T I / V N S A B / D G H K L / M O P Q R / U W X Y Z. Pairs: CO MX MI TX TE ES → FP PU RE CY IF CV.
In Playfair, two letters in the same row are replaced by:
Correct: The letters to their right.
- HELLO → HE LX LO.
- 26 × 26 = 676 digrams: much better than monoalphabetic, but still breakable with digram frequencies.
🎯 How this can come up · 1 question
In Playfair, what does cryptanalysis depend on? (Major C)
Recovering the 5×5 key square built from the keyword, usually through digram frequency analysis.
- Vigenère: repeat the key; C = (P + K) mod 26.
Asked in a real exam
🎯 How this can come up · 2 questions
An advanced Caesar cipher that shifts each letter by a keyword letter is:
Final 221 A.
Decrypt CMRUVLERMYOLRX with Vigenère key RIYADH. (Major B)
Subtract the repeated key RIYADHRIYADHRI letter by letter: LETUSENJOYLEAP (“let us enjoy LEAP”).
- Vigenère decryption: subtract the key letter.
- Frequency analysis breaks substitution ciphers (E, T, A are most common in English).
- One-time pad (Vernam/Mauborgne 1917): a truly random key as long as the message, used once → unbreakable.
🎯 How this can come up · 1 question
Which cipher is theoretically unbreakable?
Correct: One-time pad.
- One-time pad example.
- Hill (1929): m letters at a time as a vector, multiplied by an m × m key matrix mod 26.
Asked in a real exam
🎯 How this can come up · 2 questions
Encrypt HE with a Hill key K = [[3, 3], [2, 5]] using the row approach. (Major A)
HE = (7, 4). (7, 4) × K = (7·3 + 4·2, 7·3 + 4·5) = (29, 41) mod 26 = (3, 15) → DP.
Any 2 × 2 matrix can be used as a Hill cipher key.
False. Its determinant must have an inverse mod 26 (coprime with 26).
- Hill example.
- Letter numbering A = 0 … Z = 25.
- Hill matrix multiplication.
- Inverse key: K⁻¹ = det⁻¹ × adj(K) mod 26.
- Transposition keeps the letters but changes their positions: write in rows, permute/read columns by the key.
Asked in a real exam
🎯 How this can come up · 1 question
A cipher that keeps the letters but rearranges their positions is a:
Correct: Transposition cipher.
- Transposition example.
- Example.
- Example.
- Example.
- Modern ciphers overview.
- A modern block cipher.
- Block ciphers.
- Block cipher: fixed-length blocks of b bits (e.g., 128).
- Plaintext length must be a multiple of b → pad the last block unambiguously.
- Count characters as bytes; blocks = ceil(bytes / (b/8)); padding = blocks × (b/8) − bytes.
Asked in a real exam
🎯 How this can come up · 2 questions
b = 128 bits. Plaintext “Incomprehensibilities”. How many blocks and how many padded bits? (Major A)
21 characters = 21 bytes. A block holds 16 bytes → 2 blocks (32 bytes). Padding = 32 − 21 = 11 bytes = 88 bits.
b = 64 bits, plaintext of 29 bytes. How many blocks?
Major B: 8 bytes per block → 4 blocks, 3 bytes (24 bits) of padding.
- DES: IBM, adopted 1977, 56-bit key, 64-bit blocks; now broken by brute force.
- 3DES: three DES passes with three keys: C = E_K3(D_K2(E_K1(P))).
- 3DES decryption reverses it: P = D_K1(E_K2(D_K3(C))).
Asked in a real exam
🎯 How this can come up · 1 question
3DES decryption order is:
Final 221 A and Major A.
- AES: NIST 2001 (Rijndael), 128-bit blocks, 128/192/256-bit keys.
🎯 How this can come up · 1 question
AES uses a block size of:
Correct: 128 bits.
- A mode describes how a block cipher handles a sequence of blocks. ECB: each block alone (identical blocks → identical ciphertext).
- CBC: XOR each plaintext block with the previous ciphertext block (IV first), then encrypt. Decrypt: P[i] = D_K(C[i]) ⊕ C[i−1].
Asked in a real exam
🎯 How this can come up · 2 questions
In CBC, write the decryption function for P[2]. (Major A)
P[2] = D_K(C[2]) ⊕ C[1] (with C[−1] = IV for the first block).
Which mode XORs each plaintext block with the previous ciphertext block before encryption?
Correct: CBC.
- CFB: encrypt the previous ciphertext block, then XOR with the plaintext: C[i] = E_K(C[i−1]) ⊕ P[i].
Asked in a real exam
🎯 How this can come up · 1 question
C[i] = E_K(C[i−1]) ⊕ P[i] describes:
Major A.
- OFB: keystream from repeatedly encrypting the IV; C[i] = V[i] ⊕ P[i].
- CTR: keystream = E_K(counter); blocks can be processed in parallel.
- Attacker’s objective: recover the KEY. Two approaches: cryptanalysis and brute force.
- Cryptanalysis by attacker knowledge: ciphertext only, known plaintext, chosen plaintext, chosen ciphertext.
- Ciphertext only: the attacker has only ciphertext (hardest for the attacker).
- Known plaintext: has plaintext–ciphertext pairs.
- Chosen plaintext: can encrypt texts of their choice.
🎯 How this can come up · 1 question
An attacker who can get any plaintext of their choice encrypted is performing a:
Correct: Chosen-plaintext attack.
- Chosen ciphertext: can get chosen ciphertexts decrypted.
- Brute force: try every key; effort grows with key size.
- End of chapter.
Seen again
No slides match this filter.