Blink OTR implementation

September 13th, 2013

Blink SIP client for SIP2SIP edition for OSX (download here) is a free multimedia SIP client for OSX that supports chat sessions using MSRP protocol (RFC4975). The client is designed to work with SIP2SIP service that implements MSRP relay protocol for NAT traversal of SIP sessions with MSRP media like Instant Messaging chat sessions.

Over the MSRP media chat session, Blink SIP client for SIP2SIP edition implements the OTR protocol. OTR functionality will be gradually deployed to other versions and variations of Blink client like Blink Pro available in Mac App Store.

OTR Protocol

Off-the-Record (OTR) Messaging allows two parties to have private conversations over instant messaging by providing:


No one else can read your instant messages.


You are assured the correspondent is who you think it is.


The messages you send do not have digital signatures that are checkable by a third party. Anyone can forge messages after a conversation to make them look like they came from you. However, during a conversation, your correspondent is assured the messages he sees are authentic and unmodified.

Perfect forward secrecy

If you lose control of your private keys, no previous conversation is compromised.


OTR is enabled by default for every chat session, but this behaviour is configurable. The OTR implementation is backwards compatible with remote MSRP clients that do not support it (in this case the encryption features are not available). OTR is not employed when the remote party is a multi-party conference server advertised by is-focus Contact header parameter.

The code is written in Python and is based on the python-otr package

User input

  • Local and remote fingerprints are displayed in the Encryption menu
  • Chat window has the Encryption toolbar icon, encryption features for each session can be controlled by clicking on this toolbar item, a contextual menu appears
  • Verification of remote identity can be performed using SMP protocol (in a separate window) or manually in an audio session
  • Each Contact can have encrypted related attributes saved (always use OTR, verification status and learned fingerprint)
  • Logging of Chat conversations can be toggled off (global setting)
  • History saves for each message the encryption status (encrypted/non-encrypted and fingerprint un/verified). This is rendered using a lock with a corespondent colour


When the remote party has proposed OTR for the current session, the colour of the toolbar button changes to either orange (unverified fingerprint) or green (verified fingerprint). When the remote party (identified by its SIP URI) has changed its encryption fingerprint, several visual and audible clues appear:

  • Encryption lock turns red
  • Chat window system message is displayed
  • Voice synthesiser speaks
  • System notification (OSX >=10.8)
  • Growl notification

In such case, the process of verification of remote identity must be restarted.

Key storage

Private key is automatically generated the first time OTR protocol usage is invoked. The key can be regenerated in the Preferences panel in the chat section.

The private key is stored in the program configuration folder under a folder called chat. The database with the remote fingerprints is stored in a file under the same folder:

  • private_key.dsa
  • trusted_peers

The trusted peer is a tab delimited file that can be easily edited offline with a text editor.


We are not aware of any other SIP/MSRP client implementation that supports OTR encryption today. Blink OTR implementation however interoperates well with XMPP clients when using SIP2SIP service built-in SIP/XMPP gateway. We were able to have bidirectional OTR encrypted chat sessions between Blink (using SIP/MSRP) and Jitsi (using XMPP) through SylkServer.