ArticleslgStudy

science

ROT13

ROT13 is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ROT13 rather than just read about it. In short: ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the Latin alphabet. It is a special case of the Caesar cipher which was developed in ancient Rome, and used by Julius Caesar in the 1st century BC (see timeline of cryptography).

ROT13 — main illustration
ROT13 — illustration

Key takeaways

  • ROT13 belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ROT13 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ROT13 from memory before moving on to harder problems.

Reference excerpt

ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the Latin alphabet. It is a special case of the Caesar cipher which was developed in ancient Rome, and used by Julius Caesar in the 1st century BC (see timeline of cryptography). ROT13 may be referred to as Rotate13, ROT-13, rotate by 13 places, or sometimes by its autonym EBG13.

Description Applying ROT13 to a piece of text requires examining its alphabetic characters and replacing each one by the letter 13 places further along in the Latin alphabet, wrapping back to the beginning as necessary. When encoding a message, A becomes N, B becomes O, and so on up to M, which becomes Z. Then the sequence continues at the beginning of the alphabet: N becomes A, O becomes B, and so on to Z, which becomes M. When decoding a message, the same substitution rules are applied, but this time on the ROT13 encrypted text. Other characters, such as numbers, symbols, punctuation or whitespace, are left unchanged. Because there are 26 letters in the basic Latin alphabet and 26 = 2 × 13, the ROT13 function is its own inverse:

ROT 13 ( ROT 13 ( x ) ) = x {\displaystyle {\mbox{ROT}}_{13}({\mbox{ROT}}_{13}(x))=x} for any basic Latin-alphabet text x {\displaystyle x} . In other words, two successive applications of ROT13 restore the original text (in mathematics, this is sometimes called an involution; in cryptography, a reciprocal cipher). The transformation can be done using a lookup table, such as the following:

For example, in the following joke, the punchline has been obscured by ROT13:

Why did the chicken cross the road? Gb trg gb gur bgure fvqr! Transforming the entire text via ROT13 form, the answer to the joke is revealed:

Jul qvq gur puvpxra pebff gur ebnq? To get to the other side! A second application of ROT13 would restore the original.

Usage ROT13 is not intended to be used where secrecy is of any concern—the use of a constant shift means that the encryption effectively has no key, and decryption requires no more knowledge than the fact that ROT13 is in use. Even without this knowledge, the algorithm is easily broken through frequency analysis. In the early 1980s, people used ROT13 in their messages on Usenet newsgroup servers. They did this to hide potentially offensive jokes, or to obscure an answer to a puzzle or other spoiler, or to fool less sophisticated spambots. ROT13 has been the subject of many jokes. The 1989 International Obfuscated C Code Contest (IOCCC) included an entry by Brian Westley. Westley's computer program can be encoded in ROT13 or reversed and still compiles correctly. Its operation when executed is either to perform ROT13 encoding on, or to reverse, its input. In December 1999, it was found that Netscape Communicator used ROT13 as part of an insecure scheme to store email passwords. In 2001, Russian programmer Dimitry Sklyarov demonstrated that an eBook vendor, New Paradigm Research Group (NPRG), used ROT13 to encrypt their documents. It has been speculated that NPRG may have mistaken the ROT13 toy example—provided with the Adobe eBook software development kit—for a serious encryption scheme. Windows XP uses ROT13 on some of its registry keys. ROT13 is also used in the Unix fortune program to conceal potentially offensive quotations. Johann Bessler, an 18th-century clockmaker and constructor of perpetual motion machines, pointed out that ROT13 encodes his surname as Orffyre. He used its latinised form, Orffyreus, as his pseudonym.

Net culture Because of its utter unsuitability for real secrecy, ROT13 has become a catchphrase to refer to any conspicuously weak encryption scheme; a critic might claim that "56-bit DES is little better than ROT13 these days". In a play on real terms like double DES several terms cropped up with humorous intent:

Double ROT13: applying ROT13 to an already ROT13-encrypted text results in the original plaintext. ROT26: equivalent to no encryption at all. 2ROT13 was included in a spoof academic paper entitled "On the 2ROT13 Encryption Algorithm". triple-ROT13: used jokingly in analogy with 3DES, it is equivalent to regular ROT13. ROT13 jokes were popular on many newsgroup servers, like net.jokes as early as the 1980s. The newsgroup alt.folklore.urban coined a word—furrfu—that was the ROT13 encoding of the frequent utterance sheesh. Furrfu evolved in mid-1992 as a response to postings repeating urban myths on alt.folklore.urban, after some posters complained that "sheesh!" as a response to newcomers was being overused.

Word pairs

Some words will, when transformed with ROT13, produce another word. Examples of seven-letter pairs in the English language are abjurer and nowhere, and Chechen and purpura. Other examples of word pairs are shown in the table. The pair gnat and tang is an example of words that are both ROT13 reciprocals and reversals.

Variants and combinations ROT5 is a practice similar to ROT13 that applies to numeric digits (0 to 9). ROT13 and ROT5 can be used together in the same message, sometimes called ROT18 (18 = 13 + 5) or ROT13.5. ROT47 is a derivative of ROT13 which, in addition to enciphering the Latin alphabet, transforms numbers and common symbols. Instead of using the sequence A–Z as the alphabet, ROT47 uses a larger set of characters from the common character encoding known as ASCII. Specifically, the 7-bit printable characters, excluding space, from character 33 (!) through 126 (~), 94 in total, in the order of their ASCII codes, are rotated by 47 positions, without considering letter case. For example, the character A is mapped to p, while a is mapped to 2. The use of a larger alphabet produces a more thorough obfuscation than that of ROT13; for example, a telephone number such as +1-415-839-6885 is not obvious at first sight from the scrambled result Z`\c`d\gbh\eggd. On the other hand, because ROT47 introduces numbers and symbols into the mix without discrimination, it is more immediately obvious that the text has been encoded. Example:

The Quick Brown Fox Jumps Over The Lazy Dog. enciphers to

… excerpt ends here. Continue reading the full article.

Illustrations

ROT13 illustration

Worked examples

Example 1 — a first encounter with ROT13

Start with the simplest possible case. Write down what ROT13 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ROT13 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ROT13 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ROT13

In research
ROT13 appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ROT13 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ROT13 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Classical ciphers, Internet culture, so understanding it makes those chapters shorter.
In everyday life
Look for ROT13 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study ROT13 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ROT13 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ROT13 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ROT13 in simple terms?

ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the Latin alphabet. It is a special case of the Caesar cipher which was developed in ancient Rome, and used by Julius Caesar in the 1st century BC (see timeline of cryptography).

Why does ROT13 matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ROT13?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ROT13.

Tags

  • Classical ciphers
  • Internet culture

Keep exploring