Block Cipher Principles
1. What a Block Cipher Is
A block cipher encrypts fixed-size blocks ( DES, AES) with a keyed invertible map:
For fixed , is a permutation of blocks. Ideal ("random permutation") needs key bits (huge: ) — real ciphers approximate it with small keys via iterated rounds (DES , AES ).
2. Stream vs Block (Exam Contrast)
| Point | Stream cipher | Block cipher |
|---|---|---|
| Unit | Bit/byte at a time () | Whole -bit block |
| Keystream | Key + IV expanded; reuse = break | Key schedule → round subkeys |
| Error spread | One-bit error → one-bit error | One-bit error → full block garbled (with chaining, more) |
| Padding/mode | None needed | Padding + mode (ECB/CBC/...) for long messages |
| Examples | RC4, ChaCha20 (Module 4 Topics 6–7) | DES, AES (Topics 3, Module 4 Topic 2) |
3. Shannon: Confusion and Diffusion (The Design Theory)
Claude Shannon (1949) demands two properties; every exam answer on "principles" centers them:
- Confusion: ciphertext statistics must not reveal key — complex nonlinear key↔cipher relation. Achieved by substitution (S-boxes): S-DES S0/S1, DES S-boxes, AES SubBytes inversion in .
- Diffusion: one plaintext bit must spread over many ciphertext bits (and vice versa) — kills frequency/digram statistics. Achieved by permutation/transposition: DES E-expansion + P-box, AES ShiftRows + MixColumns.
Feistel/SPN round = confusion + diffusion layered; after enough rounds (DES 16, AES 10–14) the cipher shows avalanche: 1 input bit flips of output bits; strict avalanche + bit-independence are the measurable criteria.
4. Feistel Structure (Why DES Can Decrypt)
Split block ; per round with subkey :
Final (often swapped). Decryption = same circuit, subkeys reversed — because XOR cancels: . need not be invertible (DES expands ) — Feistel's genius vs SPN (AES), where every layer must invert.
Ideal block cipher checklist (Stallings): large (birthday bound ), large key ( brute force), complex key schedule (related-key resistance), no statistical weakness (confusion/diffusion), nonlinear S-boxes with avalanche.
Exam Points
- definition + stream-vs-block table — 2–5 mark opener.
- Confusion (S-box, key hiding) vs diffusion (permutation, spreading) with DES/AES examples each — 5-mark theory core.
- Feistel equations + "F need not invert" + decrypt-with-reversed-keys proof sketch.
- Avalanche 50% + ideal-cipher checklist.