Exhibit 01 of 37 Ancient Rome Broken Interactive Demo

Caesar Cipher

"The simplest cipher — and the most famous failure in history."

Invented~58 BC
InventorJulius Caesar
Key TypeShift (1–25)
Keyspace25 possible keys
Broken ByFrequency Analysis · Al-Kindi · 850 AD
Modern LessonS-boxes in AES
📜Historical Context

Julius Caesar used this cipher to communicate with his generals during the Gallic Wars. Suetonius records it in The Twelve Caesars (c. 121 AD): "If he had anything confidential to say, he wrote it in cipher, that is, by so changing the order of the letters of the alphabet, that not a word could be made out."

Caesar typically used a shift of 3. His nephew Augustus preferred a shift of 1. The cipher offered minimal protection — most of Caesar's enemies were illiterate, so even an unencrypted Latin message was safe from most interceptors.

💡

ROT13 — the modern variant — applies a shift of 13. Because 13+13=26, ROT13 is its own inverse: applying it twice returns the original text. It's still used in online forums to hide spoilers.

⚙️How It Works

Each letter is replaced by the letter a fixed number of positions down the alphabet. The shift wraps around using modular arithmetic:

Encrypt: C = (P + shift) mod 26
Decrypt: P = (C − shift + 26) mod 26

Example (shift = 3):
  A → D    N → Q
  B → E    O → R
  Z → C    (wrap-around)

Encryption steps:

  1. Convert each plaintext letter to a number (A=0, B=1 … Z=25)
  2. Add the shift value and take modulo 26
  3. Convert the result back to a letter
  4. Non-alphabetic characters (spaces, punctuation) pass through unchanged

Shift Diagram (shift = 3)

Plain
Cipher
Each plain letter maps to the cipher letter directly below it.
💀How It Was Broken
Frequency Analysis
Complexity: Trivial · Invented: ~850 AD · By: Al-Kindi

In any English text, E appears ~12.7%, T ~9.1%, A ~8.2%. Because the Caesar cipher maps each letter to exactly one other letter, these frequencies are preserved in the ciphertext — just shifted. Find the most common ciphertext letter, assume it encrypts E, and the shift is revealed.

Brute Force
Complexity: Trivial · Keyspace: 25

The entire keyspace is just 25 shifts. A human can test all 25 by hand in minutes. A computer does it in microseconds. This is the simplest form of exhaustive key search — a technique that scales to modern ciphers but requires vastly more computation.

⚠️

Why it fails fundamentally: The Caesar cipher has only 25 possible keys. Modern encryption (AES-256) has 2²⁵⁶ ≈ 10⁷⁷ possible keys — more than atoms in the observable universe. Keyspace size is the first lesson of cryptographic security.

🔬What It Teaches Modern Cryptography
Caesar ConceptEvolved Into
Letter substitutionNon-linear S-boxes in AES — designed to resist frequency analysis
Shift = keySymmetric key concept — both parties share a secret parameter
25-key spaceAES-256 requires 2²⁵⁶ key trials — computationally infeasible
Frequency leakDiffusion principle — modern ciphers ensure every output bit depends on every input bit
🎓

Shannon's confusion: Claude Shannon (1949) defined "confusion" as making the relationship between key and ciphertext as complex as possible. Caesar has zero confusion — the relationship is simply C = P + 3. AES's S-boxes are specifically designed to maximize confusion.

🔐 Try It Yourself
3
Result appears here…
📊Letter Frequency Analyzer

Paste any ciphertext to see letter frequencies. Gold bars reveal the pattern — find the tallest bar to guess the shift.

⚔️Brute Force All 25 Shifts

Paste a Caesar ciphertext — see all 25 decryptions at once. One of them is plaintext.

Break This Cipher

Can you find the shift?

QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD
← Back Hall I: Birth of Cryptography