XMPP E2E Security

This page aims to provide an overview, comparison and evaluation of existing and proposed end-to-end security solutions for XMPP, after providing the characteristings of the XMPP setting with regard to communication and the security of it.

= Security properties =


 * 1) Authenticity
 * 2) Integrity
 * 3) Encryption
 * 4) Forward secrecy
 * 5) Malleable encryption

= Compatibility of Security Properties with XMPP Features =

Multiple resources
Using multiple resources almost certainly contradicts having forward secrecy: Either the resources would have to exchange their key material frequently (themselves retaining the forward secrecy) or share a long-living signing key that is used for authentication.
 * Forward secrecy uses short-lived (decryption) keys that are negotiated between two endpoints (clients)
 * Multiple resources must use the same decryption key to be able to decrypt messages originally sent to the other resource after a spontaneous resource switch
 * Multiple resources must use the same signing key to avoid multiple authentications between the same partners using different resources

Of course, this assumes that you only have to authenticate the user/JID once and not for every resource. If you are willing to authenticate every resource of your communication partner separately, the problem is reduced to that of a Multi-User Chat.

= Proposals =

XEP-0027 (PGP)
One of the first proposals for end-to-end security is based on PGP and described in XEP-0027.

The way XEP-0027 uses PGP, it doesn't provide protection from replay attacks. It also only encrypts messages and doesn't sign them, so they could be replaced with different correctly encrypted messages on the wire.(Source: chat in xsf@m.x.o) Thus it has been obsoleted by the XMPP Council in it's meeting on 2014-03-12.

XEP-0200 (Stanza Encryption)
The Stanza Encryption, as described in XEP-0200 is a general framework for securing arbitrary stanzas in a one-to-one established session. It relies on other XEPs to provide the necessary parameters like key material and algorithms, but itself supports re-keying. This XEP as well as those required to use it are very abstract to support a wide range of algorithms and methods.

XEP-0116 (ESession)
For usage between two online partners, the ESession protocol as defined in XEP-0116 specifies how to exchange parameters for XEP-0200 using XEP-0155 (Stanza Session Negotiation). Its support for various methods to authenticate the partner (or letting that be) makes it very complex to implement.

XEP-0217 (Simple ESession)
To simplify implementation, the simpler XEP-0217 defines only a subset of XEP-0116 with exactly one method (Short authentication codes, SAS) to authenticate the partner, and thus is compatible to XEP-0116 implementations.

XEP-0187 (Offline ESession)
For usage with offline messages, the offline version of ESessions as defined in XEP-0187 uses XEP-0189 (Public Key Publishing) via PEP (Personal Eventing Protocol) instead of the active initiation of an ESession.

XTLS
XTLS, as described in draft-meyer-xmpp-e2e-encryption, uses Jingle to negotiate an end-to-end stream between two XMPP clients and establishes a TLS connection over this stream. This stream can also reside within existing connections, with In-Band Bytestreams.

miller-e2e
This is the protocol described in draft-miller-xmpp-e2e, which allows encryption and signing of arbitrary XMPP stanzas.

OTR (Off-the-record Messaging)
OTR is a crypto protocol, specifically designed to secure instant messaging conversations.

TS (Text Secure Protocol)
Text Secure is a rather new open mobile messenger which has an openly specified protocol. This protocol is described here.

SCIMP ( Silent Circle Instant Messaging Protocol)
SCIMP is the cryptographic protocol used by Silent Text, which enables private conversations over standard XMPP.

= Comparative Overview =

= Related Documents =
 * https://developer.pidgin.im/wiki/EndToEndXMPPCrypto
 * http://trevp.net/talk_2014_04_02.pdf

= Discussion = If you have any questions or comments regarding this page, please [xmpp:xsf@muc.xmpp.org?join join the XSF chatroom at xsf@muc.xmpp.org].