box.matto.nl
Enjoying Open Source Software

mcabber with OTR on FreeBSD

mcabber

mcabber is a great XMPP (Jabber) console client. It has all the important features and is easy use.

XMPP is an open standard for messaging and presence. XMPP is the Extensible Messaging and Presence Protocol that is developed in 1999 by Jeremie Miller. He called it jabber.

Federated instant messaging

XMPP is a decentralised system, that means that everybody can set up a XMPP server, nobody owns the network and the network can not be closed down by a single authority.

It is a federated system. The users of one server can exchange messages with the users of another server.

Privacy by encryption

The XMPP supports the use of encryption to protect the confidentiality of the messages. So, your chat is secured by encryption against eavesdropping.

There are two methods to protect your messages:

  • Encryption with OpenPGP
  • Encryption with OTR

mcabber supports both methods.

OTR

OTR or "Off-the-Record Messaging" is a cryptographic protocol that provides encryption for instant messaging conversations.

OTR is easy to set up, doesn't require the user to maintain a public and private key pair, and supports forward secrecy.

mcabber with OTR on FreeBSD

The FreeBSD binary package for mcabber has not been compiled with support for OTR.

Because this is one of the very few applications I compile and build, I have not installed the ports tree.

So, I did fetch the tar-ball with the source code from https://mcabber.com and compiled this.

Dependencies

You have to install the following packages:

gmake
pkgconf
glib-2
libotr-4

Fetch and unpack the tar-ball (mcabber-1.1.2.tar.bz2 in my case).

Than, run the traditional combo of ./configure, make and make install:

./configure --enable-otr
gmake
gmake install

To be able to manage any self compiled applications, GNU stow can be used. In that case, set the prefix accordingly.

./configure --enable-otr --prefix=/usr/local/stow/mcabber

Starting encrypted chat

An easy way to use OTR on mcabber is to set the OTR policy to opportunistic.

Add the following lines to the ~/.mcabber/mcabberrc file:

set otr = 1
set otr_dir = "~/.mcabber/otr/"
set otrpolicy default opportunistic

Make sure the directory "~/.mcabber/otr/" does exists. Start mcabber and connect to the jabber-server.

Set the policy for each contact you want to have a secure chat with.

/otrpolicy JID opportunistic

Remember that you can use tab-expansion on the JID.

Make sure the other party also has OTR enabled and set to opportunistic mode. Now just start chatting, first it will be unencrypted, but within a very short time you will see the friendly message:

*** OTR: channel established

Now, the channel is protected by encryption.

This can be checked by the message indicators:

-O> : outgoing message is encrypted through OTR
<O= : incoming message is encrypted through OTR

Have fun !

Tags: