The Code Book book cover
Math & Data

The Code Book

The Science of Secrecy from Ancient Egypt to Quantum Cryptography

by Simon Singh

First published 1999432 pages

What it’s about

The Code Book tells the history of secret writing as a contest between code makers and code breakers. Simon Singh moves from ancient ciphers through the Vigenere cipher, Mary Queen of Scots, Enigma and the invention of public-key encryption, finishing with quantum ideas.

Read it if

You use encryption every day and want to understand where it came from and what keeps it safe, without needing any advanced math.

Skip it if

You want a technical guide to modern cryptography, because the later chapters stay at the level of ideas instead of formal proofs.

Key ideas

  1. Every cipher that seemed unbreakable was eventually broken, which turned secrecy into a cycle where each advance by code makers is answered by a better attack.
  2. Breaking the Vigenere cipher required spotting repeated patterns and key length, a method that shows how frequency analysis grew into a general method of attack.
  3. Public-key cryptography solved the old problem of sharing a secret key in advance, which is the idea that allows strangers to communicate safely over open networks.

Our take

The Code Book works because Singh tells the history of cryptography as a series of arms races between codemakers and codebreakers. Each chapter covers a different era: ancient ciphers used by Julius Caesar, the Vigenere cipher that was considered unbreakable for 300 years, Mary Queen of Scots whose encrypted letters were decoded and used to convict her of treason, the Enigma machine that Germany used in World War II, and the development of public-key cryptography in the 1970s.

The Enigma chapters are the most gripping. Singh describes how Polish mathematicians first cracked the Enigma code, how their work was passed to British codebreakers at Bletchley Park, and how Alan Turing and his team built machines to decrypt German messages at a scale that may have shortened the war by years. The human stakes give the mathematics weight: getting the decryption right meant saving convoys from submarine attacks.

The chapters on public-key cryptography explain how Whitfield Diffie and Martin Hellman solved a problem that had stumped cryptographers for centuries: how can two people communicate securely without meeting in advance to exchange a secret key? Their solution, and its parallel discovery by the British intelligence agency GCHQ, is one of the intellectual achievements of the 20th century and the basis for all secure internet communication today.

Singh writes for readers who have no background in mathematics. He explains the concepts step by step, using analogies and diagrams. The result is a book that teaches you how encryption actually works, not just what it does.

For founders, especially those building products that involve user data, payment systems, or communication, understanding cryptography at a conceptual level is useful. You do not need to implement algorithms yourself, but knowing the principles behind the security infrastructure you depend on helps you make better architectural and product decisions.

At about 400 pages, the book is engaging throughout. Singh has a talent for making technical subjects readable without dumbing them down. The historical approach means you learn the science in context, which makes it stick.

Appears in

One good book a week

The most-recommended new pick, who recommended it and why. Every Friday.

Subscribe