TOC 
Network Working GroupP. Saint-Andre
Internet-DraftJabber Software Foundation
Expires: November 18, 2003May 20, 2003

End-to-End Object Encryption in XMPP
draft-ietf-xmpp-e2e-03

Status of this Memo

This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt.

The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html.

This Internet-Draft will expire on November 18, 2003.

Copyright Notice

Copyright (C) The Internet Society (2003). All Rights Reserved.

Abstract

This document defines a method for end-to-end object signing and encryption in the Extensible Messaging and Presence Protocol (XMPP).



 TOC 

Table of Contents




 TOC 

1. Introduction

This document define a method for end-to-end signing and encryption in the Extensible Messaging and Presence Protocol (XMPP). (For information about XMPP, see XMPP Core[1] and XMPP IM[2].) The method defined herein enables a sender to encrypt and/or sign an instant message sent to a specific recipient, encrypt and/or sign presence information that is directed to a specific user, and sign presence information that is broadcasted to a specific user. This document thereby helps the XMPP specifications meet the requirements defined in RFC 2779[3].

1.1 Terminology

This document inherits terminology defined in XMPP Core[1] and RFC 2778[4].

The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119[5].

1.2 Discussion Venue

The authors welcome discussion and comments related to the topics presented in this document. The preferred forum is the <xmppwg@jabber.org> mailing list, for which archives and subscription information are available at <http://www.jabber.org/cgi-bin/mailman/listinfo/xmppwg/>.

1.3 Intellectual Property Notice

This document is in full compliance with all provisions of Section 10 of RFC 2026. Parts of this specification use the term "jabber" for identifying namespaces and other protocol syntax. Jabber[tm] is a registered trademark of Jabber, Inc. Jabber, Inc. grants permission to the IETF for use of the Jabber trademark in association with this specification and its successors, if any.



 TOC 

2. Requirements

For the purposes of this document, we stipulate the following requirements:

  1. The method defined MUST address encryption and signing requirements for minimal instant messaging and presence only, as those are defined in RFC 2779[3]. The method is NOT REQUIRED to support non-IM applications of XMPP, nor to support advanced instant messaging and presence functionality that is outside the scope of RFC 2799. In particular, the method MUST address the following requirements defined in RFC 2779:
  2. The method defined MUST enable interoperability with non-XMPP messaging systems that support Common Presence and Instant Messaging (CPIM) as defined by the Instant Messaging and Presence (IMPP) Working Group. Therefore:
  3. The method MUST follow the procedures (including the specific algorithms) defined in Common Profile for Instant Messaging[8] and Common Profile for Presence[9]. In particular, these documents specify:



 TOC 

3. Securing Messages

In order to encrypt a message, a sending entity MUST use the following procedure:

  1. Generate a "Message/CPIM" object as defined in MSGFMT[6].
  2. Encrypt and/or sign both the headers and content of the "Message/CPIM" object as specified in Requirement 3 of Section 2 above.
  3. Provide the resulting multipart S/MIME object (see RFC 1847[13]) as the CDATA of an <e2e/> child of a <message/> stanza, with the <e2e/> element scoped by the 'urn:ietf:params:xml:ns:xmpp-e2e' namespace (note that this namespace name adheres to the format defined in The IANA XML Registry[14]).

Example 1: Sender generates "Message/CPIM" object:

Content-type: Message/CPIM

From: Juliet Capulet <im:juliet@capulet.com>
To: Romeo Montague <im:romeo@montague.net>
DateTime: 2003-05-14T11:45:36Z
Subject: Imploring

Content-type: text/xml; charset=utf-8
Content-ID: <1234567890@capulet.com>

<body>
Wherefore art thou, Romeo?
</body>
        

