Substitution Techniques
1. Substitution = Replace Letters, Keep Order
A substitution cipher replaces each plaintext symbol by another symbol; positions never move. General monoalphabetic map over 26 letters:
Key space — brute force impossible, yet every monoalphabetic cipher falls to statistics (Section 3). Contrast with transposition (Topic 8: move letters, keep identity).
2. The Classical Family
| Cipher | Rule ( = 0–25) | Key space | Worked example |
|---|---|---|---|
| Caesar | , decrypt | 25 | : HELLO → KHOOR |
| Monoalphabetic | Arbitrary permutation | Plain: ABC... / Cipher: DKV... — HELLO → "ULSSI"-style | |
| Playfair () | Digraph rules (same row → right, same col → down, rectangle → swap) | MONARCHY square: HI → BM; decrypt reverses | |
| Hill ( matrix ) | ; need invertible mod 26 () | large | , "HI" : → "TC" |
| Polyalphabetic (Vigenère) | Key LEMON over ATTACKATDICK → LXFOPVEFRNHR | ||
| Autokey | Key extends with plaintext itself | — | Key QUEEN + plaintext MEET... → cipher varies after key runs out |
| Vernam / One-Time Pad | , key random, length = message, never reused | Only unconditionally secure cipher (Shannon) |
Vigenère table check: A(0)+L(11) = L(11) ✓; T(19)+E(4) = X(23) ✓ — first two letters "AT" → "LX".
3. Breaking Monoalphabetic Ciphers — Frequency Analysis
English letter frequencies ( E 12.7%, T 9.1%, A 8.2%, O 7.5%, ...) transfer to ciphertext 1-to-1. Attack:
- Count ciphertext frequencies; guess most frequent = E, next = T/A/O.
- Use digrams (TH, HE most common) and trigrams (THE, AND) to confirm.
- Words: single-letter words are A/I; "TH-T" pattern is THAT.
Worked mini-break: "WKH TXHHQ RI WKH...": each letter is Caesar (W→T? no — frequency says H most common → H = E means shift 3): subtract 3 → "THE QUEEN OF THE..." ✓. Monoalphabetic with keys broke by hand — key size ≠ security.
Kasiski test (Vigenère): repeated blocks ("VTW" twice, distance 9) reveal key length distances; then each of the Caesar columns falls to frequency analysis separately.
4. Why Polyalphabetic Matters and OTP Is Perfect
- Monoalphabetic: one letter → one letter — statistics survive.
- Polyalphabetic: one letter → many letters (flattens frequencies); key length is the security knob — is Caesar, message length with random key is OTP.
- OTP: with , truly random, used once → is uniform random regardless of → zero leakage (unconditional security). Two-time pad ( reused) breaks instantly: .
Exam Points
- Formulas , Vigenère , Hill — 2-mark each.
- Caesar "HELLO → KHOOR" and Vigenère "ATTACK/LEMON → LXFOPVEFRNHR" — standard numericals.
- Frequency-analysis steps + Kasiski key-length trick — 5-mark theory core.
- OTP three conditions (random, full-length, once) + two-time-pad break.