1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 18:22:24 -05:00
This commit is contained in:
stpeter 2011-06-22 10:01:42 -06:00
parent 766d5ea232
commit c42eadd8dd

View File

@ -21,6 +21,14 @@
<supersededby/>
<shortname>N/A</shortname>
&stpeter;
&mwild;
&ksmith;
<revision>
<version>0.0.2</version>
<date>2011-06-22</date>
<initials>mw/ks/psa</initials>
<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>
</revision>
<revision>
<version>0.0.1</version>
<date>2011-06-16</date>
@ -42,20 +50,23 @@
</dl>
</section1>
<section1 topic='XML Element' anchor='element'>
<p>This document defines a new XML element that can be used in any XMPP protocol extension. An example follows.</p>
<section1 topic='XML Format' anchor='format'>
<p>This document defines a new XML element (and child elements) that can be used in any XMPP protocol extension. An example follows.</p>
<code><![CDATA[
<hash xmlns='urn:xmpp:hashes:0' algo='sha-256'>
2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=
</hash>
<hashes xmlns='urn:xmpp:hashes:0'>
<hash algo='sha-256'>2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=</hash>
</hashes>
]]></code>
<p>The &lt;hashes/&gt; element MAY contain more than one &lt;hash/&gt; child, as in the following example.</p>
<code><![CDATA[
<hashes xmlns='urn:xmpp:hashes:0'>
<hash algo='sha-1'>2AfMGH8O7UNPTvUVAM9aK13mpCY=</hash>
<hash algo='sha-256'>2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU=</hash>
</hashes>
]]></code>
<p>The value of the 'algo' attribute MUST be one of the values from the &ianahashes; maintained by &IANA;.</p>
</section1>
<section1 topic='Namespace Versioning' anchor='versioning'>
<p>This document defines the XML namespace 'urn:xmpp:hashes:0'. The document MUST be updated, and the namespace version MUST be incremented, whenever the XSF wishes to modify the list of mandatory, recommended, deprecated, and obsolete algorithms.</p>
</section1>
<section1 topic='Hash Functions' anchor='hashes'>
<section2 topic='MD2' anchor='hashes-md2'>
<p>The MD2 algorithm is not used in any XMPP protocols and has been deprecated by the IETF (see &rfc6149;).</p>
@ -116,6 +127,32 @@
<p>These recommendations ought to be reviewed yearly by the &COUNCIL;.</p>
</section1>
<section1 topic='Determining Support' anchor='disco'>
<p>If an entity supports the protocol defined herein, it MUST report that by including a &xep0030; feature of "urn:xmpp:hashes:0" in response to disco#info requests, along with one service discovery feature for each algorithm it supports:</p>
<example caption="Service discovery information request"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='uw72g176'
to='juliet@capulet.lit/balcony'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption="Service discovery information response"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='uw72g176'
to='romeo@montague.lit/orchard'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='urn:xmpp:hashes:0'/>
<feature var='urn:xmpp:hash-function-textual-names:md5'/>
<feature var='urn:xmpp:hash-function-textual-names:sha-1'/>
<feature var='urn:xmpp:hash-function-textual-names:sha-256'/>
</query>
</iq>
]]></example>
<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>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>This entire document discusses security.</p>
</section1>
@ -125,9 +162,54 @@
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>This document requires no interaction with the &REGISTRAR;.</p>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>This specification defines the following XML namespace:</p>
<ul>
<li>urn:xmpp:hashes:0</li>
</ul>
<p>The &REGISTRAR; shall include the foregoing namespace in its registry at &NAMESPACES;, as governed by &xep0053;.</p>
</section2>
<section2 topic='Protocol Versioning' anchor='registrar-versioning'>
&NSVER;
</section2>
<section2 topic='Service Discovery Features' anchor='registrar-features'>
<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>
<code caption='Registry Submission'><![CDATA[
<var>
<name>urn:xmpp:hash-function-text-names:md5</name>
<desc>Support for the MD5 hashing algorithm</desc>
<doc>XEP-xxxx</doc>
</var>
<var>
<name>urn:xmpp:hash-function-text-names:sha-1</name>
<desc>Support for the SHA-1 hashing algorithm</desc>
<doc>XEP-xxxx</doc>
</var>
<var>
<name>urn:xmpp:hash-function-text-names:sha-224</name>
<desc>Support for the SHA-224 hashing algorithm</desc>
<doc>XEP-xxxx</doc>
</var>
<var>
<name>urn:xmpp:hash-function-text-names:sha-256</name>
<desc>Support for the SHA-256 hashing algorithm</desc>
<doc>XEP-xxxx</doc>
</var>
<var>
<name>urn:xmpp:hash-function-text-names:sha-384</name>
<desc>Support for the SHA-384 hashing algorithm</desc>
<doc>XEP-xxxx</doc>
</var>
<var>
<name>urn:xmpp:hash-function-text-names:sha-512</name>
<desc>Support for the SHA-512 hashing algorithm</desc>
<doc>XEP-xxxx</doc>
</var>
]]></code>
</section2>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
<p>Thanks to Dave Cridland, Waqas Hussain, Glenn Maynard, and Remko Tronçon for their input.</p>
</section1>