W3C

XML Key Management Specification (XKMS 2.0)

W3C Editors Copy 7th June 2002

This version:
http://www.w3c.org/2001/XKMS/Drafts/XKMS-20020507
Latest version:
http://www.w3c.org/2001/XKMS/Drafts/XKMS/xkms.html
Previous version:
http://www.w3c.org/2001/XKMS/Drafts/XKMS-20020419/  
Editor:
Phillip Hallam-Baker VeriSign
Contributors:
See the WG participants list.

Abstract

¶2 This document specifies protocols for distributing and registering public keys, suitable for use in conjunction with the proposed standard for XML Signature [XML-SIG] developed by the World Wide Web Consortium (W3C) and the Internet Engineering Task Force (IETF) and an anticipated companion standard for XML encryption.  The XML Key Management Specification (XKMS) comprises two parts -- the XML Key Information Service Specification (X-KISS) and the XML Key Registration Service Specification (X-KRSS).

Status of this document

¶3 This is an editors copy and has no official status whatsoever.

¶4 This is the third draft of the "XML Key Management Specification (XKMS)" specification from the XML Key Management Working Group (Activity Statement).

¶5 This version attempts to capture the consensus resulting from the December 9th 2001 face-to-face meeting and subsequent discussion on the list. However, it does contain points which are still under discussion or not well specified. The Working Group will try to use a new namespace when changes in its syntax or processing are substantive. However, this namespace might be reused (prior to reaching Candidate Recommendation) by subsequent drafts in such a way as to cause instances using the namespace to become invalid or to change in meaning or affect the operation of existing software. Requests for a more stringent level of namespace stability should be made to the Working Group.

¶6 Publication of this document does not imply endorsement by the W3C membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite a W3C Working Draft as anything other than a "work in progress." A list of current W3C working drafts can be found at http://www.w3.org/TR/.

¶7 Please send comments to the editor (<pbaker@verisign.com>) and cc: the working group mailing list www-xkms@w3c.org (archive)

¶8 Patent disclosures relevant to this specification may be found on the Working Group's patent disclosure page in conformance with W3C policy.


Table Of Contents

XML Key Management Specification (XKMS 2.0)

W3C Editors Copy 7th June 2002

Abstract

Status of this document

Table Of Contents

Executive Summary

1 Introduction

1.1 Editorial and Conformance Conventions

1.2 Definition of Terms

1.3 Namepaces

1.4 Key Information Service Specification Overview (Non-Normative)

1.5 Key Registration Service Specification Overview (Non-Normative)

1.6 Structure of this document

2 Message Format

2.1 Protocol Version

2.2 Security Enhancements

2.3 Message Processing

2.4 Syntax

3 Key Information Service Overview

3.1 XKISS Locate Service

3.2 XKISS: Validate Service

3.3 Using Locate and Validate

4 Key Information Service Message Set

4.1 Locate Service

4.2 Validate Service

5 Key Registration Service Overview

5.1 Registration

5.2 Reissue

5.3 Revocation

5.4 Key Recovery

5.5 Request Authentication

6 Key Registration Service Message Set

6.1 Registration

7 Cryptographic Algorithm Specific Parameters

7.1 Use of Limited-Use Shared Secret Data

8 Security Considerations

8.1 Replay Attacks

8.2 Denial of Service

8.3 Recovery Policy

8.4 Security of Limited Use Shared Secret

9 Acknowledgments

Appendix A Schemas

A.1 XKMS Schema

Appendix B Service Location Configuration

B.1 Domain Name Service (DNS)

Appendix C Sample Protocol Exchanges

C.1 Locate Request Example 1

C.2 Locate Request Example 2

C.3 Validate Request

C.4 Registration of Client Generated Key Pair

C.5 Registration of Server Generated key Pair

Appendix D References

Appendix E Legal Notices

Appendix F Work In Progress

F.1 Outstanding Issues

F.2 Issues addressed in this draft

Executive Summary

¶9 This document specifies protocols for distributing and registering public keys, suitable for use in conjunction with the proposed standard for XML Signature [XML-SIG] developed by the World Wide Web Consortium (W3C) and the Internet Engineering Task Force (IETF) and an anticipated companion standard for XML encryption.  The XML Key Management Specification (XKMS) comprises two parts -- the XML Key Information Service Specification (X-KISS) and the XML Key Registration Service Specification (X-KRSS).

¶10 The X-KISS specification defines a protocol for a Trust service that resolves public key information contained in XML-SIG elements. The X-KISS protocol allows a client of such a service to delegate part or all of the tasks required to process <ds:KeyInfo> elements. A key objective of the protocol design is to minimize the complexity of application implementations by allowing them to become clients and thereby to be shielded from the complexity and syntax of the underlying PKI used to establish trust relationships. The underlying PKI may be based upon a different specification such as X.509/PKIX, SPKI or PGP.

¶11 The X-KRSS specification defines a protocol for a web service that accepts registration of public key information. Once registered, the public key may be used in conjunction with other web services including X-KISS.

¶12 Both protocols are defined in terms of structures expressed in the XML Schema Language, protocols employing the Simple Object Access Protocol (SOAP) v1.1 [SOAP] and relationships among messages defined by the Web Services Definition Language v1.0 [WSDL]. Expression of XKMS in other compatible object encoding schemes is also possible.

1 Introduction

¶13 This document specifies protocols for distributing and registering public keys, suitable for use in conjunction with the proposed standard for XML Signatures [XML-SIG] developed by the World Wide Web Consortium (W3C) and the Internet Engineering Task Force (IETF) and an anticipated companion standard for XML encryption.  The XML Key Management Specification (XKMS) comprises two parts -- the XML Key Information Service Specification (X-KISS) and the XML Key Registration Service Specification (X-KRSS).

¶14 These protocols do not require any particular underlying public key infrastructure (such as X.509) but are designed to be compatible with such infrastructures.

¶15 This document comprises the following service specifications:

XML Key Information Service Specification: 
A protocol to support the delegation by an application to a service of the processing of Key Information associated with an XML signature, XML encryption, or other public key.  Its functions include the location of required public keys and describing the binding of such keys to identification information.
XML Key Registration Service Specification: 
A protocol to support the registration of a key pair by a key pair holder, with the intent that the key pair subsequently be usable in conjunction with the XML Key Information Service Specification or higher level trust assertion service such as XML Trust Assertion Service Specification [XTASS].

1.1 Editorial and Conformance Conventions

¶16 This specification uses XML Schemas [XML-schema] to describe the content model.

¶17 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this specification are to be interpreted as described in RFC2119 [KEYWORDS]:

¶18 "they MUST only be used where it is actually required for interoperation or to limit behavior which has potential for causing harm (e.g., limiting retransmissions)"

¶19 Consequently, we use these capitalized keywords to unambiguously specify requirements over protocol and application features and behavior that affect the interoperability and security of implementations. These key words are not used (capitalized) to describe XML grammar; schema definitions unambiguously describe such requirements and we wish to reserve the prominence of these terms for the natural language descriptions of protocols and features. For instance, an XML attribute might be described as being "optional." Compliance with the XML-namespace specification [XML-NS] is described as "REQUIRED."

1.2 Definition of Terms

¶20 The following terms are used within this document with the particular meaning indicated below:

¶21 Service
   
An application that provides computational or informational resources on request. A service may be provided by several physical servers operating as a unit.

¶22 Web service
   
A service that is accessible by means of messages sent using standard web protocols, notations and naming conventions

¶23 Client
   
An application that makes requests of a service.  The concept of 'client' is relative to a service request; an application may have the role of client for some requests and service for others.

1.3 Namepaces

¶24 For clarity, some examples of XML are not complete documents and namespace declarations may be omitted from XML fragments. In this document, certain namespace prefixes represent certain namespaces as follows

Prefix  Specification      Schema
XML Schema http://www.w3.org/2001/XMLSchema
ds XML Signature http://www.w3.org/2000/09/xmldsig#
xenc XML Encryption http://www.w3.org/2001/04/xmlenc#
xkms XKMS http://www.w3.org/2002/03/xkms#

¶25 These namespaces are declared in the XKMS schema as follows:

<?xml version="1.0"?>
<schema targetNamespace="http://www.w3.org/2002/03/xkms#" 
      xmlns="http://www.w3.org/2001/XMLSchema" 
      xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" 
      xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 
      xmlns:xkms="http://www.w3.org/2002/03/xkms#" 
      elementFormDefault="qualified" attributeFormDefault="unqualified">
   <import namespace="http://www.w3.org/2000/09/xmldsig#" 
         schemaLocation="xmldsig-core-schema.xsd"/>
   <import namespace="http://www.w3.org/2001/04/xmlenc#" 
         schemaLocation="xenc-schema.xsd"/>
   <annotation>
      <documentation xml:lang="en">
              XML Schema for XKMS 2.0 draft 7 1st April 2002
      </documentation>
   </annotation>
   <!-- /Namespace -->
...
   <!-- End Schema -->
</schema>

1.4 Key Information Service Specification Overview (Non-Normative)

¶26 X-KISS allows a client to delegate part or all of the tasks required to process XML Signature <ds:KeyInfo> elements to a Trust service. A key objective of the protocol design is to minimize the complexity of applications using XML Signature. By becoming a client of the trust service, the application is relieved of the complexity and syntax of the underlying PKI used to establish trust relationships, which may be based upon a different specification such as X.509/PKIX, SPKI or PGP.

¶27 By design, the XML Signature Specification does not mandate use of a particular trust policy. The signer of a document is not required to include any key information but may include a <ds:KeyInfo> element that specifies the key itself, a key name, X.509 certificate, a PGP Key Identifier etc. Alternatively, a link may be provided to a location where the full <ds:KeyInfo> information may be found.

¶28 The information provided by the signer may therefore be insufficient by itself to perform cryptographic verification and decide whether to trust the signing key, or the information may not be in a format the client can use. For example:

¶29 In the case of an encryption operation:

1.5 Key Registration Service Specification Overview (Non-Normative)

¶30 X-KRSS describes a protocol for registration of public key information. A client of a conforming service may request that the Registration Service bind information to a public key. The information bound may include a name, an identifier or extended attributes defined by the implementation.

¶31 The key pair to which the information is bound may be generated in advance by the client or, to support key recovery, may be generated on request by the service. The Registration protocol may also be used for subsequent recovery of a private key.

¶32 The protocol provides for authentication of the applicant and, in the case that the key pair is generated by the client, Proof of Possession (POP) of the private key. A means of communicating the private key to the client is provided in the case that the private key is generated by the Registration Service.

¶33 This document specifies means of registering RSA and DSA keys and a framework for extending the protocol to support other cryptographic algorithms such as Diffie-Helleman and Elliptic Curve variants.

1.6 Structure of this document

¶34 The remainder of this document describes the XML Key Information Service Specification and XML Key Registration Service Specification.

Section 2: XKMS Message Format
Features of the XKMS that are common to the XKMS services are described
Section 3: Key Information Service Specification Overview.
The functional behavior of the X-KISS service is described.
Section 4: Key Information Service Specification Message Set.
The semantics of the X-KISS protocol messages are defined.
Section 5: Key Registration Service Specification Overview.
The functional behavior of the X-KRSS service is described.
Section 6: Key Registration Service Specification Message Set.
The semantics of the X-KRSS protocol messages is defined.
Section 7: Cryptographic Algorithm Specific Parameters
Parameters and data formats specific to the use of particular cryptographic algorithms are defined.
Section 8: Security Considerations
Security considerations for implementation and deployment of XKMS are described

2 Message Format

¶35 At the semantic level the XKMS protocol consists of pairs of requests and responses. The XKMS protocol binding allows for the case in which an additional request/response round trip is required to support cases such as pending responses and 2 phase requests for replay attack protection.

¶36 Each XKMS response message contains a MajorResult code that determines whether the response is final or further processing is required. The protocol is specified in the CSP formalism [CSP] as follows:

Final = { Success, VersionMismatch, Sender, Receiver }
Request Result.Final
|
Request Result.Pending PendingNotificationRequest Result.Final
|
Request Result.Represent RequestResult.Final

2.1 Protocol Version

¶37 TBS: New protocol versioning mechanism

2.2 Security Enhancements

¶38 Security enhancements MAY be applied to control the following risks:

¶39 The security enhancements required varies according to the application. In the case of a free or un-metered service the service may not require authentication of the request. A responder that requires an authenticated request must know in that circumstance that the request corresponds to the specified response.

