From 2f21fbef22d484d1651596aeb279b3386398c183 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Wed, 25 Jan 2017 00:18:28 +0100 Subject: [PATCH] XEP-0300: specify use of Base64; bump ns version to :2 --- xep-0300.xml | 67 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/xep-0300.xml b/xep-0300.xml index 9e7f6c92..6cda8b99 100644 --- a/xep-0300.xml +++ b/xep-0300.xml @@ -24,6 +24,12 @@ &mwild; &ksmith; &tobias; + + 0.5 + 2017-01-24 + tobias +

Explicitly specify encoding format. Namespace version bump to urn:xmpp:hashes:2.

+
0.4 2016-05-16 @@ -77,15 +83,35 @@

This document defines a new XML element that can be used in any XMPP protocol extension. An example follows.

- 2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU= - ]]> + 2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=åå]]>

An XMPP protocol can include more than one instance of the <hash/> element, as long as each one has a different value for the 'algo' attribute:

- 2AfMGH8O7UNPTvUVAM9aK13mpCY= -2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU= - ]]> -

The value of the 'algo' attribute MUST be one of the values from the &ianahashes; maintained by &IANA;.

+ 2AfMGH8O7UNPTvUVAM9aK13mpCY= +2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=]]> +

The value of the 'algo' attribute MUST be one of the values from the &ianahashes; maintained by &IANA;, or one of the values + defined in the following table.

+ + + + + + + + + + + + + + + + + + + + + +
Hash Function NameReference
"sha3-256"FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions <http://dx.doi.org/10.6028/NIST.FIPS.202>.
"sha3-512"FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions <http://dx.doi.org/10.6028/NIST.FIPS.202>.
"blake2b-256"&rfc7693;
"blake2b-512"&rfc7693;
+

The CDATA of the <hash/> element MUST conform to the base64Binary datatype See <http://www.w3.org/TR/xmlschema-2/#base64Binary>. and thus be encoded in accordance with Section 6.8 of &rfc2045;, which recommends that base64 data should have lines limited to at most 76 characters in length. However, any whitespace characters (e.g., '\r' and '\n') MUST be ignored.

@@ -145,45 +171,44 @@ SHA-1 160 bits - MAY + SHOULD NOT SHA-256 256 bits - SHOULD + MUST SHA-512 512 bits - MAY + SHOULD SHA3-256 256 bits - SHOULD + MUST SHA3-512 512 bits - MAY + SHOULD BLAKE2b256 256 bits - SHOULD + MUST BLAKE2b512 512 bits - MAY + SHOULD -

The current plan is to move SHA-1 to a SHOULD NOT, SHA-256, SHA3-256 and BLAKE2b256 to MUST, and SHA-512, SHA3-512, and BLAKE2b512 to SHOULD by the end of 2016.

These recommendations ought to be reviewed yearly by the &COUNCIL;.

-

If an entity supports the protocol defined herein, it MUST report that by including a &xep0030; feature of "urn:xmpp:hashes:1" in response to disco#info requests, along with one service discovery feature for each algorithm it supports:

+

If an entity supports the protocol defined herein, it MUST report that by including a &xep0030; feature of "urn:xmpp:hashes:2" in response to disco#info requests, along with one service discovery feature for each algorithm it supports:

- + @@ -254,7 +279,7 @@

This specification defines the following XML namespace:

    -
  • urn:xmpp:hashes:1
  • +
  • urn:xmpp:hashes:2

The ®ISTRAR; shall include the foregoing namespace in its registry at &NAMESPACES;, as governed by &xep0053;.

@@ -348,8 +373,8 @@