%ents; ]>
Public Key Publishing This document specifies how an entity may publish its public keys over XMPP. &LEGALNOTICE; 0189 Proposed Standards Track Standards XMPP Core XEP-0060 XEP-0163 W3C XML Signature None None NOT YET ASSIGNED &ianpaterson; &stpeter; 0.6 2007-08-15 psa

More clearly explained node creation and key publication workflows.

0.5 2007-03-05 ip

Merged node creation and first publish examples; recommended the value of each <KeyName/> element and id attribute is set to the key fingerprint; added fprint element and more examples

0.4 2006-11-27 ip

Added jid attribute and send use case; changed namespace

0.3 2006-11-20 ip

Specified that PEP nodes SHOULD be persistent

0.2 2006-09-29 ip

Replaced pubkey and key elements with the KeyInfo element defined in W3C XML Signature

0.1 2006-07-18 ip

Initial version.

This document defines different methods an entity MAY use for publishing its long-term public keys:

An entity MAY have multiple public keys with different formats, signatures, algorithms, strengths and expiry dates. Each client used by a user may use different keys.

An entity SHOULD use &xep0163; to publish its long-term public keys via its own server. Processes for doing so are described in the following sections.

If the pubkeys PEP node does not exist already then the entity must create it. The node MUST have a NodeID of "http://www.xmpp.org/extensions/xep-0189.html#ns" &NSNOTE;.

The node SHOULD be configured as follows (see also &xep0222;):

  • Items published to the node are persistent (this is done by setting the "persistent-items" option to true).
  • Keys will be pushed to subscribers only when new keys are published, not when subscribers become newly available or when a new subscription is created (this is done by setting the "send_last_published_item" option to "never").

If the user wants to control access to his/her identity (see Security Considerations) then the node access model SHOULD be something other than "Open" (this can be done by setting the "access_model" option to a value of "authorize", "presence", "roster", or "whitelist").

http://jabber.org/protocol/pubsub#node_config 1 never roster friends ]]>

Alternatively, if the entity's pubsub service supports both the "auto-create" and "publish-options" features, then the entity MAY create the node by publishing a key and in the first publish including a <publish-options/> element. However, note that not all pubsub services support this feature, since it is optional in &xep0060;.

julietRSAkey1hash ... AQAB http://jabber.org/protocol/pubsub#node_config 1 never roster friends ]]>

The entity publishes a key by sending a pubsub publish request to the pubsub service. A previously published key can be updated by re-publishing the key using the same ItemID.

Each public key MUST be wrapped in a <KeyInfo/> element qualified by the 'http://www.w3.org/2000/09/xmldsig#' namespace as specified in &w3xmlsig;. Each <KeyInfo/> element published using PEP MUST contain a <KeyName/> element with a name that is unique for the user; this enables the key to be referenced by other XMPP Extension Protocols (for example, &xep0136;). The name MAY be the same as the value of the ItemID. However, if two <KeyInfo/> elements contain the same public key in different formats (for example, an X.509 certificate may contain an RSA key), then the name of the two keys SHOULD be the same.

Before computing the fingerprint or publishing the key, all character data between all elements in the <KeyInfo/> element MUST be removed and the XML MUST be converted to canonical form according to &w3canon;. (Any whitespace or other character data shown in the examples herein is included only for the purpose of readability.)

The value of the ItemID SHOULD be set to the fingerprint of the public key, e.g., the SHA256 hash (see &nistfips180-2;) of the key's normalized <KeyValue/>, <PGPData/> or <X509Data/> element. Therefore subscribers or other interested entities are able to request a single key by specifying its fingerprint (for example, when a subscriber is using the &xep0116; protocol).

julietDSAkey1hash

...

... ... ...
]]>
julietX509cert1hash CN=TAMURA Kent, OU=TRL, O=IBM, L=Yamato-shi, ST=Kanagawa, C=JP 12345678 31d97bd7 Subject of Certificate B ... ... ... ]]> julietPGPkey1hash ... ... ]]>

After the account owner publishes the key, the pubsub service shall a notification to each subscriber or otherwise authorized and interested entity.

julietRSAkey1hash ... AQAB
]]>

Note: The stanza containing the event notification (see example above) MAY also include 'replyto' data (as specified by the &xep0033; protocol) to provide an explicit association between the published data and the resource that published it.

]]> julietRSAkey1hash ... julietDSAkey1hash ... julietX509cert1hash ... julietPGPkey1hash ... ]]> ]]> julietRSAkey1hash ... AQAB ]]>

If an entity wishes to request the public keys of another entity and it cannot access the keys via Personal Eventing via Pubsub, then the entity MAY send an &IQ; of type 'get' to the other entity, containing an empty <pubkeys/> element qualified by the 'http://www.xmpp.org/extensions/xep-0189.html#ns' namespace &NSNOTE;.

]]>

The other entity MUST make a careful access control decision before returning only those public keys for which it holds the corresponding private key (not necessarily the full list of keys being published via Personal Eventing via Pubsub):

... ... ... ... ]]>

If the receiving entity decides not to return the public keys, it MUST return an IQ error, which SHOULD be &unavailable; (to avoid divulging presence to unauthorized entities), but MAY be some other appropriate error, such as &forbidden; or ¬allowed;:

]]>

An entity MAY request one or more specific public keys by specifying their fingerprints (see Public Key Publication via PEP) as the content of <fprint/> child elements:

julietRSAkey1hash julietRSAkey2hash ]]> ... ... ]]>

An entity may request the public keys of another entity from a third party using the 'jid' attribute of the <pubkeys/> element to specify the JID that the keys belong to:

]]> ... ... ]]> ]]>

If an entity wishes to send public keys to another entity then it MAY include them in a &MESSAGE; stanza. The entity MAY use the 'jid' attribute of the <pubkeys/> element to specify the JID that the keys belong to. If no 'jid' attribute is specified then the other entity SHOULD assume the keys belong to the sender of the stanza.

... AQAB ... AQAB ]]>

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 (or the "fingerprints" of the keys) it associates with other users (not necessarily JIDs).

Whenever public keys are published an identity is typically associated with a JID. Although the public keys are public information, it may be critically important for the user of the JID to keep his identity secret from all but a few specified people. Implementors MUST take great care to ensure that the identity of the user of a JID is never divulged to anyone except the entities who have been permitted by the user to access the public key.

This document requires no interaction with &IANA;.

Until this specification advances to a status of Draft, its associated namespace shall be "http://www.xmpp.org/extensions/xep-0189.html#ns"; upon advancement of this specification, the ®ISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;.

]]>