Safekipedia
Classical ciphersInternet culture

ROT13

Adapted from Wikipedia · Discoverer experience

ROT13 is a simple way to hide messages by shifting each letter to the letter 13 places away from it in the alphabet. For example, the letter A becomes N, B becomes O, and so on. This method is a special kind of code called a substitution cipher.

The idea behind ROT13 comes from an ancient code system called the Caesar cipher, which was used by Julius Caesar in ancient Rome over 2,000 years ago. ROT13 is often called Rotate13, ROT-13, or by its special name, EBG13.

People use ROT13 to make messages a little harder to read, especially in online discussions where they want to hide something funny or surprising. Even though it’s easy to solve, it’s still a fun way to play with words and learn about codes.

Description

ROT13 is a simple way to hide messages by shifting each letter to the letter 13 places ahead in the alphabet. For example, A becomes N, B becomes O, and so on. After M, the alphabet starts again from A. This same process can also be used to read the hidden message, because doing ROT13 twice brings the text back to its original form.

Because the alphabet has 26 letters, which is twice 13, applying ROT13 twice always returns the original text. This makes it easy to both hide and reveal messages. For instance, a joke might hide its answer with ROT13, and applying ROT13 again shows the answer clearly. Other characters like numbers and symbols stay the same.

InputABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
OutputNOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm

Usage

ROT13 is not meant to keep secrets because it lacks a key, making it easy to break. In the early 1980s, people used ROT13 on Usenet newsgroup servers to hide jokes or spoilers from others.

In 1989, a programmer named Brian Westley created a computer program that could be encoded in ROT13 and still work correctly. In 1999, Netscape Communicator used ROT13 in a way to store email passwords, though it was not secure. In 2001, a Russian programmer showed that a company used ROT13 to hide their documents, possibly thinking it was stronger than it is. Windows XP also used ROT13 on some parts of its settings. The Unix fortune program uses ROT13 to hide some quotes.

Net culture

Because ROT13 is very easy to use and not good for keeping secrets, it became a joke among people online. People would say things like "56-bit DES is little better than ROT13 these days" to show that some encryption methods are not very strong. They even made up funny names for playing with ROT13, like "Double ROT13", which just gives you back the original message, and "ROT26", which is the same as having no encryption at all.

ROT13 was popular in online discussion groups in the 1980s. One group, alt.folklore.urban, even made up a new word, furrfu, which is what "sheesh" turns into after being encoded with ROT13. They started using furrfu in the mid-1990s because they were tired of seeing "sheesh!" used too much when people were talking about urban myths.

Main article: Double DES Main articles: 3DES

Word pairs

When you use ROT13 on some words, you can get another real word. For example, turning "abjurer" into ROT13 gives you "nowhere." Another example is "Chechen" turning into "purpura." There are special pairs like "gnat" and "tang" where one word becomes the other when you use ROT13, and they are also reverses of each other.

ROT13 reciprocal word pairs
abcdefghijklmnopqrstuvwxyz
NOPQRSTUVWXYZABCDEFGHIJKLM
aha and nunant and nag
balk and onyxbar and one
barf and onesbe and or
bin and ovaebbs and roof
envy and railer and re
errs and reefflap and sync
fur and shegel and try
gnat and tangirk and vex
clerk and pyrexpurely and cheryl
PNG and catSHA and fun
furby and sheolterra and green
what and JungURL and hey
shone and FUBARAres and Nerf

Variants and combinations

ROT5 is a method similar to ROT13, but it works with numbers (0 to 9) instead of letters. When ROT13 and ROT5 are used together, it is called ROT18 or ROT13.5.

ROT47 is another version of ROT13 that changes both letters and symbols, using a bigger set of characters from the ASCII system. For example, the letter "A" becomes "p" and the letter "a" becomes "2". This makes messages harder to read, but it can also make it clear that the text has been hidden.

The GNU C library includes a function called memfrob(), which works like ROT13 but is used for any kind of data. It changes each byte by combining it with the pattern 00101010 using a process called XOR, which is a simple way to hide information. Like ROT13, this method is easy to reverse.

Implementation

ROT13 can be easily used in different tools. In the Unix terminal, you can use a command called tr to change letters. For example, you can turn "Pack My Box With Five Dozen Liquor Jugs" into its secret form.

You can also use special programs like Emacs or Vim to change letters automatically. In JavaScript, you can create a small set of rules to switch each letter to the one 13 places later in the alphabet, without using extra tools. Similar methods work in Python, where you can build a table that pairs each letter with its secret partner and then use it to change the whole message.

This article is a child-friendly adaptation of the Wikipedia article on ROT13, available under CC BY-SA 4.0.