gajim and gpg for encrypted jabber chat
I finally got around to setting up gpg encryption with gajim. Pretty neat. My hosting provider has a jabber server, but unfortunately, it is not ssl encrypted. ssl encrypted jabber is also only between you and the server. The servers can communicate over non-encrypted channels...so your chat likely passes in the clear somewhere regardless. gpg encryption is between you and your target party. Public key cryptography to the rescue.
Here is how it is achieved in gajim.
Generate a gpg key, if you don't already have one.
The gentoo gpg getting started guide is one of the better ones I have found. Follow that documentation to generate your gpg keychain.Exchange public keys with the target party.
You need to send your public key to the target party, and get their public key and import it.-
Do a
gpg --list-keys. Take the key Id of your public key, and use that to export your key. -
Here is an example export
gpg --armor --output eliott.asc --export 851C11CC -
Import the other party's public key.
gpg --import joe_somebody.asc
-
Do a
Now fire up gajim. In the interface, click edit, then Accounts. Now modify your primary account. Go to the 'Personal Information' tab, and click the 'Choose Key' button. Select your key. Click Save.
Now right click on the target buddy icon. Select 'Assign GPG key'. Choose the key that you imported for that person. In our above example, it was 'joe_somebody'.
The remote party need to perform similar steps, importing your key and assigning it to you. Once done, you will be able to enabled encryption when chatting (a lock icon will be available).
So..how do you know if you are actually encrypting or not?
Click on the actions dropdown menu, Advanced, then 'show xml console'. This will pop up the xml console window. Click the 'enable' button. Now start chatting with the target party. You should see a bunch of 'garbage' in the xml chat fields. This means you are encrypting the discussion. yay!