18 January 2010 0 Comments

Add pgp/gpg encryption to gmail

This article will show you how to get started with gpg encryption and how to use it with gmail.
firegpg2

Installing gpg and generating a set of keys


First, lets install some necessary packages

1
 sudo aptitude install gnupg gnupg-agent xsel

Now, generate your public and private keys with the following command

1
 gpg --gen-key

Fill in your name, email address and a comment when required. It is a good idea to keep these accurate as people will use these when looking for your public key online. Finally, copy your public key it to the clipboard

1
gpg --export -a username | xsel --clipboard

where you replace username with your actual username. Now point your browser to MIT’s public key server. Click the mouse in the Submit a key field, and press CRTL-v to paste the public key. Finally, press the Submit this key to the keyserver!-button. Now, all your friends can find your public without any trouble.

Installing FireGPG

Launch Firefox and click this link to install FireGPG. You might have to restart firefox for the changes to take effect

Adding your friends to FireGPG’s address book

Suppose you have a friend by the name of John Doe and you wish to send him an encrypted message. To do this, you must first get his public key such that you can encode a message that only he can unencode with his private key. Once again, point your browser to MIT’s public key server. This time, type in the name John Doe in the Search String:-field and press Search to find any public keys matching this name. As you will no doubt find out, a great number of persons go by the name of John Doe so to identify your friend the comment (eg. his website’s address) will come in handy. Once you have found the John Doe you were looking for, click the KeyID link. This will take you to a page showing his public key probably looking similar to mine, shown below. Once the key is displayed, highlight it and select FireGPG->Import. You have now added John Doe to your FireGPG’s address book.

Capture 

Using FireGPG to send encrypt emails

Point you browser to gmail.com and log into your account as usual. When you compose a new email, you will see some changes to the user interface, as shown in the figure below.

firegpg

When sending emails you should choose the highlighted option sign, encrypt and send. One you click this button you will be presented with two dialogs. In the first dialog, select the person from the list you wish to send the encrypted message to. In the second dialog, select you own key.

Using FireGPG to decrypt emails

Suppose, that you have received an email from your friend John Doe with text somewhat similar to that shown below. To decrypt the message, simply highlight the text, right click and select FireGPG->Decrypt. Once you have entered your password, the decrypted message will appear in a separate window.

firegpg_key

Further reading


FireGPG’s website

GnuPG’s website

Credit Towards Kaare Hartvig Jensen

Tags: ,