Modern Cryptography
The mathematical revolution that replaced everything in this museum
Every cipher in this museum was eventually broken. Modern cryptography didn't replace them by being cleverer — it replaced them by being mathematically honest. By defining precisely what security means, proving that breaking the cipher requires solving problems believed to take billions of years, and designing systems that fail loudly when misused.
Classical → Modern: What Each Failure Taught
| Classical Cipher Type | Fatal Weakness | Modern Solution | Modern Example |
|---|---|---|---|
| Caesar / Monoalphabetic | Frequency analysis — letter mapping preserved | Non-linear S-boxes destroy all frequency patterns | AES SubBytes |
| Homophonic Substitution | Still monoalphabetic — poor distribution leaks info | Uniformly random output: every ciphertext byte equally likely | AES with proper IV |
| Polyalphabetic / Vigenère | Repeating key creates detectable periodicity | Non-repeating pseudorandom keystreams, nonce + counter | ChaCha20, AES-GCM |
| Transposition (Rail Fence, Columnar) | Letters preserved — anagram attacks work | Substitution combined with permutation every round | AES ShiftRows + MixColumns |
| Playfair / Hill (block) | Small blocks leak digraph statistics; linear algebra solvable | 128-bit blocks, non-linear operations, round keys | AES (128-bit block) |
| Fractionation (Bifid, ADFGVX) | Coordinate mixing insufficient with static key square | Multiple rounds of mixing with key-derived round keys | AES 10–14 rounds |
| Military layered (ADFGVX, VIC) | Substitution + transposition — each layer still attackable | 10–14 rounds of 4 operations — computationally infeasible to reverse | AES, Camellia, SM4 |
| Rotor machines (Enigma, Lorenz) | Physical key distribution; operator errors; structural flaws | Public-key cryptography eliminates need for shared secret distribution | RSA, Diffie-Hellman, ECDH |
| One-Time Pad | Impractical key management — reuse is catastrophic | Computationally secure with short key; KDFs for key derivation | AES-256, X25519 key exchange |
Confusion, Diffusion, and Why Classical Ciphers Lack Both
Making the relationship between key and ciphertext as complex as possible. Caesar has zero confusion: C = P + 3. One known pair reveals the entire key.
Modern solution: AES S-boxes are highly non-linear. Every output bit depends on every input bit in a way that can't be described by any simple mathematical relationship.
Spreading each plaintext bit's influence across many ciphertext bits. Caesar has zero diffusion: change one letter, change exactly one ciphertext letter.
Modern solution: AES avalanche effect — after 2 rounds, every output bit depends on every input bit. After 10 rounds, changing 1 bit changes ~50% of all output bits.
What Replaced Classical Cryptography
The Advanced Encryption Standard. 128-bit blocks. 256-bit key. 14 rounds of SubBytes + ShiftRows + MixColumns + AddRoundKey. 2²⁵⁶ possible keys. No known practical attack. Protects everything from HTTPS to full-disk encryption.
Rivest, Shamir, Adleman (1977). Security based on the difficulty of factoring the product of two large primes. Two keys: public (encrypt) and private (decrypt). Solved the key distribution problem that defeated Enigma. Used in TLS, email encryption, digital signatures.
Two parties derive a shared secret over a public channel without ever sending the secret. Based on the discrete logarithm problem. This is the mathematical solution to the problem that required Enigma operators to physically distribute codebooks.
Modern stream cipher designed by Daniel Bernstein. 256-bit key, 64-bit nonce, 64-bit counter. XOR keystream with plaintext — the same operation as Vigenère, but with a cryptographically random, never-repeating keystream.
Produces a fixed 256-bit fingerprint of any input. One-way: given the hash, you cannot recover the input. Collision-resistant: finding two inputs with the same hash requires 2¹²⁸ operations. Used in digital signatures, certificate verification, blockchain.
Quantum computers will break RSA and Diffie-Hellman. NIST is standardizing quantum-resistant algorithms: CRYSTALS-Kyber (key exchange) and CRYSTALS-Dilithium (signatures), based on lattice problems believed to resist quantum attacks.
The museum's final lesson: Every cipher in these halls failed because it relied on obscurity, manual complexity, or physical key distribution. Modern cryptography replaced all three with mathematical hardness — problems that we believe require exponential time to solve, proven under formal security models, with key distribution solved by public-key mathematics. The failures of history are the foundation of everything that protects your data today.
Resources
Free browser-based cryptography toolkit. Encrypt and decrypt with dozens of classical and modern ciphers. Visualize algorithms step by step.
Simon Singh’s The Code Book traces the history of cryptography from ancient Egypt to quantum computing. The definitive popular introduction to the field.
Dan Boneh’s free Coursera course covers modern cryptographic primitives: stream ciphers, block ciphers, MACs, public-key encryption, and key exchange.