Notes on cryptography and information theory

A short history of the Caesar cipher

Entry 002 · 2026-02-08

Suetonius writes, in his life of Julius Caesar, that the dictator used a shift-by-three substitution on his private correspondence. The cipher is therefore older than its name, and it would not have surprised its inventor that we are still calling it by his name two thousand years later: the construction is the smallest possible non-trivial substitution cipher, and small things are remembered.

As cryptography, the cipher is broken before you write it down. The keyspace has 25 elements (we ignore the identity shift), and any sufficiently long message in a natural language fixes the key by frequency analysis on a single common letter. What is interesting is that the cipher keeps being rediscovered in slightly disguised forms, often by people who did not set out to encrypt anything.

ROT13, the most famous modern descendant, is not a cipher in the security sense; it is a notational convention for marking text that the reader should be able to opt into reading. The choice of 13 makes ROT13 self-inverse on the 26-letter alphabet, which is the actual feature being sought.

The pedagogical use of the Caesar cipher is well-justified. It is the smallest example of a key-dependent function in cryptography, and it illustrates Kerckhoffs's principle in the negative: the algorithm is fully known, the key is one of 25 obvious choices, therefore security is zero. The construction makes the principle land more cleanly than any modern example could, because students can immediately verify the break by hand.