Caesar cipher: frequently asked questions
Short answers to the most common doubts about the Caesar cipher and its variants.
Did Caesar always use a shift of three?
According to Suetonius, yes, at least in the correspondence he refers to. Nothing prevents other shifts, and Suetonius himself attributes a single-letter shift to Augustus.
Is the Caesar cipher secure if I keep the key secret?
No. There are only 25 possible keys: anyone can try them all in a few minutes, even without a computer.
What is the difference between the Caesar cipher and ROT13?
ROT13 is a Caesar cipher with the fixed key 13. Applied twice, it returns the original text.
Can I make it more secure by encrypting twice?
No: two successive shifts are equivalent to a single shift by the sum of the two keys.
What came after the Caesar cipher?
Polyalphabetic ciphers, such as the Bellaso–Vigenère cipher, which alternate several different shifts according to a keyword.
Is it still used in computers?
Only as a teaching exercise or as trivial disguise. Data is protected with standard algorithms and long keys.
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.
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.