A Short, Brutal History of Secrets
Every cipher ever called unbreakable was eventually broken. Here is how.
01 Substitution: hiding letters in plain sight
The oldest trick in the book is to swap each letter for another. Julius Caesar shifted every letter three places down the alphabet — A becomes D, B becomes E — a scheme now called the Caesar cipher. Generalize it so the substitution is an arbitrary scrambling of the alphabet and you get a monoalphabetic substitution cipher, with a staggering 26-factorial possible keys. For a thousand years that number felt like safety.
It was an illusion. Around 850 CE the Arab polymath al-Kindi wrote down frequency analysis: in any language, letters appear with stable, predictable frequencies. In English, E, T, and A dominate. A substitution cipher hides which symbol stands for E, but it cannot hide the fact that some symbol appears about 12% of the time. Count the symbols, match the peaks to the known letter distribution, and the scramble collapses.
The lesson landed slowly. For centuries diplomats trusted substitution, and for centuries codebreakers quietly read their mail.
02 The cipher they called unbreakable
The fix for frequency analysis seemed obvious: stop using one alphabet. The Vigenere cipher, popularized in the 16th century, uses a keyword to select a different Caesar shift for each successive letter. Encrypt with the key LEMON and the first letter shifts by 11, the second by 4, the third by 12, and so on, repeating. Now the letter E maps to many different ciphertext symbols, and the tidy frequency peaks flatten out. It earned the nickname le chiffre indechiffrable — the indecipherable cipher — and held that reputation for roughly 300 years.
The crack came from two directions. In the 1850s Charles Babbage broke it privately; in 1863 the Prussian officer Friedrich Kasiski published the method now bearing his name. The insight: because the key repeats, identical plaintext fragments encrypted at the same key offset produce identical ciphertext. Measure the distances between repeated segments, and their common factors betray the key length. Once you know the key is, say, five letters long, you split the message into five columns — each one a plain Caesar cipher — and finish it off with frequency analysis.
03 Enigma and the war that cryptanalysis shortened
By the 20th century secrecy went electromechanical. Germany's Enigma machine used rotating wired wheels so that the substitution changed with every single keystroke — a polyalphabetic cipher with an astronomically long, non-repeating period, plus a plugboard that swapped letters before and after. The operators believed it was effectively immune to analysis.
They were wrong, and the story is more Polish than most people realize. In 1932 mathematician Marian Rejewski of Poland's Cipher Bureau reconstructed Enigma's wiring and built an electromechanical aid called the bomba. As the war approached in 1939, Poland handed its work to Britain and France. At Bletchley Park, Alan Turing and Gordon Welchman designed the far more powerful Bombe, which exploited operator mistakes and predictable message fragments — cribs — to grind through rotor settings. The decrypted intelligence, codenamed Ultra, is widely credited by historians with shortening the war in Europe by years.
04 Kerckhoffs's principle: the enemy knows the system
In 1883 the Dutch linguist Auguste Kerckhoffs wrote down the rule that still governs the field: a cryptosystem should remain secure even if everything about it except the key is public knowledge. Claude Shannon later restated it bluntly as "the enemy knows the system." This is the opposite of security through obscurity — the hope that keeping your algorithm secret will save you.
Obscurity fails for concrete reasons. Secret algorithms are never truly secret: they leak through reverse engineering, disgruntled insiders, or a captured device. When the secret is the design itself, a single leak is catastrophic and unrecoverable — you cannot quietly rotate an algorithm the way you rotate a key. And secret designs never get the public scrutiny that finds their flaws before the attackers do.
Rely on the key, not the mystery. A key can be long, random, and replaced. A hidden design is just a bug waiting for daylight.
This is why serious cryptography is open. AES, RSA, TLS, and SHA are all fully published, brutally attacked by the world's best, and trusted because of that exposure — not in spite of it. If a vendor tells you their encryption is "proprietary and secret," that is a warning sign, not a feature.
05 1976: the secret that could be shouted
Every cipher so far shared one crippling flaw: both parties needed the same secret key, which meant somehow smuggling that key to the other side first. Then in 1976 Whitfield Diffie and Martin Hellman published "New Directions in Cryptography," describing Diffie-Hellman key exchange — a way for two strangers to agree on a shared secret over a fully public channel, where an eavesdropper hearing every message still cannot compute the result. The trick rests on math that is easy to do forwards and infeasible to reverse.
A year later, in 1977, Ron Rivest, Adi Shamir, and Leonard Adleman at MIT gave us RSA: a full public-key system where you can encrypt to someone using a key they publish openly, and only their private counterpart can decrypt. Secrecy no longer required a prior secret. It was a genuine revolution.
⌘ Field Glossary
- Substitution cipher
- A cipher that replaces each plaintext symbol with another according to a fixed mapping. Vulnerable to frequency analysis because it preserves letter frequencies.
- Frequency analysis
- Breaking a cipher by matching the frequencies of ciphertext symbols to the known frequencies of letters in the underlying language. Documented by al-Kindi around 850 CE.
- Vigenere cipher
- A polyalphabetic cipher that uses a repeating keyword to vary the substitution per letter. Broken via the Kasiski examination, which recovers the key length from repeated patterns.
- Enigma
- The German rotor cipher machine of WWII whose substitution changed every keystroke. Broken through Polish and Bletchley Park cryptanalysis exploiting operator errors and cribs.
- Kerckhoffs's principle
- The rule that a system must stay secure even if everything but the key is public. The foundation for rejecting security through obscurity.
- Security through obscurity
- Relying on the secrecy of a design rather than the secrecy of a key. Fails because designs leak and cannot be rotated after a breach.
- Public-key cryptography
- A scheme, born with Diffie-Hellman (1976) and RSA (1977), that lets parties communicate securely without pre-sharing a secret key.
Knowledge Check
Field Assessment
01 Why does a simple substitution cipher fall to frequency analysis?
02 What was the key insight the Kasiski examination used to break the Vigenere cipher?
03 Kerckhoffs's principle is best summarized as: