diff --git a/xep-0300.xml b/xep-0300.xml index 6c4642d5..7d7570fb 100644 --- a/xep-0300.xml +++ b/xep-0300.xml @@ -10,7 +10,7 @@ This document provides recommendations for the use of cryptographic hash functions in XMPP protocol extensions. &LEGALNOTICE; 0300 - Deferred + Experimental Standards Track Standards Council @@ -23,6 +23,13 @@ &stpeter; &mwild; &ksmith; + &tobias; + + 0.4 + 2016-05-16 + tobias +

Updating to current knowledge on security of algorithms. Adding SHA-3 and BLAKE families of hashes.

+
0.3 2012-02-08 @@ -90,6 +97,7 @@

The MD5 algorithm was commonly used in earlier generations of Internet technologies. As explained in &rfc6151;, the MD5 algorithm "is no longer acceptable where collision resistance is required" (such as in digital signatures) and "new protocol designs should not employ HMAC-MD5" either.

+

The currently known best attack against the pre-image resistance property of the MD5 algorithm is slightly better than the generic attack and was released 2009 Yu Sasaki and Kazumaro Aoki, "Finding preimages in full MD5 faster than exhaustive search" <https://doi.org/10.1007/978-3-642-01001-9_8>..

The primary use of MD5 in XMPP protocols is &xep0096;, which will be obsoleted by &xep0234;.

@@ -97,13 +105,17 @@

The SHA-1 algorithm was developed by the U.S. National Security Agency and first published in 1995 to fix problems with SHA-0. The SHA-1 algorithm is currently the most widely-deployed hash function. As described in &rfc4270; in 2005, attacks have been found against the collision resistance property of SHA-1. &rfc6194; notes that as of 2011 no published results indicate improvement upon those attacks. In addition, RFC 6194 notes that "[t]here are no known pre-image or second pre-image attacks that are specific to the full round SHA-1 algorithm". Furthermore, there is no indication that attacks on SHA-1 can be extended to HMAC-SHA-1. Nevertheless, the U.S. National Institute of Standards and Technology (NIST) has recommended that SHA-1 not be used for generating digital signatures after December 31, 2010.

+

In fall 2015 the SHA-1 collision cost has been estimated between 75K$ to 120K$ The SHAppening: freestart collisions for SHA-1 <https://sites.google.com/site/itstheshappening/>..

The SHA-1 algorithm is used in a number of XMPP protocols. See Analysis of Existing XMPP Extensions for details.

The SHA-2 family of algorithms (SHA-224, SHA-256, SHA-384, and SHA-512) was developed by the U.S. National Security Agency and first published in 2001. Because SHA-2 is somewhat similar to SHA-1, it is thought that the security flaws with SHA-1 described above could be extended to SHA-2 (although no such attacks have yet been found on the full-round SHA-2 algorithms).

-

The U.S. National Institute of Standards and Technology (NIST) is currently holding a public competition to replace the SHA-1 and SHA-2 functions. The winner and resulting new standard will be announced in 2012. When this "SHA-3" technology is announced, the XSF will update this specification accordingly.

+

The SHA-3 family of algorithms (SHA3-224, SHA3-256, SHA3-384, and SHA3-512) is based on the Keccak algortihm developed by Guido Bertoni, Joan Daemen, Michaƫl Peeters, and Gilles Van Assche, and was pubished by NIST on August 5, 2015 in 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>. after a public hash function competition.

+
+ +

The BLAKE2 family of algorithms was designed by Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn, and Christian Winnerlein. It is described in &rfc7693; and is designed to be highly secure and run well on both software and hardware platforms.

@@ -112,36 +124,64 @@ + + + - + + - + + - + + + + + + + + + + + + + + + + + + + + + + +
AlgorithmDigest Size Support
MD2128 bits MUST NOT
MD4128 bits MUST NOT
MD5MAY128 bitMUST NOT
SHA-1MUST160 bitsMAY
SHA-256MUST256 bitsSHOULD
SHA-512512 bitsMAY
SHA3-256256 bits SHOULD
SHA3-512512 bitsMAY
BLAKE2b256256 bitsSHOULD
BLAKE2b512512 bitsMAY
+

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;.

