How codemakers and codebreakers have steered history and privacy
In 60 seconds
- Simple substitution ciphers fall to letter-frequency habits and sloppy tradecraft, not only weak math.
- Polyalphabetic systems kept an unbreakable reputation for centuries until key-length analysis reduced them to ordinary ciphers.
- State black chambers turned cryptanalysis into permanent infrastructure and raised the stakes of every later design.
- Rotor machines forced industrial mathematical codebreaking that also helped birth electronic computing.
- Public-key methods finally let strangers establish secrecy without first sharing a private key.
- Civilian-strength encryption became a political clash over privacy versus state access, with quantum key exchange offering physics-backed detection of eavesdroppers.
The big idea
Singh frames cryptography as a running arms race in which every advance in secrecy provokes a matching advance in exposure, repeatedly altering wars, empires, and everyday digital life. That same contest now sits at the center of the unresolved clash between individual privacy and government surveillance.
The book in brief
Singh begins with the basic fragility of keeping a message secret. Early letter-swapping codes look elaborate until someone counts how often letters appear and notices the careless habits of the people sending them. That exposed weakness pushed designers toward systems that change the alphabet with a repeating keyword, systems that held a long reputation for invulnerability until a method for finding the keyword length finally appeared and collapsed them back into ordinary analysis.
Governments soon professionalized the other side of the contest. Secret intercept rooms made codebreaking a standing arm of statecraft rather than an occasional wartime craft, and long-distance wires made interception easier still, forcing stronger ciphers into routine diplomatic and commercial traffic. By the world wars a single broken message could tilt a conflict, yet deciding when and how to use the intelligence without revealing the source became as difficult as the break itself.
Mechanical rotors then changed the nature of the puzzle. Encryption became a combinatorial search so large that only purpose-built electromechanical devices, and later electronic ones, could keep pace. The machines built to win that contest became early computers, and decades of classification meant the public story of computing long omitted those cryptographic roots.
Once computers spread, the oldest practical bottleneck returned with new force: how two parties who have never met can share a secret safely. Asymmetric methods built on one-way mathematical functions answered that question and put strong encryption into ordinary hands. The shift turned a technical history into a political one—whether governments should be able to unlock private traffic at all—and left no clean mathematical resolution.
The arc closes by looking past computational hardness toward key exchange that relies on the laws of physics to announce any eavesdropper. Across the whole stretch, secrecy and its undoing keep reshaping decisive moments, and today’s privacy fights read as the latest turn of the same wheel.
Context
Singh published this popular narrative history in 1999 for general readers. The summary notes that some dramatic wartime claims remain disputed among historians, that the quantum chapter has aged unevenly, and that readers seeking rigorous theory or post-2001 surveillance policy will need other sources.
The key ideas
1
Discipline beats clever alphabets
A substitution cipher fails when users trust a compromised courier and ignore letter frequencies that Arab scholars had already exploited centuries earlier.
Looks strong
Elaborate substitution alphabet that seems to hide every letter
Actually breaks
Letter frequencies, short-word patterns, and a trusted courier already working for the other side
Singh opens on a plot carried in a monoalphabetic substitution cipher. The alphabet itself was not exotic; the decisive failures were human. A secretary doubling as an enemy agent and a codebreaker applying frequency counts turned the correspondence into evidence.
Natural language is uneven. In English the letter E dominates, short words repeat, and doubled letters leave patterns. A long enough ciphertext therefore leaks the structure of the plaintext once someone is patient enough to tally it. The forged postscript that followed the break simply widened the net.
The deeper claim is that real-world collapses are as often about tradecraft and misplaced trust as about pure mathematics. That lesson becomes the book’s engine: every later advance in codemaking will meet a matching advance in breaking, and human habits will keep supplying the openings.
In practice: In the 1586 Babington correspondence, frequency analysis plus a double agent exposed the assassination plan and led to the 1587 execution.
2
Reputation outruns the math
The Vigenère cipher stayed ‘unbreakable’ for roughly three hundred years mainly because no one had yet published a systematic way to find the repeating key’s length.
After simple substitution proved fragile, cryptographers moved to polyalphabetic methods. A repeating keyword shifts the alphabet for each letter, so the same plaintext letter can become many different ciphertext letters and ordinary frequency counts fail.
The system’s fame rested on an unsolved preliminary step: discovering how long the keyword is. Once that length is known, the ciphertext splits into separate simple ciphers that fall to ordinary tallies. Charles Babbage worked out the repeated-sequence method around 1854 but left it unpublished; credit later went to the 1863 publication by Friedrich Kasiski.
Singh treats the lag as a pattern, not an accident. Governments and individuals often hide breaking successes for advantage, so the public timeline of cryptography routinely trails the real one. The same gap will reappear with wartime and intelligence breakthroughs kept classified for decades.
In practice: Repeated ciphertext sequences let an attacker infer likely key lengths, after which each shifted alphabet is attacked on its own.
3
Codebreaking becomes a ministry
Once intercepted mail could swing diplomacy, European states turned cryptanalysis into standing rooms with budgets and specialists rather than lone cleverness.
- 1Stronger intercept capacityStanding rooms, trained staff, postal access
- 2Stronger codes requiredRivals harden ciphers against routine reading
- 3More breaking investmentBudgets and specialists expand to match
↻ and round again
Singh describes the Cabinets Noirs—black chambers in capitals such as Vienna—where officials opened, copied, resealed, and forwarded diplomatic letters while analysts worked the ciphers inside. The work was routine, not exceptional.
Institutional capacity changed the arms-race logic. Investment in breaking forced other states to field stronger codes, which then justified still more breaking investment. The telegraph intensified the pressure: anyone with line access could intercept, so cryptography left the narrow world of spies and entered broad commercial and military traffic.
By the twentieth century the function was inseparable from national-security infrastructure. That precondition explains the massive state-funded efforts that dominate the book’s middle chapters.
In practice: Vienna’s chamber systematically fed foreign diplomatic secrets to Austrian rulers through the eighteenth century.
4
One message tilts a war
Room 40’s handling of the Zimmermann Telegram showed that cryptanalysis is a strategic weapon whose value depends on when and how the secret is spent.
- 1Intercept and decryptRoom 40 reads the German diplomatic traffic
- 2Protect the sourceUse a deniable secondary copy from Mexico
- 3Publish for effectContents reach the American public without exposing the primary break
In 1917 British naval intelligence decrypted a German proposal that Mexico join against the United States in exchange for help reclaiming territory. The content was explosive; the dilemma was operational.
Revealing the plain text risked telling Germany its diplomatic cipher was readable. The solution was an intermediary copy obtained through a deniable channel in Mexico, so the message could be published while the primary break stayed hidden. American outrage followed, and the episode became one factor in the April declaration of war.
Singh’s point is double: breaking yields power, yet protecting the source can matter as much as the intelligence itself. The same tension returns at larger scale in the next war.
In practice: Publication of the telegram in American newspapers in early 1917 helped push the United States toward war with Germany.
5
Rotors turn language into search
Enigma replaced linguistic puzzles with combinatorial settings so numerous that only electromechanical search, fed by operator habits, could keep up.
Each keystroke stepped wired rotors and a plugboard, changing the substitution continuously. Brute force and manual frequency methods became hopeless. Poland’s Cipher Bureau, especially Marian Rejewski, first exploited mathematical properties of the daily settings and built early bomba devices.
In 1939, after Germany raised complexity, Poland shared its work with Britain and France. At Bletchley Park, Turing and Welchman refined bombe machines that used predictable phrases—weather reports, stock greetings—to shrink the search space. The break was never a single moment; new rotors and plugs forced constant escalation.
The resulting Ultra intelligence was guarded so tightly that, Singh notes, attacks were sometimes left uninterrupted rather than risk the source—an echo of the earlier telegram dilemma, now sustained across a whole war.
In practice: Predictable weather-report phrasing gave the bombes known plaintext anchors that narrowed otherwise astronomical settings.
6
Code war midwifes the computer
Colossus and Turing’s earlier universal-machine idea mean the digital revolution’s roots are entangled with cryptanalysis, not separate from it.
- 1936Turing describes a universal machine for any computation
- WWIIColossus breaks Lorenz at electronic speed
- 1970sBletchley achievements begin to be declassified
Bombe relays were still mechanical. Against the more complex Lorenz cipher used for high-level German traffic, Bletchley built Colossus, which tested settings with vacuum tubes at electronic speed. That leap prefigured general-purpose electronic computing.
Turing’s 1936 conception of a universal machine able to perform any computation given the right instructions supplied the conceptual base that later general-purpose designs drew on. Secrecy lasting until the 1970s left the public history of computing crediting other projects for advances that had earlier hidden roots in codebreaking.
Singh reframes the narrative: tools forged to win the code war became foundations of the information age, and the same machines that broke wartime ciphers would soon make classical methods obsolete and demand entirely new approaches.
In practice: Colossus used vacuum tubes to run cipher tests far faster than relay-based bombes, pointing toward electronic computing.
7
Secrecy without a prior meeting
Public-key cryptography removes history’s greatest practical weakness—the need to carry a shared secret key in advance—by splitting encryption and decryption across one-way math.
Shared-secret era
Both sides must first possess the same key; delivery itself is the vulnerability
Public-private era
Encrypt with a published key; only the matching private key reverses it
Every earlier system required both parties to possess the same secret before they could talk safely. Distributing that key over distance or under fire was always the soft spot. In the 1970s Diffie and Hellman, building on Merkle, proposed asymmetric keys: a public key anyone can use to encrypt, a private key only the recipient holds to decrypt.
The mechanism rests on trapdoor one-way functions—easy to compute, infeasible to reverse without special knowledge, such as factoring the product of two huge primes. Rivest, Shamir, and Adleman turned the idea into the 1977 RSA algorithm that still underpins much internet security.
Singh adds that GCHQ’s Ellis, Cocks, and Williamson had reached equivalent ideas earlier and kept them classified, so open credit went to the American researchers who published. The pivot is social as much as technical: strong encryption leaves the exclusive realm of states and becomes usable by ordinary people and businesses.
In practice: RSA lets a customer encrypt a transaction to a merchant’s public key so only the merchant’s private key can open it, with no pre-shared secret.
8
Encryption leaves the lab
Once PGP put military-grade public-key strength on civilian machines, the arms race became a values fight over whether any government should hold a master key.
Privacy case
Citizens, merchants, and dissidents keep traffic closed to everyone but the intended recipient
Access case
States want a lawful path into the same traffic; escrow offers a master key that itself becomes the prize
Phil Zimmermann’s 1991 release of Pretty Good Privacy gave anyone with a computer access to strong encryption. A U.S. criminal investigation followed under export rules that treated such software like munitions; the case was later dropped, but the fault line stayed.
Singh sets out the tension without a technical winner. The same strength that shields dissidents, bank details, and private talk also blocks lawful intercept of criminal or terrorist traffic. Key-escrow proposals—government or a trusted third party holding a copy of every private key—create a single repository that is an irresistible target for theft or abuse, undercutting the security the system claims to offer.
Unlike earlier chapters settled by a new algorithm or machine, this dispute is political. It will recur whenever enforcement power and civil liberties collide over fresh technology.
In practice: Key escrow’s central store of private keys becomes the point of failure an attacker or abuser only needs to hit once.
9
Physics as the final lock
Quantum key distribution does not hide a harder math problem; it makes eavesdropping detectable because measuring a quantum state in the wrong basis disturbs it.
Classical public key
Security rests on problems that are hard today but may yield to more powerful computers
Quantum key distribution
Any intercept attempt disturbs the quantum state and announces itself by physical law
Bennett and Brassard’s 1980s proposal, building on Wiesner, encodes key bits in quantum properties such as photon polarization. An interceptor who measures in the wrong basis alters the state, so the legitimate parties can spot the intrusion and discard the key.
This differs in kind from RSA-style security, which rests on the practical difficulty of factoring large numbers. A future quantum computer running Shor’s 1994 algorithm could factor those numbers efficiently and collapse much existing internet security overnight. Quantum key distribution claims immunity to raw computing power because the guarantee is physical, not computational.
By the book’s 1999 writing, short-distance experiments had already shown the principle. Singh presents the moment as a possible close to the historical arms race for key exchange: for the first time the defenders may hold an advantage the attackers cannot simply out-compute.
In practice: An eavesdropper measuring photon polarization wrongly leaves a detectable disturbance, warning the two parties before they trust the key.
Key terms
- monoalphabetic substitution One fixed mapping from each plaintext letter to a ciphertext letter; cracked by counting how often letters appear.
- frequency analysis Using the uneven letter rates of a natural language to recover a simple substitution alphabet.
- Vigenère cipher Polyalphabetic system that shifts alphabets with a repeating keyword so the same letter encrypts differently each time.
- Kasiski method Finding repeated ciphertext stretches to guess the keyword length, then splitting the message into simple ciphers.
- Enigma German rotor-and-plugboard machine that changed the substitution with every keystroke, creating a vast setting space.
- Ultra Allied intelligence product from broken high-level German ciphers, guarded so tightly that sources sometimes outweighed immediate warnings.
- public-key cryptography Asymmetric system with a published encryption key and a private decryption key, removing the need to share a secret in advance.
- RSA 1977 algorithm using the hard problem of factoring large prime products to realize public-key encryption.
- key escrow Policy of storing copies of private keys with a government or third party so authorities can unlock traffic—creating one high-value target.
- quantum key distribution Key exchange that encodes bits in quantum states so any measurement by an eavesdropper leaves a detectable disturbance.
What to do
- Audit one password or shared secret you reuse and replace patterns or insecure delivery with a unique secret.
- Turn on an end-to-end encrypted messaging app that uses public-key methods so private keys never travel.
- In any work debate over data access or backdoors, ask who would hold the master key and what fails when that store is breached.
- Read one current encryption policy proposal and map it onto the old arms-race pattern of stronger locks inviting stronger picks.
- Separate keys you must share from keys you can keep solely private, and stop sending the private ones over ordinary channels.
Questions to think with
- Where in your own tools is security actually resting on habit and trust rather than on the underlying math?
- If a state can read a cipher but dare not admit it, when should it spend the intelligence and when should it stay silent?
- Does key escrow’s single point of failure make the whole privacy-versus-safety trade-off unworkable, or is there a narrower design that avoids it?
- Would physics-guaranteed key exchange end the historical arms race, or would new attack surfaces simply open elsewhere?
- How much of any cryptographic history can we trust when successful breaks stay classified for decades?
The other side
The book is a Western-military anecdote tour that gives little space to non-Western traditions beyond a nod to Arab frequency analysis, almost no pre-digital civilian practice, and no way for the reader to know how much still-secret history is missing; some Bletchley impact claims remain disputed, the 1999 quantum optimism has not matched later niche reality, and the privacy debate is thinner than the post-2001 legal literature.
Who it's for
Curious general readers and students who want cryptography’s human and political story in one narrative thread. Readers needing formal proofs, exhaustive global history, or deep surveillance-law analysis will want additional sources.




