Phronesis
No. 019Concept1st century BCHistory ·Mathematics ·Technology ·Internet Culture

Julius Caesar’s secret code (and why it failed)

Caesar hid messages by shifting each letter three places. It worked until a 9th-century scholar invented a way to break any cipher like it.

2 min read

According to the Roman historian Suetonius, Caesar wrote sensitive letters by replacing each letter with the one three places later: A→D, B→E, and so on.

Plain:   VENI VIDI VICI
Cipher:  YHQL YLGL YLFL

How it was broken

There are only 25 possible shifts, so you can simply try them all. But the deeper break came in 9th-century Baghdad. The polymath Al-Kindi observed that in any language some letters are much more common than others. Count the symbols in a long ciphertext, match the most frequent to the most common letters of the language, and the message emerges.

Frequency analysis defeats every simple substitution cipher, however scrambled the alphabet. Cryptographers spent the next thousand years inventing ways to hide letter frequencies, and other people kept finding ways to break them.

Its internet afterlife

On Usenet in the 1980s, people hid spoilers and punchlines with ROT13, a shift of 13. Because the alphabet has 26 letters, applying it twice gives back the original. It is not meant to keep secrets, only to stop you reading something by accident.

Follow the thread

You might also find interesting