diff --git a/xep-0420.xml b/xep-0420.xml index 1f9f75b8..c612199b 100644 --- a/xep-0420.xml +++ b/xep-0420.xml @@ -2,7 +2,6 @@ - @@ -30,6 +29,15 @@ SCE &paulschaub; + + 0.4.0 + 2021-04-07 + melvo + +

Use 'envelope' and 'content' consistently by renaming elements

+

Update namespace to urn:xmpp:sce:1

+
+
0.3.2 2021-03-04 @@ -39,7 +47,7 @@ 0.3.1 2020-11-03 - gh/@melvo + melvo

Fix misspelling of 'whose'

@@ -87,7 +95,7 @@ -

This proposal widens the scope of the security guarantees given by the used encryption mechanism from just the body of the message to all contents of the &content; element. It is intended to serve as a "one size fits all" solution for extension element encryption in XMPP.

+

This proposal widens the scope of the security guarantees given by the used encryption mechanism from just the body of the message to various extension elements. It is intended to serve as a "one size fits all" solution for extension element encryption in XMPP.

In order to achieve its goal, Stanza Content Encryption does the following:

    @@ -99,14 +107,14 @@
    -
    Envelope Element &envelope;
    An XMPP extension element which is used to hold the encrypted &content; element.
    -
    Content Element &content;
    An element which is used to contain all of those extension elements that need to be encrypted. - The XML representation of this element is encrypted and then embedded into the &envelope; element.
    +
    Envelope Element &envelope;
    An XMPP extension element which is used to hold the &content; element and the affix elements. + The XML representation of this element is encrypted and then embedded as the payload of the message being sent.
    +
    Content Element &content;
    An element which is used to contain all extension elements which need to be encrypted.
    -

    In order to prevent certain attacks, different affix elements MAY be added into the &content; element.

    +

    In order to prevent certain attacks, different affix elements MAY be added as direct child elements of the &envelope; element.

    @@ -219,21 +227,21 @@

    This applies to many extension elements that add additional information to <message/> stanzas, such as those of &xep0066;.

    - - + + [...] https://en.wikipedia.org/wiki/Fight_Club#Plot - -]]> + +]]> - - + PGNvbnRlbnQgeG1sbnM9J3Vybjp4bXBwOnNjZTowJz48cGF5bG9hZD48Ym9keSB4bWxucz0namFi YmVyOmNsaWVudCc+SSBnb3QgaW4gZXZlcnlvbmUncyBob3N0aWxlIGxpdHRsZSBmYWNlLiBZZXMs @@ -251,23 +259,23 @@

    Stanza Content Encryption thrives not only to allow for rich content encryption in <message/> stanzas, but is also applicable to <iq/> queries. A resource might want to query sensitive information from another resource capable of Stanza Content Encryption.

    - + + - + - + ]]> - - + V2FpdCwgd2hhdD8gQXJlIHlvdSBzZXJpb3VzPyBEaWQgeW91IHJlYWxseSBqdXN0IGdyYWIgeW91 ciBmYXZvdXJpdGUgYmFzZTY0IGRlY29kZXIganVzdCB0byBjaGVjayB0aGlzIGRvY3VtZW50IGZv @@ -278,9 +286,9 @@ ]]> - - + + - + -]]> +]]> - - + PGNvbnRlbnQgeG1sbnM9J3Vybjp4bXBwOnNjZTowJz4KICA8cGF5bG9hZD4KICAgIDxkYXRhIHht bG5zPSd1cm46eG1wcDpib2InCiAgICAgICAgY2lkPSdzaGExKzhmMzVmZWYxMTBmZmM1ZGYwOGQ1 @@ -326,39 +334,39 @@ -

    In order to send an encrypted message without leaking extension elements the sender prepares the message by placing the sensitive extension elements inside a &payload; element inside a &content; element.

    -

    Depending on the encryption-specific SCE-profile, some affix elements are added as child elements of the &content; element.

    -

    The &content; element is then serialized into XML and encrypted using the SCE-specific profile of the encryption mechanism in place. The result is appended to the message.

    +

    In order to send an encrypted message without leaking extension elements, the sender prepares the message by placing the sensitive extension elements inside a &content; element and that inside an &envelope; element.

    +

    Depending on the encryption-specific SCE-profile, some affix elements are added as child elements of the &envelope; element.

    +

    The &envelope; element is then serialized into XML and encrypted using the SCE-specific profile of the encryption mechanism in place. The result is appended to the message.

    Since the outer message element does not contain a <body/> element the sender appends an unencrypted <store/> hint as specified in &xep0334;.

    The message can then be sent to the recipient.

    -

    The recipient of the message decrypts the content of the &envelope; element to retrieve the &content; element. Depending on the affix profiles specified by the used encryption protocol, the affix elements are verified to prevent certain attacks from taking place.

    -

    Next the extension elements of the &content; elements &payload; element are checked against the permitted list and any disallowed elements are discarded.

    -

    As a last step, the original unencrypted stanza is recreated by replacing the &envelope; element of the stanza with the contents of the &payload; element.

    +

    The recipient of the message decrypts its encrypted payload. The result is the &envelope; element containing the &content; element and the affix elements as direct child elements. Depending on the affix profiles specified by the used encryption protocol, the affix elements are verified to prevent certain attacks from taking place.

    +

    Afterwards, the extension elements inside the &content; element are checked against the permitted list and any disallowed elements are discarded.

    +

    As a last step, the original unencrypted stanza is recreated by replacing the &envelope; element of the stanza with the elements inside of the &content; element.

    There are certain extension elements which are required to be available to the server in order to do message routing and processing. Additionally there are some elements that MUST be filtered by the server. Allowing for those elements to be included in, and parsed from the encrypted payload would allow a malicious client to perform a number of attacks.

    -

    Contrary to this, other elements are considered sensitive and MUST NOT be available in plaintext outside the &content; element.

    +

    Contrary to this, other elements are considered sensitive and MUST NOT be available in plaintext outside the &envelope; element.

    It is hard to come up with a complete list of exceptional elements at this point, as there is no practical implementation experience.

    -

    Below is a non-exhaustive list of elements that are definitely forbidden inside the &content; element and permitted as direct child elements of the message.

    -
    +

    Below is a non-exhaustive list of elements that are definitely forbidden inside the &envelope; element and permitted as direct child elements of the message.

    +
    - + - + @@ -373,13 +381,13 @@ -

    Unencrypted &content; elements are NOT ALLOWED as child elements of the stanza and MUST be dropped.

    -

    Elements in the &content; elements &payload; element MUST be identified using an element name and namespace. +

    Unencrypted &envelope; elements are NOT ALLOWED as child elements of the stanza and MUST be dropped.

    +

    Elements in the &content; element MUST be identified using an element name and namespace. Notably the <body/> element MUST contain a valid namespace (i.e. "jabber:client").

    -

    The recipient must verify that the decrypted &content; element contains valid XML before processing it any further. Invalid XML must be rejected.

    -

    After verifying the integrity of the &content; element, the recipient needs to make sure that no server-processed elements are found within the payload. +

    The recipient MUST verify that the decrypted &envelope; element contains valid XML before processing it any further. Invalid XML must be rejected.

    +

    After verifying the integrity of the &envelope; element, the recipient needs to make sure that no server-processed elements are found inside of it. Any forbidden elements MUST be dropped before the message is processed any further.

    -

    Furthermore the receiving client MUST ignore any extension elements considered as sensitive which are found outside of the &content; element, +

    Furthermore the receiving client MUST ignore any extension elements considered as sensitive which are found outside of the &envelope; element, especially as direct unencrypted child elements of the enclosing stanza.

    Since a chat message encrypted with SCE MUST NOT contain a <body/> element, it is not eligible for MAM message storage (&xep0313;). Therefore sending entities MUST append an unencrypted &xep0334; <store/> hint as a direct child element to the message.

    Element Reason
    Elements of &xep0334;Message Processing Hints are addressed to the server and MUST therefore be accessible in plaintext. A receiving client MUST ignore any message processing hints encountered inside the encrypted &content; elementMessage Processing Hints are addressed to the server and MUST therefore be accessible in plaintext. A receiving client MUST ignore any message processing hints encountered inside the encrypted &envelope; element
    Stanza-ID elements of &xep0359;Sending clients MUST NOT include Stanza-ID elements inside the &content; element, as this would prevent the server from filtering it. - A client MUST ignore Stanza-ID elements encountered inside &content; elementSending clients MUST NOT include Stanza-ID elements inside the &envelope; element, as this would prevent the server from filtering it. + A client MUST ignore Stanza-ID elements encountered inside the &envelope; element
    Elements of &xep0033;