Aug 24, 2007

GPG vs. S/MIME

So, after learning how to send emails with Python, I discovered that anybody can impersonate any email address. This is rather dangerous. Consider some hypothetical situations: Someone sends a flaming email to your boss using your email address, and you get fired! Or someone could send an email to my girlfriend (these are hypothetical situations) saying I want to break up with her. I ask her what is wrong, but she refuses to talk to me for a week! Even if I eventually find out what happened and assure her the email wasn't sent my me, damage is still done in the mean time.

So I when I read that in the latest preview of Kubuntu (Gutsy Gibbon, Tribe 5) that Kmail would be installed with all the programs needed for GPG (GnuPrivacyGuard), I decided to try GPG. I followed these simple instructions on the Ubuntu community documentation page. It was as simple as "sudo apt-get install mozilla-thunderbird-enigmail". I then followed the commandline instructions to generate a key pair and import them into Enigmail. (Enigmail has a GUI to generate and manage keys, I later found out.) It was as simple as putting in my name and email address and then issuing a command to upload my public key to the Ubuntu keyserver. (Keys are propagated to all the keyservers after some time.) Then, I could compose an email in Thunderbird and digitally sign or encrypt it via the menu or toolbar buttons. I sent a few emails to myself to test. The signature would automatically be verified and little icons and status bars would indicate that emails were signed or encrypted.

With the default settings, in order to sign my message, all the HTML formatting would have to be removed, and ugly text was added to the body of the email. E.g.,

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is a sample text.

This is more sample text.

The End
Love,
William
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzvFPhnWcV3yyfeERAsnFAKCUHyC5AZuI7jDAxhDI6DUfm6wN2gCgpbJw
vQXQ9cbH1TirrA4ppa6QYKg=
=SQbg
-----END PGP SIGNATURE-----

I surely wasn't going to send emails looking like that! Luckily, there is an option (called PGP/MIME) that makes the PGP signature an attachment and preserves the HTML formatting. However, unless the people receiving the emails have a PGP plugin installed, they would simply see normal emails with attachments called "signature.asc". Not only is that anoying, it defeats the purpose, which is for them to be able to know if the email really came from me.

I learned that a different type of security, called S/MIME, is built into most email clients, including Microsoft Outlook and Mozilla Thunderbird. It uses the same encryption technology, but instead of using self-generated keys that are uploaded to public servers, it requires getting a key pair from a "certificate authority". In essence, instead of a community based "web of trust", it is a corporate based "buy a certificate and trust us, the corporation". Obviously, S/MIME has caught on, because companies like VeriSign make money off of it. ;-)

Fortunately, at least one certificate authority, Thawte, will give you a free "certificate" (read "private/public key pair") for personal email use. (These certificates, by the way, are the same technology used in SSL and HTTPS secure websites.) Therefore, I decided I would get a free "certificate" and and try S/MIME.

EASIER SAID THAN DONE!!!

I had to register with Thawte by giving them my name, email, date of birth, nationality, prefered currency and (because they need five security questions in case I ever forget my account password) the name of my first goldfish, first crush, favorite band, birth location, and the year I started homeschooling. The had to send me an email to verify my address. The first email didn't come, so I had to do the whole registration process over again. I got the email, followed the link to put in some codes they gave me in the email. Finally, I was allowed to request a certificate. I could get either:
  • a Mozilla Firefox/Thunderbird, Netscape Communicator/Messenger certificate
  • a Microsoft Internet Explorer, Outlook and Outlook Express certificate
  • a Lotus Notes R5 certificate
  • an OperaSoftware Browser certificate
  • or a C2Net SafePassage Web Proxy certificate
    certificate.

Because I currently use Mozilla Thunderbird, I asked for a Mozilla Firefox/Thunderbird, Netscape Communicator/Messenger certificate. It complained because I was using the Opera web browser! So I tried getting the certificate with Firefox, but Firefox would not accept it. (I got the impression that Firefox would only accept PKCS 12 files, and apparently this was a PKCS 7 certificate?) I went to the support page, and found instructions on how to export a certificate from IE to Thunderbird. So I booted Vista and requested a certificate for IE (remember, these certificates work for Internet browsing too, although I have no idea why one would need one). It would not work on IE7 in Vista. (VBScript error.) So I went downstairs to an XP computer and requested a certificate for IE on it. Still using IE7, but on XP, it worked. I then exported the certificate from IE with the "export private key" option, and imported it into Thunderbird. But when I tried to send a signed message, I got an error! So I exported the certificate from IE again, with both the "private key" and "Include all certificates in certification path if possible" options, and imported into Thunderbird again. At long last, voilĂ ! It worked! About time! Creating a GPG key pair and configuring Enigmail took about an hour of my morning. Getting a S/MIME certificate and importing it into Thunderbird took the whole afternoon!