2.2.1 Confidentiality and Integrity

¶40 Conforming XKMS services MAY support the use of encryption to ensure message confidentiality and MUST support the use of authentication to ensure message integrity as follows:

¶41 Note that regardless of the means used to protect the confidentiality of XKMS messages certain data items such as private keys MUST be subject to an additional layer of encryption at the element level.

¶42 In the case that payload authentication is employed the message is signed using XML signature in enveloped mode. The scope of the signature is the message element.

¶43 The means by which the client determines that the signing key is trustworthy is outside the scope of this specification. Possible mechanisms include:

2.2.2 Correspondence of Response to Request

¶44 In order to prevent response replay and request message substitution attacks the requestor SHOULD ensure that the response corresponds to the request. The mechanism employed depends on whether or not the request is authenticated.

No Authentication
In this case no authentication is possible
Non-authenticated Request, Authenticated Response
[Here what I think we want to say is that the request SHOULD be authenticated with a signature that specifies a message digest and the response should specify the same message digest as an authenticated signature property, alternatively we may want to specify a slot for the digest]
Authenticated Request, Authenticated Response
If the request and the response are authenticated the correspondence of the request and response may be determined by verifying the value of RequestID in the response.

¶45 [Issue = how to specify digest of the request in the response, this should probably be done via an XML Signature authenticated attribute?]

2.2.3 Request Replay Protection

¶46 An XKMS service MAY at its option protect against replay attacks by means of a two phase protocol:

¶47 In the first phase the requestor presents the request and the service responds the MajorResult value Represent and presents a nonce.

¶48 In the second phase the requestor represents the original request together with the nonce.

¶49 The service can protect against replay attacks by ensuring that it only responds to each nonce once. This may be achieved in a computationally efficient manner by appropriate construction of the nonce value. The actual construction of the nonce value is outside the scope of this specification and may be chosen as site specific circumstances dictate.

¶50 For example the nonce may be constructed from the current time at the service, a unique serial number and a Message Authentication Code computer computed over the preceding items using a  secret key known only to the service:

¶51 nonce = time + serial + M ( time + serial , k )

¶52 The service may limit the time interval in which replay attacks are possible by rejecting nonce values that specify an unacceptable time value or an incorrect MAC value.

¶53 The service may prevent replay attacks completely by tracking the serial numbers for which responses have already been given.

2.3 Message Processing

¶54 The following sections summarize the message processing steps taken by both parties in each of the message

2.3.1 All Messages

Generation
Service is set to the value of the URI to which the XKMS request is directed
ds:Signature is generated in enveloped mode over the entire element derived from the MessageAbstractType
Processing
The value of Service is verified
The ds:Signature value is verified (if required)

2.3.2 Single phase Request / Response

Requestor generation of the Request Message
RequestID is set to a randomly generated unique value
Nonce and OriginalRequestID  are not present
RespondWith values Represent and/or Pending MAY be specified
Service processing of the Request Message
Verify that request meets service authorization policy
Process request to completion
Service generation of the Response Message
ResponseID is set to a randomly generated unique value
RequestID is set to the value specified in the request
Nonce is not present
MajorResult is set to a Final result value.
Requestor processing of the Response Message
The value of RequestID is verified

2.3.3 Two phase Request / Response

¶55 The processing steps specified for the single phase case are performed with the following exceptions:

Requestor generation of the Phase 1 Request Message
RespondWith value Represent MUST be specified
Service processing of the Phase 1 Request Message
Request is NOT processed
Service generation of the Phase 1 Response Message
Nonce value is set in accordance with service replay protection requirements
MajorResult is set to Represent
Requestor processing of the Phase 1 Response Message
Proceed to phase 2

¶56 The processing steps specified for the single phase case are performed with the following exceptions:

Requestor generation of the Phase 2 Request Message
OriginalRequestID  set to value in Phase 1 request
Nonce value is set to value in Phase 1 response
Service processing of the Phase 2 Request Message
Verify value of Nonce
Verify that request meets service authorization policy
Process request to completion
Service generation of the Phase 2 Response Message
Nonce is not present
MajorResult is set to a Final result value
Requestor processing of the Phase 2 Response Message
If MajorResult set to a non-final value consider to be failure

2.3.4 Pending Response

¶57 The processing steps specified for the single phase case are performed with the following exceptions:

Requestor generation of the Initial Request Message
As in the single phase case except that:
RespondWith value Pending MUST be specified
Service processing of the Initial Request Message
Schedule request for asynchronous processing
Service generation of the Initial Response Message
MajorResult is set to Pending
Requestor processing of the Initial Response Message
Register request as pending completion, wait for notification.

¶58 The processing steps specified for the single phase case are performed with the following exceptions:

Requestor generation of the Pending Request Message
Request element is PendingRequest
OriginalRequestID  set to value in initial request
ResponseID is set to value in initial response
Service processing of the Pending Request Message
Match pending request to pending response
Service generation of the Pending Response Message
ResponseID is set to a randomly generated unique value
RequestID  set to value in Pending request
Requestor processing of the Pending Response Message
If MajorResult set to a non-final value consider to be failure

2.4 Syntax

2.4.1 Type MessageAbstractType

¶59 The MessageAbstractType abstract type is the type from which all XKMS message element types are derived. The MessageAbstractType abstract type contains the following element and attributes

<ds:Signature>  [Optional]
An XML Signature in enveloping mode. The scope of the signature is the element derived from the MessageAbstractType abstract type.
Service  [Required]
The URI of the Web Service port to which the request is addressed
Nonce  [Optional]
Cryptographically random data used to defend against replay attacks

¶60 The following schema defines the <MessageAbstractType> element:

2.4.2 Type RequestAbstractType

¶61 The RequestAbstractType abstract type is the type from which all XKMS request element types are derived. The RequestAbstractType abstract type inherits the element and attributes of the MessageAbstractType abstract type and in addition contains the following attributes

<RespondWith>  [Any Number]
Specifies the types of data the recipient requests to be sent in the response.
<PendingNotification>  [Optional]
Specifies a means by which the service may notify the requestor of the completion of a pending response. If the <PendingNotification> element is present the value Pending MUST be specified as a <RespondWith> value.
RequestID  [Required]
A unique identifier generated by the requestor.
OriginalRequestID  [Optional]
Specifies the identifier of the original request in the case of a represented or pending request
ResponseLimit  [Optional]
Specifies the maximum number of data items the requestor can accept in the case that the schema specifies an unbounded number of elements.

¶62 The following schema defines the <RequestAbstractType> element::

2.4.3 Element <RespondWith>

¶63 The <RespondWith> element in the request specifies one or more strings included in the request that specify data elements to be provided in the <ds:Keyinfo> element of the response. Each string is a single identifier corresponding to a sub-element of the XML Signature Specification <ds:Keyinfo> element [XML-SIG] or the private key information defined in section 6.3.2. The XML Signature elements are described here for convenience. The normative reference is the specification [XML-SIG].

¶64 The Service SHOULD return a requested data element if it is available. The Service MAY return additional data elements that were not requested. In particular, the service MAY return data elements specified in the request with the response.

¶65 The following identifiers are defined:

¶66 Identifier

¶67 <ds:Keyinfo> Element

¶68 Description

¶69 KeyName

¶70 <ds:KeyName>

¶71 Key Name

¶72 KeyValue

¶73 <ds:KeyValue>

¶74 Public key parameters

¶75 X509Cert

¶76 <ds:X509Data>

¶77 X509 Certificate v3 that authenticates the specified key

¶78 X509Chain

¶79 <ds:X509Data>*

¶80 X509 Certificate v3 chain that authenticates the specified key

¶81 X509CRL

¶82 <ds:X509Data>

¶83 X509 Certificate Revocation List v2

¶84 OCSP

¶85 <ds:X509Data>

¶86 PKIX OCSP token that validates an X509v3 certificate that authenticates the key

¶87 RetrievalMethod

¶88 <ds:RetrievalMethod>

¶89 Retrieval Method data

¶90 MgmtData

¶91 <ds:MgmtData>

¶92 Management Data

¶93 PGP

¶94 <ds:PGPData>

¶95 PGP key signing data

¶96 PGPWeb

¶97 <ds:PGPData>*

¶98 Collection of PGP key signing data

¶99 SPKI

¶100 <ds:SPKIData>*

¶101 SPKI key signing

¶102 Multiple

¶103  

¶104 Specifies that the Trust Service SHOULD return multiple answers to the client if more than one valid answer is available.

¶105 Private

¶106  

¶107 Request that the encrypted private key be returned in the response. [Used in the X-KRSS protocol]

Pending   The requestor can accept the MajorResult code Pending
Represent   The requestor can accept the MajorResult code Represent

¶108 For example, a client that has no X.509 processing capability might perform a Locate operation to obtain the public key parameters and name information from a <ds:Keyinfo> element that specifies only a certificate. The Respond element values in this case would be "KeyName" and "KeyValue".

¶109 The following schema defines the <RespondWith> element::

2.4.4 Element <PendingNotification>

¶110 The <PendingNotification> element is used to specify a mechanism by means of which the service can inform a requestor that a pending request has completed asynchronously.

¶111 The <PendingNotification> element contains the following attributes

Mechanism  [Required]
A URI that specifies the protocol by which the notification is made
Identifier  [Required]
A URI that specified the address to which the notification is made

¶112 The following mechanisms are defined:

Protocol URI Identifier Description
SMTP rfcenter22 mailto: Notification by email. The content of the email is outside the scope of this specification
HTTP TBS http:// Notification by HTTP GET. The content of the request is outside the scope of this specification

¶113 The following schema defines the <PendingNotification> element and PendingNotificationType type:

2.4.5 Element <PendingRequest>

¶114 The PendingRequest element is used to request the result of a previously presented request for which the MajorResult code Pending was returned. The PendingRequest element inherits the element and attributes of AbstractRequestType and the following attribute:

ResponseID  [Optional]
The value of the ResponseID attribute sent in the original pending response.

¶115 The following schema defines the PendingRequest element and PendingRequestType type:

2.4.6 Element <ResultAbstractType>

¶116 The ResultAbstractType abstract type is the type from which all XKMS response element types are derived. The ResultAbstractType abstract type inherits the element and attributes of the MessageAbstractType abstract type and in addition contains the following attributes

ResultMajor  [Required]
The most significant component of the result code
ResultMinor  [Optional]
The least significant component of the result code
RequestID  [Required]
The unique identifier RequestID specified in the request
ResponseID  [Required]
A unique identifier generated by the service.

¶117 If the MajorResult value has the value Represent the nonce attribute MUST be present and MUST NOT be the empty string.

¶118 The following schema defines the ResultAbstractType abstract type:

2.4.6.1 Result Codes

¶119 Result codes consist of a major code and a minor code. This specification uses the notation ResultMajor.ResultMinor to specify a result code. For example the result code Sender.NoMatch indicates a ResultMajor code of Sender and a ResultMinor code of NoMatch.

¶120 The following ResultMajor codes are defined:

Code Final Description
Success Final The operation succeeded.
VersionMismatch Final The service does not support the protocol version specified in the request.
Sender Final An error occurred that was due to the message sent by the sender.
Receiver Final An error occurred at the receiver.
Queued Not Final The operation was queued for future processing.
Represent Not Final The service has not acted on the request which must be represented with the specified nonce in accordance with the two phase protocol
Pending Not Final The request has been accepted for processing and the service will return the result asynchronously

¶121 The ResultMajor codes Success, VersionMismatch, Sender and Receiver are Final, that is the protocol has completed when the code is returned. The ResultMajor codes Queued, Represent and Pending are Not Final and indicate that further processing is necessary to receive the result.

¶122 The following ResultMinor codes are defined:

Code Possible Major Codes Description
NoMatch   No match was found for the search prototype provided.
Success The result code Success.NoMatch indicates that the service is authoritative for the search prototype specified and that the service positively asserts that no matches exist.
Receiver The result code Receiver.NoMatch indicates that the service is not authoritative for the search prototype provided.
TooManyResponses
The request resulted in the number of responses exceeding the ResponseLimit value specified in the request.
Success The service has returned one or more responses.
Receiver The service has returned no responses.
Incomplete Success Only part of the information requested could be provided.
Failure   The service attempted to perform the request but the operation failed for unspecified reasons.
Success The reason for failure is attributed to the sender (e.g. the request failed schema validation).
Receiver The reason for failure is attributed to the receiver (e.g. a database lookup failed).
Refused   The operation was refused. The service did not attempt to perform the request.
Success The sender failed to provide sufficient information to authenticate or authorize the request (e.g. payment not supplied)
Receiver The receiver is currently refusing certain requests for unspecified reasons.
NoAuthentication Sender The operation was refused because the necessary authentication information was incorrect or missing.

