The Jabber community has long acknowledged the need for privacy and security features in a well-rounded instant messaging system. Unfortunately, finding a consensus solution to the problem of end-to-end encryption during the community's younger days was not easy. Eventually, early contributors created a quick solution using OpenPGP (RFC 4880RFC 4880: OpenPGP Message Format <http://tools.ietf.org/html/rfc4880>.). This specification documents the OpenPGP solution as it is used today, so that others may interoperate with clients that support it. This document is not intended to present a standard, because more complete solutions are being investigated.
All operations described here are done with standard OpenPGP software such as GnuPG. All program output is US-ASCII armored output with the headers removed. This allows for easy transportation of the program output directly in the XML. All keys are exchanged using OpenPGP key servers, and usually are retrieved when a signed <presence/> stanza is received (key retrieval does not happen in-band).
Signing enables a sender to verify that they sent a certain block of text. In Jabber, signing uses the 'jabber:x:signed' namespace, and is primarily used with <presence/>, but may also be used with <message/>. The text that is signed MAY be the empty string. When signing presence, the sender SHOULD sign the XML character data of the <status> element. The sender SHOULD sign presence using the private key whose KeyID corresponds to the public key to be used in encrypting messages (see below).
Encryption enables the sender to encrypt a message to a specific recipient. This is accomplished using the 'jabber:x:encrypted' namespace in conjunction with <message/> stanzas. Because a block of text is necessary in order to have something to encrypt, <message/> stanzas intended to be encrypted have the same restrictions as signing (see above). The data encrypted MUST be the XML character data of the <body> element. The sender SHOULD encrypt the message body using the public key whose KeyID corresponds to the private key used in signing presence (see above).
It is considered polite to include an unencrypted message <body/> explaining that the actual message body is encrypted. This helps if the client experiences an error while decrypting the message, or if the user's a client that does not support encryption (although generally this should not happen, since the signed presence can be used to indicate that a client accepts encrypted messages).
The method defined herein has the following security issues:
Key exchange relies on the web of trust model used on the OpenPGP keys network.
There is no mechanism for checking a fingerprint or ownership of a key other than checking the user IDs on a key.
When the recipient is not mentioned in the encrypted body, replay attacks are possible on messages.
Replay of the signed <presence/> status is possible.
It relies on signing or encryption of XML character data; therefore, it does not support signing or encryption of <iq/> stanzas, and it allows signing of the presence <status/> element and encryption of the message <body/> element only. Thus the method is not acceptable when signing or encryption of full stanzas is required.
It does not enable both signing and encryption of a stanza, only signing of the presence status and encryption of the message body.
In addition to the security considerations listed above, there are several other known issues with this method:
It is limited to PGP keys and does not support X.509 certificates, Kerberos, RSA keys, etc.
It does not include feature negotiation; instead, signed <presence/> is used as an indicator of support. Because of the lack of negotiation it is possible for encrypted <message/> elements to be stored offline and then read by a client that cannot support them.
It is verbose (the example encrypted <message/> is "Hi").
This document requires no interaction with the Internet Assigned Numbers Authority (IANA)The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>..
The XMPP RegistrarThe XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>. shall register the 'jabber:x:encrypted' and 'jabber:x:signed' namespaces as a result of this document.
The protocol documented by this schema is defined in
XEP-0027: http://www.xmpp.org/extensions/xep-0027.html
]]>
The protocol documented by this schema is defined in
XEP-0027: http://www.xmpp.org/extensions/xep-0027.html
]]>