How did Julius Caesar keep his letters secret by shifting the alphabet?
Caesar's code had a secret you could count on your fingers: a single number from 1 to 25. That is also why anyone can crack it in a minute.
▶ Start the storyJulius Caesar hid his military messages with one of the simplest codes there is: swap every letter for the one three places further along the alphabet, so A becomes D and E becomes H. That is how the Roman historian Suetonius describes it. The reader slides every letter back by three and the message appears. Today it is called a Caesar cipher: a substitution cipher where each letter is replaced by one a fixed number of positions along.
Step 1: Write the message
Each letter is looked up in the plain alphabet
Step 2: Slide each letter three places
A becomes D, E becomes H: the shift is the key
Step 3: Send the scrambled text
Only someone who knows the shift reads it at a glance
Step 4: Slide each letter back
The receiver reverses the shift to read it
The whole secret is one number, and that is its weakness. In English there are only 25 possible shifts, so an enemy can try them all and keep the one that reads as real language. Take the scrambled text exxegoexsrgi: the shift of four turns it into attackatonce, and none of the other tries makes any sense. Nobody knows how well the cipher fooled Caesar's rivals, because there is no record of how Romans solved simple substitution ciphers. The earliest surviving records date from the 9th century, when Al-Kindi discovered frequency analysis.
The idea refuses to die anyway. Suetonius writes that Caesar's nephew Augustus used a shift of just one, and didn't even wrap the alphabet around: he replaced Z with AA. In 1915 the Russian army used a Caesar cipher because its troops found harder ciphers difficult to master, and German and Austrian codebreakers had little trouble reading the messages. In 2006 the Mafia boss Bernardo Provenzano was captured in Sicily partly because some of his messages, clumsily written in a variation of the cipher, were broken. And you can still find it in children's secret decoder rings.
25
Quiz me
0/3
Recap
A Caesar cipher hides messages by sliding every letter along the alphabet, but with only 25 possible shifts the secret can be found by trying them all.
💡 A trick to remember it · A lock with only 25 possible combinations isn't a lock, it's a quick game of try-them-all.
Surprising fact · A Mafia boss was captured in 2006 partly because his messages were written in a clumsy variation of Caesar's cipher.
Sources (2)
No source, no claim. Every fact in this lesson (17 claims) cites at least one of these.