3 Key Information Service Overview

¶123 In the XML Signature Specification, a signer may optionally include information about his public signing key ("<ds:KeyInfo>") within the signature block. This key information is designed to allow the signer to communicate "hints" to a verifier about which public key to select.

¶124 Another important property of <ds:KeyInfo> is that it may or may not be cryptographically bound to the signature itself.  This allows the <ds:KeyInfo> to be substituted or supplemented without "breaking" the digital signature.

¶125 For example Alice signs a document and sends it to Bob with a <ds:KeyInfo> element that specifies only the signing Key Data. On receiving the message Bob retrieves additional information required to validate the signature and adds this information into the <ds:KeyInfo> element when he passes the document on to Carol (see Figure 1 below).

¶126 Substitution of the ds:KeyInfo element as a message is passed amongst processors.

¶127 Figure 1: Substitution of the <ds:KeyInfo> element as a message is passed amongst processors

3.1 XKISS Locate Service

¶128 The XKISS Locate service resolves a <ds:Keyinfo> element but does NOT REQUIRE the service to make an assertion concerning the validity of the binding between the data in the <ds:Keyinfo> element.

¶129 The Trust service MAY resolve the <ds:Keyinfo> element using local data or MAY relay request to other servers. For example the Trust service might resolve a <ds:RetrievalMethod> element (Figure 2) or act as a gateway to an underlying PKI based on a non-XML syntax.

¶130 Diagram shows protocol exchange between a client, a trust service and a remote server (Server A).

¶131 Figure 2: Locate Service Provides Name Resolution

¶132 Both the request and/or the response MAY be signed, to both authenticate the sender and protect the integrity of the data being transmitted, using an XML Signature.

3.1.1 Example: Document Signature

¶133 The client receives a signed XML document. The <ds:Keyinfo> element specifies a <ds:RetrievalMethod> for an X.509 certificate that contains the public key. The client sends the <ds:Keyinfo> element to the location service requesting that the <KeyName> and <KeyValue> elements be returned.

¶134 Request:

<?xml version="1.0" encoding="utf-8" ?>
<Locate>
   <Query>
      <ds:KeyInfo>
         <ds:RetrievalMethod
           URI="http://www.PKeyDir.test/Certificates/01293122"
          http://www.w3.org/2000/09/xmldsig#X509Data"/>
      </ds:KeyInfo>
   </Query>
   <Respond>
      <string>KeyName</string>
      <string>KeyValue</string>
   </Respond>
</Locate>

¶135 The location service resolves the <ds:RetrievalMethod>, obtaining an X.509v3 certificate. The certificate is parsed to obtain the public key value that is returned to the client.

¶136 The location service DOES NOT report the revocation status or the trustworthiness of the certificate. The <KeyName> returned is obtained from the certificate.

¶137 Response:

<?xml version="1.0" encoding="utf-8" ?>
<LocateResult>
   <Result>Success</Result>
   <Answer>
      <ds:KeyInfo>
         <ds:KeyName>O=XMLTrustCernter.org OU="Crypto"
                        CN="Alice"</ds:KeyName>
         <ds:KeyValue>...</ds:KeyValue>
      </ds:KeyInfo>
   </Answer>
</LocateResult>

¶138 (For readability, the contents of the <KeyValue>element are omitted from the example above.  Full examples are shown in appendices. )

3.1.2 Example: Data Encryption

¶139 The client is attempting to send an encrypted XML document and requires the public key encryption parameters of the recipient.

¶140 Request:

<?xml version="1.0" encoding="utf-8" ?>
<Locate>
   <Query>
      <ds:KeyInfo>
         <ds:RetrievalMethod
           URI="http://www.PKeyDir.test/Certificates/01293122"
          http://www.w3.org/2000/09/xmldsig#X509Data"/>
      </ds:KeyInfo>
   </Query>
   <Respond>
      <string>KeyName</string>
      <string>KeyValue</string>
   </Respond>
</Locate>

¶141 Response:

<?xml version="1.0" encoding="utf-8" ?>
<LocateResult>
   <Result>Success</Result>
   <Answer>
      <ds:KeyInfo>
         <ds:KeyName>Alice Cryptographer</ds:KeyName>
         <ds:KeyValue>...</ds:KeyValue>
      </ds:KeyInfo>
   </Answer>
</LocateResult>

3.2 XKISS: Validate Service

¶142 The XKISS Validate Service allows all that the Locate Service does, and in addition, the client may obtain an assertion specifying the status of the binding between the public key and other data, for example a name or a set of extended attributes. Furthermore the service represents that the status of each of the data elements returned is valid and that all are bound to the same public key. The client sends to the trust service a prototype containing some or all of the elements for which the status of the trust binding is required. If the information in the prototype is incomplete, the trust service MAY obtain additional data required from an underlying PKI Service. Once the validity of the Key Binding has been determined the Trust service returns the status result to the client (Figure 3).

¶143 Diagram shows a trust service acting as a gateway to 'PKI services'

¶144 Figure 3: Validate Service Provides Key Validation

3.2.1 Example: Document Signature

¶145 The client of the example in section 2.2.1 has verified the document signature. The client now needs to determine whether the binding between the name and the public key is both trustworthy and valid.

¶146 Request:

<?xml version="1.0" encoding="utf-8" ?>
<Validate>
   <Query>
      <Status>Valid</Status>
      <ds:KeyInfo>
         <ds:KeyName>...</ds:KeyName>
         <ds:KeyValue>...</ds:KeyValue>
      </ds:KeyInfo>
   </Query>
   <Respond>
      <string>KeyName</string>
      <string>KeyValue</string>
   </Respond>
</Validate>

¶147 Response:

<?xml version="1.0" encoding="utf-8" ?>
<ValidateResult>
    <Result>Success</Result>
    <Answer>
       <KeyBinding>
          <Status>Valid</Status>
          <KeyID>http://www.xmltrustcenter.org/assert/20010120-39</KeyID>
          <ds:KeyInfo>
             <ds:KeyName>...</ds:KeyName>
             <ds:KeyValue>...</ds:KeyValue>
          </ds:KeyInfo>
          <ValidityInterval>
             <NotBefore>2000-09-20T12:00:00</NotBefore>
             <NotAfter>2000-10-20T12:00:00</NotAfter>
          </ValidityInterval>
       </KeyBinding>
    </Answer>
</ValidateResult>

3.3 Using Locate and Validate

¶148 The Locate and Validate operations are both used to obtain information about a public key from a Trust Service. Locate and Validate services are both expected to attempt to provide correct information to the requestor. The Locate and Validate services differ in the extent to which the Trust Service verifies the information returned. A Location service SHOULD attempt to provide only information which is trustworthy to the best of its knowledge. A Validation service undertakes to only return information which has been positively validated by the Trust Service as meeting its validation criteria.

¶149 For example a Locate Service MAY act as an aggregator of public key related information obtained from a variety of sources without performing any checks to determine whether specific information is current or establishing any formal trust policy. Such a service would correspond to the role of a directory in a traditional PKI. A Validate service MAY provide a service that validates key information presented to it but does not provide aggregation services. An email client might use a pair of such services in combination to obtain a valid public key for the intended recipient of an encrypted email by first querying the un-trusted Locate service and then forward the information received to a Validate service to establish its trustworthiness (Figure 4).

¶150

¶151 Figure 4: Combined use of Locate and Validate service

3.3.1 DNS Integration

¶152 In many cases the key information which a client requires is bound to some form of address specified by an Internet protocol part of which consists of a DNS address. For example an email client may require a trustworthy key to send an encrypted email to bob@cryptographer.test. Unless an XKMS service which provides key information about keys bound to email addresses in the domain cryptographer.test is known a priori some means of locating the correct XKMS service is required.

¶153 Figure 5 shows an example of using the DNS SRV record to perform discovery of XKMS services. The email client requests a key for bob@cryptographer.test from a trusted Validate service. The Validate service then queries the DNS to locate an XKMS service providing information on keys bound to addresses in the zone cryptographer.test. The Validate service does not have an established trust relationship with the cryptographer.test XKMS service and so a Locate request is made to determine if any key information bound to bob@cryptographer.test can be located. The Validate service then validates the information received by such means as are appropriate (e.g. by verifying that a certification chain may be constructed from a root of trust) and the response returned to the email client.

¶154

¶155 Figure 5: Combined use of Locate and Validate service

¶156 Appendix B provides further information on the use of the DNS SRV record.

4 Key Information Service Message Set

¶157 The protocol consists of pairs of messages, with an application sending a request message to a trust service and the service responding with another message. 

    

4.1 Locate Service

¶158 The Locate service accepts as input a <ds:Keyinfo> element that specifies a public key and returns one or more <ds:Keyinfo> elements that relate to the same public key. The <ds:Keyinfo> elements returned are specified by the Respond element in the request.

4.1.1 Locate Request Element <LocateRequest>

¶159 The request message contains a <LocateRequest> element that contains the following element.

KeyInfoQuery  [Required]
A single complex structure containing a <ds:Keyinfo> element that specifies the public key for which additional data is requested.

¶160  The following schema defines the <LocateRequest> element:

   <!-- LocateRequest -->
   <element name="LocateRequest" type="xkms:LocateRequestType"/>
   <complexType name="LocateRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyInfoQuery"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <element name="KeyInfoQuery" type="ds:KeyInfoType"/>
   <!-- /LocateRequest -->

4.1.2 Locate Response Element<LocateResult>

¶161 The request message contains a <LocateResult> element

<ds:KeyInfo>  [Any Number]
A <ds:Keyinfo>element that matches the criteria specified in the corresponding request.

¶162  The following schema defines the <LocateResult> element:

   <!-- LocateResult -->
   <element name="LocateResult" type="xkms:LocateResultType"/>
   <complexType name="LocateResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="ds:KeyInfo" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /LocateResult -->

4.2 Validate Service

¶163 The Validate service allows the client to query the binding between a <ds:Keyinfo> element and other data such as an identifier. The client supplies a prototype for the <KeyBinding> assertion requested. The prototype may specify either a <KeyId> or a <ds:Keyinfo> element or both. The server returns one or more <KeyBinding> assertions that meet the criteria specified in the request.

4.2.1 Element <KeyBinding>

¶164 The <KeyBinding> element asserts a binding between data elements that relate to a public key including <KeyName>, <KeyID>, <KeyValue> and <X509Data>. Furthermore, the Service represents to the client accessing the service and to that client alone that the binding between the data elements is valid under whatever trust policy the service offers to that client.

ID  [Optional]
Identifier of the key binding.
<KeyInfo>   [Optional]
The public key information to which the key binding information is bound
<ProcessInfo>  [Optional]
Processing information associated with a key binding that end clients SHOULD treat as opaque data
<ValidityInterval>  [Required]
The time interval in which the key binding relationship is asserted
<KeyUsage>  [0 to 3]
The cryptographic key uses for which the key may be used
<UseKeyWith>  [Any Number]
The applications with which the key may be used together with the application specific subject identifier of the key holder for that application
<Reason>  [Any Number]
Reason
any [Any Number]

¶165 The following schema defines the <KeyBinding> element and the KeyBindingType type. The <Query> and <Prototype> elements share the KeyBindingType definition.

   <!-- KeyBinding -->
   <element name="KeyBinding" type="xkms:KeyBindingType"/>
   <complexType name="KeyBindingType">
      <sequence>
         <element ref="xkms:KeyInfo" minOccurs="0"/>
         <element ref="xkms:PassPhrase" minOccurs="0"/>
         <element ref="xkms:ProcessInfo" minOccurs="0"/>
         <element ref="xkms:ValidityInterval" minOccurs="0"/>
         <element ref="xkms:KeyUsage" minOccurs="0" maxOccurs="3"/>
         <element ref="xkms:UseKeyWith" minOccurs="0" maxOccurs="unbounded"/>
         <element ref="xkms:Reason" minOccurs="0" maxOccurs="unbounded"/>
         <any namespace="##other" minOccurs="0" maxOccurs="unbounded" 
               processContents="lax"/>
      </sequence>
      <attribute name="ID" type="ID" use="optional"/>
   </complexType>
   <!-- /KeyBinding -->
    

4.2.2 Element <KeyInfo>

