Skip to content

History of the Caesar Cipher

Almost everything we know comes from one short passage written over 150 years after Caesar’s death.

Bronze sculpture of the head of Julius Caesar wearing a laurel wreath, in profile against a black background
Sculpture of Julius Caesar. Photo: Pixabay
advertisement

Who invented the Caesar cipher?

Nobody knows. The cipher carries the name of Julius Caesar (100–44 BC) because he is the first person we know used it, in the 1st century BC. Whether he came up with it or borrowed it, no source says. The idea of swapping letters was already old: the Atbash cipher appears in the Hebrew Bible.

The evidence is thin, too. No encrypted letter by Caesar has survived. What we have is the Roman biographer Suetonius, writing around AD 121, who describes the rule in a single sentence: read D as A, and so on through the alphabet. That is a shift of three, the same one the Caesar cipher tool starts with.

Why did Caesar use a cipher?

Suetonius says Caesar wrote in cipher when he had anything confidential to say. A second writer, Aulus Gellius, mentions volumes of his letters to Gaius Oppius and Cornelius Balbus, who ran his affairs while he was away, with passages made up of single letters that formed no words. A grammarian named Probus even wrote a commentary on their secret meaning.

Caesar also knew the danger of a captured message. In his own account of the Gallic War, he sends a letter to the besieged Quintus Cicero “written in Greek characters”, so that the enemy would learn nothing if they intercepted it. That is a different trick from the shift, but it shows the same worry.

Was it secure at the time?

Probably, though we can’t measure it. No record survives of anyone in that period breaking a cipher of this kind, and many of the people who might have intercepted a letter could not read Latin at all. Today the same cipher falls in seconds to a brute force attack, because the Latin alphabet of his time allowed only 22 shifts.

Augustus and his shift of one

Caesar’s heir Augustus used a simpler version: each letter became the next one. He didn’t wrap around at the end of the alphabet, and wrote AA for X instead.

The panel at the top of this page uses the Latin alphabet of the time, which had no J, U or W. Suetonius doesn’t say what Caesar did at the end of the alphabet, so wrapping Z round to the start is a modern assumption. And “veni, vidi, vici” is simply a famous phrase of his: it isn’t a message we know he encrypted.

How the cipher was broken and replaced

The first surviving description of how to attack such ciphers comes from the Arab scholar Al-Kindi in the 9th century. Frequency analysis counts the letters of a message and compares them with the language, which reveals any fixed replacement, however it was made.

The answer was to change the shift as you go. Leon Battista Alberti described a cipher disk in 1467, a close relative of our cipher wheel. In 1553 Giovan Battista Bellaso published the method now wrongly named after Vigenère, which held until Friedrich Kasiski published a general attack in 1863. You can read more about this step in monoalphabetic and polyalphabetic ciphers.

The Caesar cipher in modern times

It has been used long after it stopped being safe. In 1915, the Russian army reportedly went back to it because its troops struggled with more complex ciphers, and German and Austrian codebreakers read the messages with little trouble. In 2006, Mafia boss Bernardo Provenzano was caught in Sicily partly because notes written in a variation of it were broken.

Its lasting role is more harmless. ROT13, a shift of 13, was used on Usenet to hide spoilers and punchlines, and the cipher is now a classic first exercise for people learning cryptography or programming. For today’s uses, see the Caesar cipher in modern technology.

Timeline

WhenWhat happened
1st century BCJulius Caesar uses a shift of three in confidential letters.
Around AD 121Suetonius describes the ciphers of Caesar and Augustus.
9th centuryAl-Kindi describes frequency analysis.
1467Alberti describes a cipher disk and a changing alphabet.
1553Bellaso publishes the method later called the Vigenère cipher.
1863Kasiski publishes a general attack on it.
1915The Russian army reportedly uses the Caesar cipher, and its messages are read.
1980sROT13 is used on Usenet to hide spoilers.
2006Broken messages help lead to the capture of Bernardo Provenzano.

Frequently asked questions

When was the Caesar cipher invented?

The exact date is unknown. Julius Caesar used it in the 1st century BC, which is the earliest record we have. The description of it dates from around AD 121.

Why is it called the Caesar cipher?

Because Suetonius recorded that Julius Caesar used it. The name doesn’t prove he invented it.

Did Caesar always use a shift of three?

A shift of three is the only one recorded for him. Since none of his encrypted letters survive, we can’t check whether he ever used another.

Sources

Keep going