Public Key Encryption

I wish this page weren't necessary, but until my parents and grandparents start encrypting and signing their email, I won't take for granted that everyone knows what this is all about.

Suppose you want to share a secret with me, and only me. The most convenient way to do so is to use public key encryption. I create a mathematical puzzle that is extremely difficult to solve and publish it to the world. This is my public key. The solution to the puzzle, which I keep as my most closely guarded secret, is my private key. Once you encrypt the message with my public key, only my private key will decrypt it. My public key is useless for decryption.

It is also possible to verify my identity using public key encryption. I can't access my private key without providing a password, which I have chosen to be quite long and difficult to guess. When I write an email, I can sign it with my private key (which does not give my private key away) and you can be sure of my identity by verifying the signature with my public key.

Why is all this necessary? I once fell for a phishing scam, an email that appeared to be from paypal requesting that I update my account. Fortunately, I realized I had been scammed just as I hit the submit button, and was able to change the password of my real paypal account before any harm was done. Another time, an unstable acquaintance hacked into my email account and sent messages to people I knew. I simply feel motivated to protect myself from those who stand to profit through the unethical use of information.

To use public key encryption, you need software which will keep track of the keys and automate the encryption and decryption process. There are two options listed at the end of this page. You can collect the public keys of all your correspondants (here is mine), but after you import the key to your computer, you need to verify that each key indeed belongs to whom you think it does. For example, the fingerprint for my key is C90F 8C1A 8E82 FBF4 4385 37A6 B124 949C E9FA D71E, but don't trust this webpage with such important information. You should verify the fingerprint with me in person.

It is important to be certain of the origin of each key, because you will use it to confirm the origin of any signed email you receive. You also want to know that nobody else but me can read a message which you encrypt with my public key. Nobody has access to the private part of my key, unless they break into my computer and discover my password, which would be very difficult for anyone but the government to do (and they can).

Here is a word of caution. It is technically possible to deduce my private key from my public key. It was recently reported that a 665 bit key called RSA-200 was broken. This was part of an ongoing challenge put forward by some of the creators of public key cryptography. However, it took the equivalent of 55 CPU-years to factor that 665-bit number. In contrast, most public keys are 1024, 2048 or even 4096 bit. The $100,000 and $200,000 prizes for breaking a 1024 bit or 2048 bit key have yet to be claimed.

For a colorful history of cryptography, and a glimpse of its future, I strongly recommend The Code Book by Simon Singh.


Gnu Privacy Guard is free software, available for Linux/Unix, Windows, and Mac. This is a command line program, but GnuPG's website also lists gui's and plugins available for many popular email programs, like Thunderbird, KMail, Eudora, and Outlook.

If you feel like you need to pay for your software, or want to support the individual who gave public key encrypted email to the world, check out Pretty Good Privacy (PGP).

Both GnuPG and PGP adhere to the OpenPGP protocol. OpenPGP is the standard for email encryption.

revised: Thursday November 16, 2006