Reforming rot13

rot13.com is a service frequently used here to hide spoilers. I really hate it, though. If I had the time, I would build a simple, but much better alternative. Maybe somebody has more time to do that, so I’ll share my rough specification:

  • Dynamic. The encoding happens on the client automatically, whenever the content of the input textbox changes. No Submit key needed.

  • Fully client-side. No server-side script, just a static page with Javascript.

  • Decoded content can be reached through an encoded URL. Instead of the receiver pasting the ciphertext into the rot13.com textbox, the sender can provide an encoded URL, and the receiver simply clicks on the link. This is slightly less convenient for the sender, but is much more convenient for the (hopefully many) receivers.

  • Many people can decrypt parts of rot13 ciphertexts without conscious effort. This defeats the purpose. The new service could provide some alternative encryption that is not a substitution cipher. It should still be a reciprocal cipher, that is a nice property of rot13.

  • rot13 fails for non-ASCII characters. (rot13.com leaves them intact.) The alternative encryption should work for all Unicode strings.

  • Strong, password-based encryption could also be added as an extra feature. I could send you a very long URL, and tell you a password on the phone, or only tell you the password at a later date.


The only important design problem I don’t know how best to solve is making the encryption work for Unicode, with the following three constraints: making it a reciprocal cypher, outputting visually nice strings, and making it map ASCII to ASCII. One possible solution is to drop the constraint that it is a reciprocal cypher. For this service it is probably not crucial anyway: the ciphertext can be base64, with some escape prefix distinguishing it from plaintext.

After writing the above, I found this LW thread: Does anyone else find ROT13 spoilers as annoying as I do? There were several suggestions there, and two of the commenters, sketerpot and LightningRose even coded their own solutions to the spoiler problem. Each solution had some merit, and LightningRose’s in particular was far superior to the rot13.com site I used to use, but basically, they only dealt with the third point of my proposal.

Is there anything like what I envision? Is anyone interested in building it? What changes or extra features would you like to see?