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-0189.xml 27KB

  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>Public Key Publishing</title>
  10. <abstract>This specification defines a method by which an entity can publish its public keys over XMPP.</abstract>
  12. <number>0189</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XEP-0060</spec>
  19. <spec>XEP-0163</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>NOT_YET_ASSIGNED</shortname>
  24. &stpeter;
  25. &dmeyer;
  26. &ianpaterson;
  27. <revision>
  28. <version>0.14</version>
  29. <date>2010-07-15</date>
  30. <initials>psa</initials>
  31. <remark><p>Defined an RSA-specific child element of the pubkey element to contain the modulus, public exponent, and fingerprint directly (rather than a DER-encoded format that depends on ASN.1); specified that the public exponent should be 65537; clarified the fingerprint generation method and updated all of the fingerprint formats to enable hash agility; incremented namespaces from version 1 to version 2.</p></remark>
  32. </revision>
  33. <revision>
  34. <version>0.13</version>
  35. <date>2010-01-12</date>
  36. <initials>psa</initials>
  37. <remark><p>Updated the fingerprint generation method to hash over the begin date, end date, JID, and public key (not just the key itself).</p></remark>
  38. </revision>
  39. <revision>
  40. <version>0.12</version>
  41. <date>2010-01-10</date>
  42. <initials>psa</initials>
  43. <remark><p>Removed presence extension for generated state (implied by lack of generating flag).</p></remark>
  44. </revision>
  45. <revision>
  46. <version>0.11</version>
  47. <date>2009-12-17</date>
  48. <initials>psa</initials>
  49. <remark><p>Added back example of sending public key in a message; defined presence extension to signal key generation in progress.</p></remark>
  50. </revision>
  51. <revision>
  52. <version>0.10</version>
  53. <date>2009-12-15</date>
  54. <initials>psa</initials>
  55. <remark><p>Major revision; split into three namespaces and three corresponding PEP nodes, one each for public keys, attestations, and revocations; iterated the version number for public keys to urn:xmpp:pubkey:1; added detailed data to each node payload; removed some use cases to simply the protocol.</p></remark>
  56. </revision>
  57. <revision>
  58. <version>0.9</version>
  59. <date>2009-03-08</date>
  60. <initials>dm/psa</initials>
  61. <remark><p>Required specification of an algorithm for elements with hashes; removed fingerprint in &lt;keyinfo/&gt;; added sign request; added guidelines for key management; improved examples; changed namespace from urn:xmpp:tmp:pubkey to urn:xmpp:pubkey:0.</p></remark>
  62. </revision>
  63. <revision>
  64. <version>0.8</version>
  65. <date>2008-09-08</date>
  66. <initials>dm</initials>
  67. <remark><p>Change KeyInfo element from W3C XML Signature to ASCII and add signature support</p></remark>
  68. </revision>
  69. <revision>
  70. <version>0.7</version>
  71. <date>2008-03-03</date>
  72. <initials>psa</initials>
  73. <remark><p>Changed temporary namespace per XEP-0053 procedures; corrected several small errors in the text and examples.</p></remark>
  74. </revision>
  75. <revision>
  76. <version>0.6</version>
  77. <date>2007-08-15</date>
  78. <initials>psa</initials>
  79. <remark><p>More clearly explained node creation and key publication workflows.</p></remark>
  80. </revision>
  81. <revision>
  82. <version>0.5</version>
  83. <date>2007-03-05</date>
  84. <initials>ip</initials>
  85. <remark><p>Merged node creation and first publish examples; recommended the value of each &lt;KeyName/&gt; element and id attribute is set to the key fingerprint; added fprint element and more examples</p></remark>
  86. </revision>
  87. <revision>
  88. <version>0.4</version>
  89. <date>2006-11-27</date>
  90. <initials>ip</initials>
  91. <remark><p>Added jid attribute and send use case; changed namespace</p></remark>
  92. </revision>
  93. <revision>
  94. <version>0.3</version>
  95. <date>2006-11-20</date>
  96. <initials>ip</initials>
  97. <remark><p>Specified that PEP nodes SHOULD be persistent</p></remark>
  98. </revision>
  99. <revision>
  100. <version>0.2</version>
  101. <date>2006-09-29</date>
  102. <initials>ip</initials>
  103. <remark><p>Replaced pubkey and key elements with the KeyInfo element defined in W3C XML Signature</p></remark>
  104. </revision>
  105. <revision>
  106. <version>0.1</version>
  107. <date>2006-07-18</date>
  108. <initials>ip</initials>
  109. <remark><p>Initial version.</p></remark>
  110. </revision>
  111. </header>
  112. <section1 topic='Introduction' anchor='intro'>
  113. <p>End-to-end encryption between XMPP clients and mutual authentication between a client and a server are desirable goals for the XMPP network. To enable these features, typically an XMPP user will need to possess a public key (or multiple keys), along with an associated private key that is not made public. The goal of this document is to provide simple methods for the exchange of public keys among XMPP users -- specifically, data formats that enable an XMPP entity to complete the following use cases:</p>
  114. <ul>
  115. <li>Publish its current public keys.</li>
  116. <li>Revoke keys that are no longer in use.</li>
  117. <li>Publish signed copies of its public keys (called attestations).</li>
  118. <li>Discover and retrieve public keys published by other entities.</li>
  119. </ul>
  120. </section1>
  121. <section1 topic='Approach' anchor='approach'>
  122. <p>This document assumes that each user will have a privately-generated key. A user <strong>might</strong> have more than one key (e.g., different keys for different clients) and the user's key <strong>might</strong> be signed by other entities, such as a certification authority (CA) or another user. However, the simplest case is a single key per user.</p>
  123. <p>The data formats defined here are deliberately kept very simple, with the key itself represented as by the modulus and the public exponent, and any metadata represented using a few straightforward XML elements and attributes. This document does not use the '' namespace as specified in &w3xmlsig;; although that format is quite powerful, it introduces unnecessary levels of complexity for this use case. In addition, this document has no dependency on ASN.1, whose use is problematic on some computing platforms and languages (e.g., JavaScript).</p>
  124. <p>We define three payload elements:</p>
  125. <ol>
  126. <li>The &lt;pubkey/&gt; element (qualified by the 'urn:xmpp:pubkey:2' namespace) specifies a single public key for a user.</li>
  127. <li>The &lt;revoke/&gt; element (qualified by the 'urn:xmpp:revoke:2' namespace) specifies old keys that a user once used but has now revoked.</li>
  128. <li>The &lt;attest/&gt; element (qualified by the 'urn:xmpp:attest:2' namespace) specifies one or more signed copies of a user's public key.</li>
  129. </ol>
  130. <p>An entity MAY support only public key publishing (the 'urn:xmpp:pubkey:2' namespace) and not support revocations and attestations.</p>
  131. </section1>
  132. <section1 topic='Public Keys' anchor='keys'>
  133. <p>A single public key is contained in a &lt;pubkey/&gt; element qualified by the 'urn:xmpp:pubkey:2' namespace &VNOTE;, for which the defined child elements are as follows:</p>
  134. <table caption='Children of the &lt;pubkey/&gt; Element'>
  135. <tr>
  136. <th>Element</th>
  137. <th>Description</th>
  138. </tr>
  139. <tr>
  140. <td>&lt;begin/&gt;</td>
  141. <td>The UTC DateTime before which the key shall not be considered valid, formatted according to &xep0082;.</td>
  142. </tr>
  143. <tr>
  144. <td>&lt;end/&gt;</td>
  145. <td>The UTC DateTime after which the key shall not be considered valid, formatted according to <cite>XEP-0082</cite>.</td>
  146. </tr>
  147. <tr>
  148. <td>&lt;jid/&gt;</td>
  149. <td>The XMPP address associated with this key.</td>
  150. </tr>
  151. <tr>
  152. <td>&lt;rsakey/&gt;</td>
  153. <td>An element with three defined children for the modulus, public exponent, and fingerprint, where the input string to the hash function is the concatenation of the begin date, the end date, the JID, the string representation of the modulus, and the string representation of the public exponent, all encoded according to UTF-8 -- e.g., Base64(SHA-256(UTF8-encode(begin + end + jid + str(modulus) + str(exponent))).</td>
  154. </tr>
  155. <tr>
  156. <td>&lt;uri/&gt;</td>
  157. <td>A URI at which the key can be retrieved outside the XMPP network; this element is OPTIONAL.</td>
  158. </tr>
  159. </table>
  160. <p>The children of the &lt;rsakey/&gt; element are as follows.</p>
  161. <table caption='Children of the &lt;rsakey/&gt; Element'>
  162. <tr>
  163. <th>Element</th>
  164. <th>Description</th>
  165. </tr>
  166. <tr>
  167. <td>&lt;modulus/&gt;</td>
  168. <td>A large random number used as input to encryption and signing operations.</td>
  169. </tr>
  170. <tr>
  171. <td>&lt;publicExponent/&gt;</td>
  172. <td>The public exponent used as input to encryption and signing operations; RECOMMENDED to be "65537".</td>
  173. </tr>
  174. <tr>
  175. <td>&lt;print/&gt;</td>
  176. <td>A fingerprint for the key, where the algorithm used to generate the fingerprint is specified by the 'algo' attribute (whose default value is "sha-256").</td>
  177. </tr>
  178. </table>
  179. <p>An example follows.</p>
  180. <example caption='A public key'><![CDATA[
  181. <pubkey xmlns='urn:xmpp:pubkey:2'>
  182. <begin>2010-01-14T18:44:18Z</begin>
  183. <end>2011-01-14T18:44:18Z</end>
  184. <jid></jid>
  185. <rsakey>
  186. <modulus>
  187. 1379023255526646700594339116162946782578210615394951216941818138582610132470
  188. 1538683909348374935399508656737300036572749687356120324044452513265157631177
  189. 7178489330603814456987700147603113573139002085123800563057708424072367754377
  190. 0906580036148700287401094143051242586181831057271078882862257109043483553172
  191. 66153
  192. </modulus>
  193. <publicExponent>65537</publicExponent>
  194. <print algo='sha-256'>eWGdcl+AzN0treQoRry+/zYqYJ7ZEAzwIvTossTURLw=</print>
  195. </rsakey>
  196. </pubkey>
  197. ]]></example>
  198. </section1>
  199. <section1 topic='Revocations' anchor='revocations'>
  200. <p>A user can revoke his own key. The revocation is contained in a &lt;revoke/&gt; element qualified by the 'urn:xmpp:revoke:2' namespace &VNOTE;, for which the defined child elements are as follows:</p>
  201. <table caption='Children of the &lt;revoke/&gt; Element'>
  202. <tr>
  203. <th>Element</th>
  204. <th>Description</th>
  205. </tr>
  206. <tr>
  207. <td>&lt;key/&gt;</td>
  208. <td>The public key that was revoked.</td>
  209. </tr>
  210. <tr>
  211. <td>&lt;keyprint/&gt;</td>
  212. <td>The fingerprint of the public key that was revoked, where the algorithm is specified by the 'algo' attribute (which defaults to "sha-256").</td>
  213. </tr>
  214. <tr>
  215. <td>&lt;signature/&gt;</td>
  216. <td>A signature for the revocation, as described below.</td>
  217. </tr>
  218. <tr>
  219. <td>&lt;revocationprint/&gt;</td>
  220. <td>The fingerprint of the key that was used to sign the revocation, where the algorithm is specified by the 'algo' attribute (which defaults to "sha-256").</td>
  221. </tr>
  222. <tr>
  223. <td>&lt;revocationtime/&gt;</td>
  224. <td>The UTC DateTime at which the key was revoked, formatted according to <cite>XEP-0082</cite>.</td>
  225. </tr>
  226. </table>
  227. <p>The data that is signed MUST be the revoked public key (i.e., the XML character data of the &lt;key/&gt; element), the fingerprint of the revoked public key (i.e., the XML character data of the &lt;keyprint/&gt; element), the fingerprint of the key used to sign the revocation (i.e., the XML character data of the &lt;revocationprint/&gt; element), and the time of the revocation (i.e., the XML character data of the &lt;revocationtime/&gt; element), concatenated together with no spaces or other additional characters.</p>
  228. <p>As an example, consider a revocation of the key from Example 1, where the fingerprint of the revoked key is 13475c8e27399908b4447d7c52ab30822872832eba3a654f0d80e07fb4157673, the fingerprint of the key used to sign the revocation is becb78566783166f4a1a7c64e28dae288fe1a0f2825f6b593b336ce186c6b056, and the time of the revocation is 2009-12-14T20:49:16Z. The string to be signed would be as follows (where line breaks are not significant).</p>
  229. <code>
  231. lQFiUFvyMeUOnn01NLfqfBeT4xjahsxaYFPd+V8jIHtpO3nbkpfrBh5aLPCkqDzS
  232. UFvmLaVSIMUt085kcT/Yv72BUWUGaISt7swSNfictRbVZ0k8TbXUDLIAYWN8lsie
  233. NVxL13PS9pu3WNoORuKAV5RuzDS3djnjb6fti7fTwEUpQVwRrJXY6jNhv4c4zE3x
  234. Pjm48gIlHbZrxuWNrXnKT6uwXnr6PJ6O3YspferJG1oA3kmOwm41yWDkalbKgkNZ
  235. WeS+ahB/i9LIG+41CdekPpI0Kr0Ll9X7+zaPV6xzjlG8dYy7ZGm4eTL9STuWlPdL
  236. +wIDAQAB13475c8e27399908b4447d7c52ab30822872832eba3a654f0d80e07f
  237. b4157673becb78566783166f4a1a7c64e28dae288fe1a0f2825f6b593b336ce1
  238. 86c6b0562009-12-14T20:49:16Z
  239. </code>
  240. <p>An example follows.</p>
  241. <example caption='A revocation'><![CDATA[
  242. <revocation xmlns='urn:xmpp:revoke:2'>
  243. <key>
  245. lQFiUFvyMeUOnn01NLfqfBeT4xjahsxaYFPd+V8jIHtpO3nbkpfrBh5aLPCkqDzS
  246. UFvmLaVSIMUt085kcT/Yv72BUWUGaISt7swSNfictRbVZ0k8TbXUDLIAYWN8lsie
  247. NVxL13PS9pu3WNoORuKAV5RuzDS3djnjb6fti7fTwEUpQVwRrJXY6jNhv4c4zE3x
  248. Pjm48gIlHbZrxuWNrXnKT6uwXnr6PJ6O3YspferJG1oA3kmOwm41yWDkalbKgkNZ
  249. WeS+ahB/i9LIG+41CdekPpI0Kr0Ll9X7+zaPV6xzjlG8dYy7ZGm4eTL9STuWlPdL
  250. +wIDAQAB
  251. </key>
  252. <keyprint>iof8LEqhKyItN0TsVgWuIFBhEwHsORgp6nocM1WAUmk=</keyprint>
  253. <revocationprint>becb78566783166f4a1a7c64e28dae288fe1a0f2825f6b593b336ce186c6b056</revocationprint>
  254. <revocationtime>2009-12-14T20:49:16Z</revocationtime>
  255. <signature>
  256. iEYEARECAAYFAksnvfsACgkQNL8k5A2w/vyVHgCglI5fPQfcu1e5PTA3bMPKiL0F
  257. J5cAnirpKzJ45OD+03b66UHoIosKQ31O
  258. =PGFT
  259. </signature>
  260. </revocation>
  261. ]]></example>
  262. </section1>
  263. <section1 topic='Attestations' anchor='attestations'>
  264. <p>Whether in the context of the public key infrastructure (PKI) or a web of trust, a user might want to publish signed copies of his public key, where the signer might be another user or a trusted third party such as a certification authority (CA). The signing key could even be another key owned by the user (e.g., a primary key used to sign a secondary key associated with a particular device controlled by the user). Furthermore, the signing material might be an RSA key, a DSA key, an X.509 certificate, an OpenPGP key, or any other format.</p>
  265. <p>Each signed copy is contained in an &lt;attest/&gt; element qualified by the 'urn:xmpp:attest:2' namespace &VNOTE;, for which the defined child elements are as follows:</p>
  266. <table caption='Children of the &lt;attest/&gt; Element'>
  267. <tr>
  268. <th>Element</th>
  269. <th>Description</th>
  270. </tr>
  271. <tr>
  272. <td>&lt;keyprint/&gt;</td>
  273. <td>The fingerprint of the key that was signed, where the algorithm is specified by the 'algo' attribute (which defaults to "sha-256").</td>
  274. </tr>
  275. <tr>
  276. <td>&lt;signature/&gt;</td>
  277. <td>The signature itself, as described below.</td>
  278. </tr>
  279. <tr>
  280. <td>&lt;signerjid/&gt;</td>
  281. <td>The XMPP address of the signer.</td>
  282. </tr>
  283. <tr>
  284. <td>&lt;signerprint/&gt;</td>
  285. <td>The fingerprint of the signer's key, where the algorithm is specified by the 'algo' attribute (which defaults to "sha-256").</td>
  286. </tr>
  287. <tr>
  288. <td>&lt;signtime/&gt;</td>
  289. <td>The UTC DateTime at which the key was signed, formatted according to <cite>XEP-0082</cite>.</td>
  290. </tr>
  291. </table>
  292. <p>The data that is signed MUST be the user's public key (i.e., the XML character data of the &lt;key/&gt; element), the fingerprint of the user's public key (i.e., the XML character data of the &lt;keyprint/&gt; element), the signer's JID (i.e., the XML character data of the &lt;signerjid/&gt; element), the fingerprint of the signer's key (i.e., the XML character data of the &lt;signerprint/&gt; element), and the time of the attestation (i.e., the XML character data of the &lt;signtime/&gt; element), concatenated together with no spaces or other additional characters.</p>
  293. <p>As an example, consider an attestation of the key from Example 1, where the signer's JID is, the fingerprint of the signer's key is "becb78566783166f4a1a7c64e28dae288fe1a0f2825f6b593b336ce186c6b056", and the time of the attestation is 2009-12-14T18:43:00Z. The string to be signed would be as follows (where line breaks are not significant).</p>
  294. <code>
  296. lQFiUFvyMeUOnn01NLfqfBeT4xjahsxaYFPd+V8jIHtpO3nbkpfrBh5aLPCkqDzS
  297. UFvmLaVSIMUt085kcT/Yv72BUWUGaISt7swSNfictRbVZ0k8TbXUDLIAYWN8lsie
  298. NVxL13PS9pu3WNoORuKAV5RuzDS3djnjb6fti7fTwEUpQVwRrJXY6jNhv4c4zE3x
  299. Pjm48gIlHbZrxuWNrXnKT6uwXnr6PJ6O3YspferJG1oA3kmOwm41yWDkalbKgkNZ
  300. WeS+ahB/i9LIG+41CdekPpI0Kr0Ll9X7+zaPV6xzjlG8dYy7ZGm4eTL9STuWlPdL
  301. +wIDAQAB13475c8e27399908b4447d7c52ab30822872832eba3a654f0d80e07f
  302. b4157673stpeter@jabber.orgbecb78566783166f4a1a7c64e28dae288fe1a0
  303. f2825f6b593b336ce186c6b0562009-12-14T18:43:00Z
  304. </code>
  305. <example caption='RSA public key signed by OpenPGP key'><![CDATA[
  306. <attest xmlns='urn:xmpp:attest:2'>
  307. <keyprint>iof8LEqhKyItN0TsVgWuIFBhEwHsORgp6nocM1WAUmk=</keyprint>
  308. <signature>
  309. iEYEARECAAYFAksnyJ0ACgkQNL8k5A2w/vy9DgCfc1eOYZlp1P456NkjgvCtJaRX
  310. Wi4AoIGhfzr7XMzeOzOBi9A/bxopH8O4
  311. =MMuz
  312. </signature>
  313. <signerjid></signerjid>
  314. <signerprint>becb78566783166f4a1a7c64e28dae288fe1a0f2825f6b593b336ce186c6b056</signerprint>
  315. <signtime>2009-12-14T18:43:00Z</signtime>
  316. </attest>
  317. ]]></example>
  318. </section1>
  319. <section1 topic='Publication via PEP' anchor='pep'>
  320. <p>A user SHOULD publish public keys, attestations, and revocations via &xep0163;, in particular adhering to the best practices defined in &xep0222;.</p>
  321. <p>Any other authorized entity can then receive notifications related to the user's public keys, and retrieve keys, attestations, and revocations.</p>
  322. <p>If the user has only one public key (the simplest and most common case), then the pubkey PEP node SHOULD have only one item, with an ItemID of "current".</p>
  323. </section1>
  324. <section1 topic='Requesting a Public Key Directly' anchor='request'>
  325. <p>If it is not possible for the user to publish his key via PEP, or for a contact to retrieve the user's key via PEP, the contact MAY request the user's key directly by sending an &IQ; of type 'get' to the user's particular full JID, containing an empty &lt;pubkey/&gt; element qualified by the 'urn:xmpp:pubkey:2' namespace &VNOTE;.</p>
  326. <example caption='Public key request'><![CDATA[
  327. <iq from=''
  328. to=''
  329. id='hfgt654s'
  330. type='get'>
  331. <pubkey xmlns='urn:xmpp:pubkey:2'/>
  332. </iq>
  333. ]]></example>
  334. <p>The receiving client then return its public key (which might be different from the overall key for the user, e.g. a key for only a particular device).</p>
  335. <example caption='Public key response'><![CDATA[
  336. <iq from=''
  337. to=''
  338. id='hfgt654s'
  339. type='result'>
  340. <pubkey xmlns='urn:xmpp:pubkey:2'>
  341. <begin>2009-12-11T20:12:37</begin>
  342. <end>2010-12-11T23:59:59</end>
  343. <jid></jid>
  344. <key>
  346. lQFiUFvyMeUOnn01NLfqfBeT4xjahsxaYFPd+V8jIHtpO3nbkpfrBh5aLPCkqDzS
  347. UFvmLaVSIMUt085kcT/Yv72BUWUGaISt7swSNfictRbVZ0k8TbXUDLIAYWN8lsie
  348. NVxL13PS9pu3WNoORuKAV5RuzDS3djnjb6fti7fTwEUpQVwRrJXY6jNhv4c4zE3x
  349. Pjm48gIlHbZrxuWNrXnKT6uwXnr6PJ6O3YspferJG1oA3kmOwm41yWDkalbKgkNZ
  350. WeS+ahB/i9LIG+41CdekPpI0Kr0Ll9X7+zaPV6xzjlG8dYy7ZGm4eTL9STuWlPdL
  351. +wIDAQAB
  352. </key>
  353. <print>13475c8e27399908b4447d7c52ab30822872832eba3a654f0d80e07fb4157673</print>
  354. </pubkey>
  355. </iq>
  356. ]]></example>
  357. </section1>
  358. <section1 topic='Sending a Public Key Directly' anchor='send'>
  359. <p>An entity might need to send its public key to another entity, for example if it has generated a new key but does not have a way to publish the new key (or does not wish to publish the key in a world-readable fashion). In this case the entity MAY include the key directly in a &MESSAGE; stanza.</p>
  360. <example caption='Sending a key in a message'><![CDATA[
  361. <message from=''
  362. to=''>
  363. <pubkey xmlns='urn:xmpp:pubkey:2'>
  364. <begin>2009-12-11T20:12:37</begin>
  365. <end>2010-12-11T23:59:59</end>
  366. <jid></jid>
  367. <key>
  369. lQFiUFvyMeUOnn01NLfqfBeT4xjahsxaYFPd+V8jIHtpO3nbkpfrBh5aLPCkqDzS
  370. UFvmLaVSIMUt085kcT/Yv72BUWUGaISt7swSNfictRbVZ0k8TbXUDLIAYWN8lsie
  371. NVxL13PS9pu3WNoORuKAV5RuzDS3djnjb6fti7fTwEUpQVwRrJXY6jNhv4c4zE3x
  372. Pjm48gIlHbZrxuWNrXnKT6uwXnr6PJ6O3YspferJG1oA3kmOwm41yWDkalbKgkNZ
  373. WeS+ahB/i9LIG+41CdekPpI0Kr0Ll9X7+zaPV6xzjlG8dYy7ZGm4eTL9STuWlPdL
  374. +wIDAQAB
  375. </key>
  376. <print>13475c8e27399908b4447d7c52ab30822872832eba3a654f0d80e07fb4157673</print>
  377. </pubkey>
  378. </message>
  379. ]]></example>
  380. </section1>
  381. <section1 topic='Signalling Key Generation' anchor='generate'>
  382. <p>There are several situations in which it is helpful for an entity to signal that it is currently generating a key. For example, a client that does not have access to permanent storage might generate a key on startup, but key generation might not be complete when the client sends initial presence upon establishing an XMPP session. In this case the client might signal support for the public key format in the entity capabilities data that it includes in its initial presence broadcast, but also include an indication that it is currently generating a key.</p>
  383. <example caption='Key generation in progress'><![CDATA[
  384. <presence from=''>
  385. <generating xmlns='urn:xmpp:pubkey:2'/>
  386. </presence>
  387. ]]></example>
  388. <p>After key generation is complete, the entity could publish the new key to the appropriate PEP node (if available) and send updated presence without the &lt;generating/&gt; extension.</p>
  389. <example caption='Key generation completed'><![CDATA[
  390. <presence from=''/>
  391. ]]></example>
  392. </section1>
  393. <section1 topic='Determining Support' anchor='support'>
  394. <p>To advertise its support for public keys, revocations, and attestations, when replying to &xep0030; information requests an entity MUST return features for 'urn:xmpp:pubkey:2', 'urn:xmpp:revoke:2', and 'urn:xmpp:attest:2' respectively.</p>
  395. <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>
  396. </section1>
  397. <section1 topic='Security Considerations' anchor='security'>
  398. <p>The reliable association between a user or entity and its public keys is beyond the scope of this document. However, each client SHOULD maintain its own secure library of the public keys it associates with other users.</p>
  399. </section1>
  400. <section1 topic='IANA Considerations' anchor='iana'>
  401. <p>This document requires no interaction with &IANA;.</p>
  402. </section1>
  403. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  404. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  405. <p>This specification defines the following XML namespaces:</p>
  406. <ul>
  407. <li>urn:xmpp:attest:2</li>
  408. <li>urn:xmpp:pubkey:2</li>
  409. <li>urn:xmpp:revoke:2</li>
  410. </ul>
  411. <p>Upon advancement of this specification to a status of Draft, the &REGISTRAR; shall add these namespaces to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  412. </section2>
  413. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  414. &NSVER;
  415. </section2>
  416. </section1>
  417. <section1 topic='XML Schemas' anchor='schema'>
  418. <section2 topic='attest' anchor='schema-pubkey'>
  419. <code><![CDATA[
  420. <?xml version='1.0' encoding='UTF-8'?>
  421. <xs:schema
  422. xmlns:xs=''
  423. targetNamespace='urn:xmpp:attest:2'
  424. xmlns='urn:xmpp:attest:2'
  425. elementFormDefault='qualified'>
  426. <xs:element name='attest'>
  427. <xs:complexType>
  428. <xs:sequence>
  429. <xs:element name='keyprint' type='fingerprintType' minOccurs='1' maxOccurs='1'/>
  430. <xs:element name='signature' type='xs:string' minOccurs='1' maxOccurs='1'/>
  431. <xs:element name='signerjid' type='xs:string' minOccurs='1' maxOccurs='1'/>
  432. <xs:element name='signerprint' type='fingerprintType' minOccurs='1' maxOccurs='1'/>
  433. <xs:element name='signtime' type='xs:dateTime' minOccurs='1' maxOccurs='1'/>
  434. </xs:sequence>
  435. </xs:complexType>
  436. </xs:element>
  437. <xs:complexType name='fingerprintType'>
  438. <xs:simpleContent>
  439. <xs:extension base='xs:string'>
  440. <xs:attribute name='algo' type='xs:NMTOKEN' use='optional' default='sha-256'/>
  441. </xs:extension>
  442. </xs:simpleContent>
  443. </xs:complexType>
  444. </xs:schema>
  445. ]]></code>
  446. </section2>
  447. <section2 topic='pubkey' anchor='schema-pubkey'>
  448. <code><![CDATA[
  449. <?xml version='1.0' encoding='UTF-8'?>
  450. <xs:schema
  451. xmlns:xs=''
  452. targetNamespace='urn:xmpp:pubkey:2'
  453. xmlns='urn:xmpp:pubkey:2'
  454. elementFormDefault='qualified'>
  455. <xs:element name='pubkey'>
  456. <xs:complexType>
  457. <xs:sequence>
  458. <xs:element name='begin' type='xs:dateTime' minOccurs='1' maxOccurs='1'/>
  459. <xs:element name='end' type='xs:dateTime' minOccurs='1' maxOccurs='1'/>
  460. <xs:element name='jid' type='xs:string' minOccurs='1' maxOccurs='1'/>
  461. <xs:element name='rsakey' type='rsaKeyType' minOccurs='1' maxOccurs='1'/>
  462. </xs:sequence>
  463. </xs:complexType>
  464. </xs:element>
  465. <xs:complexType name='rsaKeyType'>
  466. <xs:sequence>
  467. <xs:element name='modulus' type='xs:string' minOccurs='1' maxOccurs='1'/>
  468. <xs:element name='publicExponent' type='xs:string' minOccurs='1' maxOccurs='1'/>
  469. <xs:element name='print' type='fingerprintType' minOccurs='1' maxOccurs='1'/>
  470. </xs:sequence>
  471. </xs:complexType>
  472. <xs:complexType name='fingerprintType'>
  473. <xs:simpleContent>
  474. <xs:extension base='xs:string'>
  475. <xs:attribute name='algo' type='xs:NMTOKEN' use='optional' default='sha-256'/>
  476. </xs:extension>
  477. </xs:simpleContent>
  478. </xs:complexType>
  479. </xs:schema>
  480. ]]></code>
  481. </section2>
  482. <section2 topic='revoke' anchor='schema-pubkey'>
  483. <code><![CDATA[
  484. <?xml version='1.0' encoding='UTF-8'?>
  485. <xs:schema
  486. xmlns:xs=''
  487. targetNamespace='urn:xmpp:pubkey:2'
  488. xmlns='urn:xmpp:pubkey:2'
  489. elementFormDefault='qualified'>
  490. <xs:element name='revocation'>
  491. <xs:complexType>
  492. <xs:sequence>
  493. <xs:element name='key' type='xs:string' minOccurs='1' maxOccurs='1'/>
  494. <xs:element name='keyprint' type='fingerprintType' minOccurs='1' maxOccurs='1'/>
  495. <xs:element name='signature' type='xs:string' minOccurs='1' maxOccurs='1'/>
  496. <xs:element name='revocationprint' type='fingerprintType' minOccurs='1' maxOccurs='1'/>
  497. <xs:element name='revocationtime' type='xs:dateTime' minOccurs='1' maxOccurs='1'/>
  498. </xs:sequence>
  499. </xs:complexType>
  500. </xs:element>
  501. <xs:complexType name='fingerprintType'>
  502. <xs:simpleContent>
  503. <xs:extension base='xs:string'>
  504. <xs:attribute name='algo' type='xs:NMTOKEN' use='optional' default='sha-256'/>
  505. </xs:extension>
  506. </xs:simpleContent>
  507. </xs:complexType>
  508. </xs:schema>
  509. ]]></code>
  510. </section2>
  511. </section1>
  512. </xep>