11/26/2007

Prying Eyes Privacy

When you spend your days inside emacs, you tend to do just about everything from there. Natrually, emacs is a good place to create lists of things, and around the holidays it's a good place to draft lists of gifts you're thinking about giving. Chances are, you've created these lists before.

As an emacs user, I'm going to guess that you are the teensiest bit concerned about security. In this case, you don't want a lot of hassle. You just want to ensure that if someone opens the file, they won't know what you're planning on buying for them. So, instead of hiding your file somewhere of deep in your hard drive or insisting that your significant other doesn't touch your computer until after the New Year, you can probably just use what I'm calling Prying Eyes Privacy.

All you need to do is "encrypt" it with rot13. For those who don't know, that means you need to look at each letter and rotate 13 places in the alphabet. So A becomes N, B becomes O, L becomes Y, and so on. Normally, this would involve writing perl script, C# app1 or something similar. It isn't hard to decrypt this type of file, but you probably can't look at a file encrypted this way and figure out what it says. It's perfect for a gift list. And it's super easy to do in emacs.

So, start your list in emacs. You can use org-mode, outline-mode, or whatever you please. It doesn't matter. But before you save it, do this:

  • Select the whole buffer (control-x h, or with you mouse)
  • meta-x rot13-region

That will turn the phrase "I think the lady wants a stuffed moose" into "V guvax gur ynql jnagf n fghssrq zbbfr."

Next time you open the file up, you can just do those steps again and it will magically reappear. Now, whoever you're buying gifts for can open this file up whenever they want. Unless he/she has some kind of amazing alphabet arithmetic abilities (unlikely) or can use emacs (even less likely) you'll be in the clear. If your significant other can use emacs, this probably isn't going to cut it.


1. Just before I got my current job, I found a job posting for a C# programmer. In order to submit your resume, you had to write a C# program to "decrypt" an email address via rot 13 and send along your source. I had never used C# and had the day off, so I decided to give it a try. I spent longer downloading and installing a complier than I did writing the code. But, I sent in my solution along with a terribly outdated resume and within minutes they got back to me saying they had to speak with me. I thought that was a bad sign. If you can learn enough of a language in just a few minutes to impress the tech people at a company (this wasn't a recruiter), you don't want to work there.