- +http://dx.doi.org/10.6028/NIST.FIPS.202

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:

- - + ]]> @@ -195,6 +234,9 @@

&xep0231; supports hash agility through the structure of values for the 'cid' attribute, but does not mandate support for any particular algorithm.

+ +

&xep0234; supports hash agility in its application format to allow to verify integrity of transferred files. It does not mandate support for any particular algorithm.

+

Of the foregoing, the use in XEP-0115 has the most significant security implications. However, there are other security issues with XEP-0115 that make it likely to be replaced in a more wholesale fashion. Although it would be desirable for all XMPP extensions that use cryptographic hashes to incorporate hash agility, realistically this is difficult to achieve after the fact. For now, the XSF is encouraged to focus on new protocols (e.g., XEP-0234 and a replacement for XEP-0115 if there is consensus to work on the latter) rather than spending effort on migrating its existing uses of SHA-1 to the SHA-2 family of algorithms, and to the SHA-3 family when available. Naturally, these priorities might change if XMPP technologies experience significant attacks on existing extensions that use SHA-1.

@@ -227,11 +269,13 @@ Support for the MD5 hashing algorithm XEP-0300 + urn:xmpp:hash-function-text-names:sha-1 Support for the SHA-1 hashing algorithm XEP-0300 + urn:xmpp:hash-function-text-names:sha-224 Support for the SHA-224 hashing algorithm @@ -252,6 +296,48 @@ Support for the SHA-512 hashing algorithm XEP-0300 + + + urn:xmpp:hash-function-text-names:sha3-224 + Support for the SHA3-224 hashing algorithm + XEP-0300 + + + urn:xmpp:hash-function-text-names:sha3-256 + Support for the SHA3-256 hashing algorithm + XEP-0300 + + + urn:xmpp:hash-function-text-names:sha3-384 + Support for the SHA3-384 hashing algorithm + XEP-0300 + + + urn:xmpp:hash-function-text-names:sha3-512 + Support for the SHA3-512 hashing algorithm + XEP-0300 + + + + urn:xmpp:hash-function-text-names:id-blake2b160 + Support for the BLAKE2b-160 hashing algorithm + XEP-0300 + + + urn:xmpp:hash-function-text-names:id-blake2b256 + Support for the BLAKE2b-256 hashing algorithm + XEP-0300 + + + urn:xmpp:hash-function-text-names:id-blake2b384 + Support for the BLAKE2b-384 hashing algorithm + XEP-0300 + + + urn:xmpp:hash-function-text-names:id-blake2b512 + Support for the BLAKE2b-512 hashing algorithm + XEP-0300 + ]]>
diff --git a/xep.ent b/xep.ent index 12b4b5f7..73447b35 100644 --- a/xep.ent +++ b/xep.ent @@ -647,6 +647,7 @@ THE SOFTWARE. RFC 7572 RFC 7572: Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): Instant Messaging <http://tools.ietf.org/html/rfc7572>." > RFC 7622 RFC 7622: Extensible Messaging and Presence Protocol (XMPP): Address Format <http://tools.ietf.org/html/rfc7622>." > RFC 7395 RFC 7395: An Extensible Messaging and Presence Protocol (XMPP) Subprotocol for WebSocket <http://tools.ietf.org/html/rfc7395>." > +RFC 7693 RFC 7693: The BLAKE2 Cryptographic Hash and Message Authentication Code (MAC) <http://tools.ietf.org/html/rfc7693>." > RFC 7712 RFC 7712: Domain Name Associations (DNA) in the Extensible Messaging and Presence Protocol (XMPP)<http://tools.ietf.org/html/rfc7712>." >