Skip to content

Where the Caesar Cipher Is Used Today

It cannot protect real data, yet the letter shift still does smaller jobs. Here they are, with examples you can check.

advertisement

Is the Caesar cipher still used?

Yes, though never as real protection. With 25 possible keys, a brute force attack breaks it by hand in minutes. People use it today where that does not matter: learning how ciphers work, hiding a spoiler or setting a puzzle.

Its best known form is ROT13, the same cipher with a fixed shift of 13. Several of the uses below rely on it.

Teaching cryptography and programming

This is where you are most likely to meet it, because it fits on a sheet of paper and in a short program. Harvard’s CS50, a well-known introduction to computer science, asks students to write it in C. The one task covers command-line arguments, loops, character codes and the modulo operator.

It also shows what a key is and how an attack works. Once students have encrypted a message, they can break it by trying every shift or with frequency analysis. Try it in the Caesar cipher tool, program it in Python or use the lesson plan with a class.

Hiding spoilers and hints with ROT13

ROT13 suits text you want people to be able to read, just not by accident. Shifting by 13 twice brings you back to the start, because the alphabet has 26 letters, so one step both encodes and decodes.

In the early 1980s, Usenet users hid rude jokes and puzzle answers this way, and the Unix fortune program used it for offensive quotes. Forums without a spoiler button still do it.

Geocaching keeps the habit alive. Geocaching.com shows a cache’s hint in ROT13, so you read it only if you get stuck. A hint could look like this:

Haqre gur erq fgbar
Show the hint

Under the red stone

That stops a passing glance and nothing more. You can decode a hint by hand or with the ROT13 tool.

Puzzles, games and security contests

A cipher that falls in minutes is just right for a puzzle. Capture the flag contests start beginners on it: “Mod 26” in picoCTF is a 10-point challenge solved with ROT13. Games use letter shifts too, as our article on the Caesar cipher in video games shows.

Away from the screen, it turns up in children’s secret decoder rings. A Caesar cipher wheel works the same way, and you can print one and make it at home.

ROT13 in software

ROT13 is common enough to ship with programming languages and editors. Python has it as a codec and PHP as a function:

Python
import codecs print(codecs.encode("Hi", "rot13"))# Uv
PHP
echo str_rot13("Hi");// Uv

Emacs has rot13-region, and in Vim the command ggg?G encodes a whole buffer. Windows uses it as well: in the UserAssist registry key, which records the programs a user starts, the names are stored in ROT13. A plain text search will miss them, while forensic tools decode them automatically.

Why it cannot protect data

Real secrets have not fared well with it. Netscape Communicator used ROT13 in an insecure scheme for storing email passwords. The Mafia boss Bernardo Provenzano wrote his notes in a Caesar variant where A became 4 and B became 5. Police decoded them, and that work fed the investigation that led to his arrest in 2006.

Some articles also list network protocols, Internet of Things devices and digital watermarks among its uses. We know of no standard protocol or watermarking scheme built on it. The one commercial case we found is a 2015 report on an alarm communicator: a researcher described its encryption as a few steps beyond a Caesar cipher and published it as a security hole, and the manufacturer disputed the findings.

For passwords, files or private messages, use an established library with AES or another modern cipher. From the Caesar cipher to modern encryption explains what changed.

Frequently asked questions

Is the Caesar cipher still used today?

Yes, for teaching, puzzles and hiding text such as spoilers, often in the form of ROT13. It should not be used to protect real data.

Can I use it for passwords or private messages?

No. Anyone can try all 25 shifts in minutes. Use an established library with AES or another modern cipher.

What is ROT13 used for?

Hiding text that readers can reveal on purpose: spoilers, puzzle answers, rude jokes and geocaching hints. The same step encodes and decodes it.

Why do schools still teach the Caesar cipher?

It is small enough to do on paper and to program quickly, and it is easy to break, so students meet keys and attacks in a single lesson.

Sources

Keep going