The Code Book · Simon Singh
Chapter Summary
6 min readChapter 1: The Cipher of Mary Queen of Scots Singh begins with the basics. Steganography hides the existence of a message, while cryptography hides its meaning. He then introduces substitution ciphers, including the Caesar shift, and shows how a codemaker's confidence can outrun reality. Arab scholars developed frequency analysis, which breaks simple substitution by counting how often each symbol appears and matching those counts to the letter frequencies of the language. The chapter's central episode is the plot to free the imprisoned Mary, Queen of Scots, from Elizabeth I. Mary and her conspirators trusted a cipher, but Elizabeth's spymaster, Francis Walsingham, had a skilled cryptanalyst, Thomas Phelippes, who read their letters. The evidence helped send Mary to her execution in 1587. The lesson is that a cipher can feel secure and still betray the person using it.
Chapter 2: Le Chiffre Indéchiffrable Codemakers respond to frequency analysis with polyalphabetic ciphers, which use several cipher alphabets so that one plaintext letter can become different ciphertext letters. The best known is the Vigenère cipher, whose reputation for strength earned it the French name of the chapter title, "the indecipherable cipher." Singh shows that it was not truly unbreakable. Charles Babbage cracked it in the mid-nineteenth century, though his work went unpublished, and Friedrich Kasiski independently published a method soon afterward. The chapter shows the arms-race pattern at work, with each advance by one side prompting a response from the other. It also touches on the unsolved Beale ciphers, which are said to point to buried treasure.
Chapter 3: The Mechanisation of Secrecy Telegraphy and radio made messages easy to intercept, which raised the stakes of encryption. Singh covers cryptography in the First World War, including the British codebreaking effort in Room 40 and the Zimmermann Telegram, whose decryption helped push the United States toward joining the war. He then turns to machines. Rotor-based cipher machines such as the German Enigma, developed by Arthur Scherbius, automated complex substitution and promised a level of security that hand methods could not match. This chapter sets up the next by explaining the machine that the Allies would later have to defeat.
Chapter 4: Cracking the Enigma This is the book's most famous codebreaking story. Singh explains how Enigma worked and why the number of possible settings seemed to make it impregnable. Polish mathematicians, led by Marian Rejewski, made the first breakthroughs by exploiting patterns in how operators sent message keys, and they built machines to help. As war approached, the Poles shared their work with the British. At Bletchley Park, Alan Turing and other codebreakers developed the methods and electromechanical machines that kept the Allies reading German traffic as the Germans changed their procedures. Singh stresses both the mathematical ingenuity and the way human mistakes, such as predictable message habits, gave the codebreakers their openings. The chapter also shows how secret intelligence can affect the course of a war.
Chapter 5: The Language Barrier Here Singh widens the subject from ciphers to languages. In the Second World War the United States used Navajo speakers as code talkers, relying on a language that was extremely obscure to outsiders and that the Japanese never broke. The second half of the chapter turns to the decipherment of lost scripts, which Singh treats as a kind of codebreaking. He discusses Egyptian hieroglyphs, where the Rosetta Stone and the work of Thomas Young and Jean-François Champollion were central, and Linear B, which Michael Ventris deciphered. The chapter shows that the techniques of cryptanalysis, such as pattern-spotting and inference from partial evidence, apply well beyond military secrets.
Chapter 6: Alice and Bob Go Public This chapter marks the book's turn to modern cryptography. Until the 1970s every cipher faced the key distribution problem, since sender and receiver had to share a secret key in advance, and that was a serious obstacle as computers and communication networks grew. Whitfield Diffie, Martin Hellman and Ralph Merkle worked toward a solution. Rivest, Shamir and Adleman then devised RSA, a practical public-key system in which anyone can encrypt with a public key but only the holder of the private key can decrypt. It rests on one-way mathematical functions, notably the difficulty of factoring very large numbers. Singh uses Alice and Bob, the standard cast of characters in cryptography, to explain the ideas. He also reveals that researchers at Britain's GCHQ, including James Ellis, Clifford Cocks and Malcolm Williamson, had arrived at similar ideas earlier but could not publish them because their work was classified. Public-key cryptography is what makes secure transactions over the Internet possible.
Chapter 7: Pretty Good Privacy Once strong encryption became possible for ordinary people, a political question followed: should governments be able to limit it? Singh follows Phil Zimmermann, who wrote the PGP program to give individuals strong, practical encryption. Zimmermann believed this was a defense of personal privacy, while governments and law enforcement worried about criminals and national security. The chapter covers the conflict over export controls and the legal trouble that followed PGP's spread, along with proposals that would give authorities some way to read encrypted messages. It also introduces digital signatures and the wider problem of trust and authentication. The debate over privacy versus security that Singh describes has continued ever since.
Chapter 8: A Quantum Leap into the Future The final chapter looks ahead. Singh describes two quantum possibilities. The first is the quantum computer, which in principle could perform certain calculations, including the factoring on which RSA depends, far faster than any ordinary machine. That would threaten public-key systems in use today. The second is quantum cryptography, which uses the properties of quantum particles so that an eavesdropper's interference with a message can be detected. Singh presents it as a possible route to a truly unbreakable system, though he also notes that history is full of ciphers once thought secure. Because the book dates from 1999, students should treat this chapter as a snapshot of the field at that time rather than a current survey. Later work on cryptography designed to resist quantum attack falls outside its scope.
The Cipher Challenge At the end of the book Singh sets readers a series of ten encrypted messages of increasing difficulty, with a prize for the first person to solve them all. The challenge turns the book's history into practice, since solving the stages requires the same methods Singh has described, from frequency analysis to attacks on more advanced systems.
Study tip When reading, keep track of the cycle that structures the book: a cipher is created, trusted, attacked, broken, and replaced by something stronger. Asking at each stage who gained or lost from the result, whether Mary, the Allies, the Navajo, or the users of modern encryption, will help you see why Singh argues that cryptography has shaped history.
