No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0300.xml 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Use of Cryptographic Hash Functions in XMPP</title>
  10. <abstract>This document provides recommendations for the use of cryptographic hash functions in XMPP protocol extensions.</abstract>
  11. &LEGALNOTICE;
  12. <number>0300</number>
  13. <status>Experimental</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>N/A</shortname>
  23. &stpeter;
  24. &mwild;
  25. &ksmith;
  26. &tobias;
  27. <revision>
  28. <version>0.5.3</version>
  29. <date>2018-02-14</date>
  30. <initials>fs</initials>
  31. <remark><p>Clarify textual content of the &lt;hash/&gt; element.</p></remark>
  32. </revision>
  33. <revision>
  34. <version>0.5.2</version>
  35. <date>2017-08-21</date>
  36. <initials>ps</initials>
  37. <remark><p>Add hash-used element</p></remark>
  38. </revision>
  39. <revision>
  40. <version>0.5.1</version>
  41. <date>2017-03-17</date>
  42. <initials>fs</initials>
  43. <remark><p>Use xs:base64Binary instead of xs:string in the schema</p></remark>
  44. </revision>
  45. <revision>
  46. <version>0.5</version>
  47. <date>2017-01-24</date>
  48. <initials>tobias</initials>
  49. <remark><p>Explicitly specify encoding format. Namespace version bump to urn:xmpp:hashes:2.</p></remark>
  50. </revision>
  51. <revision>
  52. <version>0.4</version>
  53. <date>2016-05-16</date>
  54. <initials>tobias</initials>
  55. <remark><p>Updating to current knowledge on security of algorithms. Adding SHA-3 and BLAKE families of hashes.</p></remark>
  56. </revision>
  57. <revision>
  58. <version>0.3</version>
  59. <date>2012-02-08</date>
  60. <initials>psa</initials>
  61. <remark><p>Modified XML structure to remove wrapper element; added recommendations for new XMPP extensions; softened recommendations for existing extensions.</p></remark>
  62. </revision>
  63. <revision>
  64. <version>0.2</version>
  65. <date>2011-12-05</date>
  66. <initials>psa</initials>
  67. <remark><p>Updated to reflect initial analysis of existing XMPP protocol extensions.</p></remark>
  68. </revision>
  69. <revision>
  70. <version>0.1</version>
  71. <date>2011-06-29</date>
  72. <initials>psa</initials>
  73. <remark><p>Initial published version.</p></remark>
  74. </revision>
  75. <revision>
  76. <version>0.0.2</version>
  77. <date>2011-06-22</date>
  78. <initials>mw/ks/psa</initials>
  79. <remark><p>Adjusted format to include multiple hashes in one element; modified namespace versioning rules to align with common practice; added service discovery features for various algorithms.</p></remark>
  80. </revision>
  81. <revision>
  82. <version>0.0.1</version>
  83. <date>2011-06-16</date>
  84. <initials>psa</initials>
  85. <remark><p>Rough draft based on list discussion.</p></remark>
  86. </revision>
  87. </header>
  88. <section1 topic='Introduction' anchor='intro'>
  89. <p>Various XMPP extensions make use of cryptographic hash functions, but they do so in different ways (e.g., some define XML elements and some define XML attributes) and often mandate support for different algorithms. The lack of a consistent approach to the use of cryptographic hash functions in XMPP extensions can lead to interoperability problems and security vulnerabilities. Therefore, this document recommends a common approach and XML element that can be re-used in any XMPP protocol extension.</p>
  90. </section1>
  91. <section1 topic='Requirements' anchor='reqs'>
  92. <p>This extension is designed to meet the following criteria:</p>
  93. <dl>
  94. <di><dt>Agility</dt><dd>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.</dd></di>
  95. <di><dt>Security</dt><dd>This document needs to be regularly maintained and revisited so that XMPP protocols are using the most up-to-date security technologies.</dd></di>
  96. <di><dt>Reusability</dt><dd>The extension needs to be reusable in any XMPP protocol.</dd></di>
  97. </dl>
  98. </section1>
  99. <section1 topic='XML Format' anchor='format'>
  100. <p>This document defines a new XML element that can be used in any XMPP protocol extension. An example follows.</p>
  101. <code><![CDATA[<hash xmlns='urn:xmpp:hashes:2' algo='sha-256'>2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=</hash>]]></code>
  102. <p>An XMPP protocol can include more than one instance of the &lt;hash/&gt; element, as long as each one has a different value for the 'algo' attribute:</p>
  103. <code><![CDATA[<hash xmlns='urn:xmpp:hashes:2' algo='sha-1'>2AfMGH8O7UNPTvUVAM9aK13mpCY=</hash>
  104. <hash xmlns='urn:xmpp:hashes:2' algo='sha-256'>2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=</hash>]]></code>
  105. <p>In certain scenarios it makes sense to communicate the hash algorithm that is used prior to the calculation of the hash value.</p>
  106. <code><![CDATA[<hash-used xmlns='urn:xmpp:hashes:2' algo='sha-256'/>]]></code>
  107. <p>The value of the 'algo' attribute MUST be one of the values from the &ianahashes; maintained by &IANA;, or one of the values
  108. defined in the following table.</p>
  109. <table caption='Additional Hash Function Textual Names'>
  110. <tr>
  111. <th>Hash Function Name</th>
  112. <th>Reference</th>
  113. </tr>
  114. <tr>
  115. <td>"sha3-256"</td>
  116. <td><span class='ref'><link url='http://dx.doi.org/10.6028/NIST.FIPS.202'>FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions</link></span> <note>FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions &lt;<link url='http://dx.doi.org/10.6028/NIST.FIPS.202'>http://dx.doi.org/10.6028/NIST.FIPS.202</link>&gt;.</note></td>
  117. </tr>
  118. <tr>
  119. <td>"sha3-512"</td>
  120. <td><span class='ref'><link url='http://dx.doi.org/10.6028/NIST.FIPS.202'>FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions</link></span> <note>FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions &lt;<link url='http://dx.doi.org/10.6028/NIST.FIPS.202'>http://dx.doi.org/10.6028/NIST.FIPS.202</link>&gt;.</note></td>
  121. </tr>
  122. <tr>
  123. <td>"blake2b-256"</td>
  124. <td>&rfc7693;</td>
  125. </tr>
  126. <tr>
  127. <td>"blake2b-512"</td>
  128. <td>&rfc7693;</td>
  129. </tr>
  130. </table>
  131. <p>The digest produced by the used hash algorithm is included as the XML character data of the &lt;hash/&gt; element after being encoded using Base64 as specified in Section 4 of &rfc4648;. Thus the character data MUST conform to the base64Binary datatype <note>See &lt;<link url='http://www.w3.org/TR/xmlschema-2/#base64Binary'>http://www.w3.org/TR/xmlschema-2/#base64Binary</link>&gt;.</note> as defined in &w3xmlschema2;. The Base64 output MUST NOT include whitespace and MUST set padding bits to zero.</p>
  132. </section1>
  133. <section1 topic='Hash Functions' anchor='hashes'>
  134. <section2 topic='MD2' anchor='hashes-md2'>
  135. <p>The MD2 algorithm is not used in any XMPP protocols and has been deprecated by the IETF (see &rfc6149;).</p>
  136. </section2>
  137. <section2 topic='MD4' anchor='hashes-md4'>
  138. <p>The MD4 algorithm is not used in any XMPP protocols and has been deprecated by the IETF (see &rfc6150;).</p>
  139. </section2>
  140. <section2 topic='MD5' anchor='hashes-md5'>
  141. <p>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.</p>
  142. <p>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 <note>Yu Sasaki and Kazumaro Aoki, "Finding preimages in full MD5 faster than exhaustive search" &lt;<link url='https://doi.org/10.1007/978-3-642-01001-9_8'>https://doi.org/10.1007/978-3-642-01001-9_8</link>&gt;.</note>.</p>
  143. <p>The primary use of MD5 in XMPP protocols is &xep0096;, which will be obsoleted by &xep0234;.</p>
  144. </section2>
  145. <section2 topic='SHA-0' anchor='hashes-sha0'>
  146. <p>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.</p>
  147. </section2>
  148. <section2 topic='SHA-1' anchor='hashes-sha1'>
  149. <p>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.</p>
  150. <p>In fall 2015 the SHA-1 collision cost has been estimated between 75K$ to 120K$ <note>The SHAppening: freestart collisions for SHA-1 &lt;<link url='https://sites.google.com/site/itstheshappening/'>https://sites.google.com/site/itstheshappening/</link>&gt;.</note>.</p>
  151. <p>The SHA-1 algorithm is used in a number of XMPP protocols. See <link url='#existing'>Analysis of Existing XMPP Extensions</link> for details.</p>
  152. </section2>
  153. <section2 topic='SHA-2' anchor='hashes-sha2'>
  154. <p>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).</p>
  155. </section2>
  156. <section2 topic='SHA-3' anchor='hashes-sha3'>
  157. <p>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 <span class='ref'><link url='http://dx.doi.org/10.6028/NIST.FIPS.202'>FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions</link></span> <note>FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions &lt;<link url='http://dx.doi.org/10.6028/NIST.FIPS.202'>http://dx.doi.org/10.6028/NIST.FIPS.202</link>&gt;.</note> after a public hash function competition.</p>
  158. </section2>
  159. <section2 topic='BLAKE2' anchor='hashes-blake2'>
  160. <p>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.</p>
  161. </section2>
  162. </section1>
  163. <section1 topic='Algorithm Recommendations' anchor='recommendations'>
  164. <p>Support for version 1 of the 'urn:xmpp:hashes' namespace implies the following:</p>
  165. <table caption='Algorithm Recommendations'>
  166. <tr>
  167. <th>Algorithm</th>
  168. <th>Digest Size</th>
  169. <th>Support</th>
  170. </tr>
  171. <tr>
  172. <td>MD2</td>
  173. <td>128 bits</td>
  174. <td>MUST NOT</td>
  175. </tr>
  176. <tr>
  177. <td>MD4</td>
  178. <td>128 bits</td>
  179. <td>MUST NOT</td>
  180. </tr>
  181. <tr>
  182. <td>MD5</td>
  183. <td>128 bit</td>
  184. <td>MUST NOT</td>
  185. </tr>
  186. <tr>
  187. <td>SHA-1</td>
  188. <td>160 bits</td>
  189. <td>SHOULD NOT</td>
  190. </tr>
  191. <tr>
  192. <td>SHA-256</td>
  193. <td>256 bits</td>
  194. <td>MUST</td>
  195. </tr>
  196. <tr>
  197. <td>SHA-512</td>
  198. <td>512 bits</td>
  199. <td>SHOULD</td>
  200. </tr>
  201. <tr>
  202. <td>SHA3-256</td>
  203. <td>256 bits</td>
  204. <td>MUST</td>
  205. </tr>
  206. <tr>
  207. <td>SHA3-512</td>
  208. <td>512 bits</td>
  209. <td>SHOULD</td>
  210. </tr>
  211. <tr>
  212. <td>BLAKE2b256</td>
  213. <td>256 bits</td>
  214. <td>MUST</td>
  215. </tr>
  216. <tr>
  217. <td>BLAKE2b512</td>
  218. <td>512 bits</td>
  219. <td>SHOULD</td>
  220. </tr>
  221. </table>
  222. <p>These recommendations ought to be reviewed yearly by the &COUNCIL;.</p>
  223. </section1>
  224. <!-- http://dx.doi.org/10.6028/NIST.FIPS.202 -->
  225. <section1 topic='Determining Support' anchor='disco'>
  226. <p>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:</p>
  227. <example caption="Service discovery information request"><![CDATA[
  228. <iq from='romeo@montague.lit/orchard'
  229. id='uw72g176'
  230. to='juliet@capulet.lit/balcony'
  231. type='get'>
  232. <query xmlns='http://jabber.org/protocol/disco#info'/>
  233. </iq>
  234. ]]></example>
  235. <example caption="Service discovery information response"><![CDATA[
  236. <iq from='juliet@capulet.lit/balcony'
  237. id='uw72g176'
  238. to='romeo@montague.lit/orchard'
  239. type='result'>
  240. <query xmlns='http://jabber.org/protocol/disco#info'>
  241. <feature var='urn:xmpp:hashes:2'/>
  242. <feature var='urn:xmpp:hash-function-text-names:sha-256'/>
  243. <feature var='urn:xmpp:hash-function-text-names:sha3-256'/>
  244. </query>
  245. </iq>
  246. ]]></example>
  247. <p>In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.</p>
  248. </section1>
  249. <section1 topic='Recommendations for New XMPP Extensions' anchor='new'>
  250. <p>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).</p>
  251. </section1>
  252. <section1 topic='Analysis of Existing XMPP Extensions' anchor='existing'>
  253. <p>As mentioned, several existing XMPP extensions make use of the SHA-1 algorithm. This section analyzes those extensions. The final subsection provides recommendations.</p>
  254. <section2 topic='XEP-0065' anchor='existing-xep0065'>
  255. <p>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.</p>
  256. </section2>
  257. <section2 topic='XEP-0084' anchor='existing-xep0065'>
  258. <p>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.</p>
  259. </section2>
  260. <section2 topic='XEP-0115' anchor='existing-xep0115'>
  261. <p>&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.</p>
  262. </section2>
  263. <section2 topic='XEP-0124' anchor='existing-xep0124'>
  264. <p>&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.</p>
  265. </section2>
  266. <section2 topic='XEP-0153' anchor='existing-xep0153'>
  267. <p>&xep0153; is historical but still widely used. Probably it is more valuable to modify <cite>XEP-0084</cite> so that it supports hash agility.</p>
  268. </section2>
  269. <section2 topic='XEP-0174' anchor='existing-xep0174'>
  270. <p>&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.</p>
  271. </section2>
  272. <section2 topic='XEP-0231' anchor='existing-xep0231'>
  273. <p>&xep0231; supports hash agility through the structure of values for the 'cid' attribute, but does not mandate support for any particular algorithm.</p>
  274. </section2>
  275. <section2 topic='XEP-0234' anchor='existing-xep0234'>
  276. <p>&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.</p>
  277. </section2>
  278. <section2 topic='Recommendations' anchor='existing-recommendations'>
  279. <p>Of the foregoing, the use in <cite>XEP-0115</cite> has the most significant security implications. However, there are other security issues with <cite>XEP-0115</cite> 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.</p>
  280. </section2>
  281. </section1>
  282. <section1 topic='Security Considerations' anchor='security'>
  283. <p>This entire document discusses security.</p>
  284. </section1>
  285. <section1 topic='IANA Considerations' anchor='iana'>
  286. <p>This document requires no interaction with the IANA. However, it reuses entries from the relevant IANA registry.</p>
  287. </section1>
  288. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  289. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  290. <p>This specification defines the following XML namespace:</p>
  291. <ul>
  292. <li>urn:xmpp:hashes:2</li>
  293. </ul>
  294. <p>The &REGISTRAR; shall include the foregoing namespace in its registry at &NAMESPACES;, as governed by &xep0053;.</p>
  295. </section2>
  296. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  297. &NSVER;
  298. </section2>
  299. <section2 topic='Service Discovery Features' anchor='registrar-features'>
  300. <p>An entity SHOULD provide one service discovery feature for each algorithm it supports. Ideally these features would be of the form "urn:iana:hash-function-text-names:foo" (where "foo" is the name of an algorithm registered with the IANA); however there is no urn:iana namespace at present. Until there is, we use features of the form "urn:xmpp:hash-function-text-names:foo" instead. Therefore the registry submission is as follows.</p>
  301. <code caption='Registry Submission'><![CDATA[
  302. <var>
  303. <name>urn:xmpp:hash-function-text-names:md5</name>
  304. <desc>Support for the MD5 hashing algorithm</desc>
  305. <doc>XEP-0300</doc>
  306. </var>
  307. <var>
  308. <name>urn:xmpp:hash-function-text-names:sha-1</name>
  309. <desc>Support for the SHA-1 hashing algorithm</desc>
  310. <doc>XEP-0300</doc>
  311. </var>
  312. <var>
  313. <name>urn:xmpp:hash-function-text-names:sha-224</name>
  314. <desc>Support for the SHA-224 hashing algorithm</desc>
  315. <doc>XEP-0300</doc>
  316. </var>
  317. <var>
  318. <name>urn:xmpp:hash-function-text-names:sha-256</name>
  319. <desc>Support for the SHA-256 hashing algorithm</desc>
  320. <doc>XEP-0300</doc>
  321. </var>
  322. <var>
  323. <name>urn:xmpp:hash-function-text-names:sha-384</name>
  324. <desc>Support for the SHA-384 hashing algorithm</desc>
  325. <doc>XEP-0300</doc>
  326. </var>
  327. <var>
  328. <name>urn:xmpp:hash-function-text-names:sha-512</name>
  329. <desc>Support for the SHA-512 hashing algorithm</desc>
  330. <doc>XEP-0300</doc>
  331. </var>
  332. <var>
  333. <name>urn:xmpp:hash-function-text-names:sha3-224</name>
  334. <desc>Support for the SHA3-224 hashing algorithm</desc>
  335. <doc>XEP-0300</doc>
  336. </var>
  337. <var>
  338. <name>urn:xmpp:hash-function-text-names:sha3-256</name>
  339. <desc>Support for the SHA3-256 hashing algorithm</desc>
  340. <doc>XEP-0300</doc>
  341. </var>
  342. <var>
  343. <name>urn:xmpp:hash-function-text-names:sha3-384</name>
  344. <desc>Support for the SHA3-384 hashing algorithm</desc>
  345. <doc>XEP-0300</doc>
  346. </var>
  347. <var>
  348. <name>urn:xmpp:hash-function-text-names:sha3-512</name>
  349. <desc>Support for the SHA3-512 hashing algorithm</desc>
  350. <doc>XEP-0300</doc>
  351. </var>
  352. <var>
  353. <name>urn:xmpp:hash-function-text-names:id-blake2b160</name>
  354. <desc>Support for the BLAKE2b-160 hashing algorithm</desc>
  355. <doc>XEP-0300</doc>
  356. </var>
  357. <var>
  358. <name>urn:xmpp:hash-function-text-names:id-blake2b256</name>
  359. <desc>Support for the BLAKE2b-256 hashing algorithm</desc>
  360. <doc>XEP-0300</doc>
  361. </var>
  362. <var>
  363. <name>urn:xmpp:hash-function-text-names:id-blake2b384</name>
  364. <desc>Support for the BLAKE2b-384 hashing algorithm</desc>
  365. <doc>XEP-0300</doc>
  366. </var>
  367. <var>
  368. <name>urn:xmpp:hash-function-text-names:id-blake2b512</name>
  369. <desc>Support for the BLAKE2b-512 hashing algorithm</desc>
  370. <doc>XEP-0300</doc>
  371. </var>
  372. ]]></code>
  373. </section2>
  374. </section1>
  375. <section1 topic='XML Schema' anchor='schema'>
  376. <code><![CDATA[
  377. <?xml version='1.0' encoding='UTF-8'?>
  378. <xs:schema
  379. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  380. targetNamespace='urn:xmpp:hashes:2'
  381. xmlns='urn:xmpp:hashes:2'
  382. elementFormDefault='qualified'>
  383. <xs:element name='hash'>
  384. <xs:complexType>
  385. <xs:simpleContent>
  386. <xs:extension base='xs:base64Binary'>
  387. <xs:attribute name='algo' type='xs:NCName' use='required'/>
  388. </xs:extension>
  389. </xs:simpleContent>
  390. </xs:complexType>
  391. </xs:element>
  392. <xs:element name='hash-used'>
  393. <xs:complexType>
  394. <xs:extension base='empty'>
  395. <xs:attribute name='algo' type='xs:NCName' use='required'/>
  396. </xs:extension>
  397. </xs:complexType>
  398. </xs:element>
  399. </xs:schema>
  400. ]]></code>
  401. </section1>
  402. <section1 topic='Acknowledgements' anchor='ack'>
  403. <p>Thanks to Dave Cridland, Waqas Hussain, Glenn Maynard, Remko
  404. Tronçon, Paul Schaub, Christian Schudt, and Florian Schmaus for their input.</p>
  405. </section1>
  406. </xep>