¶166 The following schema defines the <KeyInfo> element of the KeyInfoType type imported from the XML Signature Specification:

   <!-- /KeyInfo -->
   <!-- /KeyInfo -->

4.2.3 Element <PassPhrase>

¶167 The <PassPhrase> element contains a MAC output value encoded as a base64 string.

¶168 On initial registration the <PassPhrase> value is obtained by first performing the MAC calculation on the pass phrase value, then performing a second MAC calculation on the result.

¶169 To prove knowledge of the pass phrase in a subsequent revocation request the <PassPhrase> value is obtained by performing the MAC calculation on the pass phrase value.

¶170 Details of the MAC output value calculation are provided in section 6  below.

¶171 The following schema defines the <PassPhrase> element and the PassPhraseValueType type:

   <!-- PassPhrase -->
   <element name="PassPhrase" type="xkms:PassPhraseValueType"/>
   <simpleType name="PassPhraseValueType">
      <restriction base="base64Binary"/>
   </simpleType>
   <!-- /PassPhrase -->

4.2.4 Element <ProcessInfo>

¶172 The <ProcessInfo> element MAY be used to specify processing information associated with a key binding that end clients SHOULD treat as opaque data.

any  [Any Number]
Processing information to be treated as opaque data by clients.

¶173 TBS Example of use

¶174 The following schema defines the <ProcessInfo> element and the ProcessInfoType type:

   <!-- ProcessInfo -->
   <element name="ProcessInfo" type="xkms:ProcessInfoType"/>
   <complexType name="ProcessInfoType">
      <sequence minOccurs="0" maxOccurs="unbounded">
         <any namespace="##other"/>
      </sequence>
   </complexType>
   <!-- /ProcessInfo -->

4.2.5 Element <ValidityInterval>

¶175 The <ValidityInterval> element specifies limits on the validity of the assertion.

NotBefore     [Optional]
Time instant at which the validity interval begins
NotOnOrAfter     [Optional]
Time instant at which the validity interval has ended

¶176 All dateTime values MUST fully specify the date.

¶177 The NotBefore and NotOnOrAfter attributes are optional. If the value is omitted it is unspecified. If the NotBefore attribute is unspecified the assertion is valid on any date up to but excluding the date specified in the NotOnOrAfter attribute . If the NotOnOrAfter attribute is unspecified the assertion is valid from the NotBefore attribute with no expiry. If neither element is specified the assertion is valid at any time.

¶178 In accordance with the XML Schema Specifications, all time instances are interpreted in Universal Coordinated Time unless they explicitly indicate a time zone.

¶179 Implementations MUST NOT generate time instances that specify leap seconds.

¶180 For purposes of comparison, the time interval NotBefore to NotOnOrAfter begins at the earliest time instant compatible with the specification of NotBefore and has ended at the earliest time instant compatible with the specification of NotOnOrAfter

¶181 For example if the time interval specified is dayT12:03:02 to dayT12:05:12 the times 12:03:02.00 and 12:05:11.9999 are within the time interval. The time 12:05:12.0000 is outside the time interval.

¶182 The following schema defines the <ValidityInterval> element:

   <!-- ValidityInterval -->
   <element name="ValidityInterval" type="xkms:ValidityIntervalType"/>
   <complexType name="ValidityIntervalType">
      <attribute name="NotBefore" type="dateTime"/>
      <attribute name="NotOnOrAfter" type="dateTime"/>
   </complexType>
   <!-- /ValidityInterval -->

4.2.6 Element <KeyUsage>

¶183 The <KeyUsage> element specifies one or more intended uses of the key. If no <KeyUsage> is specified all uses are permitted.

xkms:Encryption
The key pair may be used for encryption and decryption
xkms:Signature
The key pair may be used for signature and verification
xkms:Exchange
The key pair may be used for key exchange

¶184 If a key usage is specified that the algorithm does not support (e.g. use of a DSA key for encryption) the element MUST be ignored.

¶185 The following schema defines the <KeyUsage> element:

   <!-- KeyUsage -->
   <element name="KeyUsage" type="xkms:KeyUsageType"/>
   <simpleType name="KeyUsageType">
      <restriction base="QName">
         <enumeration value="xkms:Encryption"/>
         <enumeration value="xkms:Signature"/>
         <enumeration value="xkms:Exchange"/>
      </restriction>
   </simpleType>
   <!-- /KeyUsage -->

4.2.7 Element <UseKeyWith>

¶186 The  <UseKeyWith> element specifies a subject and application protocol for which the keys specified in the enclosing key binding may be used.

Application     [Required]
A URI that specifies the application protocol with which the key may be used
Identifier     [Required]
Specifies the subject to which the key corresponds within the specified application protocol.

¶187 The following table lists application URIs for common protocols and the corresponding format for the identifier information:

Protocol Application URI Identifier Type
S/MIME urn:ietf:rfc:2633 SMTP email address of subject RFC822 addr-spec
PGP urn:ietf:rfc:2440 SMTP email address of subject RFC822 addr-spec
SSL/HTTPS urn:ietf:rfc:2817 URI of http address URL
SSL/SMTP urn:ietf:rfc:2487 DNS address of mail server DNS Address
IPSEC urn:ietf:rfc:2401 IP address of network resource IP Address

¶188 The following table describes the formatting for the specified types of identifier:

Identifier Type Example Description
RFC822 addr-spec bob@cryptographer.test The addr-spec fragment of an RFC 822 email address as used by SMTP
URL https://secret.commerce.test/ A Uniform Resource Locator
DNS Address secret.commerce.test An Internet DNS address
IP Address 10.23.0.20 An IPv4 address in decimal notation

¶189 The following schema defines the <UseKeyWith> element:

   <!-- UseKeyWith -->
   <element name="UseKeyWith" type="xkms:UseKeyWithType"/>
   <complexType name="UseKeyWithType">
      <attribute name="Application" type="anyURI"/>
      <attribute name="Identifier" type="string"/>
   </complexType>
   <!-- /UseKeyWith -->

4.2.8 Element <Reason>

¶190 The <Reason> element is used to specify a string that specifies a reason for a particular assertion status.

¶191 If the Trust service returns the AssertionStatus value Valid, the <Reason> elements list the status aspects that have been affirmatively verified to be Valid. If the service returns the AssertionStatus value Invalid the Reason element lists the aspects of status that have been determined to be either Invalid or Indeterminate. If the service returns the AssertionStatus value Indeterminate the Reason element lists the aspects of status that have been determined to be Indeterminate.

¶192 The status aspects are defined in the table below. For convenience the equivalent X509 processing steps are given:

¶193 Reason

¶194 Description

¶195 X.509 Equivalent

Valid Invalid

¶196 IssuerTrust

¶197 The issuer of the information on which the key binding assertion is based is considered to be trustworthy by the Trust service.

¶198 Certificate path anchored by trusted root successfully constructed

Certificate path could not be constructed to a trusted root

¶199 RevocationStatus

¶200 The Trust service has affirmatively verified the status of the key binding assertion with an authoritative source

¶201 Certificate status validated using CRL or OCSP

Certificate status returned revoked or suspended.

¶202 ValidityInterval

¶203 The requested time instant was within the validity interval of the key binding assertion

¶204 The certificate chain was valid at the requested time instant.

The requested time instant was before or after the certificate chain validity interval

¶205 Signature

¶206 Signature on signed data provided by the client in the <ds:Keyinfo> element (e.g. X509Data element) was successfully verified.

¶207 Certificate Signature verified

Certificate Signature verification failed

¶208 If the Reason code ValidityInterval is returned with a Status code of Invalid additional information MAY be provided in the <ValidityInterval> element of the KeyBinding. If only the NotOnOrAfter attribute is specified it indicates that the specified time instant is before the credential became valid. If only the NotAfter attribute is specified it indicates that either the credential expired or was revoked. If both the NotOnOrAfter and NotAfter attributes are specified it is likely that the credential was suspended and MAY be reinstated at a later time.

¶209 The following schema defines the <Reason> element and the ReasonCodeType type:

   <!-- Reason -->
   <element name="Reason" type="xkms:ReasonEnumType"/>
   <simpleType name="ReasonEnumType">
      <restriction base="QName">
         <enumeration value="IssuerTrust"/>
         <enumeration value="Status"/>
         <enumeration value="ValidityInterval"/>
         <enumeration value="Signature"/>
      </restriction>
   </simpleType>
   <!-- /Reason -->

4.2.9 Validate Request Element <ValidateRequest>

¶210 The validate request message contains a <ValidateRequest> element:

<KeyBindingQuery>     [Required]
A single KeyBinding structure that is to be completed and validated.

¶211 The following schema defines the <ValidateRequest> element:

   <!-- ValidateRequest -->
   <element name="ValidateRequest" type="xkms:ValidateRequestType"/>
   <complexType name="ValidateRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBindingQuery"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <element name="KeyBindingQuery" type="xkms:KeyBindingType"/>
   <!-- /ValidateRequest -->

4.2.10 Validate Response Element <ValidateResult>

¶212 The validate response message contains a <ValidateResult> element:

<Keybinding>     [Any Number]
A sequence of <KeyBinding> structures that contain the results of the validation. If no results are found the sequence is empty and the <ResultCode>NoMatch returned. In some circumstances a Locate operation MAY return multiple matching results.

¶213 The following schema defines the <ValidateResult> element and the ValidateResultType type.

   <!-- ValidateResult -->
   <element name="ValidateResult" type="xkms:ValidateResultType"/>
   <complexType name="ValidateResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /ValidateResult -->

5 Key Registration Service Overview

¶214 The XML Key Registration Service Specification permits management of information that is bound to a public key pair. The XKRSS service specification supports the following operations:

Register
Information is bound to a public key pair through a key binding
Reissue
A previously registered key binding is reissued.
Revoke
A previously registered key binding is revoked.
Recover
The private key associated with a key binding is recovered.

¶215 The Register operation does not in itself place any requirement on the Registration Service to communicate that information to any other party. In most applications, however, a Registration Service will provide key information to other trust services such as those described in the XKMS specification or a separate underlying PKI such as PKIX.

5.1 Registration

¶216 The Register request is used to assert a binding of information to a public key pair. Generation of the public key pair MAY be performed by either the client or the Registration service.

¶217 The Registration request message contains a prototype of the requested assertion. The Registration Service MAY require the client to provide additional information to authenticate the request. If the public key pair is generated by the client, the service MAY require the client to provide Proof of Possession of the private key.

¶218 The Registration service MAY accept the name specified in the prototype or MAY substitute its own name.

¶219 On receipt of a registration request, the registration service verifies the authentication and POP information provided (if any). If the registration service accepts the request an assertion is registered. This assertion MAY include some, all or none of the information provided by the prototype assertion and MAY include additional information.

¶220 The Registration Service MAY return part or all of the registered assertion to the client.

¶221 Diagram shows the data passed from the client to the server for registration

¶222 Figure 5: Registration of a KeyBinding

5.1.1 Example: Registration of Client-Generated Key Pair

¶223 Alice requests registration of an RSA key pair for her email address Alice@cryptographer.test. Alice has previously received from the trust service the code "024837" with which to authenticate her request. Alice selects the pass phrase "Help I have revealed my key" to authenticate herself should it be necessary to revoke the registration at a later date.

¶224 The X-KRSS request message contains the following <Register> element:

<?xml version="1.0" encoding="utf-8" ?>
<Register>
   <Prototype Id="keybinding">
      <Status>Valid</Status>
      <KeyID>mailto:Alice@cryptographer.test</KeyID>
      <ds:KeyInfo>
         <ds:KeyValue>
            <ds:RSAKeyValue>
               <ds:Modulus>
               998/T2PUN8HQlnhf9YIKdMHHGM7HkJwA56UD0a1oYq7E
               fdxSXAidruAszNqBoOqfarJIsfcVKLob1hGnQ/l6xw
               </ds:Modulus>
               <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
         </ds:KeyValue>
         <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
      </ds:KeyInfo>
      <PassPhrase>Pass</PassPhrase>
   </Prototype>
   <AuthInfo>
      <AuthUserInfo>
         <ProofOfPossession>
            <ds:Signature URI="#keybinding"
                  [RSA-Sign (KeyBinding, Private)] />
         </ProofOfPossession>
         <KeyBindingAuth>
            <ds:Signature URI="#keybinding"
                  [HMAC-SHA1 (KeyBinding, Auth)] />
         </KeyBindingAuth>
      </AuthUserInfo>
   </AuthInfo>
   <Respond>
      <string>KeyName<string>
      <string>KeyValue</string>
      <string>RetrievalMethod</string>
   </Respond>