Example 2: Sender generates signed message (the 'from' address on the XMPP message stanza is stamped by sender's server):

<message to='romeo@montague.net/orchard' type='chat'>
  <e2e xmlns='urn:ietf:params:xml:ns:xmpp-e2e'>
Content-Type: multipart/signed; boundary=next;
              micalg=sha1;
              protocol=application/pkcs7-signature

--next
Content-type: Message/CPIM

From: Juliet Capulet <im:juliet@capulet.com>
To: Romeo Montague <im:romeo@montague.net>
DateTime: 2003-05-14T23:45:36Z
Subject: Imploring

Content-type: text/xml; charset=utf-8
Content-ID: <1234567890@capulet.com>

<body>
Wherefore art thou, Romeo?
</body>
--next
Content-Type: application/pkcs7-signature

[signed body part]

--next--
  </e2e>
</message>
        


 TOC 

4. Securing Presence

In order to encrypt presence information, a sending entity MUST use the following procedure:

  1. Generate an "application/cpim-pidf+xml" object defined in PIDF[7].
  2. Encrypt and/or sign the "application/cpim-pidf+xml" object as specified in Requirement 3 of Section 2 above.
  3. Provide the resulting S/MIME object as the CDATA of an <e2e/> child of a <presence/> stanza, with the <e2e/> element scoped by the 'urn:ietf:params:xml:ns:xmpp-e2e' namespace (note that this namespace name adheres to the format defined in The IANA XML Registry[14]). The <presence/> stanza MUST include a 'to' attribute, i.e., it must be an instance of directed presence as defined in XMPP IM[2].

Example 3: Sender generates "application/cpim-pidf+xml" object:

Content-type: application/cpim-pidf+xml

From: Juliet Capulet <pres:juliet@capulet.com>
To: Romeo Montague <pres:romeo@montague.net>
DateTime: 2003-05-14T23:53:11Z

Content-type: text/xml; charset=utf-8
Content-ID: <2345678901@capulet.com>

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
          xmlns:im="urn:ietf:params:xml:ns:pidf:im"
          entity="pres:juliet@capulet.com">
  <tuple id="h40zny"
    <status>
      <basic>open</basic>
      <im:im>away</im:im>
    </status>
    <note xml:lang="en">retired to the chamber</note>
    <timestamp>2003-05-14T23:53:11Z</timestamp>
  </tuple>
</presence>
        

Example 4: Sender generates signed presence (the 'from' address on the XMPP presence stanza is stamped by sender's server):

<presence to='romeo@montague.net/orchard'>
  <e2e xmlns='urn:ietf:params:xml:ns:xmpp-e2e'>
Content-Type: multipart/signed; boundary=next;
              micalg=sha1;
              protocol=application/pkcs7-signature

--next
Content-type: application/cpim-pid+xml

From: Juliet Capulet <pres:juliet@capulet.com>
To: Romeo Montague <pres:romeo@montague.net>
DateTime: 2003-05-14T23:53:11Z

Content-type: text/xml; charset=utf-8
Content-ID: <2345678901@capulet.com>

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
          xmlns:im="urn:ietf:params:xml:ns:pidf:im"
          entity="pres:juliet@capulet.com">
  <tuple id="h40zny"
    <status>
      <basic>open</basic>
      <im:im>away</im:im>
    </status>
    <note xml:lang="en">retired to the chamber</note>
    <timestamp>2003-05-14T23:53:11Z</timestamp>
  </tuple>
</presence>
--next
Content-Type: application/pkcs7-signature

[signed body part]

--next--
  </e2e>
</presence>
        


 TOC 

5. Secure Communications Through a Gateway

A common method for achieving interoperability between two disparate services is through the use of a "gateway" that interprets the protocols of each service and translates them into the protocols of the other. CPIM[8] and CPP[9] define the common profiles to be used for interoperability between instant messaging and presence services that comply with RFC 2779[3]. In the case of communications between an XMPP service and a non-XMPP service, we can visualize this relationship as follows:

+-------------+         +-------------+         +-------------+
|             |         |             |         |             |
|    XMPP     |         |  CPIM/CPP   |         |  Non-XMPP   |
|   Service   | <---->  |  Gateway    | <---->  |  Service    |
|             |         |             |         |             |
+-------------+         +-------------+         +-------------+
        

The end-to-end encryption method defined herein enables the exchange of encrypted and/or signed instant messages and presence through CPIM/CPP gateways. In particular:



 TOC 

6. IANA Considerations

A URN sub-namespace for signed and encrypted content in the Extensible Messaging and Presence Protocol (XMPP) is defined as follows.

URI:
urn:ietf:params:xml:ns:xmpp-e2e
Specification:
[RFCXXXX]
Description:
This is the XML namespace name for signed and encrypted content in the Extensible Messaging and Presence Protocol as defined by [RFCXXXX].
Registrant Contact:
IETF, XMPP Working Group, <xmppwg@jabber.org>



 TOC 

7. Security Considerations

Detailed security considerations for instant messaging and presence protocols are given in RFC 2779[3], specifically in Sections 5.1 through 5.4.

The end-to-end security method defined here MAY result in exchanging secured instant messages and presence information through a gateway that implements CPIM[8] and CPP[9]. Such a gateway MUST be compliant with the minimum security requirements of the instant messaging and presence protocols with which it interfaces. The introduction of gateways to the security model of instant messaging and presence in RFC 2779 also introduces some new risks. End-to-end security properties (especially confidentiality and integrity) between instant messaging and presence user agents that interface through a CPIM/CPP gateway can be provided only if common formats are supported. The need for end-to-end security is thus met by this specification through the use of common formats, specifically MSGFMT[6] for instant messages and PIDF[7] for presence information. Common formats are further ensured by requiring the use of multipart S/MIME[10] objects, as well as CMS[11] EnvelopeData for encryption and CMS[11] SignedData for signing. Finally, the algorithm used SHOULD be AES[12], since it is expected that AES best suits the capabilities of many platforms. However, an IETF specification for the use of AES is still incomplete at the time of writing.



 TOC 

Normative References

[1] Saint-Andre, P. and J. Miller, "XMPP Core", draft-ietf-xmpp-core-12 (work in progress), May 2003.
[2] Saint-Andre, P. and J. Miller, "XMPP Instant Messaging", draft-ietf-xmpp-im-11 (work in progress), May 2003.
[3] Day, M., Aggarwal, S. and J. Vincent, "Instant Messaging / Presence Protocol Requirements", RFC 2779, February 2000.
[4] Day, M., Rosenberg, J. and H. Sugano, "A Model for Presence and Instant Messaging", RFC 2778, February 2000.
[5] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[6] Atkins, D. and G. Klyne, "Common Presence and Instant Messaging Message Format", draft-ietf-impp-cpim-msgfmt-08 (work in progress), January 2003.
[7] Fujimoto, S., Sugano, H., Klyne, G., Bateman, A., Carr, W. and J. Peterson, "CPIM Presence Information Data Format", draft-ietf-impp-cpim-pidf-08 (work in progress), May 2003.
[8] Crocker, D. and J. Peterson, "Common Profile for Instant Messaging (CPIM)", draft-ietf-impp-im-02 (work in progress), March 2003.
[9] Crocker, D. and J. Peterson, "Common Profile for Presence (CPP)", draft-ietf-impp-pres-02 (work in progress), March 2003.
[10] Ramsdell, B., "S/MIME Version 3 Message Specification", RFC 2633, June 1999.
[11] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3369, August 2002.
[12] Housley, R. and J. Schaad, "Use of the AES Encryption Algorithm and RSA-OAEP Key Transport in CMS", draft-ietf-smime-aes-alg-06 (work in progress), January 2003.
[13] Galvin, J., Murphy, S., Crocker, S. and N. Freed, "Security Multiparts for MIME: Multipart/Signed and Multipart/Encrypted", RFC 1847, October 1995.
[14] Mealling, M., "The IANA XML Registry", draft-mealling-iana-xmlns-registry-04 (work in progress), June 2002.


 TOC 

Author's Address

  Peter Saint-Andre
  Jabber Software Foundation
EMail:  stpeter@jabber.org
URI:  http://www.jabber.org/people/stpeter.php


 TOC 

Appendix A. Schema for urn:ietf:params:xml:ns:xmpp-e2e

The following XML schema is descriptive, not normative.

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:ietf:params:xml:ns:xmpp-e2e'
    xmlns='urn:ietf:params:xml:ns:xmpp-e2e'
    elementFormDefault='qualified'>

  <xs:element name='e2e' type='xs:string'/>

</xs:schema>
        


 TOC 

Appendix B. Revision History

Note to RFC Editor: please remove this entire appendix, and the corresponding entries in the table of contents, prior to publication.

B.1 Changes from draft-ietf-xmpp-e2e-02

B.2 Changes from draft-ietf-xmpp-e2e-01

B.3 Changes from draft-ietf-xmpp-e2e-00



 TOC 

Intellectual Property Statement

Full Copyright Statement

Acknowledgement