13

I was reading through the docs for vim, and noticed there's a shortcut, for example g?w would transform the next word using ROT13. I also know that you can change the encoding of a Python file to ROT13.

Here's my question: Why? It seems like it wouldn't be that useful, aside from prank programs like Django FUNserver.

1
  • + Because until this moment, I had forgotten what great fun we used to have with ROT13 and "non-geeks"... sigh. Commented Jul 28, 2011 at 14:56

3 Answers 3

19

There is history there. In the old days, long before the spoiler tag, you'd ROT13 a spoiler, or a joke punchline, or a riddle, so that it wouldn't be immediately readable, but it could still be quickly converted to readable format (if you ROT13 a piece of text a second time, it'll switch it back to the original text because there are only 13 26 (need more COFFEE) characters in the roman alphabet.)

So a lot of things that did mild obfuscation used ROT13, because it was commonly available, and so it's been backported into a number of more modern languages. It's just a weird quirk.

10
  • 6
    "...there are only 13 characters in the roman alphabet." I think you mean 26 characters.
    – GreenMatt
    Commented Jul 28, 2011 at 14:29
  • 1
    Also, I never did study Latin, but it uses quite a few more letter variants than does English. It's probably pretty safe to say that there are only 26 letters in the English alphabet, though.
    – user
    Commented Jul 28, 2011 at 14:44
  • 1
    @green Ell. Oh. Ell. 13 is ROTing my brain. Commented Jul 28, 2011 at 14:48
  • 1
    @Satanicpuppy: You mean YBY, surely!
    – TMN
    Commented Jul 28, 2011 at 15:04
  • 1
    @Michael: the Latin alphabet lacks a few of the characters in the English alphabet: it has 21 letters. In fact English used to have a few more letters, too.
    – user4051
    Commented Jul 28, 2011 at 15:08
8

ROT13 was originally devised to be used with Usenet postings that contained offensive material so the more sensitive among us wouldn't be inadvertently exposed to them. The idea was that you had to take an action to decode the posting as a way of indicating that you understood that you might find the contents offensive.

It's just a substitution cipher and isn't intended to provide any kind of privacy or authentication.

(ETA: It was very difficult to resist the urge to post this answer ROT13'd.)

7
  • 9
    Instead you posted it in ROT26 - sneaky! Commented Jul 28, 2011 at 14:09
  • 4
    ROT26, nothing. For extra security, I used quadruple ROT13.
    – Blrfl
    Commented Jul 28, 2011 at 14:21
  • 2
    "originally devised to be used with Usenet postings" Caesar posted on Usenet?(؟)
    – StuperUser
    Commented Jul 28, 2011 at 14:39
  • 2
    @StuperUser: ROT13 is a subset of the Caesar cipher in that it (intentionally) only allows for one offset. And if Al Gore could invent the Internet, there's not reason Caesar couldn't have invented Usenet.
    – Blrfl
    Commented Jul 28, 2011 at 14:57
  • 2
    @Blrfl: Caesar used ROT3. en.wikipedia.org/wiki/Caesar_cipher
    – user4051
    Commented Jul 28, 2011 at 15:10
2

It was actually once used seriously as part of a 4 stage encryption process by Netscape Navigator to store email passwords. It is probably not their greatest idea and forms part of a case study of poor encryption (There may be a better version of this doc to link to somewhere - if so - please edit)

2
  • cd to the directory, containing sqlite3, ~/.mozilla/firefox/vzfbtbbq.default or similar, and: sqlite3 urlclassifier2.sqlite 'SELECT * FROM goog_black_url' | tr "[A-Z][a-z]" "[N-ZA-M][n-za-m]" Commented Jul 28, 2011 at 17:17
  • Sorry, of course not to the directory, containing sqlite3, but to the one, containing the firefox-Cache and so on. Commented Jul 29, 2011 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.