</Register>

¶225 Where:

¶226 Auth = HMAC-SHA1 ("024837", 0x1)
Pass = HMAC-SHA1 (HMAC-SHA1 ("helpihaverevealedmykey", 0x2), 0x3)

¶227 For clarity, the details of the signature elements are omitted. In each case the signature scope is the <KeyBinding> element and the signature scope is specified by reference. The MAC function used in this case is HMAC-SHA1 as defined in [RFC-2104]. The notation f(m, k) is used to indicate the message m signed under the key k. Further details are provided in section 6.1 .

¶228 The service accepts the registration and returns the following response:

<?xml version="1.0" encoding="utf-8" ?>
<RegisterResult>
   <Result>Success</Result>
   <Answer>
      <Status>Valid</Status>
      <KeyID>mailto:Alice@cryptographer.test</KeyID>
      <ds:KeyInfo>
         <ds:RetrievalMethod
              URI="http://www.PKeyDir.test/Certificates/01293122"
              Type="http://www.w3.org/2000/09/xmldsig#X509Data"/>
         <ds:KeyValue>
            <ds:RSAKeyValue>
               <ds:Modulus>998/T2PUN8HQlnhf9YIKdMHHGM7HkJwA56UD0a1oYq7Ef
               dxSXAidruAszNqBoOqfarJIsfcVKLob1hGnQ/l6xw</ds:Modulus>
               <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
         </ds:KeyValue>
         <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
      </ds:KeyInfo>
   </Answer>
</RegisterResult>

5.1.2 Example: Registration of Service-Generated Key Pair

¶229 The request for registration of a service generated key pair omits the public key data and requests that private key data be returned with the response.

<?xml version="1.0" encoding="utf-8" ?>
<Register>
   <Prototype Id="keybinding">
      <Status>Valid</Status>
      <KeyID>mailto:Alice@cryptographer.test</KeyID>
      <KeyInfo>
         <ds:KeyInfo>
            <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
         </ds:KeyInfo>
      </KeyInfo>
      <PassPhrase>Pass</PassPhrase>
   </Prototype>
   <AuthInfo>
      <AuthServerInfo>
         <KeyBindingAuth>
            <ds:Signature URI="#keybinding"
               [HMAC-SHA1 (Prototype, Auth)] />
         </KeyBindingAuth>
      </AuthServerInfo>
   </AuthInfo>
   <Respond>
      <string>KeyName</string>
      <string>KeyValue</string>
      <string>Private</string>
   </Respond>
</Register>


¶230 Where

¶231 Auth = HMAC-SHA1 ("024837", 0x1)
Pass = HMAC-SHA1 (HMAC-SHA1 ("helpihaverevealedmykey", 0x2), 0x3)

¶232 The response includes both the public key data and the encrypted private key:

<?xml version="1.0" encoding="utf-8" ?>
<RegisterResult>
   <Result>Success</Result>
   <Answer>
      <KeyBinding>
         <Status>Valid</Status>
         <KeyID>mailto:Alice@cryptographer.test</KeyID>
         <ds:KeyInfo>
            <ds:KeyValue>
               <ds:RSAKeyValue>
                  <ds:Modulus>998/T2PUN8HQlnhf9YIKdMHHGM7HkJwA56UD0a1oY
                  q7EfdxSXAidruAszNqBoOqfarJIsfcVKLob1hGnQ/l6xw
                  </ds:Modulus>
                  <ds:Exponent>AQAB</ds:Exponent>
               </ds:RSAKeyValue>
            </ds:KeyValue>
            <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
         </ds:KeyInfo>
      <KeyBinding>
   </Answer>
   <Private> Base64 ( 3DES ( RSAPrivate, Enc)) </Private>
</RegisterResult>


5.2 Reissue

¶233 A Registration service MAY permit clients to reissue previously issued assertions. A reissue request is made in the same manner as the initial registration of a key.

¶234 The principal reason a client would make a Reissue request is to cause the registration service to generate new credentials in the underlying PKI, e.g. X.509 Certificates.

5.2.1 Example: Reissue

¶235 Alice requests reissue of her previously issued RSA key pair for her email address.

¶236 The X-KRSS request message contains the following <Reissue> element:

<?xml version="1.0" encoding="utf-8" ?>
<Reissue>
   <Prototype Id="keybinding">
      <Status>Valid</Status>
      <KeyID>mailto:Alice@cryptographer.test</KeyID>
      <ds:KeyInfo>
         <ds:KeyValue>
            <ds:RSAKeyValue>
               <ds:Modulus>
               998/T2PUN8HQlnhf9YIKdMHHGM7HkJwA56UD0a1oYq7E
               fdxSXAidruAszNqBoOqfarJIsfcVKLob1hGnQ/l6xw
               </ds:Modulus>
               <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
         </ds:KeyValue>
         <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
      </ds:KeyInfo>
      <PassPhrase>Pass</PassPhrase>
   </Prototype>
   <AuthInfo>
      <AuthUserInfo>
         <ProofOfPossession>
            <ds:Signature URI="#keybinding"
                  [RSA-Sign (KeyBinding, Private)] />
         </ProofOfPossession>
         <KeyBindingAuth>
            <ds:Signature URI="#keybinding"
                  [HMAC-SHA1 (KeyBinding, Auth)] />
         </KeyBindingAuth>
      </AuthUserInfo>
   </AuthInfo>
   <Respond>
      <string>KeyName<string>
      <string>KeyValue</string>
      <string>RetrievalMethod</string>
   </Respond>
</Register>



¶237 Where:

¶238 Auth = HMAC-SHA1 ("024837", 0x1)
Pass = HMAC-SHA1 (HMAC-SHA1 ("helpihaverevealedmykey", 0x2), 0x3)

¶239 For clarity, the details of the signature elements are omitted. In each case the signature scope is the <KeyBinding> element and the signature scope is specified by reference. The MAC function used in this case is HMAC-SHA1 as defined in [RFC-2104]. The notation f(m, k) is used to indicate the message m signed under the key k. Further details are provided in section 6.1 .

¶240 The service accepts the registration and returns the following response:

<?xml version="1.0" encoding="utf-8" ?>
<ReissueResult>
   <Result>Success</Result>
   <Answer>
      <Status>Valid</Status>
      <KeyID>mailto:Alice@cryptographer.test</KeyID>
      <ds:KeyInfo>
         <ds:RetrievalMethod
              URI="http://www.PKeyDir.test/Certificates/01293122"
              Type="http://www.w3.org/2000/09/xmldsig#X509Data"/>
         <ds:KeyValue>
            <ds:RSAKeyValue>
               <ds:Modulus>998/T2PUN8HQlnhf9YIKdMHHGM7HkJwA56UD0a1oYq7Ef
               dxSXAidruAszNqBoOqfarJIsfcVKLob1hGnQ/l6xw</ds:Modulus>
               <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
         </ds:KeyValue>
         <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
      </ds:KeyInfo>
   </Answer>
</RegisterResult>




5.3 Revocation

¶241 A Registration service MAY permit clients to revoke previously issued assertions. A revocation request is made in the same manner as the initial registration of a key except that:

5.3.1 Example: Revocation

¶242 For some reason Alice requests the Registration Service revoke the binding for her public key. Alice authenticates herself using by signing her request with the corresponding private key. Alice could have used the pass phrase she established during registration instead.

¶243 The request message is:

<?xml version="1.0" encoding="utf-8" ?>
<Register>
   <Prototype Id="keybinding">
      <Status>Invalid</Status>
      <KeyID>mailto:Alice@cryptographer.test</KeyId>
      <ds:KeyInfo>
         <ds:KeyValue>
            <ds:RSAKeyValue>
               <ds:Modulus>998/T2PUN8HQlnhf9YIKdMHHGM7HkJwA56UD0a1oYq7E
               fdxSXAidruAszNqBoOqfarJIsfcVKLob1hGnQ/l6xw</ds:Modulus>
               <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
         </ds:KeyValue>
         <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
      </ds:KeyInfo>
   </Prototype>
   <AuthInfo>
      <AuthUserInfo>
         <ProofOfPossession>
            <ds:Signature URI="#keybinding"
                  [RSA-Sign (KeyBinding, Private)] />
         </ProofOfPossession>
      </AuthUserInfo>
   </AuthInfo>
   <Respond>
      <string>KeyName</string>
      <string>KeyValue</string>
   </Respond>
</Register>

¶244 The service responds that the key binding has been revoked:

<?xml version="1.0" encoding="utf-8" ?>
<RequestResult>
   <Result>Success</Result>
   <Answer>
      <Status>Invalid</Status>
      <KeyID>mailto:Alice@cryptographer.test</KeyID>
      <ds:KeyInfo>
         <ds:KeyValue>
            <ds:RSAKeyValue>
               <ds:Modulus>998/T2PUN8HQlnhf9YIKdMHHGM7HkJwA56UD0a1oYq7E
               fdxSXAidruAszNqBoOqfarJIsfcVKLob1hGnQ/l6xw</ds:Modulus>
               <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
         </ds:KeyValue>
         <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
      </ds:KeyInfo>
   </Answer>

5.4 Key Recovery

¶245 A Registration service MAY permit clients to request key recovery. A key recovery request is made in the same manner as the initial registration of a key except that:

5.4.1 Example: Key Recovery

¶246 Alice has forgotten the private key she registered earlier. She first contacts the administrator of the key recovery service using an out-of-band authentication procedure determined by site policy. The key recovery administrator issues to Alice (using an out of band method) the key recovery authorization code "A8centerS H93HU C9H29 8Y43U H9J3 I23". In this case the code is read over the telephone and so it would be inconvenient to be required to specify spacing between the code blocks or capitalization.

¶247 The request parameters for the key recovery are:

<?xml version="1.0" encoding="utf-8" ?>
<Register>
   <Prototype>
      <Status>Indeterminate</Status>
      <KeyID>mailto:Alice@cryptographer.test</KeyId>
      <ds:KeyInfo>
         <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
      </ds:KeyInfo>
   </Prototype>
   <AuthInfo>
      <PassPhraseAuth>Auth</PassPhraseAuth>
   </AuthInfo>
   <Respond>
      <string>KeyName</string>
      <string>KeyValue</string>
      <string>Private</string>
   </Respond>

¶248 Where

¶249    Auth = HMAC-SHA1 ("a8centersh93huc9h298y43uh9j3i23", 0x1)

¶250 The registration service policy is to revoke a private key whenever key recovery is performed. The service returns the revoked key binding and the private key parameters:

<?xml version="1.0" encoding="utf-8" ?>
<RegisterResult>
   <Answer>
      <Status>Invalid</Status>
      <KeyID>mailto:Alice@cryptographer.test</KeyID>
      <ds:KeyInfo>
         <ds:KeyValue>
            <ds:RSAKeyValue>
               <ds:Modulus>998/T2PUN8HQlnhf9YIKdMHHGM7HkJwA56UD0a1oYq7E
               fdxSXAidruAszNqBoOqfarJIsfcVKLob1hGnQ/l6xw</ds:Modulus>
               <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
         </ds:KeyValue>
         <ds:KeyName>mailto:Alice@cryptographer.test</ds:KeyName>
      </ds:KeyInfo>
   </Answer>
   <Private> Base64 ( 3DES ( RSAPrivate, Enc)) </Private>

¶251 Where:

¶252 Enc = HMAC-SHA1 ("a8centersh93huc9h298y43uh9j3i23", 0x4)
RSAPrivate = "

<?xml version="1.0" encoding="utf-8" ?>
<RSAKeyPair>
   <ds:Modulus>998/T2PUN8HQlnhf9YIKdMHHGM7HkJwA56UD0a1oYq7EfdxSXAidr
   uAszNqBoOqfarJIsfcVKLob1hGnQ/l6xw </ds:Modulus>
   <PublicExponent>AQAB</PublicExponent>
   <PrivateExponent>whatever</PrivateExponent>
   <P>whatever</P>
   <Q>whatever</Q>
</RSAKeyPair>



5.5 Request Authentication

¶253 The Service SHOULD ensure that all requests are valid.

¶254 Authenticity: The request message originated from the specified party.

¶255 Integrity: The request message has not been modified.

¶256 Possession: If a public key is specified in a registration request, proof that the request is authorized by a party that has access to the corresponding private key.