The advantage of S/MIME, of course, is that I can sign all my messages, and other people will see it and think "Hey! That's like, secured or something," instead of "What's with the weird attachment?" They don't have to install extra plugins. (And there may be no good GPG plugins for Outlook. The Gpg4win project is doing it's best to make GPG easy on Windows, but they say Outlook doesn't allow the kind of functionality needed for PGP/MIME encryption or automatic decryption.)

So what can I say? I like GPG better. It's open-source, easy to set up, and is more than secure enough to verify that this email came from the real owner of this email address. S/MIME is less transparent, is designed to benefit corporations like Thawte and VeriSign, and the setup process - which could have been made very easy! - is a terrible user experience, at least with Thawte. (However, Thawte may be the only company that issues free email certificates that don't expire.) With GPG, I know that the only copy of my private key in the world is on my computer: you would have to hack into my computer to steal it. Thawte, on the other hand, generated the keypair for me, and they have a copy of my private key that I can redownload at any time. I'm trusting the employees of Thawte not to steal my key, AND I'm trusting that their servers can withstand attacks from hackers. Thawte harvested a lot of personal information in the registration process, which makes the possibility of identity theft even worse. However, I can't revoke the certificate. So which will I use: GPG or S/MIME? S/MIME, because it works with the leading email clients without my friends having to install extra software. However, I will keep my GPG signature and Enigmail around, because it might come in handy someday.

Aug 21, 2007

GNU/Linux

Someone else's blog post on why he uses the name Linux instead of GNU/Linux inspired me to write my own opinion of the matter. I too, choose to say "Linux", although if I was actually talking to someone who was interested, I'd probably say I use "Kubuntu Linux", because that is more accurate.

Here's what I think:
Arguing about the name is stupid. You might as well argue that America should be renamed America/Columbus. All Amerigo Vespucci did was recognized the land as a new continent; he couldn't have done that without the help of Columbus, who discovered the land. (True history buffs would insist it should be called America/Ericson, because Leif Ericson discovered America long before Christopher Columbus did.)

Only a small few think "Linux" refers only to a kernel. To the rest of us, "Linux" is the catch-all posterchild word for "open source operating system and software."

Arguing over the name is looking backwards instead of forwards. It is fighting over recognition instead of cooperating towards real recognition... by the world.

Jun 19, 2007

The future of: Spell Checking

November 17th, 2006

Spell checking is in serious need of improvement! I’m currently writing this in OpenOffice.org Writer, so I’ll use it as an example. Say I add the word “macronutrient” to the standard custom dictionary. After adding the word, none of the obvious variations are recognized; I have to add “macronutrients” (plural), “macronutrient’s” (possessive), “Macronutrient” (capital), “Macronutrients’ ” (capital plural possesive), and so on individually. It’s a pain in the butt!!! How hard could it be to apply a little grammatical logic? At a bare minimum, OpenOffice ought to be able to ignore “s” and ” ’s” at the end of a word, and accept capitalized words at the beginning of sentences. Ideally, whenever I add a word to the dictionary, OpenOffice would let me choose what part of speech the word is (noun, verb, adjective, adverb) and use that information to determine that “Macronutrients’ ” is logical, but not “macronutriented”.

The best idea would be to ask users, whenever they add a word to their custom dictionaries, whether the word ought to be part of the standard dictionary. If they say yes, a message would be sent to the folks who write the OpenOffice spelling dictionary, so they could double check the word’s authenticity and quickly add it to the main dictionary. That way the main dictionary would improve over time.

What spell checking OUGHT to be like NOW:

But let’s consider spell check at the global level. Spelling dictionaries ought to be shared between all the applications on your computer: word processors, email clients, web browsers, text editors, etc. Switching between dictionaries or enabling combinations of dictionaries should be a piece of cake. For instance, I’d like to have an “Email slang” dictionary that is applied only to emails and forum postings, containing words such as “lol”, “iirc”, and “rtfm”. However, I ought to be able to switch that dictionary off quickly if I’m writing a formal email.

Advanced ideas for Spell Checking in the future

In the future, I’d love to see more “project based” spell checking. I’d love to have custom dictionaries specifically for certain subjects, such as chemistry or biology, and to be able to specify in my Chemistry and Biology document templates that those dictionaries ought to be applied when spell checking documents made from these templates. Or if I’m writing an essay about The Ramayana, it would be nice if my word processor could downloaded a dictionary of character and place names to supplement the spell check. For materials whose copyright has expired, word processors could download the entire e-text to help correct quotations. Auto-completion could be a huge boon, too. Imagine I’m writing a report on The Adventures of Huckleberry Finn. I type:

“You don’t know about me without you have read

and a balloon appears, saying

“… a book by the name of The Adventures of Tom Sawyer; but that ain’t no matter.” [Complete Quote] [More Sentences]

Such a feature would allow users to quickly and accurately quote large portions of text. It could be especially helpful if you knew how a quote started, but not what page it was on.

Think about it. The next time some tells you spell checking has reached it’s potential, reply “Nay! we have not yet begun to spell check!”