Classical Ciphers & Cryptanalysis
The substitution-cipher lineage — Caesar, Trithemius, Vigenère, gamma ciphers — the frequency-analysis attacks that killed it, and the one member that is provably unbreakable until you reuse the pad.
Every cipher in this entry is broken, and that is exactly why they are worth an hour: the classical lineage is the cheapest way to acquire the attacker's mindset — counting letter frequencies, exploiting structure, solving for a key from known plaintext — and it ends at the one scheme with a proof of unbreakability, whose failure mode (pad reuse) is still shipping in production systems today under different names.
The shift lineage: Caesar and Trithemius #
Number the alphabet . The Caesar cipher shifts every letter by a fixed key :
The keyspace is candidates — brute force by hand in minutes. Mathematically it is the special case of the affine cipher . Its only surviving descendant is ROT13, used as a don't-spoil-me encoding, not encryption.
Trithemius makes the shift depend on the position of the letter in the message — e.g. a linear rule :
The position-dependent shift masks single-letter frequencies, but a linear key rule has two unknown coefficients: two characters of known plaintext solve the whole system. Structure survives; only the disguise improved.
Polyalphabetic ciphers and gamma #
The general form — the gamma cipher family, of which Vigenère is the classic member — adds a key stream (the gamma) to the plaintext, symbol by symbol:
With a keyword of length , the gamma is periodic: the ciphertext is really interleaved Caesar ciphers. That kills naive frequency counting — the histogram of a Vigenère ciphertext is much flatter than the plaintext's — and it resisted attack for ~300 years. Then two tools ended it:
- Kasiski examination (1863): repeated plaintext fragments encrypted under the same key offset produce repeated ciphertext fragments; the distances between repeats are multiples of . GCD the distances → key length.
- Index of coincidence (Friedman, 1920s): the probability that two random ciphertext letters match distinguishes a monoalphabetic column (English ≈ 0.066) from random (≈ 0.038), confirming statistically. Then each of the columns falls to plain frequency analysis.
The one that works: the one-time pad #
Make the gamma as long as the message, truly random, and never reused, and the gamma cipher becomes the one-time pad. Shannon proved (1949) it has perfect secrecy: the ciphertext is statistically independent of the plaintext, so an attacker with unlimited compute learns nothing but the length. It is the only cipher with such a proof — and the proof also shows the price is unavoidable: perfect secrecy requires key material at least as long as all traffic, exchanged out of band. That makes OTP a logistics problem, not an engineering solution, which is why it guards hotlines, not HTTPS.
The two-time pad: the failure mode that never dies #
Reuse a pad once and perfect secrecy inverts into near-total compromise:
The key drops out. The XOR of two natural-language plaintexts is highly redundant and yields to crib dragging — sliding a guessed word along and checking whether the complement reads as language.
- 1940s Soviet OTP factory reuses pad pages under wartime pressure; the US Venona project exploits the reuse for decades, exposing the Rosenberg and Fuchs networks.
- 1997 Microsoft PPTP (MS-CHAPv1 era) uses the same RC4 keystream in both directions of a session — a literal two-time pad.
- 2001 WEP's 24-bit IV space guarantees keystream reuse within hours on a busy AP; related-key structure (FMS attack) finishes it off.
- 2016+ Nonce reuse in AES-GCM and ChaCha20-Poly1305 recreates the same algebra — keystream reuse plus, for GCM, recovery of the authentication key (the "forbidden attack", found live on ~184 HTTPS servers in 2016).
Source claims audit #
Seeded from a university lab manual (Caesar / Trithemius / gamma labs). Status of its load-bearing claims:
| Claim from source | Status | Notes |
|---|---|---|
| Caesar encryption/decryption equations, affine generalization | current | Standard; keyspace argument unchanged |
| "Caesar is easily broken and has practically no use" | current | ROT13 survives as an obfuscation convention only |
| Trithemius worked example (, mod 34) | current | Recomputed and verified; presented above |
| Decryption-by-strips method as the practical attack on Caesar | outdated | Museum technique; frequency analysis / brute force is the real story |
| "Vigenère is a gamma cipher; gamma masks letter frequencies" | current | But the source omits Kasiski/IC — the ciphers are broken; added above |
| Gamma from a "pseudorandom sequence produced by a rule" is secure | outdated | True only for a true-random, message-length, never-reused pad (OTP); a short or linear rule is solvable from known plaintext |