A short, true history of codes, codebreakers, and the cipher you'll teach this week.
Read this before Lesson 1 · ~12 minutes
For as long as people have had secrets, other people have tried to read them. The history of codes is really the history of a single, unbroken argument between two kinds of clever: the codemaker, hiding a message, and the codebreaker, determined to drag it back into the light. It is a war that has toppled queens, tipped world wars, and — almost as a side effect — built the computer.
You don't need to tell your students all of this. But carrying it into the room is what turns "shift the letters along the alphabet" into something bigger: you are joining a two-thousand-year-old war. This briefing is for you — the backstory behind the lesson, and then the lesson's own little cipher, taken apart.
Part One
Make & Break
A history of secrets in seven episodes — and a pattern that repeats every single time.
Baghdad · around 850 CE
1 · The first codebreaker
For a long time, hiding a message felt safe enough. Swap every letter for a different symbol, and the result is gibberish — who could possibly untangle that? Then, in ninth-century Baghdad, a polymath named al-Kindi wrote a short treatise, On Deciphering Cryptographic Messages, and quietly ended the age of easy secrets.
His trick was almost insultingly simple. In any language, some letters turn up far more often than others — in English, E is everywhere; Q and Z are rare. Scrambling which symbol stands for E doesn't change how often it shows up. So you count the symbols in the secret message, find the commonest one, and you've very probably found E. Repeat, and the message peels open like an orange. Al-Kindi had invented frequency analysis — and, with it, the codebreaker.
The pattern beginsThe instant someone could read a "scrambled" message, every simple cipher was living on borrowed time. Keep this in mind — it's exactly why the cipher you'll teach is so easy to crack.
England · 1586
2 · The cipher that killed a queen
Mary, Queen of Scots, had been Elizabeth I's prisoner for nearly nineteen years when a young nobleman named Anthony Babington wrote to her with a plan: murder Elizabeth, free Mary, and put her on the English throne. They wrote in a cipher of sixty-four symbols, and smuggled the letters in and out of Mary's prison hidden inside the bung of a beer barrel. Mary trusted it completely. She wrote back, in code, approving the assassination of a queen.
What she didn't know was that Elizabeth's spymaster, Sir Francis Walsingham, had arranged the beer barrel himself. Every letter crossed the desk of his cryptanalyst, Thomas Phelippes, who read the cipher as easily as a newspaper. Phelippes even forged a postscript — in Mary's own cipher — asking Babington to helpfully name his fellow conspirators.
She wrote back, in code, approving the murder of a queen.
Mary's coded letter was her death warrant. She was beheaded in February 1587 — by most accounts the first person in history executed because someone broke her cipher.
The lessonA cipher is only as safe as your belief in it is correct. Mary's confidence was total. It was also fatal.
Europe · 1500s–1863
3 · The cipher that couldn't be broken (for 300 years)
Frequency analysis had a weakness of its own: it only works if each letter is always disguised the same way. So cryptographers built a cipher where it isn't. The Vigenère cipher uses a keyword to change the shift for every letter — so an E might become R in one place and K three letters later. Counting frequencies gets you nothing but a headache.
For three centuries it was admiringly called le chiffre indéchiffrable — "the indecipherable cipher." It was, of course, eventually deciphered. Around 1854, the British inventor Charles Babbage — the man who designed the first mechanical computer — was needled by a stranger's boast of an "unbreakable" cipher, and cracked Vigenère to prove him wrong. Typically, he never bothered to publish. The credit went instead to a retired Prussian officer, Friedrich Kasiski, who printed the same method in 1863. The key move: spot repeated chunks in the ciphertext, and the gaps between them quietly betray the length of the keyword — at which point the whole thing falls apart into a little stack of simple shift ciphers you already know how to crack.
The pattern, again"Unbreakable" is a marketing claim, not a mathematical one. Every cipher in this story was once called unbreakable.
1917 · the First World War
4 · The telegram that pulled a country into a war
In January 1917, Germany's foreign minister, Arthur Zimmermann, sent a secret coded telegram with an audacious offer for Mexico: join Germany against the United States, and when the war is won, take back Texas, Arizona, and New Mexico. He assumed no one was listening.
But British naval intelligence ran a unit so secret it was known only by its room number — Room 40 — and it had been quietly reading German diplomatic traffic for years. Within a day, the codebreaker Nigel de Grey had unravelled enough to grasp what he was holding. Britain now faced a delicate problem: revealing the telegram would tell Germany its codes were broken. So they staged a quiet deception to make it look as though the message had leaked in Mexico, then slid it to President Wilson. The American public was outraged; within weeks the United States entered the war. A few hundred decrypted characters had helped tip the course of history.
The stakesOne broken message can be worth an army. Codebreaking isn't a footnote to history — now and then, it is the history.
1932–1945 · the Second World War
5 · The machine, the misfits & the birth of the computer
The Enigma machine — a keyboard wired through a shifting maze of rotors.
By the Second World War, the Germans had stopped trusting humans with their secrets and handed the job to a machine: Enigma. It pushed each letter through a shifting tangle of rotors, with so many possible settings that guessing the right one was, for all practical purposes, impossible. The Germans were certain it was unbreakable. (You will have noticed a pattern by now.)
The first cracks came not from Britain but from Poland, where a young mathematician, Marian Rejewski, and his colleagues broke Enigma in the 1930s — and built a code-breaking machine they nicknamed the bomba. As war closed in, they handed everything they had to Britain and France. At a country house called Bletchley Park, a gloriously odd team of mathematicians, chess champions and crossword fanatics — among them Alan Turing — took the Polish work further and built the Bombe, a machine that could rip through Enigma settings faster than any room full of humans.
Historians reckon their work shortened the war by around two years and saved millions of lives. And here is the twist that matters most to us: to out-think a machine, Turing first had to imagine a machine that could be told to do anything at all — the idea sitting at the heart of every computer you have ever used.
Codebreaking didn't just win a war. It invented the future.
Why your students should careThe computer they'll prompt this module is, in a real and direct sense, a grandchild of the codebreakers.
the twentieth century
6 · The only truly unbreakable code (and why nobody uses it)
There is exactly one cipher proven, mathematically, to be unbreakable: the one-time pad. Use a key that is completely random, as long as the message itself, and never reused, and the coded text gives an eavesdropper nothing — every possible message is equally likely. Perfect secrecy, guaranteed.
The catch is brutal. You need a fresh, truly random key as long as everything you will ever send, and you must somehow deliver it to the other person in secret first. If you could reliably do that, you wouldn't need the cipher at all. Perfection, it turns out, is gloriously impractical.
The grown-up truthReal security is almost never about a "perfect" code. It's about making the cost of breaking it larger than the prize inside.
the 1970s · and right now
7 · The padlock you can hand to a stranger
Every cipher so far shares one stubborn problem: both people need the same secret key, and somehow that key has to be exchanged privately first. For thousands of years, this was simply assumed to be unavoidable. Then, in the 1970s, a handful of mathematicians had an idea that sounds impossible — a lock you can hand out freely, that only you can open. Anyone may snap your padlock shut around a message; only you hold the key to open it again. No shared secret. No private meeting. (Astonishingly, British codebreakers at GCHQ had invented the same thing in secret years earlier, and weren't allowed to say so until 1997.)
This is not history. It is the little padlock in your browser, the "end-to-end encrypted" banner on your students' group chats, the invisible thing guarding their parents' bank logins this very second. The two-thousand-year war is still running. It has just gone quiet, and fast — billions of times a second.
The answer to "when would I use this?"Every time they tap a padlock icon. Your students already live inside this story — they've just never been shown the door.
Notice the rhythm running through all seven: every "unbreakable" code in this story was, in the end, broken — usually by someone clever, stubborn, and badly underestimated. That is the real thing to carry into the room. Not that codes are safe, but that codebreaking is a craft, and a genuinely thrilling one. Which brings us, at last, to the little cipher you're actually going to teach.
Part Two
The Caesar Cipher
The simplest real cipher in history — and the perfect first rung for a young codebreaker.
Rome · around 50 BCE
Where it comes from
Two thousand years before Bletchley, Julius Caesar had the same problem as everyone in this briefing: how to send an order the enemy couldn't read if the messenger was caught. His solution, recorded by the Roman historian Suetonius, is about as simple as a cipher can be — shift every letter three places down the alphabet. A becomes D, B becomes E, and so on. To his enemies, his battle orders looked like pure nonsense.
His successor, the emperor Augustus, used a gentler version — a shift of just one. Charmingly, he never quite mastered the end of the alphabet: where the rule should have looped Z back round to A, he simply wrote "AA" instead. (Your ten-year-olds will handle the wrap-around better than the first Roman emperor did.) The same idea has a famous modern cousin, ROT13 — a shift of thirteen, still used online to hide spoilers and punchlines. Thirteen is special: because the alphabet has 26 letters, shifting by 13 twice lands you exactly back where you started. Encoding and decoding become the very same move.
How it works
Strip away the history and the Caesar cipher is a single move: slide every letter the same number of places along the alphabet. That number is the entire secret.
The only wrinkle lives at the end of the alphabet. Shift X by three and you'd run clean off the edge — so the alphabet loops: after Z, you arrive back at A. The trick is to picture the 26 letters not as a line but as a ring. That single idea — the wrap-around — is the one thing students find genuinely surprising, and the thing the teaching aid below is built to show.
plaintext
the real message, before it's hidden
ciphertext
the scrambled, coded version
shift / key
how many places each letter moves (1–26) — the secret
encrypt
shift forward, to hide a message
decrypt
shift back, to read it
wrap-around
past Z, the alphabet loops back to A
Play with it
Here's the machine, for you. Type a word, drag the shift up and down, and flip between encode and decode. Watch the strip at the bottom — the letters in red are the ones that have wrapped past Z and back to the start.
The secret you keep to yourself
Here is the thing to hold quietly in mind as you teach: the Caesar cipher is hopeless. There are only 25 possible shifts, so a codebreaker can simply try them all — by hand, in a couple of minutes. And even that is overkill, because al-Kindi's thousand-year-old frequency analysis cracks it almost instantly. For your purposes that isn't a flaw; it's the whole point. A cipher weak enough for a child to break by hand is the perfect doorway into a craft that runs all the way up to the code protecting their pocket.
The frame for the roomYou're not teaching a secure code. You're teaching the first rung of a ladder whose top rung is the modern internet — and letting them feel, for an afternoon, like the clever, stubborn, underestimated people who break things open.
Build your own presentation
The lesson's images — a starter canvas
The five key images from this briefing — WhatsApp, the padlock, the Enigma machine, the Caesar wheel and more — dropped onto a blank Excalidraw canvas. Open it, then build the lesson your way: arrange them, write on them, and tell the story in your own voice.