Secret codes

The Caesar cipher

Date: c. 50 BCPlace: Rome (Italy)Who?: Julius Caesar

Shifting the alphabet by three letters: the most famous cipher in history

Substitution ciphers
Julius Caesar
Julius Caesar — an ancient bust
Wilfredor Alternative names Wilfredor — CC0 — Wikimedia Commons

In brief

According to the historian Suetonius, Julius Caesar wrote his confidential letters by replacing each letter with the one three places further on: D for A, E for B… Simple and quick, this cipher is also very easy to break: there are only 25 possible shifts.

The story

In his “Lives of the Twelve Caesars”, written in the 2nd century, Suetonius says that when Caesar had something secret to send, he changed the order of the letters so the words could not be read, writing D for A and so on. His successor Augustus used a shift of just one letter. At a time when few people could read, this was probably enough to put off the curious.

Today, any shift of the alphabet is called a “Caesar cipher”, whatever the number of places. To break it, you just try the 25 possible shifts and look for the one that gives readable text. On the internet, “ROT13”, a shift of 13, is still used to hide the end of a film or the answer to a puzzle.

Example

CAESAR → FDHVDU (shift of 3)

Try it in the workshop

Did you know?

With a shift of 13, encrypting and decrypting are the same thing, since the alphabet has 26 letters: that is the trick behind ROT13.

Sources: D. Kahn, The Codebreakers, 1967 (rev. ed. 1996); S. Singh, The Code Book, 1999; F. L. Bauer, Decrypted Secrets, 4th ed., 2007; C. P. Bauer, Secret History: The Story of Cryptology, 2nd ed., 2021; texts written for this site.

In the same family: Substitution ciphers