In the winter of 54 BCE, a javelin flew into a besieged Roman camp in Gaul with a letter tied to it. The camp was commanded by Quintus Tullius Cicero, brother of the famous orator, and enemy forces had surrounded it so thoroughly that getting a message through had become dangerous. Caesar eventually learned of the siege from a messenger who slipped out, then sent a Gallic cavalryman back with his reply. If he couldn't get close enough to deliver it safely, Caesar instructed him to fasten the letter to a javelin and throw it into the camp. The plan worked, although the javelin lodged in a tower and went unnoticed for two days before a soldier finally spotted it.
The letter told Cicero that Caesar was already marching to his aid with the legions, giving the trapped Romans a much-needed morale boost. Caesar also mentioned one precaution that makes the story especially interesting today. He had written the message using Greek characters so that an enemy who intercepted it wouldn't immediately be able to read Roman plans.
That particular letter isn't necessarily an example of the three-letter shift we now call the Caesar cipher. The famous description of that method comes from Suetonius, writing much later. However, the two accounts together show that Caesar was already thinking seriously about how to keep intercepted military correspondence from being easily understood.
The trick was almost insultingly simple
Shift every letter by three, and call it done
We know the method because the Roman biographer Suetonius recorded it in The Twelve Caesars, roughly 150 years after Caesar's death. In his account, Caesar handled confidential correspondence with a simple substitution system that replaced each letter with one three places farther along in the alphabet. It's an early, extremely simple example of how a cipher turns readable plaintext into ciphertext.
Suetonius uses D in place of A as his example, which gives us the contemporary pattern where A becomes D, B becomes E, and Z eventually loops back around to C. Caesar's Latin alphabet was not identical to the one we use today, so the A-to-Z version is really a modern illustration of the same basic method.
You can see why the system was useful. Once both sides knew the shift, a message could be written and decoded entirely by hand, with no special device or complicated reference table. It would not hold up against anyone determined to analyze the text, but an intercepted letter no longer gave up its meaning at a glance. For military correspondence moving through hostile territory, even that small barrier could be useful.
You can still try Caesar's cipher in your head
Two thousand years later, pencil and paper will do
Let's do a little exercise, shall we? Take a message as simple as ATTACK AT DAWN. With Caesar's traditional shift of three, every letter slides three spots forward in the alphabet, so A becomes D, T becomes W, C becomes F, and the full message comes out as DWWDFN DW GDZQ. In modern terminology, ATTACK AT DAWN is the plaintext, DWWDFN DW GDZQ is the ciphertext, and the shift acts as the key.
Once you know the shift, reversing it is just as mechanical. Move every letter three places backward and the original sentence comes straight back. That's part of what made the scheme practical, since the sender and recipient only had to remember the agreed shift and apply the same rule consistently.
The weakness becomes obvious just as quickly. Someone who suspects a Caesar shift doesn't have an enormous mystery to solve. Using the modern 26-letter alphabet, there are only 25 nontrivial possibilities, so an interceptor can try each one until recognizable words appear. DWWDFN DW GDZQ looks like gibberish under most shifts, but three steps backward immediately produces ATTACK AT DAWN. Modern software can test every option in a blink, though even with pencil and paper, a short Caesar-shift message is hardly an archaeological dig.
His heir kept the habit going
Augustus had his own version of the trick
Caesar's adopted heir Augustus apparently used a similar system. Suetonius says that when Augustus wrote in cipher, he substituted the next letter of the alphabet for the one he actually meant, so A became B and B became C. His version also had a strange wrinkle near the end of the alphabet. Rather than wrapping around in the neat circular fashion used in modern Caesar-cipher demonstrations, Suetonius says Augustus wrote AA in place of X.
That little quirk is useful because it shows that letter-by-letter substitution wasn't some one-off habit unique to Caesar. We know about both systems because Suetonius recorded them much later, leaving us with unusually specific glimpses of how two Roman rulers tried to make sensitive correspondence a little harder for unintended readers to decipher.
It took centuries to formalize the weakness
Al-Kindi turned patterns in language into a codebreaking tool
A Caesar shift might fool someone glancing at a message, but its keyspace is tiny. With a modern 26-letter alphabet, there are only 25 meaningful shifts to test, so a determined reader can simply work through them until the text starts making sense.
A much bigger leap came in the ninth century, when the Arab polymath Al-Kindi produced what is generally considered the earliest surviving systematic description of frequency analysis. His work belongs to what we'd now call cryptanalysis, the study of breaking cryptographic protections.
His key insight was that language has patterns. Some letters appear far more often than others, and a simple substitution cipher may hide the letters themselves while still leaving those statistical fingerprints behind.
That idea was useful far beyond Caesar's specific cipher. A general monoalphabetic substitution can rearrange letters in vastly more ways than a fixed shift, which makes brute-force guessing much less practical by hand. Frequency analysis gives the codebreaker another way in by looking at common symbols, repeated pairs, and other recurring patterns and comparing them with the language underneath.
One way cryptographers later made substitution harder to attack was by varying the substitution as the message progressed. Leon Battista Alberti experimented with multiple cipher alphabets in the fifteenth century, Johannes Trithemius published his tabula recta in 1518, and Giovan Battista Bellaso described a keyed polyalphabetic system in 1553. Blaise de Vigenère published his own work on polyalphabetic encryption in 1586, and history later attached his name to the cipher now commonly taught as the Vigenère cipher, even though Bellaso had described its basic approach decades earlier.
The shift never actually went away
Caesar's basic shift is still kicking around online, although nobody with an actual secret to protect would go anywhere near it. ROT13 is probably its most familiar descendant, replacing each letter with the one thirteen places farther along the alphabet. Since thirteen sits exactly halfway through a 26-letter alphabet, applying ROT13 a second time gives you the original text back. That made it perfect for old Usenet posts, forum jokes, puzzle answers, and spoilers where the whole point was simply to keep the hidden text from smacking you in the face before you decided to reveal it.
Modern encryption has wandered a very long way from Caesar sliding letters around an alphabet. It can use symmetric keys or public-and-private key pairs, depending on what needs to be protected and how the keys need to be exchanged. AES-256 is a modern symmetric encryption standard, while systems such as PGP combine symmetric and public-key encryption to protect messages.
Since you've made it this far, I'll leave you with one to crack yourself: FDHVDU ZRXOG ORYH WKLV, using the same three-letter shift Caesar is famous for. Drop the plaintext in the comments if you figure it out.
Source:MakeUseOf News
