How it works
The Caesar cipher is the simplest cipher in the world:
Pick a number. Shift every letter of your message forward in the alphabet by that many steps.
If your shift is 3, then:
| Plain | A | B | C | D | E | F | … | X | Y | Z |
|---|---|---|---|---|---|---|---|---|---|---|
| Cipher | D | E | F | G | H | I | … | A | B | C |
When you run off the end (X, Y, Z), you just wrap around back to A.
The number you picked — 3 — is the key. Your friend needs it to un-scramble the message.
Try the cipher wheel
Type a message and drag the shift slider. Watch the inner wheel turn — that’s exactly the same trick.
Decoding
To decode, you do the opposite — shift backwards by the same number.
- If the shift was 3, encoding goes forward 3 and decoding goes back 3.
- Forward 3 is the same as backward 23 (because 3 + 23 = 26 letters).
Try the wheel above and flip to “Decode” — notice how it un-scrambles!
Strengths and weaknesses
The Caesar cipher was strong in Caesar’s day — most soldiers could barely read, so shifting letters was enough to stump them.
But there’s a serious weakness: there are only 25 possible keys. You could try all of them in a few minutes and eventually read the message. Computers can try all 25 in a millisecond.
That means today, the Caesar cipher is fun but not secure. We’ll learn stronger ones soon.
Practice
With a shift of 5, what does the letter A become?
A → B → C → D → E → F. That's 5 steps forward.
You receive the ciphertext WKLV LV IXQ (shift 3). Decode it.
Shift every letter BACK by 3: W→T, K→H, L→I, V→S ... That spells THIS IS FUN.
Why is the Caesar cipher easy to break with a computer?
There are only 25 useful shifts (shift 0 doesn't change anything). A computer can test every one in less than a second.
You used shift 7 to encode a message. What shift does your friend use to decode it?
Decoding by 7 forward is the same as 19 backward (because 7 + 19 = 26 = full loop). Most people just shift BACK by 7 instead.
Challenge
Quick-Fire Round