...with Psi and GnuPG

Jun 13, 2007 14:49 GMT  ·  By

Jabber is an "en vogue" chat (Instant Messaging) technology, perfect for small and medium businesses. One of the cool things about Jabber - except for the fact that it's free and open source - is that it can be used on multiple platforms (Linux, Mac, Windows, BSD). Popular chat clients like Pidgin, Psi or Adium have support for the Jabber protocol. Once with the use of the Jabber protocol comes the need for privacy, which leads us to our current guide.

In today's tutorial you'll learn how to encrypt your chat sessions, no matter the operating system you are using. For this, we tested the following guide on an Ubuntu 7.04 PC, a Windows XP PC and a MAC OS X 10.4.9. We've used the following applications:

- Psi Messenger (Ubuntu/Windows/Mac OS X) - KGpg Key Manager - A very popular gpg frontend for KDE (Ubuntu) - GPG4Win - GPA (GNU Privacy Assistant) (Windows) - Mac GNU Privacy Guard (Mac GPG) - Mac OS X port of GnuPG (MAC OS X)

The basic idea for the chat encryption is to create one encryption key that will be used by everybody to encrypt their messages.

Ubuntu Setup

Create the encryption key

We will start with Ubuntu, because KGpg can export the encryption key to a keyserver very easily. If you don't have KGpg installed, you can install it by opening Synaptic Package Manager and search for kgpg. Open KGpg, go to Key -> Generate Key Pair, enter a desired Name and Email, select a Key Size (the bigger the better) and an Algorithm (I'll suggest you to use RSA). Click the OK button and you'll be asked for a passphrase. Once you've introduced the passphrase (make sure you write it somewhere in case you forget it) than click the OK button. You'll have to wait a few seconds (or more, depending on the key size) for the key to be generated. Once generated, the key will be immediately listed on the KGpg interface.

Review image

Export the encryption key

Now go to File -> Key Server Dialog, click on the 'Export' tab, select the Ubuntu keyserver (hkp://keyserver.ubuntu.com), then select the key you want to export (if you have multiple keys) and hit the 'Export' button. In about 5 seconds, you will receive a confirmation message.

Review image

Configure Psi for encryption

Assuming you have a Jabber account already setup, open Psi messenger and go to Account Setup. Click the 'Modify' button, go to the 'Details' tab, click the 'Select Key' button and choose the encryption key you've just created. Save and restart Psi.

NOTICE:

1. You will be asked for the key passphrase every time you open Psi. 2. Make sure you write the Key ID somewhere, because you will need it later in order to import it on the other computers. The Key ID is composed of 8 alpha numeric characters (e.g. E89DSA01)

Windows Setup

Import the encryption key

Download and install the GnuPG For Windows (GPG4Win) and the Psi Jabber client (of course). Open the GPA software from Start -> Programs -> GnuPG For Windows -> GPA. Go to Edit -> Preferences and at the "Default keyserver" section, choose the Ubuntu keyserver (hkp://keyserver.ubuntu.com), click Close. Now go to Server -> Retrieve Keys, enter the Key ID and click the OK button. You will be notified that the key was imported and you can see it listed in the main window of the GPA software. You can now close the GPA software.

Review image
Review image

Configure Psi

Open Psi and configure it exactly as in the Ubuntu section.

Mac OS X Setup

Import the encryption key

Download the Mac GNU Privacy Guard software, double click the DMG file, and install the package using the wizard. Now open up a terminal and type the following code:

code
gpg --recv-keys KEY ID
Where KEY ID will be replaced with your key ID. See picture below.
Review image

Configure Psi

Open Psi and configure it exactly as in the Ubuntu section.

That's it! All you have to do now is start a chat session with one of your friends, click on the encryption button and enjoy full privacy. Have a look at some encrypted chat session examples on Ubuntu, Windows and Mac OS X.

Review image
Review image
Review image