Top Secret
Chapter 1

Ancient Secrets

Long before computers, generals and spies were already hiding their words. Meet the very first ciphers — a sliding alphabet, a message that only makes sense wrapped around a stick, and the clever mind who invented code-breaking itself.

This chapter teaches the Caesar cipher.

### Caesar's Secret Shift

Ancient Secrets · Caesar

Julius Caesar had a massive problem. In the first century BCE, his military campaigns stretched across the world. He constantly sent runners through enemy territory carrying highly sensitive orders. If a messenger was captured, Caesar’s battle plans were ruined. He needed a way to make his letters look like complete gibberish.

His solution was brilliantly simple: he just slid the alphabet forward. Caesar chose a shift of exactly three steps. If he wanted to write an A, he counted three letters down and wrote a D. A B became an E, and a C became an F.

When he reached the end of the alphabet, he just wrapped it around like a circle. An X, Y, or Z looped back to become an A, B, or C. To read the message, his generals simply shifted every letter three spaces backward.

You might think shifting three letters is a terrible way to hide a secret. Today, it is! But back then, most of Caesar's enemies couldn't read at all. Even the few who could had never seen a substitution cipher. That simple shift was all he needed.

The Caesar Shift
Shift +3
plainABCDEFGHIJKLM
secretDEFGHIJKLMNOP
plainNOPQRSTUVWXYZ
secretQRSTUVWXYZABC
message
MEET ME AT THE FORUM
secret
PHHW PH DW WKH IRUXP
Slide every letter three steps forward to hide it. Slide three steps back to read it.
A grinning Roman general in a red cloak leans in to whisper to a young scribe, while a big brass wheel with two rings of glyph-marks floats and glows between them; a rolled scroll and a small oil lamp sit nearby, and cyan light catches the marks as they seem to slide around the wheel.

Caesar hands off a scrambled order — Rome, around 50 BC.

### How to Crush a Caesar Cipher

Ancient Secrets · Cracking It

Julius Caesar might have conquered the ancient world, but his famous cipher has a massive, glaring weakness. If you intercept a scrambled Roman message, you don't need advanced mathematics or a captured spy to read it. You just need a little patience.

The secret to beating this code is recognizing its limit. Because there are only twenty-six letters in the alphabet, there are only twenty-five possible ways to shift them. That means there are exactly twenty-five possible keys to the entire system.

Code-breakers call this a "brute force" attack. You don't look for clever clues—you just kick the door down. Take the first scrambled word of the message and shift its letters backward by one space. If it is still gibberish, shift it by two. Then three.

Long before you test all twenty-five shifts, a normal, readable word will magically appear on your page. The Romans got away with this trick because most of their enemies couldn't read at all. Today, busting it open is the ultimate code-breaking superpower.

Only 25 Ways to Slide
Shift +5
plainABCDEFGHIJKLM
secretFGHIJKLMNOPQR
plainNOPQRSTUVWXYZ
secretSTUVWXYZABCDE
message
TRY EVERY SHIFT
secret
YWD JAJWD XMNKY
A Caesar cipher has just 25 real shifts. A patient code-breaker can try them all until words appear.

### The Scrambled Spartan Stick

Ancient Secrets · Scytale

In ancient Sparta, during the 5th-century BCE Peloponnesian War, military commanders needed to send secure messages. Instead of swapping letters for different ones, they invented a clever way to jumble the order of the letters using a wooden rod called a scytale.

A sender spiraled a long, narrow strip of leather tightly around the wooden stick, leaving no gaps. They wrote their secret message straight across the rod. When they unwound the strip, the letters transformed into a meaningless, scrambled mess.

The Roman writer Aulus Gellius noted that the unwrapped leather looked like random ink smudges because the letters were physically broken up! To read it, the receiver just wrapped the leather around an identical stick of the exact same thickness. The broken ink perfectly realigned.

While famous as history's first transposition cipher, modern historians debate its practical battlefield use. If an enemy intercepted the leather strap, they didn't need a math degree to crack it—they just had to test different-sized sticks until the letters lined up!

A Spartan messenger in a crested helmet grins as he winds a long thin paper strip in a neat spiral around a wooden staff; hanging loose the strip is a jumble of marks, but wound on the rod the marks line up into a tidy glowing column; a second soldier holding an identical rod watches, amazed.
The Spartan scytale: readable only when it is wound just right.

### The Polybius Fire Grid

Ancient Secrets · Polybius

In ancient Greece, a historian named Polybius documented a brilliantly simple way to send messages across miles of empty space. This system didn't need a messenger on horseback. It just needed a mountaintop, a sharp-eyed scout, and two fistfuls of blazing torches.

The trick is a five-by-five grid, like a checkerboard. You number the five rows down the side, and the five columns across the top, then fill the boxes with the alphabet. To send a letter, you just find its box and transmit its row and column numbers.

Instead of ink, ancient soldiers used fire. A scout held up torches on his left side for the row number, and torches on his right for the column number. By flashing these number pairs, they could spell out entire warnings from mountain to mountain.

Centuries later, this exact same mathematical grid helped captured soldiers survive. Prisoners of war realized they didn't need torches to send number pairs. They just needed a wall. They tapped out the row and column numbers, knocking secret messages right under their guards' noses.

### The Math That Broke Every Code

Ancient Secrets · Code-Breaking

For hundreds of years, generals thought substitution ciphers were basically magic. If you swapped letters for new symbols, your secrets were perfectly safe! But in 9th-century Baghdad, a brilliant polymath named Al-Kindi working at the House of Wisdom shattered that illusion forever.

Al-Kindi realized that language leaves a mathematical fingerprint. Even if you disguise a written message, you cannot hide how humans actually talk. In English, the letter E is everywhere, showing up about 13 percent of the time.

He figured out that a substitution code doesn’t change a letter’s frequency. If a spy swaps E for a squiggly line, that squiggly line will still be the most common symbol on the page. To crack the code, you simply have to count.

Match the most common secret symbols to the most common regular letters, and the message begins to unravel. With this single realization, Al-Kindi invented the science of frequency analysis—and the modern art of code-breaking was officially born.

### The Disk That Scrambled Everything

Ancient Secrets · Cipher Wheel

In 1467 Rome, a Renaissance architect named Leon Battista Alberti had a problem. The brilliant statistical tricks invented by Al-Kindi had made old codes like the Caesar shift too easy to bust. Codebreakers just counted letters to find the secret message. Alberti needed a code that could fight back.

His solution was a brilliant mechanical gadget made of two copper plates. The outer plate held a normal alphabet, and the inner wheel held a scrambled one. By pinning them together in the center, Alberti created a code machine that could spin.

To write a message, you line up the wheels and encode a few words. But here is the genius part: right in the middle of a sentence, you spin the inner wheel to a totally new position and keep writing.

By rotating the disk, you completely change the secret alphabet mid-message. The letter 'E' might be a 'Q' in the first sentence, and an 'M' in the next. Letter counting becomes useless, making this spinning wheel a codebreaker’s worst nightmare.

The Cipher Disk
Shift +4
plainABCDEFGHIJKLM
secretEFGHIJKLMNOPQ
plainNOPQRSTUVWXYZ
secretRSTUVWXYZABCD
message
SPIN THE WHEEL
secret
WTMR XLI ALIIP
Turn the wheel to pick your shift. Here the wheel is set to four steps.