¶257 Registration services set their own authentication policy. This specification defines an authentication mechanism that employs a shared secret established out of band between the client and the Registration Service.

¶258 Services SHOULD require that clients demonstrate Proof of Possession of the private key components of a public key if a request is made to register a valid assertion bound to that public key.

¶259 Services SHOULD accept Proof of Possession of the private key component of a public key to effect revocation of any assertion bound to that key.

6 Key Registration Service Message Set

¶260 The protocol operations consist of a remote procedure call that consists of a single request message sent by the client to the Registration Service followed by a single response message sent by the server to the client. 

6.1 Registration

¶261 The Request message specifies a <Prototype> element that has the type KeyBinding and provides the prototype for the key binding to be registered.

¶262 The <Prototype> element may contain only partial information, a key without a name or a name without a key. In this case, the client is requesting that the Registration Service provide the additional information required to complete the binding.

¶263 For example, the client may not specify the public key parameters because the public and private key pair is to be generated by the Registration Service.

6.1.1 Element <Authentication>

¶264 The  <Authentication> element is used to authenticate the <keybinding> element within an XKRSS request.

<ProofOfPossesion>     [Optional]
Proof of possession of the public key component of the key binding.
<KeyBindingAuthentication>     [Optional]
Authentication of the key binding by means of a signature using a previously established key.
<PassPhraseAuthentication>     [Optional]
Plaintext data used to authenticate the registration request that is not bound to the key binding.

¶265 The following schema defines the <Authentication> element:

   <!-- Authentication -->
   <element name="Authentication" type="xkms:AuthenticationType"/>
   <complexType name="AuthenticationType">
      <sequence>
         <element ref="xkms:ProofOfPossession" minOccurs="0"/>
         <element ref="xkms:KeyBindingAuthentication" minOccurs="0"/>
         <element ref="xkms:PassPhraseAuthentication" minOccurs="0"/>
      </sequence>
   </complexType>
   <!-- Authentication -->
   <!-- PassPhraseAuthentication -->
   <element name="PassPhraseAuthentication" type="string"/>
   <!-- /PassPhraseAuthentication -->
   <!-- KeyBindingAuthentication -->
   <element name="KeyBindingAuthentication" 
         type="xkms:KeyBindingAuthenticationType"/>
   <complexType name="KeyBindingAuthenticationType">
      <sequence>
         <element ref="ds:Signature"/>
      </sequence>
   </complexType>
   <!-- /KeyBindingAuthentication -->
   <!-- ProofOfPossession -->
   <element name="ProofOfPossession" type="xkms:ProofOfPossessionType"/>
   <complexType name="ProofOfPossessionType">
      <sequence>
         <element ref="ds:Signature"/>
      </sequence>
   </complexType>
   <!-- /ProofOfPossession -->
   <!-- Private -->
   <element name="Private" type="xkms:PrivateType"/>
   <complexType name="PrivateType">
      <sequence>
         <element ref="xenc:EncryptedData"/>
      </sequence>
   </complexType>
   <!-- /Private -->
   <!-- RegisterRequest -->
   <element name="RegisterRequest" type="xkms:RegisterRequestType"/>
   <complexType name="RegisterRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:Prototype"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <element name="Prototype" type="xkms:KeyBindingType"/>
   <!-- /RegisterRequest -->
   <!-- RegisterResult -->
   <element name="RegisterResult" type="xkms:RegisterResultType"/>
   <complexType name="RegisterResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
               <element ref="xkms:Private" minOccurs="0"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RegisterResult -->
   <!-- ReissueRequest -->
   <element name="ReissueRequest" type="xkms:ReissueRequestType"/>
   <complexType name="ReissueRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /ReissueRequest -->
   <!-- ReissueResult -->
   <element name="ReissueResult" type="xkms:ReissueResultType"/>
   <complexType name="ReissueResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /ReissueResult -->
   <!-- RevokeRequest -->
   <element name="RevokeRequest" type="xkms:RevokeRequestType"/>
   <complexType name="RevokeRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RevokeRequest -->
   <!-- RevokeResult -->
   <element name="RevokeResult" type="xkms:RevokeResultType"/>
   <complexType name="RevokeResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RevokeResult -->
   <!-- RecoverRequest -->
   <element name="RecoverRequest" type="xkms:RecoverRequestType"/>
   <complexType name="RecoverRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RecoverRequest -->
   <!-- RecoverResult -->
   <element name="RecoverResult" type="xkms:RecoverResultType"/>
   <complexType name="RecoverResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
               <element ref="xkms:Private" minOccurs="0"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RecoverResult -->
   <!-- RSAKeyPair -->
   <element name="RSAKeyPair" type="xkms:RSAKeyPairType"/>
   <complexType name="RSAKeyPairType">
      <sequence>
         <element name="Modulus" type="ds:CryptoBinary"/>
         <element name="PublicExponent" type="ds:CryptoBinary"/>
         <element name="PrivateExponent" type="ds:CryptoBinary"/>
         <element name="P" type="ds:CryptoBinary" minOccurs="0"/>
         <element name="Q" type="ds:CryptoBinary" minOccurs="0"/>
      </sequence>
   </complexType>
   <!-- /RSAKeyPair -->
   <!-- End Schema -->
</schema>

6.1.2 Element <PassPhraseAuthentication>

¶266 The <PassPhraseAuthentication> contains a plaintext limited use shared secret that is used to authenticate the request.

¶267 NB: This element is provided to support applications in which the authentication scheme requires the server to have plaintext access to the authentication data. The authentication data is not securely bound to the request and thus the element MUST NOT be employed except in circumstances where the message or transport protocol provides adequate protection of both confidentiality and integrity.

¶268 The following schema defines the <PassPhraseAuthentication> element:

   <!-- PassPhraseAuthentication -->
   <element name="PassPhraseAuthentication" type="string"/>
   <!-- /PassPhraseAuthentication -->

6.1.3 Element <KeyBindingAuthentication>

¶269 The <KeyBindingAuthentication> element: contains a XML Signature element that is used to authenticate the <KeyBinding> request using a previously established key. The signature scope is the <KeyBinding> prototype using the public key that is to be registered.

<ds:Signature>     [Required]
An XML Signature element that contains a detached signature over the <KeyBinding> element.

¶270 The following schema defines the <KeyBindingAuthentication> element:

   <!-- KeyBindingAuthentication -->
   <element name="KeyBindingAuthentication" 
         type="xkms:KeyBindingAuthenticationType"/>
   <complexType name="KeyBindingAuthenticationType">
      <sequence>
         <element ref="ds:Signature"/>
      </sequence>
   </complexType>
   <!-- /KeyBindingAuthentication -->

6.1.4 Element <ProofOfPossession>

¶271 The <ProofOfPossession> element contains a XML Signature element. The signature scope is the <KeyBinding> prototype using the public key that is to be registered. The private key component of the public key contained within the <KeyBinding> is used to generate the signature.

<ds:Signature>     [Required]
An XML Signature element that contains a detached signature over the <KeyBinding> element. The signing key is the key identified by the ds:KeyInfo element within the <KeyBinding> element.

¶272 The following schema defines the <ProofOfPossession> element:

   <!-- ProofOfPossession -->
   <element name="ProofOfPossession" type="xkms:ProofOfPossessionType"/>
   <complexType name="ProofOfPossessionType">
      <sequence>
         <element ref="ds:Signature"/>
      </sequence>
   </complexType>
   <!-- /ProofOfPossession -->

6.1.5 Element <Private>

¶273 The <Private> element contains the encrypted private key parameters returned by the service in a response to a registration request with server generated keys or a response to a successful recovery request.

<xenc:EncryptedData>     [Required]
The encrypted private key data

¶274 The following schema defines the <Private> element:

   <!-- Private -->
   <element name="Private" type="xkms:PrivateType"/>
   <complexType name="PrivateType">
      <sequence>
         <element ref="xenc:EncryptedData"/>
      </sequence>
   </complexType>
   <!-- /Private -->

6.1.6 Register Request Element <RegisterRequest>

¶275 The register request message contains a <RegisterRequest> element that contains the following elements:

<Prototype>     [Required]
Specifies elements that the client requests be registered.
<Authentication>     [Required]
Information that authenticates the request.

¶276 The following schema defines the <RegisterRequest> element:

   <!-- RegisterRequest -->
   <element name="RegisterRequest" type="xkms:RegisterRequestType"/>
   <complexType name="RegisterRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:Prototype"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <element name="Prototype" type="xkms:KeyBindingType"/>
   <!-- /RegisterRequest -->

6.1.7 Register Response Element<RegisterResult>

¶277 The register response message contains a <RegisterResult> element that contains the following elements:

<KeyBinding>     [Any number]
If present specifies the key binding that was registered by the service
<Private>     [Optional]
The values of the private key parameters of a private key generated by the Registration Service

¶278 The following schema defines the <RegisterResult> element:

   <!-- RegisterResult -->
   <element name="RegisterResult" type="xkms:RegisterResultType"/>
   <complexType name="RegisterResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
               <element ref="xkms:Private" minOccurs="0"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RegisterResult -->

6.1.8 Reissue Request Element<ReissueRequest>

¶279 The reissue request message contains a <ReissueRequest> element that contains the following elements:

< KeyBinding >     [Required]
Identifies the key binding to be reissued
<Authentication>     [Required]
Information that authenticates the request.

¶280 The following schema defines the <ReissueRequest> element:

   <!-- ReissueRequest -->
   <element name="ReissueRequest" type="xkms:ReissueRequestType"/>
   <complexType name="ReissueRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /ReissueRequest -->

6.1.9 Reissue Response Element<ReissueResult>

¶281 The reissue response message contains a <ReissueResult> element that contains the following element:

<KeyBinding>    [Any Number]
If present specifies the key binding(s) that were reissued by the service

¶282  The following schema defines the <ReissueResult> element:

   <!-- ReissueResult -->
   <element name="ReissueResult" type="xkms:ReissueResultType"/>
   <complexType name="ReissueResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /ReissueResult -->

6.1.10 Revoke Request Element <RevokeRequest>

¶283 The revoke request message contains a <RevokeRequest> element that contains the following elements:

< KeyBinding >     [Required]
Identifies the key binding to be revoked.
<Authentication>     [Required]
Information that authenticates the request.

¶284 The following schema defines the <RevokeRequest> element:

   <!-- RevokeRequest -->
   <element name="RevokeRequest" type="xkms:RevokeRequestType"/>
   <complexType name="RevokeRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RevokeRequest -->

6.1.11 Revoke Response Element<RevokeResult>

¶285 The request message contains a <RevokeResult> element that contains the following element:

<KeyBinding>    [Any Number]
If present specifies the key binding that was revoked by the service

¶286 [Status will be Invalid if successful]

¶287 The following schema defines the <RevokeResult> element:

   <!-- RevokeResult -->
   <element name="RevokeResult" type="xkms:RevokeResultType"/>
   <complexType name="RevokeResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RevokeResult -->

6.1.12 Recover Request Element<RecoverRequest>

¶288 The recover request message contains a <RecoverRequest> element that contains the following elements:

< KeyBinding >     [Required]
Identifies the key binding to be recovered.
<Authentication>     [Required]
Information that authenticates the request.

¶289 The following schema defines the <RecoverRequest> element:

   <!-- RecoverRequest -->
   <element name="RecoverRequest" type="xkms:RecoverRequestType"/>
   <complexType name="RecoverRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RecoverRequest -->

6.1.13 Recover Response Element<RecoverResult>

¶290 The request message contains a <RecoverResult> element that contains the following elements:

< KeyBinding >     [Any Number]
May be present to advertise a change to the status of the key binding made as a result of the key recovery.
<Private>    [Optional]
The values of the private key parameters of the recovered private key

¶291 The following schema defines the <RecoverResult> element:

   <!-- RecoverResult -->
   <element name="RecoverResult" type="xkms:RecoverResultType"/>
   <complexType name="RecoverResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
               <element ref="xkms:Private" minOccurs="0"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RecoverResult -->

7 Cryptographic Algorithm Specific Parameters

7.1 Use of Limited-Use Shared Secret Data

¶292 It is frequently necessary or desirable to use a limited use shared secret for authentication (i.e. a one time use PIN or pass phrase) to authenticate registration request messages. In particular a private key cannot be used for authentication until the corresponding public key has been registered.

¶293 In addition it is desirable that private key parameters generated or recovered by the registration service be returned encrypted. It is convenient to use symmetric data for this purpose.

