Hidden Meanings
Secret Writing: A History of Codes, Ciphers and Codebreaking 🏆
Course 1 · Chapter 1 · Hidden Meanings
The Greek historian Herodotus tells of a man who shaved a servant's head, wrote a message on his scalp, waited for the hair to grow back and sent him on his way. When the servant arrived, the recipient shaved him again and read the order. It is a charming story, and a good one to start with, because it shows the oldest problem in the subject: how do you send a message so that only the right person can read it? This course follows that problem from antiquity to the eve of the modern computer. This first chapter sets out why people hide messages and gives you the handful of words you will need for the other eleven.
Why Hide a Message?
Almost every reason comes down to the fact that messages travel through hands you do not control.
War and statecraft
A messenger can be captured. Generals, kings and governments have always needed orders and reports to survive an enemy interception.
Trade and money
Merchants guard prices, routes and suppliers. Later, telegraph companies and banks protected payments.
Love, faith and dissent
Lovers, persecuted believers and conspirators have all used hidden writing because being discovered carried a heavy cost.
Play and prestige
Puzzles, riddles and secret alphabets have long been a game in themselves, and some secrets were kept simply to show that one had them.
Two Ways to Keep a Secret
There are two very different ideas, and the history of the subject is partly the story of how they have competed and combined.
| Steganography | Cryptography | |
|---|---|---|
| Hides | That a message exists at all | What the message says |
| Looks like | Something ordinary: a blank tablet, a harmless letter, a bare scalp | Obvious gibberish or odd symbols |
| Weakness | Once the trick is spotted, the message is simply read | An interceptor knows there is something worth breaking |
| Greek roots | "concealed" + "writing" | "hidden" + "writing" |
Herodotus also describes Demaratus, an exile, who warned Sparta of a Persian attack by scratching the message onto the wooden base of a wax writing tablet and then covering it with fresh wax, so that the tablet looked blank. Both stories are steganography: the secret lies in the hiding place. A cipher, by contrast, can be sent openly across a table, because the page is useless without the key.
The two combine well. A message can be enciphered and then hidden, so that an enemy must first find it and then break it. Much later in the course you will meet modern versions of both.
The Vocabulary
People often say "code" for everything. Historians and cryptographers do not, and the difference is useful from now on.
| Term | Meaning | Example |
|---|---|---|
| Plaintext | The readable message before it is hidden | ATTACK AT DAWN |
| Ciphertext | The scrambled form after enciphering | BUUBDL BU EBXO |
| Cipher | A rule that works on letters (or symbols), one by one or in small groups | Shift every letter one place along the alphabet |
| Code | A list that replaces whole words or phrases with other words, numbers or symbols | A codebook entry: PLUM means "attack at dawn" |
| Key | The piece of secret information needed to encipher or decipher | "Shift by one", or a keyword |
| Encipher / decipher | To scramble with, or unscramble with, the key | The sender enciphers; the recipient deciphers |
| Cryptanalysis | Reading a message without the key; codebreaking | An interceptor working it out |
A cipher and a code, side by side
Here is the same message treated both ways. The cipher shifts each letter one place on (A becomes B, B becomes C). The code replaces the whole phrase with a word agreed in advance.
The code is short and fast, but both sides need the same book, and it only covers the phrases someone thought to include. The cipher can say anything, but it is longer and, as you will see, easier to attack the more text it carries. Both remain in use together through most of the course.
Kerckhoffs's Idea, Early
One principle will keep coming back. A good system should still be safe if the enemy knows how it works and lacks only the key. Systems that depend on the method itself staying hidden tend to fail the day a clerk is captured or bribed. This idea is named after the nineteenth-century Dutch-born linguist Auguste Kerckhoffs, who stated it formally (check the exact wording and date), though people discovered it the hard way long before he wrote it down.
What the Course Covers
| Chapters | Theme |
|---|---|
| 2–3 | Ancient ciphers, and the Arab scholars who first broke them by counting letters |
| 4–6 | Renaissance cipher offices, the "unbreakable" cipher that was broken, and spymasters |
| 7–9 | Telegraph codebooks, rotor machines, and the wartime codebreakers |
| 10–11 | The Cold War, then the invention of public-key ideas |
| 12 | Unsolved puzzles, and how to make your own |
TFDSFU XSJUJOH
Show the worked answer
Move each letter back one: T→S, F→E, D→C, S→R, F→E, U→T gives SECRET; X→W, S→R, J→I, U→T, J→I, O→N, H→G gives WRITING. The plaintext is SECRET WRITING.
Exercises
Sort each of these into steganography, cipher or code: (a) a message written on a shaved scalp and hidden by regrown hair; (b) every letter replaced by the one two places further on; (c) a book in which "MAPLE" stands for "the shipment has left"; (d) a message written in lemon juice that appears only when heated; (e) a letter written in symbols that look like nonsense.
A tiny codebook says: PLUM = attack at dawn; CEDAR = hold the bridge; HERON = send more supplies. (a) Write the code message for "hold the bridge, send more supplies". (b) A friend decodes "HERON" as "send more". What goes wrong, and what does it say about the limits of codes compared with ciphers?
Read the first letter of each line of this note: "Carefully check the shed. / Isn't the door open? / Peter said nothing. / Hurry, please. / Every light was off. / Remember the gate." What is hidden in it? Is this steganography or cryptography, and why? Then write one innocent-looking sentence of your own that hides a word the same way.
Quick Reference
- Steganography: hides that a message exists (scalp, wax tablet)
- Cryptography: hides what a message says
- Cipher: works on letters; code: works on words and phrases
- Plaintext / ciphertext / key: the readable text, the scrambled text, the secret that links them
- Decipher vs break: with the key, or without it
- Check: the date of the shaved-scalp story, the exact wording and date of Kerckhoffs's principle
Next chapter: Ancient Secrets, which looks at the Spartan scytale, the Caesar shift and the Hebrew Atbash cipher, the first ciphers worked entirely by hand.