From f926037398ad85d9cd8449b3556d75cf8820d7f1 Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Thu, 1 May 2008 02:57:39 +0000 Subject: [PATCH] 0.17 git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1821 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0136.xml | 372 ++------------------------------------------------- 1 file changed, 12 insertions(+), 360 deletions(-) diff --git a/xep-0136.xml b/xep-0136.xml index c83deeb2..94dba35e 100644 --- a/xep-0136.xml +++ b/xep-0136.xml @@ -19,12 +19,10 @@ XEP-0030 XEP-0059 XEP-0060 - W3C XML Encryption - W3C XML Signature - TO BE ASSIGNED + NOT_YET_ASSIGNED &ianpaterson; Jon @@ -34,6 +32,12 @@ &stpeter; &infiniti; + + 0.17 + 2008-04-30 + psa +

Split encryption content off into new specification.

+
0.16 2008-04-15 @@ -208,7 +212,7 @@
  • stream -- the saving entity SHOULD save every byte that passes over the stream in either direction. ***
  • * Note: When archiving locally a client MAY save the full XML content of each &MESSAGE; element even if the Save Mode is 'body'.

    -

    ** Note: Support for the 'message' value is optional and, to conserve bandwidth and storage space, it is RECOMMENDED that client implementations do not specify the 'message' value. Stream compression typically does not mitigate bandwidth and storage issues since collections SHOULD be encrypted, and since clients running in constrained runtime environments typically cannot take advantage of stream compression (no binary data, only XML, may be transfered).

    +

    ** Note: Support for the 'message' value is optional and, to conserve bandwidth and storage space, it is RECOMMENDED that client implementations do not specify the 'message' value. Stream compression typically does not mitigate bandwidth and storage issues since clients running in constrained runtime environments typically cannot take advantage of stream compression (no binary data, only XML, may be transfered).

    *** Note: The upload, retrieval and management of 'stream' archives is currently beyond the scope of this document.

    @@ -557,11 +561,11 @@
    • Messages are encrypted using evanescent keys, as in &xep0116;
    • A client's own server does not support automatic archiving but it (or another server) does support manual archiving
    • -
    • A server does not support encryption of auto-archived collections
    • +
    • A server does not support encryption of auto-archived collections (see &xep0241;)
    • A client wants to maintain a unified archive for messages that were transmitted both in and out-of-band (e.g. SMS or email)
    • A client wants to append private notes to a conversation
    -

    Therefore, often a client will want to send or receive a sequence of messages, optionally add private notes to the sequence, optionally encrypt the sequence, and then ask the server to archive it. Such messages and notes SHOULD be stored on the server in the form of a "collection".

    +

    Therefore, often a client will want to send or receive a sequence of messages, optionally add private notes to the sequence, optionally encrypt the sequence (see XEP-0241), and then ask the server to archive it. Such messages and notes SHOULD be stored on the server in the form of a "collection".

    A collection of messages and notes is uploaded to the server encapsulated in a <save/> element.

    @@ -733,7 +737,7 @@ ]]> -

    As described in the Encryption section of this document, the content of the uploaded x:data form MAY be encrypted.

    +

    As described in XEP-0241, the content of the uploaded x:data form MAY be encrypted.

    @@ -769,28 +773,6 @@ - - ]]> -

    The client can enable auto-archiving with server-side encryption by setting the 'save' attribute to "true" or "1" and setting the 'encrypt' attribute to "true" or "1".

    - - - - ]]> -

    If the server does not support encryption but the client attempts to enable encryption, the server MUST return a &feature; error.

    - - - - - - ]]> -

    If the server supports encryption but there is no public key available for the user (e.g., as published via &xep0189;, the server MUST return a ¬acceptable; error.

    - - - - ]]>

    The client can disable auto-archiving by setting the 'save' attribute to "false" or "0".

    @@ -1068,330 +1050,6 @@

    After receiving each result set page the client SHOULD delete from its local archive any collections that have been removed from the master archive. The client should also retrieve from the server the content of each collection that has been modified (see Retrieving a Collection) and add it to its local copy of the archive (deleting any older version of the same collection that it may already have).

    - -

    The examples above are not encrypted for clarity. However, clients SHOULD encrypt their archived collections. This section describes how to do so.

    - -

    Clients SHOULD encrypt manually-archived collections (although early implementations of this protocol MAY prefer to defer encryption and decryption to later releases). Servers MUST support the manual-archiving of encrypted collections.

    -

    Before uploading a sequence of messages to a collection, the client SHOULD select a symmetric data encryption algorithm, generate a suitable random encryption key, give the key a unique (for the user) name, encrypt the symmetric key with one of the user's public keys, and wrap the result inside one or more <EncryptedKey/> elements, as specified in &w3xmlenc;.

    -

    To ensure that all its user's clients will be able to decrypt the collection, the client SHOULD create one <EncryptedKey/> element for each of its user's public keys that are being published using &xep0189;. However, the client MUST NOT create an <EncryptedKey/> element for any public key until it has confirmed that it belongs to the user. Note: The fact that a public key is being published using XEP-0189 is not sufficient proof of ownership, since the user's server may have been compromised at some stage. The method of confirmation is beyond the scope of this document.

    -

    The client SHOULD use the symmetric key to encrypt the joined sequence of <to/>, <from/> and <note/> elements, base64 encode the resulting sequence of bytes, and wrap it inside an <EncryptedData/> element, as described in XML Encryption.

    -

    Clients may add one or more <EncryptedData/> or <EncryptedKey/> elements to a collection using exactly the same method as for <to/>, <from/> and <note/> elements (see Uploading Messages to a Collection). One collection may contain <EncryptedData/> elements encrypted with different symmetric keys.

    -

    When appending <EncryptedData/> elements to a collection, the client MAY reuse a symmetric Key that has already been uploaded to the collection. In this case the client SHOULD NOT resend <EncryptedKey/> elements.

    -

    Note: A collection that contains <EncryptedData/> or <EncryptedKey/> elements MUST NOT contain <to/> or <from/> or <note/> elements.

    - - - - - - - dataKey1 - - +OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ - - - dataKey1 - - - romeoPublicKey1fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - dataKey1 - - - romeoPublicKey2fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - - - ]]> -

    The <CipherData/> child of each <EncryptedData/> element contains the base64-encoded symmetric-encrypted messages. The <EncryptionMethod/> and <KeyInfo/> children specify the symmetric encryption algorithm and the name of the symmetric key used to encrypt the messages.

    -

    The <CarriedKeyName/> child of each <EncryptedKey/> element contains the name of the symmetric key it contains. The name is referenced by the <KeyName/> child of the <KeyInfo/> child of an <EncryptedData/> element. The <CipherData/> child of each <EncryptedKey/> element contains the base64-encoded public-key-encrypted symmetric key. The <EncryptionMethod/> and <KeyInfo/> children specify the public key encryption algorithm and the name of the public key used to encrypt the symmetric key. The name of the public key MAY refer to the name in the <KeyName/> child of one of the <KeyInfo/> elements that are being published using XEP-0189.

    - - - - - - - - dataKey1 - - +OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ - - - - dataKey1 - - - romeoPublicKey1fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - - - ]]> -

    The x:data form MAY be removed from a collection simply by uploading an empty form. Note: The server SHOULD NOT return an error if it finds that the form to be deleted does not exist.

    - - - - - - - - ]]> -
    - -

    Servers (and clients) SHOULD support the encryption (and decryption) of automatically-archived collections (although early implementations of this protocol MAY prefer to defer encryption and decryption to later releases).

    -

    Whenever the client enables auto-archiving it SHOULD set the optional 'encrypt' attribute to 'true'. After receiving such a request, if the server supports encryption (see Determining Server Support), it MUST encrypt all the messages that it archives automatically (including any message collections that are currently being recorded) by following exactly the same procedure as clients use when manually archiving collections (see Encryption).

    -

    The client MAY also specify one or more public keys (in addition to any public keys that the user may be publishing using XEP-0189). The server MUST use them all to encrypt all the symmetric keys it generates and add these to the collection wrapped in <EncryptedKey/> elements.

    - - - - - romeoPublicKey3fingerprint - - xA7SEU+e0yQH5rm9kbCDN9o3aPIo7HbP7tX6WOocLZAtNfyxSZDU16ksL6W - jubafOqNEpcwR3RdFsT7bCqnXPBe5ELh5u4VEy19MzxkXRgrMvavzyBpVRgBUwUlV - 5foK5hhmbktQhyNdy/6LpQRhDUDsTvK+g9Ucj47es9AQJ3U= - - AQAB - - - - - - ]]> -

    As soon as the server has finished archiving a collection, it MUST securely destroy all copies of the symmetric key it used to encrypt the messages. Note: If the security of the server is compromised, then only the collections being recorded during the attack will be revealed (i.e. only those messages that would have been compromised even if they had not been archived).

    -
    - -

    If a collection contains <EncryptedData/> or <EncryptedKey/> elements then the 'crypt' attribute of the <chat/> element MUST be set to 'true':

    - - - - . - [28 more collections] - . - - - 1469-07-21T02:56:15Zjuliet@capulet.com - 1469-07-21T03:16:37Zbalcony@house.capulet.com - 1372 - - - - ]]> -
    - -

    The items in encrypted collections are typically larger than the items in an unencrypted collection, since each <EncryptedData/> element typically contains many messages. So the client SHOULD take even more care not to request a page of <EncryptedData/> elements that is so big it might exceed rate limiting restrictions.

    - - - 5 - - - - ]]> -

    In addition to the requested <EncryptedData/> elements, the server MUST return all the <EncryptedKey/> elements that it possesses for the user whose symmetric key name (wrapped in its <CarriedKeyName/> child) is referenced by the <KeyName/> child of the <KeyInfo/> child of any of the <EncryptedData/> elements in the returned page.

    - - - - - - dataKey1 - - +OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ - - . - [3 more elements] - . - - - - dataKey2 - - +OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ - - - dataKey1 - - - romeoPublicKey1fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - dataKey1 - - - romeoPublicKey2fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - dataKey2 - - - romeoPublicKey1fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - dataKey2 - - - romeoPublicKey2fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - 0 - 4 - 7 - - - - ]]> -

    The client MAY limit the number of <EncryptedKey/> elements that it receives by specifying the name of one or more public keys for which it holds the associated private keys. The name of each public key MUST be wrapped in a <KeyName/> element.

    - - - romeoPublicKey1fingerprint - - 1 - - - - ]]> -

    If the request includes one or more <KeyName/> elements then the server MUST only return those <EncryptedKey/> elements whose public key name (wrapped in the <KeyName/> child of the <KeyInfo/> child) is specified in the request.

    -
    - -

    If a private key becomes obsolete or compromised then it may be necessary for a client to replace all <EncryptedKey/> elements that contain symmetric keys encrypted with the public key that is associated with the obsolete private key.

    -

    The client first requests a list of the affected <EncryptedKey/> elements from all collections by sending a <keys/> element to the server:

    - - - romeoPublicKey1fingerprint - - 50 - - - - ]]> -

    The server MUST return only <EncryptedKey/> elements whose symmetric encryption key is encrypted with the obsolete public key specified in the <KeyName/> child of the request:

    - - - - - dataKey1 - - - romeoPublicKey1fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - dataKey2 - - - romeoPublicKey1fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - . - [49 more sets of collection keys] - . - - 1469-07-23T19:22:31Zjuliet@capulet.com - 1469-08-03T13:24:06Zbalcony@house.capulet.com - 3810 - - - - ]]> -

    The client decrypts each symmetric key with the obsolete private key and encrypts it again with the new public key. The client then wraps each symmetric key in an <EncryptedKey/> element and asks the server to archive it in its associated collection on the server (see Encryption):

    - - - - - dataKey1 - - - romeoPublicKey2fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - dataKey2 - - - romeoPublicKey2fingerprint - - E5Qbvfa2gI5lBZMAHryv4g - - - - -. -[49 more sets of collection keys] -. - ]]> -

    Finally, the client asks the server to delete from each collection all <EncryptedKey/> elements whose symmetric encryption key is encrypted with the obsolete public key:

    - - - romeoPublicKey1fingerprint - - -. -[49 more delete requests] -. - ]]> -
    -
    -

    A client discovers whether its server supports this protocol using &xep0030;.

    @@ -1403,7 +1061,7 @@ ]]> -

    For each feature defined herein, if the server supports that feature it MUST return a <feature/> element with the 'var' attribute set to 'urn:xmpp:tmp:archive:name' &NSNOTE;, where 'name' is 'auto' for the Automatic Archiving feature, 'encrypt' for the server-side encryption feature (see Automatic Archiving), 'manage' for the Archive Management feature, 'manual' for the Manual Archiving feature, and 'pref' for the Archiving Preferences feature.

    +

    For each feature defined herein, if the server supports that feature it MUST return a <feature/> element with the 'var' attribute set to 'urn:xmpp:tmp:archive:name' &NSNOTE;, where 'name' is 'auto' for the Automatic Archiving feature, 'manage' for the Archive Management feature, 'manual' for the Manual Archiving feature, and 'pref' for the Archiving Preferences feature.

    - @@ -1454,9 +1111,6 @@

    If automatic archiving defaults to enabled then that creates serious privacy issues for users of legacy clients that do not support this protocol, and (more seriously) for those contacts who they unwittingly mislead by agreeing to disable logging (via the 'logging' field defined in &xep0155;).

    If a server deployment enables automatic archiving by default, then it MUST return a stream feature containing an empty <default/> element (see the Stream Feature section of this document).

    - -

    Since the subject of each collection will not be encrypted, the client MUST warn its human user (if any) before including 'subject' attributes on encrypted collections.

    -

    The client that originates a message MAY specify a 'false' value for the 'store' header (see &xep0131;). The recipient MUST NOT archive such a message or any of the information it contains.

    If the sender plans to use 'store' headers it MUST use Service Discovery to determine whether or not the recipient supports them. Note: Since servers are not required to check the content of message stanzas for headers, if the recipient is using automatic archiving then it MUST indicate that it does not support 'store' headers.

    @@ -1476,7 +1130,6 @@

    The XMPP Registrar shall include the following features in its registry of service discovery features (see &DISCOFEATURES;), where the string "urn:xmpp:tmp:archive" shall be replaced with the URN issued by the XMPP Registrar:

    • urn:xmpp:tmp:archive:auto
    • -
    • urn:xmpp:tmp:archive:encrypt
    • urn:xmpp:tmp:archive:manage
    • urn:xmpp:tmp:archive:manual
    • urn:xmpp:tmp:archive:pref
    • @@ -1527,7 +1180,6 @@ -