Everything about Rot13 totally explained
ROT13 ("
rotate by 13 places", sometimes hyphenated
ROT-13) is a simple
substitution cipher used in
online forums as a means of hiding
spoilers,
punchlines, puzzle solutions, and
offensive materials from the casual glance. ROT13 has been described as the "
Usenet equivalent of a magazine printing the answer to a quiz upside down". ROT13 is a variation of the
Caesar cipher, developed in ancient Rome.
ROT13 is its own
inverse; that is, to undo ROT13, the same algorithm is applied, so the same action can be used for encoding and decoding. The algorithm provides no real
cryptographic security and should never be used for such. It is often cited as a canonical example of weak encryption. ROT13 has inspired a variety of letter and word games on-line, and is frequently mentioned in
newsgroup conversations.
Description
Applying ROT13 to a piece of text merely requires examining its alphabetic characters and replacing each one by the letter 13 places further along in the
alphabet, wrapping back to the beginning if necessary.
A becomes
N,
B becomes
O, and so on up to
M, which becomes
Z, then the sequence reverses:
N becomes
A,
O becomes
B, and so on to
Z, which becomes
M. Only those letters which occur in the
English alphabet are affected; numbers, symbols, whitespace, and all other characters are left unchanged. Because there are 26 letters in the English alphabet and 26 = 2 × 13, the ROT13 function is its own
inverse: It is used to hide potentially offensive jokes, or to obscure an answer to a puzzle or other
spoiler. A shift of thirteen was chosen over other values, such as three as in the original Caesar cipher, because thirteen is the value which arranges that encoding and decoding are equivalent, thereby allowing the convenience of a single command for both. ROT13 isn't 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. As applying ROT13 to an already ROT13-encrypted text restores the original
plaintext, ROT26 is equivalent to no encryption at all. By extension, triple-ROT13 (used in joking analogy with 3DES) is equivalent to regular ROT13.
In December 1999, it was found that
Netscape Communicator used ROT-13 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.
Letter games and net culture
abcdefghijklmnopqrstuvwxyz NOPQRSTUVWXYZABCDEFGHIJKLM |
| aha ↔ nun |
ant ↔ nag |
| balk ↔ onyx |
bar ↔ one |
| barf ↔ ones |
be ↔ or |
| bin ↔ ova |
ebbs ↔ roof |
| envy ↔ rail |
er ↔ re |
| errs ↔ reef |
flap ↔ sync |
| fur ↔ she |
gel ↔ try |
| gnat ↔ tang |
irk ↔ vex
|
| clerk ↔ pyrex |
purely ↔ cheryl |
| PNG ↔ cat |
SHA ↔ fun |
| furby ↔ sheol |
terra ↔ green |
| what ↔ Jung |
URL ↔ hey |
| purpura ↔ Chechen |
shone ↔ FUBAR |
ROT13 provides an opportunity for
letter games. Some words will, when transformed with ROT13, produce another word. The longest example in the
English language is the pair of 7-letter words
abjurer and
nowhere; there's also the 7-letter pair
chechen and
purpura. Other examples of words like these are shown in the table.
The 1989
International Obfuscated C Code Contest (IOCCC) included an entry by Brian Westley. Westley's
computer program can be ROT13'd or reversed and still
compiles correctly. Its operation, when executed, is either to perform ROT13 encoding on, or to reverse its input.
The newsgroup
alt.folklore.urban coined a word—
furrfu—that was the ROT13 encoding of the frequently encoded 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.
Variants
ROT47 is a derivative of ROT13 which, in addition to scrambling the basic letters, also treats 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, all 7-bit printable characters, excluding space, from decimal 33 '
!' through 126 '
~' are rotated by 47 positions, without special preserving of case. The use of a larger alphabet is intended to produce a more thorough obfuscation than that of ROT13, but because ROT47 introduces numbers and symbols into the mix without discrimination, it's much more obvious that the text has been enciphered.
Example:
The Quick Brown Fox Jumps Over The Lazy Dog.
...enciphers to...
%96 "F:4< qC@H? u@I yF>AD ~G6C %96 {2KJ s@8]
The
GNU C library, a set of standard routines available for use in
computer programming, contains a
function—
memfrob—which has a similar purpose to ROT13, although it's intended for use with arbitrary binary data. The function operates by combining each
byte with the
binary pattern 00101010 (
42) using the
exclusive or (XOR) operation. This effects a
simple XOR cipher. Like ROT13,
memfrob is self-reciprocal, and provides a similar level of security.
Further Information
Get more info on 'Rot13'.
|
External Link Exchanges
Do you know how hard it is to get a link from a large encyclopaedia? Well we're different and will prove it. To get a link from us just add the following HTML to your site on a relevant page:
<a href="http://rot13.totallyexplained.com">ROT13 Totally Explained</a>
Then simply click through this link from your web page. Our crawlers will verify your link, extract the title of your web page and instantly add a link back to it. If you like you can remove the words Totally Explained and embed the link in article text.
As long as your link remains in place, we'll keep our link to you right here. Please play fair - our crawlers are watching. Your site must be closely related to this one's topic. Any kind of spamming, dubious practises or removing the link will result in your link from us being dropped and, potentially, your whole site being banned. |