Caesar cipher: try it yourself
Three exercises to solve with pen and paper: encrypt, decrypt with the key, and break a message without the key.
You need pen, paper and, if you like, the interactive wheel on the site’s home page. Solutions are at the bottom of the page: try on your own first.
- 01
Exercise 1 · Encrypt
Encrypt the word SECRET with key 3.
- 02
Exercise 2 · Decrypt
Decrypt FRGH knowing that the key is 3.
- 03
Exercise 3 · No key
This message was encrypted with an unknown key: MFHPJW. Find the key by trying the shifts, or by looking for a word that makes sense.
Hints
For exercise 3 it helps to build a table with the first two cipher letters (M and F) shifted back by 1, 2, 3… positions, stopping when the beginning of a plausible English word appears. It is brute force done by hand.
Solutions
Solution to exercise 1
SECRET becomes VHFUHW.
Solution to exercise 2
FRGH becomes CODE.
Solution to exercise 3
The key is 5 and the message is HACKER.
Caesar cipher: frequently asked questions
Short answers to the most common doubts about the Caesar cipher and its variants.
The pages of this topic
Back to the overviewCaesar cipher: the history
Suetonius, Julius Caesar, Augustus and letters written in Greek characters: what we really know about Roman ciphers.
Caesar cipher: how it works
Two alphabets side by side, one shifted: the mechanism of encryption and decryption step by step.
Caesar cipher: a worked example
Let us encrypt and decrypt VENI VIDI VICI with key 3, letter by letter.
Caesar cipher: the maths
Modular arithmetic, encryption and decryption formulas, key space: the Caesar cipher written as formulas.
Caesar cipher: how it is broken
Brute force, frequency analysis and known plaintext: three ways to break the Caesar cipher, each faster than the last.
Caesar cipher: today’s uses
ROT13, puzzles, teaching and obfuscation: where the Caesar cipher still turns up, and where it must never be used.