OTR

Version 24 (Adrian Georgescu, 09/13/2013 02:30 am)

1 3 Adrian Georgescu
h1. Blink OTR implementation
2 1 Adrian Georgescu
3 12 Adrian Georgescu
September 12th, 2013
4 12 Adrian Georgescu
5 24 Adrian Georgescu
Blink SIP client for SIP2SIP edition for OSX ("download here":http://download.sip2sip.info/) is a free multimedia SIP client for OSX that supports chat sessions using MSRP protocol ("RFC4975":http://tools.ietf.org/html/rfc4975).  The client is designed to work with SIP2SIP service that implements "MSRP relay":http://tools.ietf.org/html/rfc4976 protocol for NAT traversal of SIP sessions with MSRP media like Instant Messaging chat sessions. 
6 16 Adrian Georgescu
7 16 Adrian Georgescu
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. 
8 16 Adrian Georgescu
9 1 Adrian Georgescu
10 3 Adrian Georgescu
h2. OTR Protocol
11 3 Adrian Georgescu
12 9 Adrian Georgescu
"Off-the-Record (OTR) Messaging":http://www.cypherpunks.ca/otr/ allows two parties to have private conversations over instant messaging by providing:
13 3 Adrian Georgescu
14 1 Adrian Georgescu
h3. Encryption
15 1 Adrian Georgescu
16 1 Adrian Georgescu
No one else can read your instant messages.
17 1 Adrian Georgescu
18 1 Adrian Georgescu
h3. Authentication
19 3 Adrian Georgescu
20 1 Adrian Georgescu
You are assured the correspondent is who you think it is.
21 1 Adrian Georgescu
22 1 Adrian Georgescu
h3. Deniability
23 1 Adrian Georgescu
24 1 Adrian Georgescu
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.
25 1 Adrian Georgescu
26 1 Adrian Georgescu
h3. Perfect forward secrecy
27 1 Adrian Georgescu
28 1 Adrian Georgescu
If you lose control of your private keys, no previous conversation is compromised.
29 3 Adrian Georgescu
30 3 Adrian Georgescu
h2. Implementation
31 1 Adrian Georgescu
32 20 Adrian Georgescu
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. 
33 20 Adrian Georgescu
34 20 Adrian Georgescu
The code is written in Python and is based on the "python-otr package":https://pypi.python.org/pypi/python-potr/1.0.0b5
35 7 Adrian Georgescu
36 4 Adrian Georgescu
h3. User input
37 4 Adrian Georgescu
38 17 Adrian Georgescu
 * Local and remote fingerprints are displayed in the Encryption menu
39 1 Adrian Georgescu
 * 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
40 17 Adrian Georgescu
 * Verification of remote identity can be performed using SMP protocol (in a separate window) or manually in an audio session
41 7 Adrian Georgescu
 * Each Contact can have encrypted related attributes saved (always use OTR, verification status and learned fingerprint)
42 10 Adrian Georgescu
 * Logging of Chat conversations can be toggled off (global setting)
43 13 Adrian Georgescu
 * History saves for each message the encryption status (encrypted/non-encrypted and fingerprint un/verified). This is rendered using a lock with a corespondent collor
44 1 Adrian Georgescu
45 1 Adrian Georgescu
h3. Notifications
46 4 Adrian Georgescu
47 17 Adrian Georgescu
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:
48 7 Adrian Georgescu
49 17 Adrian Georgescu
 * Encryption lock turns red
50 4 Adrian Georgescu
 * Chat window system message is displayed
51 4 Adrian Georgescu
 * Voice synthesiser speaks
52 1 Adrian Georgescu
 * System notification (OSX >=10.8) 
53 1 Adrian Georgescu
 * Growl notification
54 8 Adrian Georgescu
55 23 Adrian Georgescu
In  such case, the process of verification of remote identity must be restarted.
56 22 Adrian Georgescu
57 1 Adrian Georgescu
h3. Key storage
58 23 Adrian Georgescu
59 23 Adrian Georgescu
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.
60 11 Adrian Georgescu
61 11 Adrian Georgescu
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:
62 11 Adrian Georgescu
63 11 Adrian Georgescu
 * private_key.dsa
64 11 Adrian Georgescu
 * trusted_peers
65 11 Adrian Georgescu
66 8 Adrian Georgescu
h3. Interoperability
67 1 Adrian Georgescu
68 19 Adrian Georgescu
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":http://jit.si (using XMPP) through "SylkServer":http://sylkserver.org.