¶294 Since human users are the most demanding in terms of interface requirements the handling of symmetric key data is designed for the needs of clients supporting human users directly. Symmetric keying data is typically issued to a human user in the form of a text string which may in some circumstances be read over a telephone line. The authentication data itself MAY be randomly generated and represent an underlying numeric value, or MAY be a password or phrase. In either case it is most convenient to present the value to the human user as a string of characters in a character set the particular user understands.

¶295 Keying material is derived from the shared string using a MAC function. Different MAC keying values are used according to the use of the symmetric key derived as follows:

¶296 Value

¶297 Application

¶298 0x1

¶299 Authentication

¶300 0x2

¶301 Encoding of Pass Phrase - Pass 1

¶302 0x3

¶303 Encoding of Pass Phrase - Pass 2

¶304 0x4

¶305 Encryption of private key data

¶306 If the output of the MAC function provides more keying material than is required for a cryptographic operation (i.e. encryption, MAC), the lowest significant bits are used.

¶307 If the output of the MAC function provides less keying material than is required the first MAC output value is used to supply the least significant 160 bits of keying material. A second MAC output value is then obtained by applying the MAC function to the shared string again, this time the MAC keying value is obtained by XOR-ing the first output with the previous keying value. This process may be repeated as many times as necessary to produce a sufficient amount of keying material.

7.1.1 Element <RSAKeyPair>

¶308 The <RSAKeyPair> element specifies the public and private parameters of an RSA Key Pair.

<Modulus> (Required)
The modulus
<PublicExponent> (Required)
The public exponent
<PrivateExponent> (Required)
The private exponent
<P> (Optional)
The prime parameter P
<Q> (Optional)
The prime parameter Q

¶309 The public and private parameters for the RSA algorithm are generated from the parameters p and q. Although private key operations may be performed using the private modulus alone knowledge of the generator parameters permits optimizations such as the Chinese Remainder Theorem to be applied. Accordingly the private key element permits these to be specified.

¶310  The following schema defines the <RSAKeyPair> element:

   <!-- RSAKeyPair -->
   <element name="RSAKeyPair" type="xkms:RSAKeyPairType"/>
   <complexType name="RSAKeyPairType">
      <sequence>
         <element name="Modulus" type="ds:CryptoBinary"/>
         <element name="PublicExponent" type="ds:CryptoBinary"/>
         <element name="PrivateExponent" type="ds:CryptoBinary"/>
         <element name="P" type="ds:CryptoBinary" minOccurs="0"/>
         <element name="Q" type="ds:CryptoBinary" minOccurs="0"/>
      </sequence>
   </complexType>
   <!-- /RSAKeyPair -->

8 Security Considerations

¶311 Implementations SHOULD consider the following security issues.

8.1 Replay Attacks

¶312 Implementations SHOULD ensure that replay of a previous XKMS response is not possible.

¶313 The precise mechanism by which replay attacks are prevented is left to the implementation. For example generic mechanism built into the object exchange protocol if specified MAY be used.

¶314 A generally applicable means of preventing a replay attack is to place a token in each message that demonstrates to the recipient that the message is 'fresh', for example:

¶315 Freshness tokens MAY be encoded as XML Signature Properties.

8.2 Denial of Service

¶316 Trust Services SHOULD take measures to prevent or mitigate denial of service attacks. In particular Trust Services SHOULD NOT perform an unlimited number of resource intensive operations unless the request comes from an authenticated source. Potentially resource intensive operations include:

8.3 Recovery Policy

¶317 Key recovery policy is left as an implementation decision.

¶318 Depending on the implementation and application a key recovery operation MAY involve an unacceptable loss of confidence in the security of a private key component. This may lead to the possibility of repudiation of a signed document or of accountability in the case of an encrypted document.

¶319 Services SHOULD carefully assess the extent to which a recovery operation compromises a private key and apply sufficient controls such as the revocation of the underlying key binding as appropriate.

8.4 Security of Limited Use Shared Secret

¶320 If a limited use shared secret is used care must be taken to ensure that the secret is not revealed to an attacker. A means of protecting the confidentiality of the shared secret SHOULD be employed. This MAY be a message level or transport level protocol that protects both encryption and integrity such as SSL.

¶321 Note that merely encrypting the shared secret does not provide adequate security since the <PassPhraseAuth> element is not cryptographically bound to the message.

9 Acknowledgments

¶322 The authors also acknowledge the extensive assistance provided in the design stage of this specification by David Solo (CitiGroup), and the contributions of Steve Farrell (Baltimore), Mack Hicks (Bank of America), Andrew Layman  (Microsoft), Dr Paul Boisen (NSA),  Dan Guinan, Marc Hayes, Alex Deacon, Mingliang Pei (VeriSign).

Appendix A Schemas

A.1 XKMS Schema

<?xml version="1.0"?>
<schema targetNamespace="http://www.w3.org/2002/03/xkms#" 
      xmlns="http://www.w3.org/2001/XMLSchema" 
      xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" 
      xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 
      xmlns:xkms="http://www.w3.org/2002/03/xkms#" 
      elementFormDefault="qualified" attributeFormDefault="unqualified">
   <import namespace="http://www.w3.org/2000/09/xmldsig#" 
         schemaLocation="xmldsig-core-schema.xsd"/>
   <import namespace="http://www.w3.org/2001/04/xmlenc#" 
         schemaLocation="xenc-schema.xsd"/>
   <annotation>
      <documentation xml:lang="en">
              XML Schema for XKMS 2.0 draft 7 1st April 2002
      </documentation>
   </annotation>
   <!-- /Namespace -->
   <!-- MessageAbstractType -->
   <complexType name="MessageAbstractType" abstract="true">
      <sequence>
         <element ref="ds:Signature" minOccurs="0"/>
      </sequence>
      <attribute name="MajorVersion" type="positiveInteger" use="required"/>
      <attribute name="MinorVersion" type="integer" use="optional"/>
      <attribute name="Service" type="anyURI" use="required"/>
      <attribute name="Nonce" type="ds:CryptoBinary" use="optional"/>
   </complexType>
   <!-- /MessageAbstractType -->
   <!-- RequestAbstractType -->
   <complexType name="RequestAbstractType" abstract="true">
      <complexContent>
         <extension base="xkms:MessageAbstractType">
            <sequence>
               <element ref="xkms:RespondWith" minOccurs="0" 
                     maxOccurs="unbounded"/>
               <element ref="xkms:PendingNotification" minOccurs="0"/>
            </sequence>
            <attribute name="RequestID" type="ID" use="required"/>
            <attribute name="OriginalRequestID" type="IDREF" use="optional"/>
            <attribute name="ResponseLimit" type="integer" use="optional"/>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RequestAbstractType -->
   <!-- RespondWith -->
   <element name="RespondWith" type="QName"/>
   <simpleType name="RespondWithEnumType">
      <restriction base="QName">
         <enumeration value="KeyName"/>
         <enumeration value="KeyValue"/>
         <enumeration value="X509Cert"/>
         <enumeration value="X509Chain"/>
         <enumeration value="X509CRL"/>
         <enumeration value="OCSP"/>
         <enumeration value="RetrievalMethod"/>
         <enumeration value="MgmtData"/>
         <enumeration value="PGP"/>
         <enumeration value="PGPWeb"/>
         <enumeration value="SPKI"/>
         <enumeration value="Multiple"/>
         <enumeration value="Private"/>
      </restriction>
   </simpleType>
   <!-- /RespondWith -->
   <!-- PendingNotification -->
   <element name="PendingNotification" type="xkms:PendingNotificationType"/>
   <complexType name="PendingNotificationType">
      <attribute name="Mechanism" type="anyURI" use="required"/>
      <attribute name="Identifier" type="anyURI" use="required"/>
   </complexType>
   <!-- /PendingNotification -->
   <!-- PendingRequest -->
   <element name="PendingRequest" type="xkms:PendingRequestType"/>
   <complexType name="PendingRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <attribute name="ResponseID" type="IDREF" use="optional"/>
         </extension>
      </complexContent>
   </complexType>
   <!-- /PendingRequest -->
   <!-- ResultAbstractType -->
   <complexType name="ResultAbstractType" abstract="true">
      <complexContent>
         <extension base="xkms:MessageAbstractType">
            <attribute name="RequestID" type="IDREF" use="required"/>
            <attribute name="ResponseID" type="ID" use="required"/>
         </extension>
      </complexContent>
   </complexType>
   <!-- /ResultAbstractType -->
   <!-- LocateRequest -->
   <element name="LocateRequest" type="xkms:LocateRequestType"/>
   <complexType name="LocateRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyInfoQuery"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <element name="KeyInfoQuery" type="ds:KeyInfoType"/>
   <!-- /LocateRequest -->
   <!-- LocateResult -->
   <element name="LocateResult" type="xkms:LocateResultType"/>
   <complexType name="LocateResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="ds:KeyInfo" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /LocateResult -->
   <!-- KeyBinding -->
   <element name="KeyBinding" type="xkms:KeyBindingType"/>
   <complexType name="KeyBindingType">
      <sequence>
         <element ref="xkms:KeyInfo" minOccurs="0"/>
         <element ref="xkms:PassPhrase" minOccurs="0"/>
         <element ref="xkms:ProcessInfo" minOccurs="0"/>
         <element ref="xkms:ValidityInterval" minOccurs="0"/>
         <element ref="xkms:KeyUsage" minOccurs="0" maxOccurs="3"/>
         <element ref="xkms:UseKeyWith" minOccurs="0" maxOccurs="unbounded"/>
         <element ref="xkms:Reason" minOccurs="0" maxOccurs="unbounded"/>
         <any namespace="##other" minOccurs="0" maxOccurs="unbounded" 
               processContents="lax"/>
      </sequence>
      <attribute name="ID" type="ID" use="optional"/>
   </complexType>
   <!-- /KeyBinding -->
   <!-- /KeyInfo -->
   <element name="KeyInfo" type="ds:KeyInfoType"/>
   <!-- /KeyInfo -->
   <!-- PassPhrase -->
   <element name="PassPhrase" type="xkms:PassPhraseValueType"/>
   <simpleType name="PassPhraseValueType">
      <restriction base="base64Binary"/>
   </simpleType>
   <!-- /PassPhrase -->
   <!-- ProcessInfo -->
   <element name="ProcessInfo" type="xkms:ProcessInfoType"/>
   <complexType name="ProcessInfoType">
      <sequence minOccurs="0" maxOccurs="unbounded">
         <any namespace="##other"/>
      </sequence>
   </complexType>
   <!-- /ProcessInfo -->
   <!-- ValidityInterval -->
   <element name="ValidityInterval" type="xkms:ValidityIntervalType"/>
   <complexType name="ValidityIntervalType">
      <attribute name="NotBefore" type="dateTime"/>
      <attribute name="NotOnOrAfter" type="dateTime"/>
   </complexType>
   <!-- /ValidityInterval -->
   <!-- KeyUsage -->
   <element name="KeyUsage" type="xkms:KeyUsageType"/>
   <simpleType name="KeyUsageType">
      <restriction base="QName">
         <enumeration value="xkms:Encryption"/>
         <enumeration value="xkms:Signature"/>
         <enumeration value="xkms:Exchange"/>
      </restriction>
   </simpleType>
   <!-- /KeyUsage -->
   <!-- UseKeyWith -->
   <element name="UseKeyWith" type="xkms:UseKeyWithType"/>
   <complexType name="UseKeyWithType">
      <attribute name="Application" type="anyURI"/>
      <attribute name="Identifier" type="string"/>
   </complexType>
   <!-- /UseKeyWith -->
   <!-- Reason -->
   <element name="Reason" type="xkms:ReasonEnumType"/>
   <simpleType name="ReasonEnumType">
      <restriction base="QName">
         <enumeration value="IssuerTrust"/>
         <enumeration value="Status"/>
         <enumeration value="ValidityInterval"/>
         <enumeration value="Signature"/>
      </restriction>
   </simpleType>
   <!-- /Reason -->
   <!-- ValidateRequest -->
   <element name="ValidateRequest" type="xkms:ValidateRequestType"/>
   <complexType name="ValidateRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBindingQuery"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <element name="KeyBindingQuery" type="xkms:KeyBindingType"/>
   <!-- /ValidateRequest -->
   <!-- ValidateResult -->
   <element name="ValidateResult" type="xkms:ValidateResultType"/>
   <complexType name="ValidateResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /ValidateResult -->
   <!-- Authentication -->
   <element name="Authentication" type="xkms:AuthenticationType"/>
   <complexType name="AuthenticationType">
      <sequence>
         <element ref="xkms:ProofOfPossession" minOccurs="0"/>
         <element ref="xkms:KeyBindingAuthentication" minOccurs="0"/>
         <element ref="xkms:PassPhraseAuthentication" minOccurs="0"/>
      </sequence>
   </complexType>
   <!-- Authentication -->
   <!-- PassPhraseAuthentication -->
   <element name="PassPhraseAuthentication" type="string"/>
   <!-- /PassPhraseAuthentication -->
   <!-- KeyBindingAuthentication -->
   <element name="KeyBindingAuthentication" 
         type="xkms:KeyBindingAuthenticationType"/>
   <complexType name="KeyBindingAuthenticationType">
      <sequence>
         <element ref="ds:Signature"/>
      </sequence>
   </complexType>
   <!-- /KeyBindingAuthentication -->
   <!-- ProofOfPossession -->
   <element name="ProofOfPossession" type="xkms:ProofOfPossessionType"/>
   <complexType name="ProofOfPossessionType">
      <sequence>
         <element ref="ds:Signature"/>
      </sequence>
   </complexType>
   <!-- /ProofOfPossession -->
   <!-- Private -->
   <element name="Private" type="xkms:PrivateType"/>
   <complexType name="PrivateType">
      <sequence>
         <element ref="xenc:EncryptedData"/>
      </sequence>
   </complexType>
   <!-- /Private -->
   <!-- RegisterRequest -->
   <element name="RegisterRequest" type="xkms:RegisterRequestType"/>
   <complexType name="RegisterRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:Prototype"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <element name="Prototype" type="xkms:KeyBindingType"/>
   <!-- /RegisterRequest -->
   <!-- RegisterResult -->
   <element name="RegisterResult" type="xkms:RegisterResultType"/>
   <complexType name="RegisterResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
               <element ref="xkms:Private" minOccurs="0"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RegisterResult -->
   <!-- ReissueRequest -->
   <element name="ReissueRequest" type="xkms:ReissueRequestType"/>
   <complexType name="ReissueRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /ReissueRequest -->
   <!-- ReissueResult -->
   <element name="ReissueResult" type="xkms:ReissueResultType"/>
   <complexType name="ReissueResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /ReissueResult -->
   <!-- RevokeRequest -->
   <element name="RevokeRequest" type="xkms:RevokeRequestType"/>
   <complexType name="RevokeRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RevokeRequest -->
   <!-- RevokeResult -->
   <element name="RevokeResult" type="xkms:RevokeResultType"/>
   <complexType name="RevokeResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RevokeResult -->
   <!-- RecoverRequest -->
   <element name="RecoverRequest" type="xkms:RecoverRequestType"/>
   <complexType name="RecoverRequestType">
      <complexContent>
         <extension base="xkms:RequestAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding"/>
               <element ref="xkms:Authentication"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RecoverRequest -->
   <!-- RecoverResult -->
   <element name="RecoverResult" type="xkms:RecoverResultType"/>
   <complexType name="RecoverResultType">
      <complexContent>
         <extension base="xkms:ResultAbstractType">
            <sequence>
               <element ref="xkms:KeyBinding" minOccurs="0" 
                     maxOccurs="unbounded"/>
               <element ref="xkms:Private" minOccurs="0"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>
   <!-- /RecoverResult -->
   <!-- RSAKeyPair -->
   <element name="RSAKeyPair" type="xkms:RSAKeyPairType"/>
   <complexType name="RSAKeyPairType">
      <sequence>
         <element name="Modulus" type="ds:CryptoBinary"/>
         <element name="PublicExponent" type="ds:CryptoBinary"/>
         <element name="PrivateExponent" type="ds:CryptoBinary"/>
         <element name="P" type="ds:CryptoBinary" minOccurs="0"/>
         <element name="Q" type="ds:CryptoBinary" minOccurs="0"/>
      </sequence>
   </complexType>
   <!-- /RSAKeyPair -->
   <!-- End Schema -->
