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-0217.xml 46KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  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>Simplified Encrypted Session Negotiation</title>
  10. <abstract>This document specifies a minimal subset of the Encrypted Session Negotiation protocol sufficent for negotiating an end-to-end encrypted session.</abstract>
  11. &LEGALNOTICE;
  12. <number>0217</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XMPP IM</spec>
  19. <spec>RFC 2104</spec>
  20. <spec>RFC 2409</spec>
  21. <spec>RFC 3526</spec>
  22. <spec>RFC 4648</spec>
  23. <spec>SHA256</spec>
  24. <spec>xml-c14n</spec>
  25. <spec>XEP-0004</spec>
  26. <spec>XEP-0020</spec>
  27. <spec>XEP-0030</spec>
  28. <spec>XEP-0068</spec>
  29. <spec>XEP-0115</spec>
  30. <spec>XEP-0155</spec>
  31. <spec>XEP-0200</spec>
  32. </dependencies>
  33. <supersedes/>
  34. <supersededby/>
  35. <shortname>TO BE ASSIGNED</shortname>
  36. &ianpaterson;
  37. <revision>
  38. <version>0.1</version>
  39. <date>2007-05-30</date>
  40. <initials>psa</initials>
  41. <remark><p>Initial published version; modified namespaces to reflect XMPP Registrar procedures regarding URN issuance.</p></remark>
  42. </revision>
  43. <revision>
  44. <version>0.0.1</version>
  45. <date>2007-05-30</date>
  46. <initials>ip</initials>
  47. <remark><p>First draft.</p></remark>
  48. </revision>
  49. </header>
  50. <section1 topic='Introduction' anchor='intro'>
  51. <p>&xep0116; is a fully-fledged protocol that supports multiple different end-to-end encryption functionalities and scenarios. The protocol is as simple as possible given its feature set. However, the work involved to implement it may be reduced by removing support for several of the optional features, including alternative algorithms, 3-message exchange, public keys, repudiation and key re-exchange.</p>
  52. <p>The minimal subset of the protocol defined in this document is designed to be relatively simple to implement while offering full compatibility with implementations of the fully-fledged protocol. The existence of this subset enables developers to produce working code before they have finished implementing the full protocol.</p>
  53. <p>The requirements and the consequent cryptographic design that underpin this protocol are described in &xep0210; and &xep0188;. The basic concept is that of an encrypted session which acts as a secure tunnel between two endpoints. The protocol specified in &xep0155; and in this document is used to negotiate the encryption keys and establish the tunnel. Thereafter the content of each one-to-one XML stanza exchanged between the endpoints during the session will be encrypted and transmitted within a "wrapper" stanza using &xep0200;.</p>
  54. <p>The cut-down protocol described here is a 4-message key exchange (see <link url='http://www.xmpp.org/extensions/xep-0188.html#design-online-r'>useful summary of 4-message negotiation</link>) with short-authentication-string (SAS), hash commitment and optional retained secrets. It avoids using public keys - thus protecting the identity of <em>both</em> participants against active attacks from third parties.</p>
  55. <p>Note: This protocol requires that both entities are online. An entity MAY use the protocol specified in &xep0187; if it believes the other entity is offline.</p>
  56. </section1>
  57. <section1 topic="Dramatis Personae" anchor='personae'>
  58. <p>This document introduces two characters to help the reader follow the necessary exchanges:</p>
  59. <ol start='1'>
  60. <li>"Alice" is the name of the initiator of the ESession. Within the scope of this document, we stipulate that her fully-qualified JID is: &lt;alice@example.org/pda&gt;.</li>
  61. <li>"Bob" is the name of the other participant in the ESession started by Alice. Within the scope of this document, his fully-qualified JID is: &lt;bob@example.com/laptop&gt;.</li>
  62. <li>"Aunt Tillie" the archetypal typical user (i.e. non-technical, with only very limited knowledge of how to use a computer, and averse to performing any procedures that are not familiar).</li>
  63. </ol>
  64. <p>While Alice and Bob are introduced as "end users", they are simply meant to be examples of XMPP entities. Any directly addressable XMPP entity may participate in an ESession.</p>
  65. </section1>
  66. <section1 topic='Discovering Support' anchor='disco'>
  67. <p>Before attempting to engage in an ESession with Bob, Alice MAY discover whether he supports this protocol, using either &xep0030; or the presence-based profile of <cite>XEP-0030</cite> specified in &xep0115;.</p>
  68. <p>The disco#info request sent from Alice to Bob might look as follows:</p>
  69. <example caption='Alice Queries Bob for ESession Support via Disco'><![CDATA[
  70. <iq type='get'
  71. from='alice@example.org/pda'
  72. to='bob@example.com/laptop'
  73. id='disco1'>
  74. <query xmlns='http://jabber.org/protocol/disco#info'/>
  75. </iq>
  76. ]]></example>
  77. <p>If Bob sends a disco#info reply and he supports the protocol defined herein, then he MUST include a service discovery feature variable of "http://www.xmpp.org/extensions/xep-0116.html#ns".</p>
  78. <example caption='Bob Returns disco#info Data'><![CDATA[
  79. <iq type='result'
  80. from='bob@example.com/laptop'
  81. to='alice@example.org/pda'
  82. id='disco1'>
  83. <query xmlns='http://jabber.org/protocol/disco#info'>
  84. <identity category='client' type='pc'/>
  85. ...
  86. <feature var='http://www.xmpp.org/extensions/xep-0116.html#ns'/>
  87. ...
  88. </query>
  89. </iq>
  90. ]]></example>
  91. </section1>
  92. <section1 topic="Online ESession Negotiation" anchor='init'>
  93. <section2 topic="ESession Request (Alice)" anchor='init-online-request'>
  94. <p>In addition to the "accept", "security", "otr" and "disclosure" fields (see <link url='#sec-backdoor'>Back Doors</link>) specified in <cite>Stanza Session Negotiation</cite>, Alice MUST send to Bob each of the ESession options (see list below) that she is willing to use.</p>
  95. <ul>
  96. <li><p>The list of Modular Exponential (MODP) group numbers (as specified in &rfc2409; or &rfc3526;) that MAY be used for Diffie-Hellman key exchange in a "modp" field (valid group numbers include 1,2,3,4,5,14,15,16,17 and 18) <note>Entities SHOULD offer even the lowest MODP groups since some entities are CPU-constrained, and security experts tend to agree that "longer keys do not protect against the most realistic security threats".</note></p></li>
  97. <li><p>The list of stanza types that MAY be encrypted and decrypted in a "stanzas" field (message, presence, iq)</p></li>
  98. <li><p>The different versions of the <cite>Encrypted Session Negotiation</cite> protocol that are supported in a "ver" field</p></li>
  99. </ul>
  100. <p>Each MODP group has at least two well known constants: a large prime number p, and a generator g for a subgroup of GF(p). For <em>each</em> MODP group that Alice specifies she MUST perform the following computations to calculate her Diffie-Hellman keys (where n is 128 - i.e. the number of bits per cipher block for the AES-128 block cipher algorithm):</p>
  101. <ol>
  102. <li><p>Generate: a secret random number x (where &twosup2n; &lt; x &lt; p - 1)</p></li>
  103. <li><p>Calculate: e = &gsupx; mod p</p></li>
  104. <li><p>Calculate: He = SHA256(e) (see &nistfips180-2;)</p></li>
  105. </ol>
  106. <p>Alice MUST send all her calculated values of 'He' to Bob (in a "dhhashes" field in the same order as the associated MODP groups are being sent) Base64 encoded (in accordance with Section 4 of &rfc4648;). She MUST also specify a randomly generated Base64 encoded value of &NsubA; (her ESession ID in a "my_nonce" field).</p>
  107. <p>The form SHOULD NOT include a "sign_algs" field. However, to ensure compatibility with entities that support the full <cite>Encrypted Session Negotiation</cite> protocol, the form SHOULD include the following fixed values in hidden fields:</p>
  108. <table caption='Fixed Parameters'>
  109. <tr>
  110. <th>Field</th>
  111. <th>Value</th>
  112. </tr>
  113. <tr>
  114. <td>crypt_algs</td>
  115. <td>"aes128-ctr"</td>
  116. </tr>
  117. <tr>
  118. <td>hash_algs</td>
  119. <td>"sha256"</td>
  120. </tr>
  121. <tr>
  122. <td>compress</td>
  123. <td>"none"</td>
  124. </tr>
  125. <tr>
  126. <td>init_pubkey</td>
  127. <td>"none"</td>
  128. </tr>
  129. <tr>
  130. <td>resp_pubkey</td>
  131. <td>"none"</td>
  132. </tr>
  133. <tr>
  134. <td>rekey_freq</td>
  135. <td>"4294967295"</td>
  136. </tr>
  137. <tr>
  138. <td>sas_algs</td>
  139. <td>"sas28x5"</td>
  140. </tr>
  141. </table>
  142. <p>The options in each field MUST appear in Alice's order of preference.</p>
  143. <example caption='Initiates a 4-message ESession Negotiation'><![CDATA[
  144. <message from='alice@example.org/pda' to='bob@example.com'>
  145. <thread>ffd7076498744578d10edabfe7f4a866</thread>
  146. <feature xmlns='http://jabber.org/protocol/feature-neg'>
  147. <x type='form' xmlns='jabber:x:data'>
  148. <field type='hidden' var='FORM_TYPE'>
  149. <value>urn:xmpp:ssn</value>
  150. </field>
  151. <field type='boolean' var='accept'>
  152. <value>1</value>
  153. <required/>
  154. </field>
  155. <field type='list-single' var='otr'>
  156. <option><value>false</value></option>
  157. <option><value>true</value></option>
  158. <required/>
  159. </field>
  160. <field type='list-single' var='disclosure'>
  161. <option><value>never</value></option>
  162. <required/>
  163. </field>
  164. <field type='list-single' var='security'>
  165. <option><value>e2e</value></option>
  166. <option><value>c2s</value></option>
  167. <required/>
  168. </field>
  169. <field type='list-single' var='modp'>
  170. <option><value>5</value></option>
  171. <option><value>14</value></option>
  172. <option><value>2</value></option>
  173. <option><value>1</value></option>
  174. </field>
  175. <field type='hidden' var='crypt_algs'>
  176. <value>aes128-ctr</value>
  177. </field>
  178. <field type='hidden' var='hash_algs'>
  179. <value>sha256</value>
  180. </field>
  181. <field type='hidden' var='compress'>
  182. <value>none</value>
  183. </field>
  184. <field type='list-multi' var='stanzas'>
  185. <option><value>message</value></option>
  186. <option><value>iq</value></option>
  187. <option><value>presence</value></option>
  188. </field>
  189. <field type='hidden' var='init_pubkey'>
  190. <value>none</value>
  191. </field>
  192. <field type='hidden' var='resp_pubkey'>
  193. <value>none</value>
  194. </field>
  195. <field type='list-single' var='ver'>
  196. <option><value>1.3</value></option>
  197. <option><value>1.2</value></option>
  198. </field>
  199. <field type='hidden' var='rekey_freq'>
  200. <value>4294967295</value>
  201. </field>
  202. <field type='hidden' var='my_nonce'>
  203. <value> ** Alice's Base64 encoded ESession ID ** </value>
  204. </field>
  205. <field type='hidden' var='sas_algs'>
  206. <value>sas28x5</value>
  207. </field>
  208. <field type='hidden' var='dhhashes'>
  209. <value> ** Base64 encoded value of He5 ** </value>
  210. <value> ** Base64 encoded value of He14 ** </value>
  211. <value> ** Base64 encoded value of He2 ** </value>
  212. <value> ** Base64 encoded value of He1 ** </value>
  213. </field>
  214. </x>
  215. </feature>
  216. <amp xmlns='http://jabber.org/protocol/amp' per-hop='true'>
  217. <rule action='drop' condition='deliver' value='stored'/>
  218. </amp>
  219. </message>
  220. ]]></example>
  221. </section2>
  222. <section2 topic="ESession Rejection (Bob)" anchor='init-online-reject'>
  223. <p>If Bob does not want to reveal presence to Alice for whatever reason then Bob SHOULD return no response or error.</p>
  224. <p>If Bob finds that one or more of the fields (other than the "rekey_freq" field) listed in the <cite>Fixed Parameters</cite> table (see <link url='#init-online-request'>ESession Request</link>) does not include the value included in the table (or an &lt;option/&gt; element containing the value), or if Bob supports <em>none</em> of the options for one or more of the negotiable ESession fields ("modp", "stanzas", "ver"), then he SHOULD also return a &notacceptable; error specifying the field(s) with unsupported options:</p>
  225. <example caption='Bob Informs Alice that Her Options are Not Supported'><![CDATA[
  226. <message type='error'
  227. from='bob@example.com/laptop'
  228. to='alice@example.org/pda'>
  229. <thread>ffd7076498744578d10edabfe7f4a866</thread>
  230. <feature xmlns='http://jabber.org/protocol/feature-neg'>
  231. ...
  232. </feature>
  233. <error type='cancel'>
  234. <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  235. <feature xmlns='http://jabber.org/protocol/feature-neg'>
  236. <field var='modp'/>
  237. <field var='ver'/>
  238. </feature>
  239. </error>
  240. </message>
  241. ]]></example>
  242. <p>Either Bob or Alice MAY attempt to initiate a new ESession after any error during the negotiation process. However, both MUST consider the previous negotiation to have failed and MUST discard any information learned through the previous negotiation.</p>
  243. <p>If Bob is unwilling to start an ESession, but he <em>is</em> ready to initiate a one-to-one stanza session with Alice (see <cite>Stanza Session Negotiation</cite>), and if Alice included an option for the "security" field with the value "none" or "c2s", then Bob SHOULD accept the stanza session and terminate the ESession negotiation by specifying "none" or "c2s" for the value of the "security" field in his response.</p>
  244. <example caption='Bob Accepts Stanza Session'><![CDATA[
  245. <message from='bob@example.com/laptop' to='alice@example.org/pda'>
  246. <thread>ffd7076498744578d10edabfe7f4a866</thread>
  247. <feature xmlns='http://jabber.org/protocol/feature-neg'>
  248. <x type='submit' xmlns='jabber:x:data'>
  249. <field var='FORM_TYPE'>
  250. <value>urn:xmpp:ssn</value>
  251. </field>
  252. <field var='accept'><value>1</value></field>
  253. <field var='otr'><value>true</value></field>
  254. <field var='disclosure'><value>never</value></field>
  255. <field var='security'><value>c2s</value></field>
  256. </x>
  257. </feature>
  258. </message>
  259. ]]></example>
  260. </section2>
  261. <section2 topic="ESession Response (Bob)" anchor='init-response'>
  262. <section3 topic="Diffie-Hellman Preparation (Bob)" anchor='init-online-bobprep'>
  263. <p>If Bob supports one or more of each of Alice's ESession options and is willing to start an ESession with Alice, then he MUST select one of the options from each of the negotiable ESession fields ("modp", "stanzas", "ver") he received from Alice, including one of the MODP groups and Alice's corresponding value of 'He'. Note: MODP group 14, with its 2048-bit modulus, could be considered a good match for AES-128, however CPU-constrained implementations MAY select a smaller group.</p>
  264. <p>Note: Each MODP group has at least two well known constants: a large prime number p, and a generator g for a subgroup of GF(p).</p>
  265. <p>Bob MUST then perform the following computations (where n is 128, the number of bits per cipher block for AES-128):</p>
  266. <ol start='1'>
  267. <li><p>Generate a random number &NsubB; (his ESession ID)</p></li>
  268. <li><p>Generate an n-bit random number &CsubA; (the block cipher counter for stanzas sent from Alice to Bob)</p></li>
  269. <li><p>Set &CBeCAx2n1; (where &CsubB; is the block counter for stanzas sent from Bob to Alice)</p></li>
  270. <li><p>Generate a secret random number y (where &twosup2n; &lt; y &lt; p - 1)</p></li>
  271. <li><p>Calculate d = &gsupy; mod p</p></li>
  272. </ol>
  273. </section3>
  274. <section3 topic="Response Form" anchor='init-online-form'>
  275. <p>Bob SHOULD generate the form that he will send back to Alice, including his responses for all the fields Alice sent him except that he MUST NOT include a 'dhhashes' field. The form SHOULD include the fields and associated values listed in the <cite>Fixed Parameters</cite> table (see <link url='#init-online-request'>ESession Request</link>).</p>
  276. <p>He MUST place his Base64 encoded values of &NsubB; and d in the 'my_nonce' and 'dhkeys' fields. Note: Bob MUST NOT return Alice's value of &NsubA; in the 'my_nonce' field.</p>
  277. <p>Bob MUST encapsulate the Base64 encoded values of &CsubA; and Alice's &NsubA; in two new 'counter' and 'nonce' fields and append them to the form.</p>
  278. <p>Bob SHOULD respond to Alice by sending her the form (&formB;).</p>
  279. <example caption='Bob Responds to Alice'><![CDATA[
  280. <message from='bob@example.com/laptop' to='alice@example.org/pda'>
  281. <thread>ffd7076498744578d10edabfe7f4a866</thread>
  282. <feature xmlns='http://jabber.org/protocol/feature-neg'>
  283. <x type='submit' xmlns='jabber:x:data'>
  284. <field var='FORM_TYPE'>
  285. <value>urn:xmpp:ssn</value>
  286. </field>
  287. <field var='accept'><value>1</value></field>
  288. <field var='otr'><value>true</value></field>
  289. <field var='disclosure'><value>never</value></field>
  290. <field var='security'><value>e2e</value></field>
  291. <field var='modp'><value>5</value></field>
  292. <field var='crypt_algs'><value>aes128-ctr</value></field>
  293. <field var='hash_algs'><value>sha256</value></field>
  294. <field var='compress'><value>none</value></field>
  295. <field var='stanzas'><value>message</value></field>
  296. <field var='init_pubkey'><value>none</value></field>
  297. <field var='resp_pubkey'><value>none</value></field>
  298. <field var='ver'><value>1.3</value></field>
  299. <field var='rekey_freq'><value>4294967295</value></field>
  300. <field var='my_nonce'>
  301. <value> ** Bob's Base64 encoded ESession ID ** </value>
  302. </field>
  303. <field var='sas_algs'><value>sas28x5</value></field>
  304. <field var='dhkeys'>
  305. <value> ** Base64 encoded value of d ** </value>
  306. </field>
  307. <field var='nonce'>
  308. <value> ** Alice's Base64 encoded ESession ID ** </value>
  309. </field>
  310. <field var='counter'>
  311. <value> ** Base64 encoded block counter ** </value>
  312. </field>
  313. </x>
  314. </feature>
  315. </message>
  316. ]]></example>
  317. </section3>
  318. </section2>
  319. <section2 topic="ESession Accept (Alice)" anchor='init-acceptalice'>
  320. <section3 topic="Diffie-Hellman Preparation (Alice)" anchor='init-acceptalice-prep'>
  321. <p>After Alice receives Bob's response, she MUST use the value of d and the ESession options specified in Bob's response to perform the following steps (where p and g are the constants associated with the selected MODP group, and n is 128 - the number of bits per cipher block):</p>
  322. <ol start='1'>
  323. <li><p>Verify that the ESession options selected by Bob are acceptable</p></li>
  324. <li><p>Return a &notacceptable; error to Bob unless: 1 &lt; d &lt; p - 1</p></li>
  325. <li><p>Set &CBeCAx2n1; (where &CsubB; is the block counter for stanzas sent from Bob to Alice)</p></li>
  326. <li><p>Select her values of x and e that correspond to the selected MODP group (from all the values of x and e she calculated previously - see <link url='#init-online-request'>ESession Request</link>)</p></li>
  327. <li><p>Calculate K = SHA256(&dsupx; mod p) (the shared secret)</p></li>
  328. <li><p>Generate provisory session keys <em>only</em> for the messages Alice sends to Bob (&KCsubA;, &KMsubA;, &KSsubA;) - see the next section, <link url='#init-keys'>Generating Session Keys</link>.</p></li>
  329. </ol>
  330. </section3>
  331. <section3 topic="Generating Session Keys" anchor='init-keys'>
  332. <p>Alice MUST use HMAC with SHA256 and the shared secret ("K") to generate two sets of three keys, one set for each direction of the ESession.</p>
  333. <p>For stanzas that Alice will send to Bob, the keys are calculated as:</p>
  334. <ol>
  335. <li><p>Encryption key &KCsubA; = <em>HMAC</em>(SHA256, K, "Initiator Cipher Key")</p></li>
  336. <li><p>Integrity key &KMsubA; = <em>HMAC</em>(SHA256, K, "Initiator MAC Key")</p></li>
  337. <!-- <note>&KMsubA; is a hash of &KCsubA; (not K) to ensure that if an attacker recovers the decryption key she will not be able to cryptographically convince anyone that it was not her who created the stanza.</note> -->
  338. <li><p>SIGMA key &KSsubA; = <em>HMAC</em>(SHA256, K, "Initiator SIGMA Key")</p></li>
  339. </ol>
  340. <p>For stanzas that Bob will send to Alice the keys are calculated as:</p>
  341. <ol start='4'>
  342. <li><p>Encryption key &KCsubB; = <em>HMAC</em>(SHA256, K, "Responder Cipher Key")</p></li>
  343. <li><p>Integrity key &KMsubB; = <em>HMAC</em>(SHA256, K, "Responder MAC Key")</p></li>
  344. <li><p>SIGMA key &KSsubB; = <em>HMAC</em>(SHA256, K, "Responder SIGMA Key")</p></li>
  345. </ol>
  346. <p>Note: Only the 128 <em>least</em> significant bits of the HMAC output must be used for each key.</p>
  347. <p>Once the sets of keys have been calculated the value of K MUST be securely destroyed, unless it will be used later to generate the final shared secret (see <link url='#init-finalbob'>Generating Bob's Final Session Keys</link>).</p>
  348. </section3>
  349. <section3 topic="Hiding Alice's Identity" anchor='init-hide'>
  350. <p>Alice MUST perform the following steps before she can prove her identity to Bob while protecting it from third parties.</p>
  351. <ol>
  352. <li><p>Set &formA; to be the full <link url='#sign-normal'>Normalized</link>&#160;<em>content</em> of the <link url='#init-online-request'>ESession Request</link> data form that Alice sent to Bob at the start of the negotiation.</p></li>
  353. <li><p>Set &formA2; to be the full <link url='#sign-normal'>Normalized</link>&#160;<em>content</em> of Alice's session negotiation completion form <em>excluding</em> the 'identity' and 'mac' fields (see <link url='#init-acceptalice-send'>Sending Alice's Identity</link> below).</p></li>
  354. <li><p>Concatenate Bob's ESession ID, Alice's ESession ID, e, &formA; and &formA2;, and calculate the HMAC of the resulting byte string using SHA256 and the key &KSsubA;.</p>
  355. <code>&macA; = <em>HMAC</em>(SHA256, &KSsubA;, {&NsubB;, &NsubA;, e, &formA;, &formA2;})</code></li>
  356. <li><p>Encrypt the HMAC result with AES-128 in counter mode (see &nistfips800-38a;), using the encryption key &KCsubA; and block counter &CsubA;. Note: &CsubA; MUST be incremented by 1 for each encrypted block or partial block (i.e. &CsubA; = (&CsubA; + 1) mod 2<span class='super'>n</span>, where n is 128 - the number of bits per cipher block).</p>
  357. <code>&IDA; = CIPHER(&KCsubA;, &CsubA;, &macA;)</code></li>
  358. <li><p>Calculate the HMAC of the encrypted identity (&IDA;) and the value of Bob's block cipher counter &CsubA;&#160;<em>before</em> the encryption above using SHA256 and the integrity key &KMsubA;.</p>
  359. <code>&MsubA; = <em>HMAC</em>(SHA256, &KMsubA;, &CsubA;, &IDA;)</code></li>
  360. </ol>
  361. </section3>
  362. <section3 topic="Sending Alice's Identity" anchor='init-acceptalice-send'>
  363. <p>Alice MUST send the Base64 encoded values of &NsubB; (wrapped in a 'nonce' field), &IDA; (wrapped in an 'identity' field) and &MsubA; (wrapped in a 'mac' field) to Bob in her session negotiation completion message.</p>
  364. <p>Alice MUST also include in the data form her Base64 encoded values of e (wrapped in a 'dhkeys' field) and the Base64 encoded HMAC (using SHA256 and the key &NsubA; <note>The HMACs of the retained secrets are generated using Alice's unique session nonce to prevent her being identified by her retained secrets (only one secret changes each session, and some might not change very often).</note>) of each secret (if any) that Alice has retained from her previous session with each of Bob's clients (wrapped in a 'rshashes' field) - see <link url='#init-acceptbob-send'>Sending Bob's Identity</link>. Note: Alice MUST also append a few random numbers to the 'rshashes' field to make it difficult for an active attacker to discover if she has communicated with Bob before or how many clients Bob has used to communicate with her.</p>
  365. <example caption='Alice Sends Bob Her Identity'><![CDATA[
  366. <message from='alice@example.org/pda' to='bob@example.com/laptop'>
  367. <thread>ffd7076498744578d10edabfe7f4a866</thread>
  368. <feature xmlns='http://jabber.org/protocol/feature-neg'>
  369. <x type='result' xmlns='jabber:x:data'>
  370. <field var='FORM_TYPE'><value>urn:xmpp:ssn</value></field>
  371. <field var='accept'><value>1</value></field>
  372. <field var='nonce'><value> ** Bob's Base64 encoded ESession ID ** </value></field>
  373. <field type='hidden' var='dhkeys'>
  374. <value> ** Base64 encoded value of e5 ** </value>
  375. </field>
  376. <field type='hidden' var='rshashes'>
  377. <value> ** Base64 encoded hash of retained secret ** </value>
  378. <value> ** Base64 encoded hash of retained secret ** </value>
  379. <value> ** Base64 encoded random value ** </value>
  380. <value> ** Base64 encoded random value ** </value>
  381. </field>
  382. <field var='identity'><value> ** Encrypted identity ** </value></field>
  383. <field var='mac'><value> ** Integrity of identity ** </value></field>
  384. </x>
  385. </feature>
  386. </message>
  387. ]]></example>
  388. </section3>
  389. </section2>
  390. <section2 topic="ESession Accept (Bob)" anchor='init-acceptbob'>
  391. <section3 topic="Generating Provisory Session Keys (Bob)" anchor='init-acceptbob-generate'>
  392. <p>Bob MUST perform the following four steps:</p>
  393. <ol>
  394. <li><p>Return a &feature; error unless SHA256(e) equals 'He', the value he received from Alice in her original session request.</p></li>
  395. <li><p>Return a &feature; error unless: 1 &lt; e &lt; p - 1</p></li>
  396. <li><p>Use the value of e he received from Alice, his secret value of y and their agreed value of p to calculate the value of the Diffie-Hellman shared secret: K = SHA256(&esupy; mod p)</p></li>
  397. <li><p>Generate Alice's provisory session keys (&KCsubA;, &KMsubA;, &KSsubA;) in exactly the same way as specified in the <link url='#init-keys'>Generating Session Keys</link> section.</p></li>
  398. </ol>
  399. </section3>
  400. <section3 topic="Verifying Alice's Identity" anchor='init-acceptbob-verify'>
  401. <p>Bob MUST also perform the following steps:</p>
  402. <ol start='1'>
  403. <li><p>Calculate the HMAC of the encrypted identity (&IDA;) and the value of Alice's block cipher counter using SHA256 and the integrity key &KMsubA;.</p>
  404. <code>&MsubA; = <em>HMAC</em>(SHA256, &KMsubA;, &CsubA;, &IDA;)</code></li>
  405. <li><p>Return a &feature; error to Alice unless the value of &MsubA; he calculated matches the one he received in the 'mac' field</p></li>
  406. <li><p>Obtain &macB; by decrypting &IDA; with the AES-128 symmetric block cipher algorithm ("DECIPHER") in counter mode, using the encryption key &KCsubA; and block counter &CsubA;. Note: &CsubA; MUST be incremented by 1 for each encrypted block or partial block (i.e. &CsubA; = (&CsubA; + 1) mod 2<span class='super'>n</span>, where n is 128 - the number of bits per cipher block).</p>
  407. <code>&macA; = DECIPHER(&KCsubA;, &CsubA;, &IDA;)</code></li>
  408. <li><p>Set the value of &formA; to be the full <link url='#sign-normal'>Normalized</link>&#160;<em>content</em> of the <link url='#init-online-request'>ESession Request</link> data form that Alice sent to Bob at the start of the negotiation.</p></li>
  409. <li><p>Set the value of &formA2; to be the full <link url='#sign-normal'>Normalized</link>&#160;<em>content</em> of Alice's session negotiation completion form <em>excluding</em> the 'identity' and 'mac' fields (see <link url='#init-acceptalice-send'>Sending Alice's Identity</link>).</p></li>
  410. <li><p>Concatenate Bob's ESession ID, Alice's ESession ID, e, &formA; and &formA2;, and calculate the HMAC of the resulting byte string using SHA256 and the key &KSsubA;.</p>
  411. <code>&macA; = <em>HMAC</em>(SHA256, &KSsubA;, {&NsubB;, &NsubA;, e, &formA;, &formA2;})</code></li>
  412. <li><p>Return a &feature; error to Alice if the two values of &macA; he calculated in the steps above do not match.</p></li>
  413. </ol>
  414. </section3>
  415. <section3 topic="Short Authentication String" anchor='init-acceptbob-sas'>
  416. <p>Bob and Alice MAY confirm out-of-band that the Short Authentication Strings (SAS) their clients generate for them (using the SAS generation algorithm that they agreed on) are the same. This out-of-band step MAY be performed at any time. However, they SHOULD confirm out-of-band that their SAS match as soon as they realise that the two clients have no retained secret in common (see <link url='#init-finalbob'>Generating Bob's Final Session Keys</link> below, or <link url='#init-finalalice'>Generating Alice's Final Session Keys</link>). However, if it is inconvenient for Bob and Alice to confirm the match immediately, both clients MAY remember (in a secure way) that a SAS match has not yet been confirmed and remind Bob and Alice at the start of each ESession that they should confirm the SAS match (even if they have a retained secret in common). Their clients should continue to remind them until they either confirm a SAS match, or indicate that security is not important enough for them to bother.</p>
  417. </section3>
  418. <section3 topic="Generating Bob's Final Session Keys" anchor='init-finalbob'>
  419. <p>Bob MUST identify the shared retained secret (SRS) by selecting from his client's list of the secrets it retained (if any) from previous sessions with Alice's clients (i.e., secrets from sessions where the bareJID was the same as the one Alice is currently using). Note: The list contains the most recent shared secret for each of Alice's clients that she has previously used to negotiate ESessions with the client Bob is currently using.</p>
  420. <p>Bob does this by calculating the HMAC (using SHA256 and the key &NsubA;) of each secret in the list in turn and comparing it with each of the values in the 'rshashes' field he received from Alice (see <link url='#init-acceptalice-send'>Sending Alice's Identity</link>). Once he finds a match, and has confirmed that the secret has not expired (because it is older than an implementation-defined period of time), then he has found the SRS.</p>
  421. <p>If Bob cannot find a match, then he SHOULD search through all the retained secrets that have not expired (if any) for all the other JIDs his client has communicated with to try to find a match with one of the values in the 'rshashes' field he received from Alice (since she may simply be using a different JID, perhaps in order to protect her identity from third parties). Once he finds a match then he has found the SRS. Note: Resource-constrained implementations MAY make the performance of this second extended search an optional feature.</p>
  422. <p>Bob MUST calculate the final session key by appending to K (the Diffie-Hellman shared secret) the SRS (only if one was found) and then the Other Shared Secret (only if one exists) and then setting K to be the SHA256 result of the concatenated string of bytes:</p>
  423. <code>K = SHA256(K | SRS | OSS)</code>
  424. <p>Bob MUST now use the new value of K to generate the new session keys (&KCsubA;, &KMsubA;, &KCsubB;, &KMsubB; and &KSsubB;) - see <link url='#init-keys'>Generating Session Keys</link>. These keys will be used to exchange encrypted stanzas. Note: Bob will still need the value of K in the next section.</p>
  425. </section3>
  426. <section3 topic="Sending Bob's Identity" anchor='init-acceptbob-send'>
  427. <p>Bob MUST now prove his identity to Alice while protecting it from third parties. He MUST perform the steps equivalent to those Alice performed above (see <link url='#init-hide'>Hiding Alice's Identity</link> for a more detailed description). Bob's calculations are summarised below. Note: When calculating &macB; pay attention to the order of &NsubA; and &NsubB;.</p>
  428. <p>Note: &formB; is the full <link url='#sign-normal'>Normalized</link>&#160;<em>content</em> of the reponse data form he generated above (see <link url='#init-online-form'>Response Form</link>), and &formB2; is the full <link url='#sign-normal'>Normalized</link>&#160;<em>content</em> of Bob's session negotiation completion form <em>excluding</em> the 'identity' and 'mac' fields (see below).</p>
  429. <code>&macB; = <em>HMAC</em>(SHA256, &KSsubB;, {&NsubA;, &NsubB;, d, &formB;, &formB2;})</code>
  430. <code>&IDB; = CIPHER(&KCsubB;, &CsubB;, &macB;)</code>
  431. <code>&MsubB; = <em>HMAC</em>(SHA256, &KMsubB;, &CsubB;, &IDB;)</code>
  432. <p>Bob MUST send Alice the Base64 encoded value of the HMAC (using SHA256 and the key SRS) of the string "Shared Retained Secret" (wrapped in an 'srshash' field). If no SRS was found then he MUST use a random number instead. <note>Bob always sends a value in the 'srshash' field to prevent an attacker learning that the session is not protected by a retained secret.</note></p>
  433. <code><em>HMAC</em>(SHA256, SRS, "Shared Retained Secret")</code>
  434. <p>Bob MUST also include in the data form the Base64 encoded values of &NsubA;, and &IDB; and &MsubB; (that he just calculated). Note: He MAY also send encrypted content (see <cite>Stanza Encryption</cite>) in the same stanza.</p>
  435. <example caption='Bob Sends Alice His Identity'><![CDATA[
  436. <message from='bob@example.com/laptop' to='alice@example.org/pda'>
  437. <thread>ffd7076498744578d10edabfe7f4a866</thread>
  438. <init xmlns='http://www.xmpp.org/extensions/xep-0116.html#ns-init'>
  439. <x type='result' xmlns='jabber:x:data'>
  440. <field var='FORM_TYPE'><value>urn:xmpp:ssn</value></field>
  441. <field var='nonce'><value> ** Alice's Base64 encoded ESession ID ** </value></field>
  442. <field var='srshash'><value> ** HMAC with shared retained secret ** </value></field>
  443. <field var='identity'><value> ** Encrypted identity ** </value></field>
  444. <field var='mac'><value> ** Integrity of identity ** </value></field>
  445. </x>
  446. </init>
  447. <c xmlns='http://www.xmpp.org/extensions/xep-0200.html#ns'>
  448. <data> ** Base64 encoded m_final ** </data>
  449. <mac> ** Base64 encoded a_mac ** </mac>
  450. </c>
  451. </message>
  452. ]]></example>
  453. <p>Finally, Bob MUST destroy all his copies of the old retained secret (SRS) he was keeping for Alice's client, and calculate a new retained secret for this session:</p>
  454. <code><em>HMAC</em>(SHA256, K, "New Retained Secret")</code>
  455. <p>Bob MUST <em>securely</em> store the new value along with the retained secrets his client shares with Alice's other clients.</p>
  456. <p>Bob's value of K MUST now be securely destroyed.</p>
  457. </section3>
  458. </section2>
  459. <section2 topic="Final Steps (Alice)" anchor='init-complete'>
  460. <section3 topic="Generating Alice's Final Session Keys" anchor='init-finalalice'>
  461. <p>Alice MUST identify the shared retained secret (SRS) by selecting from her client's list of the secrets it retained from sessions with Bob's clients (the most recent secret for each of the clients he has used to negotiate ESessions with Alice's client).</p>
  462. <p>Alice does this by using each secret in the list in turn as the key to calculate the HMAC (with SHA256) of the string "Shared Retained Secret", and comparing the calculated value with the value in the 'srshash' field she received from Bob (see <link url='#init-acceptbob-send'>Sending Bob's Identity</link>). Once she finds a match, and has confirmed that the secret has not expired (because it is older than an implementation-defined period of time), then she has found the SRS.</p>
  463. <p>Alice MUST calculate the final session key by appending to K (the Diffie-Hellman shared secret) the SRS (only if one was found) and then the Other Shared Secret (only if one exists) and then setting K to be the SHA256 result of the concatenated string of bytes:</p>
  464. <code>K = SHA256(K | SRS | OSS)</code>
  465. <p>Alice MUST destroy all her copies of the old retained secret (SRS) she was keeping for Bob's client, and calculate a new retained secret for this session:</p>
  466. <code><em>HMAC</em>(SHA256, K, "New Retained Secret")</code>
  467. <p>Alice MUST <em>securely</em> store the new value along with the retained secrets her client shares with Bob's other clients.</p>
  468. <p>Alice MUST now use the new value of K to generate the new session keys (&KCsubA;, &KMsubA;, &KCsubB;, &KMsubB; and &KSsubB;) in exactly the same way as Bob did (see <link url='#init-keys'>Generating Session Keys</link>). These keys will be used to exchange encrypted stanzas.</p>
  469. </section3>
  470. <section3 topic="Verifying Bob's Identity" anchor='init-complete-verify'>
  471. <p>Finally, Alice MUST verify the identity she received from Bob. She does this by performing steps equivalent to those performed by Bob above (see <link url='#init-acceptbob-verify'>Verifying Alice's Identity</link> for a more detailed description).</p>
  472. <p>Alice's calculations are summarised below. Note: &formB; is the full <link url='#sign-normal'>Normalized</link>&#160;<em>content</em> of the initial reponse data form Alice received from Bob (see <link url='#init-online-form'>Response Form</link>), and &formB2; is the full <link url='#sign-normal'>Normalized</link>&#160;<em>content</em> of the session negotiation completion form she received from Bob <em>excluding</em> the 'identity' and 'mac' fields (see <link url='#init-acceptbob-send'>Sending Bob's Identity</link>). Note: When calculating &macB; pay attention to the order of &NsubA; and &NsubB;.</p>
  473. <code>&MsubB; = <em>HMAC</em>(SHA256, &KMsubB;, &CsubB;, &IDB;)</code>
  474. <code>&macB; = DECIPHER(&KCsubB;, &CsubB;, &IDB;)</code>
  475. <code>&macB; = <em>HMAC</em>(SHA256, &KSsubB;, {&NsubA;, &NsubB;, d, &formB;, &formB2;})</code>
  476. <p>Note: If Alice discovers an error then she SHOULD ignore any encrypted content she received in the stanza.</p>
  477. <p>Once ESession negotiation is complete, Alice and Bob MUST exchange only encrypted forms of the one-to-one stanza types they agreed upon (e.g., &MESSAGE; and &IQ; stanzas) within the session.</p>
  478. </section3>
  479. </section2>
  480. </section1>
  481. <section1 topic='ESession Termination' anchor='terminate'>
  482. <p>Either entity MAY terminate an ESession at any time. Entities MUST terminate all open ESessions before they go offline. To terminate an ESession Alice MUST send an encrypted stanza (see <cite>Stanza Encryption</cite>) to Bob including within the encrypted XML of the &lt;data/&gt; element a stanza session negotiation form with a "terminate" field (as specified in the Termination section of <cite>Stanza Session Negotiation</cite>). She MUST then securely destroy all keys associated with the ESession.</p>
  483. <example caption='Alice Terminates an ESession'><![CDATA[
  484. <message from='alice@example.org/pda' to='bob@example.com/laptop'>
  485. <thread>ffd7076498744578d10edabfe7f4a866</thread>
  486. <c xmlns='http://www.xmpp.org/extensions/xep-0200.html#ns'>
  487. <data> ** Base64 encoded encrypted terminate form ** </data>
  488. <mac> ** Base64 encoded a_mac ** </mac>
  489. </c>
  490. </message>
  491. ]]></example>
  492. <p>When Bob receives a termination stanza he MUST verify the MAC (to be sure he received all the stanzas Alice sent him during the ESession) and immediately send an encrypted termination acknowledgement form (as specified in the Termination section of <cite>Stanza Session Negotiation</cite>) back to Alice. He MUST then securely destroy all keys associated with the ESession.</p>
  493. <example caption='Bob Acknowledges ESession Termination'><![CDATA[
  494. <message from='bob@example.com/laptop' to='alice@example.org/pda'>
  495. <thread>ffd7076498744578d10edabfe7f4a866</thread>
  496. <c xmlns='http://www.xmpp.org/extensions/xep-0200.html#ns'>
  497. <data> ** Base64 encoded encrypted acknowledgement form ** </data>
  498. <mac> ** Base64 encoded b_mac ** </mac>
  499. </c>
  500. </message>
  501. ]]></example>
  502. <p>When Alice receives the stanza she MUST verify the MAC to be sure she received all the stanzas Bob sent her during the ESession. Once an entity has sent a termination or termination acknowledgement stanza it MUST NOT send another stanza within the ESession.</p>
  503. </section1>
  504. <section1 topic='Implementation Notes' anchor='implement'>
  505. <section2 topic='Multiple-Precision Integers' anchor='sign-bigint'>
  506. <p>Before Base-64 encoding, hashing or HMACing an arbitrary-length integer, the integer MUST first be converted to a "big endian" bitstring. The bitstring MUST then be padded with leading zero bits so that there are an integral number of octets. Finally, if the integer is not of fixed bit-length (i.e. not a hash or HMAC result) and the bitstring contains leading octets that are zero, these MUST be removed (so the high-order octet is non-zero).</p>
  507. </section2>
  508. <section2 topic='XML Normalization' anchor='sign-normal'>
  509. <p>Before the signature or MAC of a block of XML is generated or verified, all character data <em>between</em> all elements MUST be removed and the XML MUST be converted to canonical form (see &w3canon;).</p>
  510. <p>All the XML this protocol requires to be signed or MACed is very simple, so in this case, canonicalization SHOULD only require the following changes:</p>
  511. <ul>
  512. <li>Set attribute value delimiters to single quotation marks (i.e. simply replace all single quotes in the serialized XML with double quotes)</li>
  513. <li>Impose lexicographic order on the attributes of "field" elements (i.e. ensure "type" is before "var")</li>
  514. </ul>
  515. <p>Implementations MAY conceivably also need to make the following changes. Note: Empty elements and special characters SHOULD NOT appear in the signed or MACed XML specified in this protocol.</p>
  516. <ul>
  517. <li>Ensure there are no character references</li>
  518. <li>Convert empty elements to start-end tag pairs</li>
  519. <li>Ensure there is no whitespace except for single spaces before attributes</li>
  520. <li>Ensure there are no "xmlns" attributes or namespace prefixes.</li>
  521. </ul>
  522. </section2>
  523. </section1>
  524. <section1 topic='Security Considerations' anchor='sec'>
  525. <section2 topic='Random Numbers' anchor='sec-prng'>
  526. <p>Weak pseudo-random number generators (PRNG) enable successful attacks. Implementors MUST use a cryptographically strong PRNG to generate all random numbers (see &rfc1750;).</p>
  527. </section2>
  528. <section2 topic='Replay Attacks' anchor='sec-replay'>
  529. <p>Alice and Bob MUST ensure that the value of e or d they provide when negotiating each online ESession is unique. This prevents complete online ESessions being replayed.</p>
  530. </section2>
  531. <section2 topic='Unverified SAS' anchor='sec-keys'>
  532. <p>Since very few people bother to (consistently) verify SAS, entities SHOULD protect against 'man-in-the-middle' attacks using retained secrets (and/or other secrets). Entities SHOULD remember whether or not the whole chain of retained secrets (and the associated sessions) has ever been validated by the user verifying a SAS.</p>
  533. </section2>
  534. <section2 topic="Back Doors" anchor="sec-backdoor">
  535. <p>The authors and the XSF would like to discourage the deliberate inclusion of "back doors" in implementations of this protocol. However, we recognize that some organizations must monitor stanza sessions or record stanza sessions in decryptable form for legal compliance reasons, or may choose to monitor stanza sessions for quality assurance purposes. In these cases it is important to inform the other entity of the (potential for) disclosure before starting the ESession (if only to maintain public confidence in this protocol).</p>
  536. <p>Both implementations MUST immediately and clearly inform their users if the negotiated value of the 'disclose' field is not 'never'.</p>
  537. <p>Before disclosing any stanza session, an entity SHOULD either negotiate the value of the 'disclose' field to be 'enabled' or terminate the negotiation unsuccessfully. It MUST NOT negotiate the value of the 'disclose' field to be 'disabled' unless it would be illegal for it to divulge the disclosure to the other entity.</p>
  538. <p>In any case an implementation MUST NOT negotiate the value of the 'disclose' field to be 'never' unless it implements no feature or mechanism (not even a disabled feature or mechanism) that could be used directly or indirectly to divulge to <em>any</em> third-party either the identites of the participants, or the keys, or the content of <em>any</em> ESession (or information that could be used to recover any of those items). If an implementation deliberately fails to observe this last point (or fails to correct an accidental back door) then it is not compliant with this protocol and MUST NOT either claim or imply any compliance with this protocol or any of the other protocols developed by the authors or the XSF. In this case the authors and the XSF reserve all rights regarding the names of the protocols.</p>
  539. <p>The expectation is that this legal requirement will persuade many implementors either to tell the users of their products that a back door exists, or not to implement a back door at all (if, once informed, the market demands that).</p>
  540. </section2>
  541. <section2 topic='Extra Responsabilities of Implementors' anchor='sec-general'>
  542. <p>Cryptography plays only a small part in an entity's security. Even if it implements this protocol perfectly it may still be vulnerable to other attacks. For examples, an implementation might store ESession keys on swap space or save private keys to a file in cleartext! Implementors MUST take very great care when developing applications with secure technologies.</p>
  543. </section2>
  544. </section1>
  545. <section1 topic='Mandatory to Implement Technologies' anchor='sec-mandatory'>
  546. <p>An implementation of this protocol MUST support the following algorithms:</p>
  547. <ul>
  548. <li>Diffie-Hellman Key Agreement</li>
  549. <li>The block cipher algorithm "aes128-ctr" (see &nistfips197;)</li>
  550. <li>The hash algorithm "sha256" (see <cite>Secure Hash Standard</cite>)</li>
  551. <li>HMAC (see Section 2 of &rfc2104;)</li>
  552. <li>The Short Authentication String generation algorithm "sas28x5" (see <link url='#sas'>The sas28x5 SAS Algorithm</link>)</li>
  553. </ul>
  554. </section1>
  555. <section1 topic="The sas28x5 SAS Algorithm" anchor='sas'>
  556. <p>Given the multi-precision integer &MsubA; (a big-endian byte array), the UTF-8 byte string &formB; (see <link url='#init-hide'>Hiding Bob's Identity</link>) and SHA256, the following steps can be used to calculate a 5-character SAS with over 16 million possible values that is easy to read and communicate verbally:</p>
  557. <ol>
  558. <li><p>Concatenate &MsubA;, &formB; and the UTF-8 byte string "Short Authentication String" into a string of bytes</p></li>
  559. <li><p>Calculate the least significant 24-bits of the SHA256 of the string</p></li>
  560. <li><p>Convert the 24-bit integer into a base-28 <note>Base-28 was used instead of Base-36 because some characters are often confused when communicated verbally (n, s, b, t, z, j), and because zero is often read as the letter 'o', and the letter 'l' is often read as the number '1'.</note> 5-character string using the following "digits": acdefghikmopqruvwxy123456789 (the digits have values 0-27)</p></li>
  561. </ol>
  562. </section1>
  563. <section1 topic='IANA Considerations' anchor='iana'>
  564. <p>This document requires no interaction with &IANA;. </p>
  565. </section1>
  566. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  567. <p>See <cite>Encrypted Session Negotiation</cite>.</p>
  568. </section1>
  569. </xep>