From 2fde7233d27258ca3cde5289d47977cc91a8e3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Mon, 4 Feb 2019 16:51:29 +0100 Subject: [PATCH] XEP-0300: remove content which has been moved to XEP-0414 --- xep-0300.xml | 141 ++++++--------------------------------------------- 1 file changed, 15 insertions(+), 126 deletions(-) diff --git a/xep-0300.xml b/xep-0300.xml index 87e48e5a..457d67be 100644 --- a/xep-0300.xml +++ b/xep-0300.xml @@ -7,7 +7,7 @@
Use of Cryptographic Hash Functions in XMPP - This document provides recommendations for the use of cryptographic hash functions in XMPP protocol extensions. + This document provides a common wire format for the transport of cryptographic hash function references and hash function values in XMPP protocol extensions. &LEGALNOTICE; 0300 Experimental @@ -19,11 +19,17 @@ - N/A + hashes &stpeter; &mwild; &ksmith; &tobias; + + 0.6.0 + 2019-04-28 + jsc +

Remove hash function recommendations to be able to advance this without tying down the recommendations. Recommendations are now in XEP-0414.

+
0.5.3 2018-02-14 @@ -93,8 +99,7 @@

This extension is designed to meet the following criteria:

-
Agility
It is absolutely necessary to support more secure cryptographic hash functions as they become available, and to stop supporting less secure functions as they are deprecated.
-
Security
This document needs to be regularly maintained and revisited so that XMPP protocols are using the most up-to-date security technologies.
+
Agility
It is absolutely necessary to support more secure cryptographic hash functions as they become available, and to stop supporting less secure functions as they are deprecated. The wire format should make it easy to use multiple hash functions at the same time.
Reusability
The extension needs to be reusable in any XMPP protocol.
@@ -134,99 +139,12 @@

The digest produced by the used hash algorithm is included as the XML character data of the <hash/> element after being encoded using Base64 as specified in Section 4 of &rfc4648;. Thus the character data MUST conform to the base64Binary datatype See <http://www.w3.org/TR/xmlschema-2/#base64Binary>. as defined in &w3xmlschema2;. The Base64 output MUST NOT include whitespace and MUST set padding bits to zero.

- - -

The MD2 algorithm is not used in any XMPP protocols and has been deprecated by the IETF (see &rfc6149;).

-
- -

The MD4 algorithm is not used in any XMPP protocols and has been deprecated by the IETF (see &rfc6150;).

-
- -

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

-
- -

The SHA-0 algorithm was developed by the U.S. National Security Agency and first published in 1993. It was never widely deployed and is not used in any XMPP protocols.

-
- -

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

-
+ +

Previously, this document made recommendations for specific hash functions. + Those documentations have been removed in version 0.6.0 and are now found + in &xep0414;.

- -

Support for version 1 of the 'urn:xmpp:hashes' namespace implies the following:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AlgorithmDigest SizeSupport
MD2128 bitsMUST NOT
MD4128 bitsMUST NOT
MD5128 bitMUST NOT
SHA-1160 bitsSHOULD NOT
SHA-256256 bitsMUST
SHA-512512 bitsSHOULD
SHA3-256256 bitsMUST
SHA3-512512 bitsSHOULD
BLAKE2b256256 bitsMUST
BLAKE2b512512 bitsSHOULD
-

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:2" in response to disco#info requests, along with one service discovery feature for each algorithm it supports:

The XSF is strongly encouraged to incorporate hash agility into new XMPP extensions that it develops by mandating re-use of the protocol defined in this specification (instead of hash elements or attributes specific to each extension).

-
- - -

As mentioned, several existing XMPP extensions make use of the SHA-1 algorithm. This section analyzes those extensions. The final subsection provides recommendations.

- -

Both &xep0065; and &xep0260; use SHA-1 to hash the Stream ID, Requester's JID, and Target's JID, and this hash can be communicated via the 'dstaddr' attribute. Although this usage is not security-critical, currently it has no agility to specify newer algorithms. Because the hash is communicated by means of an attribute, it cannot directly use the extension defined in this specification.

-
- -

In &xep0084;, the &xep0060; ItemId for the metadata node is the SHA-1 hash of the image data for the "image/png" media type. There is no hash agility for this usage. Although attacks against the collision resistance property could potentially result in confusion over the avatar for a user, the fact that avatars cannot be uploaded without authentication as the node owner or authorization as a node publisher reduces the practicality of attacks. In addition, XEP-0084 ought to be updated to specify that avatars must not be compared across JIDs.

-
- -

&xep0115; typically uses SHA-1 to compute the verification string, however hash agility is supported by use of the 'hash' attribute. Because the hash is communicated by means of an attribute, it cannot directly use the extension defined in this specification.

-
- -

&xep0124; uses SHA-1 to generate the key sequence used to secure sessions that are not protected via SSL/TLS. Because these keys are ephemeral, it is unlikely that an attacker could reproduce or poison the key sequence quickly enough to successfully attack the session. However, attackers can be discouraged more significantly by protecting sessions with SSL/TLS (indeed, it is unclear how widely the key sequence feature is implemented). That said, this use of SHA-1 in BOSH does not support hash agility.

-
- -

&xep0153; is historical but still widely used. Probably it is more valuable to modify XEP-0084 so that it supports hash agility.

-
- -

&xep0174; uses SHA-1 to hash the avatar image (i.e., the "phsh" field) advertised in the DNS TXT record for a user, mirroring the usage from XEP-0115. The "hash" field can be used to specify alternative hash algorithms, and thus supports hash agility. However, in practice it is likely that only SHA-1 is implemented. Because the hash is represented in a DNS TXT record, it cannot directly use the extension defined in this specification.

-
- -

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

-
+

Specifications should take the considerations in &xep0414; into + account.