</schema>

Appendix B Service Location Configuration

¶323 In many instances it is desirable to advertise the existence of an XKMS service in some form of discovery protocol. This appendix describes specific means of advertising the existence of XKMS services in the Internet Domain Name Service (DNS).

B.1 Domain Name Service (DNS)

¶324 The provision of an XKMS service that provides information on key information bound to DNS addresses in a specified DNS zone MAY be advertised by means of the DNS SRV record [RFC 2782]. An SRV record contains the following data fields:

¶325 _Service._Protocol.NameTTLClassSRVPriorityWeightPortTarget

Service
The symbolic name of the desired service, as defined in Assigned Numbers [STD 2] or locally.  An underscore (_) is prepended to the service identifier to avoid collisions with DNS labels that occur in nature.
Protocol
The symbolic name of the desired protocol, with an underscore (_) prepended to prevent collisions with DNS labels that occur in nature.
Name
The domain this RR refers to. The SRV RR is unique in that the name one searches for is not this name.
TTL
Standard DNS meaning [RFC 1035].
Class
Standard DNS meaning [RFC 1035]. SRV records occur in the IN Class.
Priority
The priority of this target host. A client MUST attempt to contact the target host with the lowest-numbered priority it can reach; target hosts with the same priority SHOULD be tried in an order defined by the weight field.
Weight
A server selection mechanism. The weight field specifies a relative weight for entries with the same priority. Larger weights SHOULD be given a proportionately higher probability of being selected. The range of this number is 0-65535.
Port
The port on this target host of this service. The range is 0-65535. This is a 16 bit unsigned integer in network byte order. This is often as specified in Assigned Numbers but need not be.
Target
The domain name of the target host. There MUST be one or more address records for this name, the name MUST NOT be an alias (in the sense of RFC 1034 or RFC 2181). Implementors are urged, but not required, to return the address record(s) in the Additional Data section. Unless and until permitted by future standards action, name compression is not to be used for this field.

¶326 The following service values are defined:

_XKMS_XKISS_SOAP_HTTP
An XKMS service supporting the XKISS protocol in the SOAP binding using HTTP as the application layer transport. The Protocol value for this service is TCP.
_XKMS_XKRSS_SOAP_HTTP
An XKMS service supporting the XKRSS protocol in the SOAP binding using HTTP as the application layer transport. The Protocol value for this service is TCP.

¶327 The publication of an SRV record in a DNS zone that advertises an XKMS service is an affirmative statement by the operator of the zone that the XKMS service indicated MAY be queried for information concerning key information bound to protocol addresses within that zone. The publication of an SRV record does not imply any undertaking on the part of the part of the publisher to ensure that the information provided by the XKMS service is accurate or trustworthy. Relying parties MUST therefore establish the trustworthiness of any information they may receive from an XKMS service discovered by means of an SRV record by other means, for example by forwarding the data to an XKMS Validate service.

B.1.1 Examples

¶328 The following SRV record advertises an XKMS XKISS service on port 80 of border-xkms.cryptographer.test:

¶329 _XKMS_XKISS_SOAP_HTTP._TCP.cryptographer.test - IN 0 1 80 border-xkms.cryptographer.test

¶330 The following SRV record advertises three XKMS XKISS services, main1, main2 and backup. Clients should direct requests to main1 and main2 with equal priority. The service backup should only be accessed if neither main1 or main2 is available:

¶331 _XKMS_XKISS_SOAP_HTTP._TCP.cryptographer.test - IN 0 50 80 main1.cryptographer.test
_XKMS_XKISS_SOAP_HTTP._TCP.cryptographer.test - IN 0 50 80 main2.cryptographer.test
_XKMS_XKISS_SOAP_HTTP._TCP.cryptographer.test - IN 1 1 80 backup.cryptographer.test

Appendix C Sample Protocol Exchanges

C.1 Locate Request Example 1

¶332 This example shows the formatting of the X-KISS request and response for the first example in section 2.2  above.

¶333 Request Message

¶334 TBS

¶335 Server Response

¶336 TBS

C.2 Locate Request Example 2

¶337 This example shows the formatting of the X-KISS request and response for the second example in section 2.2  above.

¶338 Request Message

¶339 TBS

¶340 Server Response

¶341 TBS

C.3 Validate Request

¶342 This example shows the formatting of the X-KISS request and response for the example in section 2.2.1 above.

¶343 Request Message

¶344 TBS

¶345 Server Response

¶346 TBS

C.4 Registration of Client Generated Key Pair

¶347 Request Message

¶348 TBS

¶349 Server Response

¶350 TBS

C.5 Registration of Server Generated key Pair

¶351 Request Message

¶352 TBS

¶353 Server Response

¶354 TBS

Appendix D References

¶355 [CSP] C. A. R. Hoare

¶356 [PKCS1] Kaliski, B., PKCS #1: RSA Encryption Version 2.0, RSA Laboratories, also IETF RFC 2437, October 1998.

¶357 [RFC-2104]   Krawczyk, H., Bellare, M. and R. Canetti, HMAC: Keyed Hashing for Message Authentication, IETF  RFC 2104, February 1997. http://www.ietf.org/rfc/rfc2104.txt

¶358 [RFC-2782] A. Gulbrandsen, P. Vixie, L. Esibov, A DNS RR for specifying the location of services (DNS SRV), IETF RFC 2782, February 2000, http://www.ietf.org/rfc/rfc2782.txt

¶359 [SOAP] D. Box, D Ehnebuske, G. Kakivaya, A. Layman, N. Mendelsohn, H. Frystyk Nielsen, S Thatte, D. Winer. Simple Object Access Protocol (SOAP) 1.1, W3C Note 08 May 2000, http://www.w3.org/TR/SOAP/

¶360 [TLS] TBS

¶361 [WSSL] E. Christensen, F. Curbera, G. Meredith, S. Weerawarana, Web Services Description Language (WSDL) 1.0 September 25, 2000, http://msdn.microsoft.com/xml/general/wsdl.asp

¶362 [XTASS] P. Hallam-Baker, XML Trust Assertion Service Specification, To Be Published, January 2001

¶363 [XML-SIG]  D. Eastlake, J. R., D. Solo, M. Bartel, J. Boyer , B. Fox , E. Simon. XML-Signature Syntax and Processing, World Wide Web Consortium. http://www.w3.org/TR/xmldsig-core/

¶364 [XML-SIG-XSD] XML Signature Schema available from http://www.w3.org/TR/2000/CR-xmldsig-core-20001031/xmldsig-core-schema.xsd.

¶365 [XML-Enc] XML Encryption Specification, In development.

¶366 [XML-Schema1] H. S. Thompson, D. Beech, M. Maloney, N. Mendelsohn. XML Schema Part 1: Structures, W3C Working Draft 22 September 2000, http://www.w3.org/TR/2000/WD-xmlschema-1-20000922/, latest draft at http://www.w3.org/TR/xmlschema-1/

¶367 [XML-Schema2] P. V. Biron, A. Malhotra, XML Schema Part 2: Datatypes; W3C Working Draft 22 September 2000, http://www.w3.org/TR/2000/WD-xmlschema-2-20000922/, latest draft at http://www.w3.org/TR/xmlschema-2/

Appendix E Legal Notices

¶368 TBS

Appendix F Work In Progress

F.1 Outstanding Issues

[I-PayloadHash]
For establishing correspondence of response to a specific request.
[I-Passphrase]
Needs to become Base64 data at the very least.
[I-SOAP]
Introduce section in the request/response section that discusses the SOAP binding issues, in particular SOAP faults.
[I-Examples]
All the examples are bogus and hopelessly out of date, will work on fixing this.

F.2 Issues addressed in this draft

[I-PayloadAuth]
Require decision on how payload authentication is to be handled, in particular whether by a SOAP header or a signature within the Request packet.
[I-RespondWith]
Need to decide on the format of the identifiers here, I am still unsure as to what QNames do. In particular note that there are three types of query that return <X509Data>; X509Cert, X509Chain and OCSP.
[I-FaultHandling]
We need to address this, how is XP getting on here?
[I-KeyID]
I forget can we delete this now?
[I-Pending]
We were going to include some way of dealing with a Pending response (only makes sense to consider for <Register> or <ReIssue>). 
[I-MultipleResponseLimit]
I believe we were going to allow the client to set a limit on the number of "Multiple" responses that might be returned. The server would have to indicate whether there were more responses that were not sent because the limit would have been exceeded.
[I-Reason]
Connect up the Reason code to Result Code, possibly introduce Qnames here.