Abstract: | Extension for JET introducing OMEMO End-to-End Encrypted Jingle Transports. |
Author: | Paul Schaub |
Copyright: | © 1999 – 2017 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Experimental |
Type: | Standards Track |
Version: | 0.1 |
Last Updated: | 2017-11-29 |
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.
1. Introduction
2. Mappings
3. Limitaions
4. Key Transport
5. Determining Support
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
Jingle Encrypted Transports (XEP-0391) [1] can be used to utilize different end-to-end encryption methods to secure Jingle Transports, eg. in the context of Jingle File Transfer (XEP-0234) [2]. This document aims to extend Jingle Encrypted Transports (XEP-0391) [1] to allow the use of OMEMO encryption with Jingle transports. To achieve this goal, this protocol extension makes use of OMEMOs KeyTransportElements.
Conveniently the OMEMO protocol already provides a way to transport key material to another entity. So called KeyTransportElements are basically normal OMEMO MessageElements, but without a payload, so the contained key can be used for something else (See Section 4.6 of XEP-0384). This extension uses the key encrypted in the KeyTransportMessages <key> attribute and initialization vector from the <iv> attribute to secure Jingle Transports. The key corresponds to the Transport Key of XEP-0391, while the iv corresponds to the Initialization Vector. The KeyTransportMessage is the equivalent to the Envelope Element. Note that within the Envelope Element, the Transport Key is encrypted with the OMEMO ratchet.
Unfortunately OMEMO Encryption (XEP-0384) [3] determines the type of the transported key to be AES-128-GCM-NoPadding, so no other configuration can be used in the context of this extension.
Since OMEMO deviceIds are not bound to XMPP resources, the initiator MUST encrypt the Transport Key for every device of the recipient.
In order to transport a key to the responder, the initiator creates a fresh AES-128-GCM-NoPadding Transport Key and Initialization Vector and generates an OMEMO KeyTransportElement from it as described in XEP-0384. This is then added as a child of the JET <security> element. The 'cipher' attribute MUST be set to 'aes-128-gcm-nopadding:0' (see the ciphers section of XEP-0391). The value of the 'type' attribute must be set to the namespace of the used version of XEP-0384 (see Namespace Versioning regarding the possibility of incrementing the version number).
<iq from='romeo@montague.example/dr4hcr0st3lup4c' id='nzu25s8' to='juliet@capulet.example/yn0cl4bnw0yr3vym' type='set'> <jingle xmlns='urn:xmpp:jingle:1' action='session-initiate' initiator='romeo@montague.example/dr4hcr0st3lup4c' sid='851ba2'> <content creator='initiator' name='a-file-offer' senders='initiator'> <description xmlns='urn:xmpp:jingle:apps:file-transfer:5'> <file> <date>1969-07-21T02:56:15Z</date> <desc>This is a test. If this were a real file...</desc> <media-type>text/plain</media-type> <name>test.txt</name> <range/> <size>6144</size> <hash xmlns='urn:xmpp:hashes:2' algo='sha-1'>w0mcJylzCn+AfvuGdqkty2+KP48=</hash> </file> </description> <transport xmlns='urn:xmpp:jingle:transports:s5b:1' mode='tcp' sid='vj3hs98y'> <candidate cid='hft54dqy' host='192.168.4.1' jid='romeo@montague.example/dr4hcr0st3lup4c' port='5086' priority='8257636' type='direct'/> </transport> <security xmlns='urn:xmpp:jingle:jet:0' name='a-file-offer' cipher='urn:xmpp:ciphers:aes-128-gcm-nopadding' type='eu.siacs.conversations.axolotl'> <encrypted xmlns='eu.siacs.conversations.axolotl'> <header sid='27183'> <key rid='31415'>BASE64ENCODED...</key> <key prekey="true" rid='12321'>BASE64ENCODED...</key> <!-- ... --> <iv>BASE64ENCODED...</iv> </header> </encrypted> </security> </content> </jingle> </iq>
The recipient decrypts the OMEMO KeyTransportElement to retrieve the Transport Secret. Transport Key and Initialization Vector are later used to encrypt/decrypt data as described in Jingle Encrypted Transports (XEP-0391) [1].
To advertise its support for JET-OMEMO, when replying to service discovery information ("disco#info") requests an entity MUST return URNs for any version of this extension, as well as of the JET extension that the entity supports -- e.g., "urn:xmpp:jingle:jet-omemo:0" for this version, or "urn:xmpp:jingle:jet:0" for Jingle Encrypted Transports (XEP-0391) [1] (see Namespace Versioning regarding the possibility of incrementing the version number).
<iq from='romeo@montague.example/dr4hcr0st3lup4c' id='uw72g176' to='juliet@capulet.example/yn0cl4bnw0yr3vym' type='get'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq from='juliet@capulet.example/yn0cl4bnw0yr3vym' id='uw72g176' to='romeo@montague.example/dr4hcr0st3lup4c' type='result'> <query xmlns='http://jabber.org/protocol/disco#info'> <feature var='urn:xmpp:jingle:jet:0'/> <feature var='urn:xmpp:jingle:jet-omemo:0'/> </query> </iq>
In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in Entity Capabilities (XEP-0115) [4]. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.
Series: XEP
Number: 0396
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.1
Last Updated: 2017-11-29
Approving Body: XMPP Council
Dependencies: XEP-0391, XEP-0234, XEP-0384
Supersedes: None
Superseded By: None
Short Name: jet-omemo
XML Schema for the 'jingle' namespace: <http://xmpp.org/schemas/jingle.xsd>
XML Schema for the 'jingle:errors' namespace: <http://xmpp.org/schemas/jingle-errors.xsd>
Registry:
<http://xmpp.org/registrar/jet-omemo.html>
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
vanitasvitae@riseup.net
JabberID:
vanitasvitae@jabberhead.tk
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
There exists a special venue for discussion related to the technology described in this document: the <jingle@xmpp.org> mailing list.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0391: Jingle Encrypted Transports <https://xmpp.org/extensions/xep-0391.html>.
2. XEP-0234: Jingle File Transfer <https://xmpp.org/extensions/xep-0234.html>.
3. XEP-0384: OMEMO Encryption <https://xmpp.org/extensions/xep-0384.html>.
4. XEP-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.html>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Accepted by Council as Expremental XEP
(XEP Editor (jwi))First draft
(vv)END