Glossary Development

Caesar cipher

The Caesar cipher is a simple substitution cipher that shifts each letter a fixed number of places along the alphabet.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

With a shift of 3, HELLO becomes KHOOR. ROT13 is the special case with a shift of 13, so applying it twice returns the original (HELLO to URYYB and back). With only 25 possible shifts it is broken by trying them all, so it offers no real security. Each letter is moved a fixed number of places along the alphabet and wraps round from Z to A; digits, spaces and punctuation are normally left alone. Decrypting is simply shifting back by the same amount.

Why it matters

The Caesar cipher is the classic first lesson in cryptography and still appears in puzzles, escape rooms and capture-the-flag challenges. It also shows two lasting weaknesses: a tiny key space and letter frequencies that survive the shift, so the most common letter in a long English ciphertext usually stands for E. Never use it, or ROT13, to protect anything real; use proper Encryption instead.

Example

ATTACK AT DAWN with a shift of 3 becomes DWWDFN DW GDZQ. To break an unknown shift, list all 25 candidates; for the ciphertext TLLA TL HA UVVU only one line reads as English:

shift 1:  SKKZ SK GZ TUUT
shift 2:  RJJY RJ FY STTS
...
shift 7:  MEET ME AT NOON

Try both directions with the Caesar Cipher.

AdSense Placeholder
Slot: footer_leaderboard