Internet DRAFT - draft-ietf-keyprov-dskpp
draft-ietf-keyprov-dskpp
KEYPROV Working Group A. Doherty
Internet-Draft RSA, The Security Division of EMC
Intended status: Standards Track M. Pei
Expires: May 7, 2009 Verisign, Inc.
S. Machani
Diversinet Corp.
M. Nystrom
RSA, The Security Division of EMC
November 3, 2008
Dynamic Symmetric Key Provisioning Protocol (DSKPP)
draft-ietf-keyprov-dskpp-06.txt
Status of this Memo
By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on May 7, 2009.
Abstract
DSKPP is a client-server protocol for initialization (and
configuration) of symmetric keys to locally and remotely accessible
cryptographic modules. The protocol can be run with or without
private-key capabilities in the cryptographic modules, and with or
without an established public-key infrastructure.
Two variations of the protocol support multiple usage scenarios.
Doherty, et al. Expires May 7, 2009 [Page 1]
Internet-Draft DSKPP November 2008
With the four-pass variant, keys are mutually generated by the
provisioning server and cryptographic module; provisioned keys are
not transferred over-the-wire or over-the-air. The two-pass variant
enables secure and efficient download and installation of pre-
generated symmetric keys to a cryptographic module.
This document builds on information contained in [RFC4758], adding
specific enhancements in response to implementation experience and
liaison requests.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1. Usage Scenarios . . . . . . . . . . . . . . . . . . . . . 6
1.1.1. Single Key Request . . . . . . . . . . . . . . . . . 7
1.1.2. Multiple Key Requests . . . . . . . . . . . . . . . . 7
1.1.3. User Authentication . . . . . . . . . . . . . . . . . 7
1.1.4. Provisioning Time-Out Policy . . . . . . . . . . . . 7
1.1.5. Key Renewal . . . . . . . . . . . . . . . . . . . . . 7
1.1.6. Pre-Loaded Key Replacement . . . . . . . . . . . . . 8
1.1.7. Pre-Shared Manufacturing Key . . . . . . . . . . . . 8
1.1.8. End-to-End Protection of Key Material . . . . . . . . 8
1.2. Protocol Entities . . . . . . . . . . . . . . . . . . . . 9
1.3. Initiating DSKPP . . . . . . . . . . . . . . . . . . . . 10
1.4. Determining Which Protocol Variant to Use . . . . . . . . 11
1.4.1. Criteria for Using the Four-Pass Protocol . . . . . . 11
1.4.2. Criteria for Using the Two-Pass Protocol . . . . . . 12
1.5. Presentation Syntax . . . . . . . . . . . . . . . . . . . 12
1.5.1. Versions . . . . . . . . . . . . . . . . . . . . . . 12
1.5.2. Namespaces . . . . . . . . . . . . . . . . . . . . . 12
1.5.3. Identifiers . . . . . . . . . . . . . . . . . . . . . 13
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1. Key Words . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 13
2.3. Notation . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 16
3. DSKPP Protocol Details . . . . . . . . . . . . . . . . . . . 17
3.1. Protocol Initiation . . . . . . . . . . . . . . . . . . . 17
3.1.1. Server Initiation . . . . . . . . . . . . . . . . . . 17
3.1.2. Client Initiation . . . . . . . . . . . . . . . . . . 18
3.2. Protocol Variations . . . . . . . . . . . . . . . . . . . 18
3.2.1. Four-Pass Protocol Interaction . . . . . . . . . . . 18
3.2.2. Two-Pass Protocol Interaction . . . . . . . . . . . . 20
3.3. Cryptographic Construction . . . . . . . . . . . . . . . 21
3.3.1. The DSKPP One-Way Pseudorandom Function, DSKPP-PRF . 21
3.4. Four-Pass Protocol Usage . . . . . . . . . . . . . . . . 22
3.4.1. Message Flow . . . . . . . . . . . . . . . . . . . . 22
Doherty, et al. Expires May 7, 2009 [Page 2]
Internet-Draft DSKPP November 2008
3.4.2. Generation of Symmetric Keys for Cryptographic
Modules . . . . . . . . . . . . . . . . . . . . . . . 25
3.4.3. Encryption of Pseudorandom Nonces Sent from the
DSKPP Client . . . . . . . . . . . . . . . . . . . . 28
3.4.4. MAC Calculations . . . . . . . . . . . . . . . . . . 28
3.5. Two-Pass Protocol Usage . . . . . . . . . . . . . . . . . 30
3.5.1. Message Flow . . . . . . . . . . . . . . . . . . . . 30
3.5.2. Key Protection Profiles . . . . . . . . . . . . . . . 33
3.5.3. MAC Calculations . . . . . . . . . . . . . . . . . . 37
3.6. Device Identification . . . . . . . . . . . . . . . . . . 38
3.7. User Authentication . . . . . . . . . . . . . . . . . . . 39
3.7.1. Authentication Data . . . . . . . . . . . . . . . . . 39
3.7.2. Authentication Code Format . . . . . . . . . . . . . 40
3.7.3. Authentication Data Calculation . . . . . . . . . . . 42
4. DSKPP Message Formats . . . . . . . . . . . . . . . . . . . . 43
4.1. General XML Schema Requirements . . . . . . . . . . . . . 43
4.2. Components of the <KeyProvTrigger> Message . . . . . . . 44
4.3. Components of the <KeyProvClientHello> Request . . . . . 45
4.3.1. The DeviceIdentifierDataType Type . . . . . . . . . . 48
4.3.2. The ProtocolVariantsType Type . . . . . . . . . . . . 48
4.3.3. The KeyPackagesFormatType Type . . . . . . . . . . . 49
4.3.4. The AuthenticationDataType Type . . . . . . . . . . . 50
4.4. Components of the <KeyProvServerHello> Response (Used
Only in Four-Pass DSKPP) . . . . . . . . . . . . . . . . 50
4.5. Components of a <KeyProvClientNonce> Request (Used
Only in Four-Pass DSKPP) . . . . . . . . . . . . . . . . 52
4.6. Components of a <KeyProvServerFinished> Response . . . . 53
4.7. The StatusCode Type . . . . . . . . . . . . . . . . . . . 55
5. Protocol Extensions . . . . . . . . . . . . . . . . . . . . . 57
5.1. The ClientInfoType Type . . . . . . . . . . . . . . . . . 57
5.2. The ServerInfoType Type . . . . . . . . . . . . . . . . . 57
6. Protocol Bindings . . . . . . . . . . . . . . . . . . . . . . 57
6.1. General Requirements . . . . . . . . . . . . . . . . . . 57
6.2. HTTP/1.1 Binding for DSKPP . . . . . . . . . . . . . . . 57
6.2.1. Introduction . . . . . . . . . . . . . . . . . . . . 57
6.2.2. Identification of DSKPP Messages . . . . . . . . . . 58
6.2.3. HTTP Headers . . . . . . . . . . . . . . . . . . . . 58
6.2.4. HTTP Operations . . . . . . . . . . . . . . . . . . . 58
6.2.5. HTTP Status Codes . . . . . . . . . . . . . . . . . . 59
6.2.6. HTTP Authentication . . . . . . . . . . . . . . . . . 59
6.2.7. Initialization of DSKPP . . . . . . . . . . . . . . . 59
6.2.8. Example Messages . . . . . . . . . . . . . . . . . . 60
7. DSKPP Schema . . . . . . . . . . . . . . . . . . . . . . . . 60
8. Conformance Requirements . . . . . . . . . . . . . . . . . . 69
9. Security Considerations . . . . . . . . . . . . . . . . . . . 70
9.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 70
9.2. Active Attacks . . . . . . . . . . . . . . . . . . . . . 70
9.2.1. Introduction . . . . . . . . . . . . . . . . . . . . 70
Doherty, et al. Expires May 7, 2009 [Page 3]
Internet-Draft DSKPP November 2008
9.2.2. Message Modifications . . . . . . . . . . . . . . . . 70
9.2.3. Message Deletion . . . . . . . . . . . . . . . . . . 72
9.2.4. Message Insertion . . . . . . . . . . . . . . . . . . 72
9.2.5. Message Replay . . . . . . . . . . . . . . . . . . . 72
9.2.6. Message Reordering . . . . . . . . . . . . . . . . . 73
9.2.7. Man-in-the-Middle . . . . . . . . . . . . . . . . . . 73
9.3. Passive Attacks . . . . . . . . . . . . . . . . . . . . . 73
9.4. Cryptographic Attacks . . . . . . . . . . . . . . . . . . 73
9.5. Attacks on the Interaction between DSKPP and User
Authentication . . . . . . . . . . . . . . . . . . . . . 74
9.6. Miscellaneous Considerations . . . . . . . . . . . . . . 75
9.6.1. Client Contributions to K_TOKEN Entropy . . . . . . . 75
9.6.2. Key Confirmation . . . . . . . . . . . . . . . . . . 75
9.6.3. Server Authentication . . . . . . . . . . . . . . . . 75
9.6.4. User Authentication . . . . . . . . . . . . . . . . . 75
9.6.5. Key Protection in Two-Pass DSKPP . . . . . . . . . . 76
10. Internationalization Considerations . . . . . . . . . . . . . 77
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 77
11.1. URN Sub-Namespace Registration . . . . . . . . . . . . . 77
11.2. XML Schema Registration . . . . . . . . . . . . . . . . . 78
11.3. MIME Media Type Registration . . . . . . . . . . . . . . 78
11.4. Status Code Registry . . . . . . . . . . . . . . . . . . 79
12. Intellectual Property Considerations . . . . . . . . . . . . 80
13. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 80
14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 80
15. References . . . . . . . . . . . . . . . . . . . . . . . . . 81
15.1. Normative references . . . . . . . . . . . . . . . . . . 81
15.2. Informative references . . . . . . . . . . . . . . . . . 82
Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 84
A.1. Trigger Message . . . . . . . . . . . . . . . . . . . . . 85
A.2. Four-Pass Protocol . . . . . . . . . . . . . . . . . . . 85
A.2.1. <KeyProvClientHello> Without a Preceding Trigger . . 86
A.2.2. <KeyProvClientHello> Assuming a Preceding Trigger . . 87
A.2.3. <KeyProvServerHello> Without a Preceding Trigger . . 88
A.2.4. <KeyProvServerHello> Assuming a Preceding Trigger . . 89
A.2.5. <KeyProvClientNonce> Using Default Encryption . . . . 89
A.2.6. <KeyProvServerFinished> Using Default Encryption . . 91
A.3. Two-Pass Protocol . . . . . . . . . . . . . . . . . . . . 91
A.3.1. Example Using the Key Transport Profile . . . . . . . 91
A.3.2. Example Using the Key Wrap Profile . . . . . . . . . 94
A.3.3. Example Using the Passphrase-Based Key Wrap Profile . 97
Appendix B. Integration with PKCS #11 . . . . . . . . . . . . . 100
B.1. The 4-pass Variant . . . . . . . . . . . . . . . . . . . 100
B.2. The 2-pass Variant . . . . . . . . . . . . . . . . . . . 100
Appendix C. Example of DSKPP-PRF Realizations . . . . . . . . . 103
C.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 103
C.2. DSKPP-PRF-AES . . . . . . . . . . . . . . . . . . . . . . 103
C.2.1. Identification . . . . . . . . . . . . . . . . . . . 103
Doherty, et al. Expires May 7, 2009 [Page 4]
Internet-Draft DSKPP November 2008
C.2.2. Definition . . . . . . . . . . . . . . . . . . . . . 103
C.2.3. Example . . . . . . . . . . . . . . . . . . . . . . . 104
C.3. DSKPP-PRF-SHA256 . . . . . . . . . . . . . . . . . . . . 104
C.3.1. Identification . . . . . . . . . . . . . . . . . . . 105
C.3.2. Definition . . . . . . . . . . . . . . . . . . . . . 105
C.3.3. Example . . . . . . . . . . . . . . . . . . . . . . . 106
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 106
Intellectual Property and Copyright Statements . . . . . . . . . 108
Doherty, et al. Expires May 7, 2009 [Page 5]
Internet-Draft DSKPP November 2008
1. Introduction
While the range of problems for which symmetric key cryptography is
the solution of choice is somewhat smaller than for public key
cryptography, the problems it does solve, it solves exceedingly well.
In particular, symmetric key algorithms are considerably faster than
public key equivalents and allow for smaller key and signature sizes.
Despite the clear advantages of employing symmetric keys as long term
credentials or access keys in certain circumstances, it has generally
been assumed that any protocol in which ease of key management is
required will employ public key cryptography. In particular it is
assumed that only private components of public keypairs will be
employed as long term secrets and that symmetric cryptography will
only play a supporting role.
This document describes the Dynamic Symmetric Key Provisioning
Protocol (DSKPP), which provides a mechanism for provisioning
symmetric keys that provides the same degree of flexibility and
convenience in use as equivalent infrastructures for public keys.
DSKPP enables provisioning of symmetric keys to a symmetric key
cryptographic module that provides data authentication and encryption
services to software (or firmware) applications hosted on a wide
range of hardware devices, such as personal computers, handheld
mobile phones, one-time password tokens, USB flash drives, tape
drives, etc.
DSKPP provides an open and interoperable mechanism for initializing
and configuring symmetric keys to cryptographic modules that are
accessible over the Internet. The description is based on the
information contained in [RFC4758], and contains specific
enhancements, such as User Authentication and support for the [PSKC]
format for transmission of keying material.
DSKPP has two principal protocol variations. The four pass protocol
variation permits a symmetric key to be established that includes
randomness contributed by both the client and the server. The two
pass protocol requires only one round trip instead of two and permits
a server specified key to be established.
1.1. Usage Scenarios
DSKPP is expected to be used to provision symmetric keys to
cryptographic modules in a number of different scenarios, each with
its own special requirements.
Doherty, et al. Expires May 7, 2009 [Page 6]
Internet-Draft DSKPP November 2008
1.1.1. Single Key Request
The usual scenario is that a cryptographic module makes a request for
a symmetric key from a provisioning server that is located on the
local network or somewhere on the Internet. Depending upon the
deployment scenario, the provisioning server may generate a new key
on-the-fly or use a pre-generated key, e.g., one provided by a legacy
back-end issuance server. The provisioning server assigns a unique
key ID to the symmetric key and provisions it to the cryptographic
module.
1.1.2. Multiple Key Requests
A cryptographic module makes multiple requests for symmetric keys
from the same provisioning server. The symmetric keys need not be of
the same type, i.e., the keys may be used with different symmetric
key cryptographic algorithms, including one-time password
authentication algorithms, and the AES encryption algorithm.
1.1.3. User Authentication
In some deployment scenarios, a key issuer may rely on a third party
provisioning service. In this case, the issuer directs provisioning
requests from the cryptographic module to the provisioning service.
As such, it is the responsibility of the issuer to authenticate the
user through some out-of-band means before granting him rights to
acquire keys. Once the issuer has granted those rights, the issuer
provides an authentication code to the user and makes it available to
the provisioning service, so that the user can prove that he is
authorized to acquire keys.
1.1.4. Provisioning Time-Out Policy
An issuer may provide a time-limited authentication code to a user
during registration, which the user will input into the cryptographic
module to authenticate themselves with the provisioning server. The
server will allow a key to be provisioned to the cryptographic module
hosted by the user's device when user authentication is required only
if the user inputs a valid authentication code within the fixed time
period established by the issuer.
1.1.5. Key Renewal
A cryptographic module requests renewal of the symmetric key material
attached to a key ID, as opposed to keeping the key value constant
and refreshing the metadata. Such a need may occur in the case when
a user wants to upgrade her device that houses the cryptographic
module or when a key has expired. When a user uses the same
Doherty, et al. Expires May 7, 2009 [Page 7]
Internet-Draft DSKPP November 2008
cryptographic module to, for example, perform strong authentication
at multiple Web login sites, keeping the same key ID removes the need
for the user to register a new key ID at each site.
1.1.6. Pre-Loaded Key Replacement
This scenario represents a special case of symmetric key renewal in
which a local administrator can authenticate the user procedurally
before initiating the provisioning process. It also allows for a
device issuer to pre-load a key onto a cryptographic module with a
restriction that the key is replaced with a new key prior to use of
the cryptographic module. Another variation of this scenario is the
organization who recycles devices. In this case, a key issuer would
provision a new symmetric key to a cryptographic module hosted on a
device that was previously owned by another user.
Note that this usage scenario is essentially the same as the previous
scenario wherein the same key ID is used for renewal.
1.1.7. Pre-Shared Manufacturing Key
A cryptographic module is loaded onto a smart card after the card is
issued to a user. The symmetric key for the cryptographic module
will then be provisioned using a secure channel mechanism present in
many smart card platforms. This allows a direct secure channel to be
established between the smart card chip and the provisioning server.
For example, the card commands (i.e., Application Protocol Data
Units, or APDUs) are encrypted with a pre-issued card manufacturer's
key and sent directly to the smart card chip, allowing secure post-
issuance in-the-field provisioning. This secure flow can pass
Transport Layer Security (TLS) and other transport security
boundaries.
Note that two pre-conditions for this usage scenario are for the
protocol to be tunneled and the provisioning server to know the
correct pre-established manufacturer's key.
1.1.8. End-to-End Protection of Key Material
In this scenario, transport layer security does not provide end-to-
end protection of keying material transported from the provisioning
server to the cryptographic module. For example, TLS may terminate
at an application hosted on a PC rather than at the cryptographic
module (i.e., the endpoint) located on a data storage device.
Mutually authenticated key agreement provides end-to-end protection,
which TLS cannot provide.
Doherty, et al. Expires May 7, 2009 [Page 8]
Internet-Draft DSKPP November 2008
1.2. Protocol Entities
A DSKPP provisioning transaction has three entities:
Server: The DSKPP provisioning server.
Cryptographic Module: The cryptographic module to which the
symmetric keys are to be provisioned.
Client: The DSKPP client which manages communication between the
cryptographic module and the provisioning server.
While it is highly desirable for the entire communication between the
DSKPP client and server to be protected by means of a transport
providing confidentiality and integrity protection such as HTTP over
Transport Layer Security (TLS), such protection is not sufficient to
protect the exchange of the symmetric key data between the server and
the cryptographic module and the DSKPP protocol is designed to permit
implementations that satisfy this requirement.
The server only communicates to the client. As far as the server is
concerned, the client and cryptographic module may be considered to
be a single entity.
From a client-side security perspective, however, the client and the
cryptographic module are separate logical entities and may in some
implementations be separate physical entities as well.
A high-level object model that describes the client-side entities and
how they relate to each other is shown in Figure 1. Conceptually,
each entity is represented by the definitions found in Section 2.2.
Doherty, et al. Expires May 7, 2009 [Page 9]
Internet-Draft DSKPP November 2008
----------- -------------
| User | | Device |
|---------|* owns *|-----------|
| UserID |--------->| DeviceID |
| ... | | ... |
----------- -------------
| 1
|
| contains
|
| *
V
--------------------------
|Cryptographic Module |
|------------------------|
|Crypto Module ID |
|Security Attribute List |
|... |
--------------------------
| 1
|
| contains
|
| *
V
-----------------------
|Key Package |
|---------------------|
|Key ID |
|Key Type |
|... |
-----------------------
Figure 1: Object Model
It is assumed that a device will host an application layered above
the cryptographic module, and this application will manage
communication between the DSKPP client and cryptographic module. The
manner in which the communicating application will transfer DSKPP
protocol elements to and from the cryptographic module is transparent
to the DSKPP server. One method for this transfer is described in
[CT-KIP-P11].
1.3. Initiating DSKPP
To initiate DSKPP:
Doherty, et al. Expires May 7, 2009 [Page 10]
Internet-Draft DSKPP November 2008
1. A server may first send a DSKPP trigger message to a client
application (e.g., in response to a user browsing to a Web site
that requires a symmetric key for authentication), although this
step is optional.
2. A client application calls on the DSKPP client to send a
symmetric key request to a DSKPP server, thus beginning a DSKPP
protocol run.
One of the following actions may be used to contact a DSKPP server:
1. A user may indicate how the DSKPP client is to contact a certain
DSKPP server during a browsing session.
2. A DSKPP client may be pre-configured to contact a certain DSKPP
server.
3. A user may be informed out-of-band about the location of the
DSKPP server.
Once the location of the DSKPP server is known, the DSKPP client and
the DSKPP server engage in a 4-pass or 2-pass protocol.
1.4. Determining Which Protocol Variant to Use
The four-pass and two-pass protocols are appropriate in different
deployment scenarios, as described in the sub-sections below. The
biggest differentiator between the two is that the two-pass protocol
supports transport of an existing key to a cryptographic module,
while the four-pass involves key generation on-the-fly via key
agreement. In either case, both protocol variants support algorithm
agility through negotiation of encryption mechanisms and key types at
the beginning of each protocol run.
1.4.1. Criteria for Using the Four-Pass Protocol
The four-pass protocol is needed under one or more of the following
conditions:
o Policy requires that both parties engaged in the protocol jointly
contribute entropy to the key. Enforcing this policy mitigates
the risk of exposing a key during the provisioning process as the
key is generated through mutual agreement without being
transferred over-the-air or over-the-wire. It also mitigates risk
of exposure after the key is provisioned, as the key will be not
be vulnerable to a single point of attack in the system.
o A cryptographic module does not have private-key capabilities.
o The cryptographic module is hosted by a device that was neither
pre-issued with a manufacturer's key or other form of pre-shared
key (as might be the case with a smart card or SIM card) nor has a
keypad that can be used for entering a passphrase (such as present
Doherty, et al. Expires May 7, 2009 [Page 11]
Internet-Draft DSKPP November 2008
on a mobile phone).
1.4.2. Criteria for Using the Two-Pass Protocol
The two-pass protocol is needed under one or more of the following
conditions:
o Pre-existing (i.e., legacy) keys must be provisioned via transport
to the cryptographic module.
o The cryptographic module is hosted on a device that was pre-issued
with a manufacturer's key (such as may exist on a smart card), or
other form of pre-shared key (such as may exist on a SIM-card),
and is capable of performing private-key operations.
o The cryptographic module is hosted by a device that has a built-in
keypad with which a user may enter a passphrase, useful for
deriving a key wrapping key for distribution of keying material.
1.5. Presentation Syntax
This documents presents DSKPP message formats and data elements using
XML syntax. The main goal in using this syntax is to document DSKPP.
Application of the syntax beyond this goal is OPTIONAL (i.e., an
implementation that does not use XML and instead uses ASN.1 could
claim compliance with this specification).
1.5.1. Versions
There is a provision made in the syntax for an explicit version
number. Only version "1.0" is currently specified.
1.5.2. Namespaces
The XML namespace [XMLNS] URN that MUST be used by implementations of
this syntax is:
xmlns:dskpp="urn:ietf:params:xml:ns:keyprov:dskpp:1.0"
References to qualified elements in the DSKPP schema defined herein
use the prefix "dskpp".
This document relies on qualified elements already defined in the
Portable Symmetric Key Container [PSKC] namespace, which is
represented by the prefix "pskc" and declared as:
xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc:1.0"
Finally, the DSKPP syntax presented in this document relies on
algorithm identifiers defined in the XML Signature [XMLDSIG]
Doherty, et al. Expires May 7, 2009 [Page 12]
Internet-Draft DSKPP November 2008
namespace:
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
References to algorithm identifiers in the XML Signature namespace
are represented by the prefix "ds".
1.5.3. Identifiers
This document uses Uniform Resource Identifiers [RFC2396] to identify
resources, algorithms, and semantics.
2. Terminology
2.1. Key Words
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
2.2. Definitions
The definitions provided below are defined as used in this document.
The same terms may be defined differently in other documents.
Authentication Code (AC): Client Authentication Code comprised of a
string of numeric characters known to the device and the server
and containing an identifier and a password
Authentication Data (AD): Client Authentication Data that may be
derived from the Authentication Code (AC)
Cryptographic Module: A component of an application, which enables
symmetric key cryptographic functionality
CryptoModule ID: A unique identifier for an instance of the
cryptographic module
Device: A physical piece of hardware, or a software framework, that
hosts symmetric key cryptographic modules
Device ID (DeviceID): A unique identifier for the device
Doherty, et al. Expires May 7, 2009 [Page 13]
Internet-Draft DSKPP November 2008
DSKPP Client: Manages communication between the symmetric key
cryptographic module and the DSKPP server
DSKPP Server: The symmetric key provisioning server that
participates in the DSKPP protocol run
DSKPP Server ID (ServerID): The unique identifier of a DSKPP server
Issuer: See "Key Issuer"
Key Issuer: An organization that issues symmetric keys to end-users
Key Package (KP): An object that encapsulates a symmetric key and
its configuration data
Key Package Header (KPH): Information about the Key Package, useful
for two-pass DSKPP, e.g., the passing the ServerID and the Key
Protection Method
Key ID (KeyID): A unique identifier for the symmetric key
Key Protection Method (KPM): The key transport method used during
two-pass DSKPP
Key Protection Method List (KPML): The list of key protection
methods supported by a cryptographic module
Key Provisioning Server: A lifecycle management system that provides
a key issuer with the ability to provision keys to cryptographic
modules hosted on end-users' devices
Key Transport: A key establishment procedure whereby the DSKPP
server selects and encrypts the keying material and then sends
the material to the DSKPP client [NIST-SP800-57]
Key Transport Key: The private key that resides on the cryptographic
module. This key is paired with the DSKPP client's public key,
which the DSKPP server uses to encrypt keying material during key
transport [NIST-SP800-57]
Key Type: The type of symmetric key cryptographic methods for which
the key will be used (e.g., OATH HOTP or RSA SecurID
authentication, AES encryption, etc.)
Doherty, et al. Expires May 7, 2009 [Page 14]
Internet-Draft DSKPP November 2008
Key Wrapping: A method of encrypting keys for key transport
[NIST-SP800-57]
Key Wrapping Key: A symmetric key encrypting key used for key
wrapping [NIST-SP800-57]
Keying Material: The data necessary (e.g., keys and key
configuration data) necessary to establish and maintain
cryptographic keying relationships [NIST-SP800-57]
Manufacturer's Key A unique master key pre-issued to a hardware
device, e.g., a smart card, during the manufacturing process. If
present, this key may be used by a cryptographic module to derive
secret keys
Provisioning Service: See "Key Provisioning Server"
Security Attribute List (SAL): A payload that contains the DSKPP
version, DSKPP variation (four- or two-pass), key package
formats, key types, and cryptographic algorithms that the
cryptographic module is capable of supporting
Security Context (SC): A payload that contains the DSKPP version,
DSKPP variation (four- or two-pass), key package format, key
type, and cryptographic algorithms relevant to the current
protocol run
User: The person or client to whom devices are issued
User ID: A unique identifier for the user or client
2.3. Notation
|| String concatenation
[x] Optional element x
A ^ B Exclusive-OR operation on strings A and B (where A
and B are of equal length)
<XMLElement> A typographical convention used in the body of the
text
Doherty, et al. Expires May 7, 2009 [Page 15]
Internet-Draft DSKPP November 2008
DSKPP-PRF(k,s,dsLen) A keyed pseudo-random function (see
Section 3.3.1)
E(k,m) Encryption of m with the key k
K Key used to encrypt R_C (either K_SERVER or
K_SHARED), or in MAC or DSKPP_PRF computations
K_AC Secret key that is derived from the Authentication
Code and used for user authentication purposes
K_MAC Secret key derived during a DSKPP exchange for use
with key confirmation
K_MAC' A second secret key used for server authentication
K_PROV A provisioning master key from which two keys are
derived: K_TOKEN and K_MAC
K_SERVER Public key of the DSKPP server; used for encrypting
R_C in the four-pass protocol variant
K_SHARED Secret key that is pre-shared between the DSKPP
client and the DSKPP server; used for encrypting
R_C in the four-pass protocol variant
K_TOKEN Secret key that is established in a cryptographic
module using DSKPP
R Pseudorandom value chosen by the DSKPP client and
used for MAC computations
R_C Pseudorandom value chosen by the DSKPP client and
used as input to the generation of K_TOKEN
R_S Pseudorandom value chosen by the DSKPP server and
used as input to the generation of K_TOKEN
R_TRIGGER Pseudorandom value chosen by the DSKPP server and
used as input in a trigger message.
URL_S DSKPP server address, as a URL
2.4. Abbreviations
Doherty, et al. Expires May 7, 2009 [Page 16]
Internet-Draft DSKPP November 2008
AC Authentication Code
AD Authentication Data
DSKPP Dynamic Symmetric Key Provisioning Protocol
HTTP Hypertext Transfer Protocol
KP Key Package
KPH Key Package Header
KPM Key Protection Method
KPML Key Protection Method List
MAC Message Authentication Code
PC Personal Computer
PDU Protocol Data Unit
PKCS Public-Key Cryptography Standards
PRF Pseudo-Random Function
PSKC Portable Symmetric Key Container
SAL Security Attribute List (see Section 2.2)
SC Security Context (see Section 2.2)
TLS Transport Layer Security
URL Uniform Resource Locator
USB Universal Serial Bus
XML eXtensible Markup Language
3. DSKPP Protocol Details
DSKPP enables symmetric key provisioning between a DSKPP server and
DSKPP client.
3.1. Protocol Initiation
The DSKPP protocol has two- and four-pass variations, either of which
may be initiated by either the client or the server making four
possible successful protocol interactions. In every case the first
message sent from the client to the server is <KeyProvClientHello>
and the last message is <KeyProvServerFinished> and is sent from the
server to the client.
3.1.1. Server Initiation
The DSKPP protocol may be initiated by the server by means of a
<KeyProvTrigger> message to which the client responds with a
<KeyProvClientHello> message as shown in Figure 2. The trigger
message always contains a nonce to allow the server to couple the
trigger with a later <KeyProvClientHello> request.
Doherty, et al. Expires May 7, 2009 [Page 17]
Internet-Draft DSKPP November 2008
+---------------+ +---------------+
| | | |
| DSKPP Client | | DSKPP Server |
| | | |
+---------------+ +---------------+
| |
| <--------- <KeyProvTrigger> --------- |
| |
| ------- <KeyProvClientHello> -------> |
... ...
Figure 2: Server Initiated DSKPP (start)
3.1.2. Client Initiation
The DSKPP protocol may be initiated by the client by means of the
<KeyProvClientHello> message Figure 3 message.
+---------------+ +---------------+
| | | |
| DSKPP Client | | DSKPP Server |
| | | |
+---------------+ +---------------+
| |
| ------- <KeyProvClientHello> -------> |
... ...
Figure 3: Client Initiated DSKPP (start)
3.2. Protocol Variations
Once contact has been initiated, the client and server MAY engage in
either a two-pass or four-pass protocol depending on the protocol
options specified in the <KeyProvClientHello> message and the server
configuration.
3.2.1. Four-Pass Protocol Interaction
In the four-pass version of the protocol the server responds to the
<KeyProvClientHello> message with <KeyProvServerHello>. The client
then responds with <KeyProvClientNonce> and the server with
<KeyProvServerFinished> as shown in Figure 4.
Doherty, et al. Expires May 7, 2009 [Page 18]
Internet-Draft DSKPP November 2008
+---------------+ +---------------+
| | | |
| DSKPP Client | | DSKPP Server |
| | | |
+---------------+ +---------------+
| |
| [ <--------- <KeyProvTrigger> --------- ] |
| |
| ------- <KeyProvClientHello> -------> |
| |
| <------ <KeyProvServerHello> -------- |
| |
| ------- <KeyProvClientNonce> -------> |
| |
| <---- <KeyProvServerFinished> ------- |
| |
Figure 4: Four Pass DSKPP protocol (with OPTIONAL preceding trigger)
[<KeyProvTrigger> Message]: The <KeyProvTrigger> message is used to
initiate a request from the server. The trigger message always
contains a nonce to allow the server to couple the trigger with a
later <KeyProvClientHello> request.
<KeyProvClientHello>: The <KeyProvClientHello> request is sent by a
DSKPP client to initiate contact with the DSKPP server,
indicating which protocol versions and variations (four-pass or
two-pass), key types, encryption and MAC algorithms that it
supports. In addition, the request may include client
authentication data that the DSKPP server uses to verify proof-
of-possession of the device.
Server Processing of <KeyProvClientHello>: Upon receiving a
<KeyProvClientHello> request, the DSKPP server uses the
<KeyProvServerHello> response to specify which protocol version
and variation, key type, encryption algorithm, and MAC algorithm
that will be used by the DSKPP server and DSKPP client during the
protocol run. The decision of which variation, key type, and
cryptographic algorithms to pick is policy- and implementation-
dependent and therefore outside the scope of this document.
<KeyProvServerHello>: The <KeyProvServerHello> response is only used
in the four pass protocol, it includes the DSKPP server's random
nonce, R_S. The response also consists of information about
either a shared secret key, or its own public key, that the DSKPP
client uses when sending its protected random nonce, R_C, in the
<KeyProvClientNonce> request (see below).
Doherty, et al. Expires May 7, 2009 [Page 19]
Internet-Draft DSKPP November 2008
Optionally, the DSKPP server may provide a MAC that the DSKPP
client may use for server authentication.
Client Processing of <KeyProvServerHello>: On receipt of
<KeyProvServerHello>, the client encrypts the random client nonce
R_c under the (provided) server key K.
<KeyProvClientNonce>: The <KeyProvClientNonce> request is only used
in the four pass protocol, it is used to exchange protected data,
i.e., the protected random nonce R_C. In addition, the request
may include user authentication data that the DSKPP server uses
to verify proof-of-possession of the device.
<KeyProvServerFinished>: The <KeyProvServerFinished> response is a
confirmation message that includes a key package that holds
configuration data, but no keying material.
Optionally, the DSKPP server may provide a MAC that the DSKPP
client may use for server authentication.
3.2.2. Two-Pass Protocol Interaction
In the two-pass version of the protocol the server responds to the
<KeyProvClientHello> message with a <KeyProvServerFinished> message
Figure 5
+---------------+ +---------------+
| | | |
| DSKPP Client | | DSKPP Server |
| | | |
+---------------+ +---------------+
| |
| [ <--------- <KeyProvTrigger> --------- ] |
| |
| ------- <KeyProvClientHello> -------> |
| |
| <---- <KeyProvServerFinished> ------- |
| |
Figure 5: Two Pass DSKPP protocol (with OPTIONAL preceding trigger)
[<KeyProvTrigger> Message]: The <KeyProvTrigger> message is used to
initiate a request from the server. The trigger message always
contains a nonce to allow the server to couple the trigger with a
later <KeyProvClientHello> request.
Doherty, et al. Expires May 7, 2009 [Page 20]
Internet-Draft DSKPP November 2008
<KeyProvClientHello>: The <KeyProvClientHello> request is sent by a
DSKPP client to initiate contact with the DSKPP server,
indicating which protocol versions and variations (four-pass or
two-pass), key types, encryption and MAC algorithms that it
supports. In addition, the request may include client
authentication data that the DSKPP server uses to verify proof-
of-possession of the device.
<KeyProvServerFinished>: The <KeyProvServerFinished> response is a
confirmation message that includes a key package that holds
configuration data and contain protected keying material.
Optionally, the DSKPP server may provide a MAC that the DSKPP
client may use for server authentication.
3.3. Cryptographic Construction
3.3.1. The DSKPP One-Way Pseudorandom Function, DSKPP-PRF
3.3.1.1. Introduction
Regardless of the protocol variation employed, there is a requirement
for a cryptographic primitive that provides a deterministic
transformation of a secret key k and a varying length octet string s
to a bitstring of specified length dsLen.
This primitive must meet the same requirements as for a keyed hash
function: It MUST take an arbitrary length input, and generate an
output that is one-way and collision-free (for a definition of these
terms, see, e.g., [FAQ]). Further, its output MUST be unpredictable
even if other outputs for the same key are known.
From the point of view of this specification, DSKPP-PRF is a "black-
box" function that, given the inputs, generates a pseudorandom value
and MAY be realized by any appropriate and competent cryptographic
technique. Appendix C contains two example realizations of DSKPP-
PRF.
3.3.1.2. Declaration
DSKPP-PRF (k, s, dsLen)
Input:
Doherty, et al. Expires May 7, 2009 [Page 21]
Internet-Draft DSKPP November 2008
k secret key in octet string format
s octet string of varying length consisting of variable data
distinguishing the particular string being derived
dsLen desired length of the output
Output:
DS pseudorandom string, dsLen-octets long
For the purposes of this document, the secret key k MUST be at least
16 octets long.
3.4. Four-Pass Protocol Usage
This section describes the message flow and methods that comprise the
four-pass protocol variant.
3.4.1. Message Flow
The four-pass protocol flow consists of two message exchanges:
1: Pass 1 = <KeyProvClientHello>, Pass 2 = <KeyProvServerHello>
2: Pass 3 = <KeyProvClientNonce>, Pass 4 = <KeyProvServerFinished>
The first pair of messages negotiate cryptographic algorithms and
exchange nonces. The second pair of messages establishes a symmetric
key using mutually authenticated key agreement.
The DSKPP server MUST ensure that a generated key is associated with
the correct cryptographic module, and if applicable, the correct
user. To do this, the DSKPP server MAY couple an initial user
authentication to the DSKPP execution using one of the mechanisms
described in Section 3.7.
The purpose and content of each message are described below,
including the optional <KeyProvTrigger>.
DSKPP Client DSKPP Server
------------ ------------
[<---] R_TRIGGER, [DeviceID],
[KeyID], [URL_S]
The DSKPP server optionally sends a <KeyProvTrigger> message to the
DSKPP client. The trigger message MUST contain a nonce, R_TRIGGER,
to allow the server to couple the trigger with a later
<KeyProvClientHello> request. <KeyProvTrigger> MAY include a DeviceID
to allow the client to select the device with which it will
communicate (for more information about device identification, refer
Doherty, et al. Expires May 7, 2009 [Page 22]
Internet-Draft DSKPP November 2008
to Section 3.6). In the case of key renewal, <KeyProvTrigger> MAY
include the identifier for the key, KeyID, that is being replaced.
Finally, the trigger MAY contain a URL for the DSKPP client to use
when contacting the DSKPP server.
DSKPP Client DSKPP Server
------------ ------------
SAL, [R_TRIGGER],
[DeviceID], [KeyID] --->
The DSKPP client sends a <KeyProvClientHello> message to the DSKPP
server. This message MUST contain a Security Attribute List (SAL),
identifying which DSKPP versions, protocol variations (in this case
"four-pass"), key package formats, key types, encryption and MAC
algorithms that the client supports. In addition, if a trigger
message preceded <KeyProvClientHello>, then it passes the parameters
received in <KeyProvTrigger> back to the DSKPP Server. In
particular, it MUST include R_TRIGGER so that the DSKPP server can
associate the client with the trigger message, and SHOULD include
DeviceID and KeyID.
DSKPP Client DSKPP Server
------------ ------------
<--- SC, R_S, [K], [MAC]
The DSKPP server responds to the DSKPP client with a
<KeyProvServerHello> message, whose Status attribute is set to a
return code for <KeyProvClientHello>. If Status is not "Continue",
only the Status and Version attributes will be present, and the DSKPP
client MUST abort the protocol. If Status is set to "Continue", then
the message MUST include a Security Context (SC). The DSKPP client
will use the SC to select the DSKPP version and variation (e.g.,
four-pass), type of key to generate, and cryptographic algorithms
that it will use for the remainder of the protocol run.
<KeyProvServerHello> MUST also include the server's random nonce,
R_S, whose length may depend on the selected key type. In addition,
the <KeyProvServerHello> message MAY provide K, which represents its
own public key (K_SERVER) or information about a shared secret key
(K_SHARED) to use for encrypting the cryptographic module's random
nonce (see description of <KeyProvClientNonce> below). Optionally,
<KeyProvServerHello> MAY include a MAC that the DSKPP client can use
for server authentication in the case of key renewal (Section 3.4.4.1
describes how to calculate the MAC).
Doherty, et al. Expires May 7, 2009 [Page 23]
Internet-Draft DSKPP November 2008
DSKPP Client DSKPP Server
------------ ------------
E(K,R_C), [AD] --->
Based on the Security Context (SC) provided in the
<KeyProvServerHello> message, the cryptographic module generates a
random nonce, R_C. The length of the nonce R_C will depend on the
selected key type. The cryptographic module encrypts R_C using the
selected encryption algorithm and with a key, K, that is either the
DSKPP server's public key, K_SERVER, or a shared secret key,
K_SHARED, as indicated by the DSKPP server.
Note: If K is equivalent to K_SERVER, then the cryptographic module
SHOULD verify the server's certificate before using it to encrypt R_C
in accordance with [RFC5280].
Note: If successful execution of the protocol will result in the
replacement of an existing key with a newly generated one, the DSKPP
client MUST verify the MAC provided in the <KeyProvServerHello>
message. The DSKPP client MUST terminate the DSKPP session if the
MAC does not verify, and MUST delete any nonces, keys, and/or secrets
associated with the failed run.
The DSKPP client MUST send the encrypted random nonce to the DSKPP
server in a <KeyProvClientNonce> message, and MAY include client
Authentication Data (AD), such as a MAC derived from an
authentication code and R_C (refer to Section 3.7.1). Finally, the
cryptographic module calculates and stores a symmetric key, K_TOKEN,
of the key type specified in the SC received in <KeyProvServerHello>
(refer to Section 3.4.2.2.<KeyProvServerFinished> for a description
of how K_TOKEN is generated).
DSKPP Client DSKPP Server
------------ ------------
<--- KP, MAC
If Authentication Data (AD) was received in the <KeyProvClientNonce>
message, then the DSKPP server MUST authenticate the user in
accordance with Section 3.7.1. If authentication fails, then DSKPP
server MUST abort. Otherwise, the DSKPP server decrypts R_C,
calculates K_TOKEN from the combination of the two random nonces R_S
and R_C, the encryption key K, and possibly some other data (refer to
Section 3.4.2.2 for a description of how K_TOKEN is generated). The
server then associates K_TOKEN with the cryptographic module in a
server-side data store. The intent is that the data store later on
will be used by some service that needs to verify or decrypt data
produced by the cryptographic module and the key.
Doherty, et al. Expires May 7, 2009 [Page 24]
Internet-Draft DSKPP November 2008
Once the association has been made, the DSKPP server sends a
confirmation message to the DSKPP client called
<KeyProvServerFinished>. The confirmation message MUST include a Key
Package (KP) that holds an identifier for the generated key (but not
the key itself) and additional configuration information, e.g., the
identity of the DSKPP server. The default symmetric key package
format is based on the Portable Symmetric Key Container (PSKC)
defined in [PSKC]. Alternative formats MAY include [SKPC-ASN.1],
PKCS#12 [PKCS-12], or PKCS#5 XML [PKCS-5-XML] format. In addition to
a Key Package, <KeyProvServerFinished> MUST also include a MAC that
the DSKPP client will use to authenticate the message before
committing K_TOKEN
After receiving a <KeyProvServerFinished> message with Status =
"Success", the DSKPP client MUST verify the MAC. The DSKPP client
MUST terminate the DSKPP session if the MAC does not verify, and
MUST, in this case, also delete any nonces, keys, and/or secrets
associated with the failed run of the protocol. If
<KeyProvServerFinished> has Status = "Success" and the MAC was
verified, then the DSKPP client MUST associate the provided key
package with the generated key K_TOKEN, and store this data
permanently. After this operation, it MUST NOT be possible to
overwrite the key unless knowledge of an authorizing key is proven
through a MAC on a later <KeyProvServerHello> (and
<KeyProvServerFinished>) message.
3.4.2. Generation of Symmetric Keys for Cryptographic Modules
With 4-pass DSKPP, the symmetric key that is the target of
provisioning, is generated on-the-fly without being transferred
between the DSKPP client and DSKPP server. A sample data flow
depicting how this works followed by computational information are
provided in the subsections below.
3.4.2.1. Data Flow
A sample data flow showing key generation during the 4-pass protocol
is shown in Figure 6.
Doherty, et al. Expires May 7, 2009 [Page 25]
Internet-Draft DSKPP November 2008
+----------------------+ +-------+ +----------------------+
| +------------+ | | | | |
| | Server key | | | | | |
| +<-| Public |------>------------->-------------+---------+ |
| | | Private | | | | | | | |
| | +------------+ | | | | | | |
| | | | | | | | | |
| V V | | | | V V |
| | +---------+ | | | | +---------+ | |
| | | Decrypt |<-------<-------------<-----------| Encrypt | | |
| | +---------+ | | | | +---------+ | |
| | | +--------+ | | | | ^ | |
| | | | Server | | | | | | | |
| | | | Random |--->------------->------+ +----------+ | |
| | | +--------+ | | | | | | Client | | |
| | | | | | | | | | Random | | |
| | | | | | | | | +----------+ | |
| | | | | | | | | | | |
| | V V | | | | V V | |
| | +------------+ | | | | +------------+ | |
| +-->| DSKPP PRF | | | | | | DSKPP PRF |<----+ |
| +------------+ | | | | +------------+ |
| | | | | | | |
| V | | | | V |
| +-------+ | | | | +-------+ |
| | Key | | | | | | Key | |
| +-------+ | | | | +-------+ |
| +-------+ | | | | +-------+ |
| |Key Id |-------->------------->------|Key Id | |
| +-------+ | | | | +-------+ |
+----------------------+ +-------+ +----------------------+
DSKPP Server DSKPP Client DSKPP Client
(PC Host) (cryptographic module)
Figure 6: Principal data flow for DSKPP key generation -
using public server key
Note: Conceptually, although R_C is one pseudorandom string, it may
be viewed as consisting of two components, R_C1 and R_C2, where R_C1
is generated during the protocol run, and R_C2 can be pre-generated
and loaded on the cryptographic module before the device is issued to
the user. In that case, the latter string, R_C2, SHOULD be unique
for each cryptographic module.
The inclusion of the two random nonces R_S and R_C in the key
generation provides assurance to both sides (the cryptographic module
and the DSKPP server) that they have contributed to the key's
randomness and that the key is unique. The inclusion of the
Doherty, et al. Expires May 7, 2009 [Page 26]
Internet-Draft DSKPP November 2008
encryption key K ensures that no man-in-the-middle may be present, or
else the cryptographic module will end up with a key different from
the one stored by the legitimate DSKPP server.
Note: A man-in-the-middle (in the form of corrupt client software or
a mistakenly contacted server) may present his own public key to the
cryptographic module. This will enable the attacker to learn the
client's version of K_TOKEN. However, the attacker is not able to
persuade the legitimate server to derive the same value for K_TOKEN,
since K_TOKEN is a function of the public key involved, and the
attacker's public key must be different than the correct server's (or
else the attacker would not be able to decrypt the information
received from the client). Therefore, once the attacker is no longer
"in the middle," the client and server will detect that they are "out
of sync" when they try to use their keys. In the case of encrypting
R_C with K_SERVER, it is therefore important to verify that K_SERVER
really is the legitimate server's key. One way to do this is to
independently validate a newly generated K_TOKEN against some
validation service at the server (e.g. using a connection independent
from the one used for the key generation).
3.4.2.2. Computing the Symmetric Key
In DSKPP, K_TOKEN and K_MAC are derived from provisioning key,
K_PROV, which is generated using the DSKPP-PRF function as follows
(refer to Section 3.3.1):
K_PROV = DSKPP-PRF(k,s,dsLen), where
k = R_C (i.e., the secret random value chosen by the DSKPP
client)
s = "Key generation" || K || R_S (where K is the key used to
encrypt R_C and R_S is the random value chosen by the DSKPP
server)
dsLen = (desired length of K_PROV whose first half constitutes
K_MAC and second half constitutes K_TOKEN)
Then K_TOKEN and K_MAC derived from K_PROV, where
K_PROV = K_MAC || K_TOKEN
When computing K_PROV, the derived keys, K_MAC and K_TOKEN, MAY be
subject to an algorithm-dependent transform before being adopted as a
key of the selected type. One example of this is the need for parity
in DES keys.
Doherty, et al. Expires May 7, 2009 [Page 27]
Internet-Draft DSKPP November 2008
3.4.3. Encryption of Pseudorandom Nonces Sent from the DSKPP Client
DSKPP client random nonce(s) are either encrypted with the public key
provided by the DSKPP server or by a shared secret key. For example,
in the case of a public RSA key, an RSA encryption scheme from PKCS
#1 [PKCS-1] MAY be used.
In the case of a shared secret key, to avoid dependence on other
algorithms, the DSKPP client MAY use the DSKPP-PRF function described
herein with the shared secret key K_SHARED as input parameter k (in
this case, K_SHARED SHOULD be used solely for this purpose), the
concatenation of the (ASCII) string "Encryption" and the server's
nonce R_S as input parameter s, and dsLen set to the length of R_C:
dsLen = len(R_C)
DS = DSKPP-PRF(K_SHARED, "Encryption" || R_S, dsLen)
This will produce a pseudorandom string DS of length equal to R_C.
Encryption of R_C MAY then be achieved by XOR-ing DS with R_C:
E(DS, R_C) = DS ^ R_C
The DSKPP server will then perform the reverse operation to extract
R_C from E(DS, R_C).
3.4.4. MAC Calculations
3.4.4.1. Server Authentication in the Case of Key Renewal
A MAC MUST be present in the <KeyProvServerHello> message if the
DSKPP run will result in the replacement of an existing key with a
new one, as proof that the DSKPP server is authenticated to perform
the action. When the MAC value is used for server authentication,
the value MAY be computed by using the DSKPP-PRF function of
Section 3.3.1, in which case the input parameter k MUST be set to the
existing MAC key K_MAC' (i.e., the value of the MAC key that existed
before this protocol run); and input parameter s MUST be set to the
concatenation of the (ASCII) string "MAC 1 computation", R (if sent
by the client), and R_S. Note that the implementation MAY specify
K_MAC' to be the value of the K_TOKEN that is being replaced, or a
version of K_MAC from the previous protocol run.
The input parameter dsLen MUST be set to the length of R_S:
dsLen = len(R_S)
MAC = DSKPP-PRF (K_MAC', "MAC 1 computation" || [R ||] R_S, dsLen)
Doherty, et al. Expires May 7, 2009 [Page 28]
Internet-Draft DSKPP November 2008
The MAC algorithm MUST be the same as the algorithm used for key
confirmation purposes.
3.4.4.2. Key Confirmation
To avoid a false "Commit" message causing the cryptographic module to
end up in an initialized state in which the server does not recognize
the stored key, <KeyProvServerFinished> messages MUST be
authenticated with a MAC, calculated as follows:
msg_hash = SHA-256(msg_1, ..., msg_n)
dsLen = len(msg_hash)
MAC = DSKPP-PRF (K_MAC, "MAC 2 computation" || msg_hash, dsLen)
where
MAC The MAC MUST be calculated using the already established
MAC algorithm and MUST be computed on the (ASCII) string
"MAC 2 computation" and msg_hash using the existing the
MAC key K_MAC.
K_MAC The key derived from K_PROV, as described in
Section 3.4.2.2.
msg_hash The message hash, defined below, of messages msg_1, ...,
msg_n.
If DSKPP-PRF (defined in Section 3.3.1) is used as the MAC algorithm,
then the input parameter s MUST consist of the concatenation of the
(ASCII) string "MAC 2 computation" and msg_hash, and the parameter
dsLen MUST be set to the length of msg_hash.
3.4.4.3. Message Hash Algorithm
To compute a message hash for a MAC, given a sequence of DSKPP
messages msg_1, ..., msg_n, the following operations MUST be carried
out:
a. The sequence of messages contains all DSKPP Request and Response
messages up to but not including this message.
b. Re-transmitted messages are removed from the sequence of
messages.
Note: The resulting sequence of messages MUST be an alternating
sequence of DSKPP Request and DSKPP Response messages
Doherty, et al. Expires May 7, 2009 [Page 29]
Internet-Draft DSKPP November 2008
c. The contents of each message is concatenated together.
d. The resulting string is hashed using SHA-256 in accordance with
[FIPS180-SHA].
3.5. Two-Pass Protocol Usage
This section describes the message flow and methods that comprise the
two-pass protocol variant. Two-pass DSKPP is essentially a transport
of keying material from the DSKPP server to the DSKPP client. The
keying material is contained in a package that is formatted in such a
way that ensures that the symmetric key that is being established,
K_TOKEN, is not exposed to any other entity than the DSKPP server and
the cryptographic module itself. To ensure the keying material is
adequately protected for all two-pass usage scenarios, the key
package format MUST support the following key protection methods, as
defined in Section 3.5.2:
Key Transport This profile is intended for PKI-capable
devices. Key transport is carried out
using the public key of the DSKPP client,
whose private key part resides in the
cryptographic module as the key transport
key.
Key Wrap This profile is ideal for pre-keyed
devices, e.g., SIM cards. Key wrap is
carried out using a key wrapping key,
which is known in advance by both the
cryptographic module and the DSKPP
server.
Passphrase-Based Key Wrap This profile is a variation of the Key
Wrap Profile. It is applicable to
constrained devices with keypads, e.g.,
mobile phones. Key wrap is carried out
using a passphrase-derived key wrapping
key, known in advance by both the
cryptographic module and DSKPP server.
Key package formats that satisfy this criteria are [PSKC],
[SKPC-ASN.1], PKCS#12 [PKCS-12], and PKCS#5 XML [PKCS-5-XML].
3.5.1. Message Flow
The two-pass protocol flow consists of one exchange:
Doherty, et al. Expires May 7, 2009 [Page 30]
Internet-Draft DSKPP November 2008
1: Pass 1 = <KeyProvClientHello>, Pass 2 = <KeyProvServerFinished>
The client's initial <KeyProvClientHello> message is directly
followed by a <KeyProvServerFinished> message (unlike the four-pass
variant, there is no exchange of the <KeyProvServerHello> and
<KeyProvClientNonce> messages). However, as the two-pass variation
of DSKPP consists of one round trip to the server, the client is
still able to include its random nonce, R_C, algorithm preferences
and supported key types in the <KeyProvClientHello> message. Note
that by including R_C in <KeyProvClientHello>, the DSKPP client is
able to ensure the server is alive before "committing" the key.
The DSKPP server MUST ensure that a generated key is associated with
the correct cryptographic module, and if applicable, the correct
user. To ensure that the key K_TOKEN ends up associated with the
correct cryptographic module and user, the DSKPP server MAY couple an
initial user authentication to the DSKPP execution as described in
Section 3.7.
The purpose and content of each message are described below,
including the optional <KeyProvTrigger>.
DSKPP Client DSKPP Server
------------ ------------
[<---] R_TRIGGER, [DeviceID],
[KeyID], [URL_S]
The DSKPP server optionally sends a <KeyProvTrigger> message to the
DSKPP client. The trigger message MUST contain a nonce, R_TRIGGER,
to allow the server to couple the trigger with a later
<KeyProvClientHello> request. <KeyProvTrigger> MAY include a DeviceID
to allow the client to select the device with which it will
communicate (for more information about device identification, refer
to Section 3.6). In the case of key renewal, <KeyProvTrigger> SHOULD
include the identifier for the key, KeyID, that is being replaced.
Finally, the trigger MAY contain a URL for the DSKPP client to use
when contacting the DSKPP server.
DSKPP Client DSKPP Server
------------ ------------
R_C, SAL, KPML, [AD],
[R_TRIGGER],
[DeviceID], [KeyID] --->
The DSKPP client sends a <KeyProvClientHello> message to the DSKPP
server. <KeyProvClientHello> MUST include client nonce, R_C, and a
Security Attribute List (SAL), identifying which DSKPP versions,
protocol variations (in this case "two-pass"), key package formats,
Doherty, et al. Expires May 7, 2009 [Page 31]
Internet-Draft DSKPP November 2008
key types, encryption and MAC algorithms that the client supports.
Unlike 4-pass DSKPP, the 2-pass DSKPP client uses the
<KeyProvClientHello> message to declare the list of Key Protection
Method List (KPML) it supports, providing required payload
information in accordance with Section 3.5.2. Optionally, the
message MAY include client Authentication Data (AD), such as a MAC
derived from an authentication code and R_C (refer to Section 3.7.1).
In addition, if a trigger message preceded <KeyProvClientHello>, then
it passes the parameters received in <KeyProvTrigger> back to the
DSKPP Server. In particular, it MUST include R_TRIGGER so that the
DSKPP server can associate the client with the trigger message, and
SHOULD include DeviceID and KeyID.
DSKPP Client DSKPP Server
------------ ------------
<--- KPH, KP, E(K,K_PROV),
MAC, AD
If Authentication Data (AD) was received, then the DSKPP server MUST
authenticate the user in accordance with Section 3.7.1. If
authentication fails, then DSKPP server MUST abort. Otherwise, the
DSKPP server generates a key K_PROV from which two keys, K_TOKEN and
K_MAC, are derived. (Alternatively, the key K_PROV may have been
pre-generated as described in Section 1.1.1.) The DSKPP server
selects a Key Protection Method (KPM) and applies it to K_PROV in
accordance with Section 3.5.2. The server then associates K_TOKEN
with the cryptographic module in a server-side data store. The
intent is that the data store later will be used by some service that
needs to verify or decrypt data produced by the cryptographic module
and the key.
Once the association has been made, the DSKPP server sends a
confirmation message to the DSKPP client called
<KeyProvServerFinished>. For two-pass DSKPP, the confirmation
message MUST include a Key Package Header (KPH) that contains the
DSKPP Server's ID and KPM. The ServerID is used for authentication
purposes, and the KPM informs the DSKPP client of the security
context in which it will operate. In addition to the KPH, the
confirmation message MUST include the Key Package (KP) that holds the
KeyID, K_PROV from which K_TOKEN and K_MAC are derived, and
additional configuration information. The default symmetric key
package format is based on the Portable Symmetric Key Container
(PSKC) defined in [PSKC]. Alternative formats MAY include
[SKPC-ASN.1], PKCS#12 [PKCS-12], or PKCS#5 XML [PKCS-5-XML].
Finally, <KeyProvServerFinished> MUST include two MACs (MAC and AD)
whose values are calculated with contribution from the client nonce,
R_C, provided in the <ClientHello> message. The MAC values will
allow the cryptographic module to perform key confirmation and server
Doherty, et al. Expires May 7, 2009 [Page 32]
Internet-Draft DSKPP November 2008
authentication before "committing" the key (see Section 3.5.3 for
more information).
After receiving a <KeyProvServerFinished> message with Status =
"Success", the DSKPP client MUST verify both MAC values (MAC and AD).
The DSKPP client MUST terminate the DSKPP protocol run if either MAC
does not verify, and MUST, in this case, also delete any nonces,
keys, and/or secrets associated with the failed run of the protocol.
If <KeyProvServerFinished> has Status = "Success" and the MACs were
verified, then the DSKPP client MUST extract the key data from the
provided key package, and store data locally. After this operation,
it MUST NOT be possible to overwrite the key unless knowledge of an
authorizing key is proven through a MAC on a later
<KeyProvServerFinished> message.
3.5.2. Key Protection Profiles
This section introduces three profiles of two-pass DSKPP for key
protection. Further profiles MAY be defined by external entities or
through the IETF process.
3.5.2.1. Key Transport Profile
This profile establishes a symmetric key, K_TOKEN, in the
cryptographic module using key transport and key derivation. Key
transport is carried out using a public key whose private key part
resides in the cryptographic module as the key transport key. A
provisioning master key, K_PROV, MUST be transported from the DSKPP
server to the client. From K_PROV, two keys are derived: the
symmetric key to be established, K_TOKEN, and a key used to compute
MACs, K_MAC.
This profile MUST be identified with the following URN:
urn:ietf:params:xml:schema:keyprov:dskpp#transport
In the two-pass version of DSKPP, the client MUST send a payload with
the Key Transport Profile. This payload MUST be of type <ds:
KeyInfoType> ([XMLDSIG]), and only those choices of <ds:KeyInfoType>
that identify a public key are allowed (i.e., <ds:KeyName>, <ds:
KeyValue>, <ds:X509Data>, or <ds:PGPData>). The <ds:X509Certificate>
option of the <ds:X509Data> alternative is RECOMMENDED when the
public key corresponding to the private key on the cryptographic
module has been certified.
The server payload associated with this key protection method MUST be
of type <xenc:EncryptedKeyType> ([XMLENC]), and only those encryption
methods utilizing a public key that are supported by the DSKPP client
(as indicated in the <SupportedEncryptionAlgorithms> element of the
Doherty, et al. Expires May 7, 2009 [Page 33]
Internet-Draft DSKPP November 2008
<KeyProvClientHello> message in the case of 2-pass DSKPP) are allowed
as values for the <xenc:EncryptionMethod>. Further, in the case of
2-pass DSKPP, <ds:KeyInfo> MUST contain the same value (i.e. identify
the same public key) as the <Payload> of the corresponding supported
key protection method in the <KeyProvClientHello> message that
triggered the response. <xenc:CarriedKeyName> MAY be present, but
MUST, when present, contain the same value as the <KeyID> element of
the <KeyProvServerFinished> message. The Type attribute of the
<xenc:EncryptedKeyType> MUST be present and MUST identify the type of
the wrapped key. The type MUST be one of the types supported by the
DSKPP client (as reported in the <SupportedKeyTypes> of the preceding
<KeyProvClientHello> message in the case of 2-pass DSKPP). The
transported key, K_PROV, MUST consist of two parts of equal length.
The first half constitutes K_MAC and the second half constitutes
K_TOKEN. The length of K_TOKEN (and hence also the length of K_MAC)
is determined by the type of K_TOKEN.
DSKPP servers and cryptographic modules supporting this profile MUST
support the http://www.w3.org/2001/04/xmlenc#rsa-1_5 key wrapping
mechanism defined in [XMLENC].
When this profile is used, the MacAlgorithm attribute of the <Mac>
element of the <KeyProvServerFinished> message MUST be present and
MUST identify the selected MAC algorithm. The selected MAC algorithm
MUST be one of the MAC algorithms supported by the DSKPP client (as
indicated in the <SupportedMacAlgorithms> element of the
<KeyProvClientHello> message in the case of 2-pass DSKPP). The MAC
MUST be calculated as described in Section 3.5.3 for two-pass DSKPP.
In addition, DSKPP servers MUST include the AuthenticationDataType
element in their <KeyProvServerFinished> messages whenever a
successful protocol run will result in an existing K_TOKEN being
replaced.
3.5.2.2. Key Wrap Profile
This profile establishes a symmetric key, K_TOKEN, in the
cryptographic module through key wrap and key derivation. Key wrap
is carried out using a symmetric key wrapping key, known in advance
by both the cryptographic module and the DSKPP server. A
provisioning master key, K_PROV, MUST be transported from the DSKPP
server to the client. From K_PROV, two keys are derived: the
symmetric key to be established, K_TOKEN, and a key used to compute
MACs, K_MAC.
This profile MUST be identified with the following URI:
urn:ietf:params:xml:schema:keyprov:dskpp#wrap
Doherty, et al. Expires May 7, 2009 [Page 34]
Internet-Draft DSKPP November 2008
In the 2-pass version of DSKPP, the client MUST send a payload with
the Key Wrap Profile. This payload MUST be of type <ds:KeyInfoType>
([XMLDSIG]), and only those choices of <ds:KeyInfoType> that identify
a symmetric key are allowed (i.e., <ds:KeyName> and <ds:KeyValue>).
The <ds:KeyName> alternative is RECOMMENDED.
The server payload associated with this key protection method MUST be
of type <xenc:EncryptedKeyType> ([XMLENC]), and only those encryption
methods utilizing a symmetric key that are supported by the DSKPP
client (as indicated in the <SupportedEncryptionAlgorithms> element
of the <KeyProvClientHello> message in the case of 2-pass DSKPP) are
allowed as values for the <xenc:EncryptionMethod>. Further, in the
case of 2-pass DSKPP, <ds:KeyInfo> MUST contain the same value (i.e.
identify the same symmetric key) as the <Payload> of the
corresponding supported key protection method in the
<KeyProvClientHello> message that triggered the response. <xenc:
CarriedKeyName> MAY be present, and MUST, when present, contain the
same value as the <KeyID> element of the <KeyProvServerFinished>
message. The Type attribute of the <xenc:EncryptedKeyType> MUST be
present and MUST identify the type of the wrapped key. The type MUST
be one of the types supported by the DSKPP client (as reported in the
<SupportedKeyTypes> of the preceding <KeyProvClientHello> message in
the case of 2-pass DSKPP). The wrapped key, K_PROV, MUST consist of
two parts of equal length. The first half constitutes K_MAC and the
second half constitutes K_TOKEN. The length of K_TOKEN (and hence
also the length of K_MAC) is determined by the type of K_TOKEN.
DSKPP servers and cryptographic modules supporting this profile MUST
support the http://www.w3.org/2001/04/xmlenc#kw-aes128 key wrapping
mechanism defined in [XMLENC].
When this profile is used, the MacAlgorithm attribute of the <Mac>
element of the <KeyProvServerFinished> message MUST be present and
MUST identify the selected MAC algorithm. The selected MAC algorithm
MUST be one of the MAC algorithms supported by the DSKPP client (as
indicated in the <SupportedMacAlgorithms> element of the
<KeyProvClientHello> message in the case of 2-pass DSKPP). The MAC
MUST be calculated as described in Section 3.5.3.
In addition, DSKPP servers MUST include the AuthenticationDataType
element in their <KeyProvServerFinished> messages whenever a
successful protocol run will result in an existing K_TOKEN being
replaced.
3.5.2.3. Passphrase-Based Key Wrap Profile
This profile is a variation of the key wrap profile. It establishes
a symmetric key, K_TOKEN, in the cryptographic module through key
Doherty, et al. Expires May 7, 2009 [Page 35]
Internet-Draft DSKPP November 2008
wrap and key derivation. Key wrap is carried out using a passphrase-
derived key wrapping key. The passphrase is known in advance by both
the user of the device and the DSKPP server. To preserve the
property of not exposing K_TOKEN to any other entity than the DSKPP
server and the cryptographic module itself, the method SHOULD be
employed only when the device contains facilities (e.g. a keypad) for
direct entry of the passphrase. A provisioning master key, K_PROV,
MUST be transported from the DSKPP server to the client. From
K_PROV, two keys are derived: the symmetric key to be established,
K_TOKEN, and a key used to compute MACs, K_MAC.
This profile MUST be identified with the following URI:
urn:ietf:params:xml:schema:keyprov:dskpp#passphrase-wrap
In the 2-pass version of DSKPP, the client MUST send a payload with
the Passphrase-Based Key Wrap Profile. This payload MUST be of type
<ds:KeyInfoType> ([XMLDSIG]). The <ds:KeyName> option MUST be used
and the key name MUST identify the passphrase that will be used by
the server to generate the key wrapping key. As an example, the
identifier could be a user identifier or a registration identifier
issued by the server to the user during a session preceding the DSKPP
protocol run.
The server payload associated with this key protection method MUST be
of type <xenc:EncryptedKeyType> ([XMLENC]), and only those encryption
methods utilizing a passphrase to derive the key wrapping key that
are supported by the DSKPP client (as indicated in the
<SupportedEncryptionAlgorithms> element of the <KeyProvClientHello>
message in the case of 2-pass DSKPP) are allowed as values for the
<xenc:EncryptionMethod>. Further, in the case of 2-pass DSKPP, <ds:
KeyInfo> MUST contain the same value (i.e. identify the same
passphrase) as the <Payload> of the corresponding supported key
protection method in the <KeyProvClientHello> message that triggered
the response. <xenc:CarriedKeyName> MAY be present, and MUST, when
present, contain the same value as the <KeyID> element of the
<KeyProvServerFinished> message. The Type attribute of the <xenc:
EncryptedKeyType> MUST be present and MUST identify the type of the
wrapped key. The type MUST be one of the types supported by the
DSKPP client (as reported in the <SupportedKeyTypes> of the preceding
<KeyProvClientHello> message in the case of 2-pass DSKPP). The
wrapped key, K_PROV, MUST consist of two parts of equal length. The
first half constitutes K_MAC and the second half constitutes K_TOKEN.
The length of K_TOKEN (and hence also the length of K_MAC) is
determined by the type of K_TOKEN.
DSKPP servers and cryptographic modules supporting this profile MUST
support the PBES2 password based encryption scheme defined in
[PKCS-5] (and identified as
Doherty, et al. Expires May 7, 2009 [Page 36]
Internet-Draft DSKPP November 2008
http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbes2 in
[PKCS-5-XML]), the PBKDF2 passphrase-based key derivation function
also defined in [PKCS-5] (and identified as
http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbkdf2 in
[PKCS-5-XML]), and the http://www.w3.org/2001/04/xmlenc#kw-aes128 key
wrapping mechanism defined in [XMLENC].
When this profile is used, the MacAlgorithm attribute of the <Mac>
element of the <KeyProvServerFinished> message MUST be present and
MUST identify the selected MAC algorithm. The selected MAC algorithm
MUST be one of the MAC algorithms supported by the DSKPP client (as
indicated in the <SupportedMacAlgorithms> element of the
<KeyProvClientHello> message in the case of 2-pass DSKPP). The MAC
MUST be calculated as described in Section 3.5.3.
In addition, DSKPP servers MUST include the AuthenticationDataType
element in their <KeyProvServerFinished> messages whenever a
successful protocol run will result in an existing K_TOKEN being
replaced.
3.5.3. MAC Calculations
3.5.3.1. Key Confirmation
The MAC value in the <KeyProvServerFinished> message MUST be
calculated as follows:
msg_hash = SHA-256(msg_1, ..., msg_n)
dsLen = len(msg_hash)
MAC = DSKPP-PRF (K_MAC, "MAC 1 computation" || msg_hash || ServerID,
dsLen)
where
MAC The MAC MUST be calculated using the already established
MAC algorithm and MUST be computed on the (ASCII) string
"MAC 1 computation", msg_hash, and ServerID using the
existing the MAC key K_MAC.
K_MAC The key, along with K_TOKEN, that is derived from K_PROV
which the DSKPP server MUST provide to the cryptographic
module.
Doherty, et al. Expires May 7, 2009 [Page 37]
Internet-Draft DSKPP November 2008
msg_hash The message hash, defined in Section 3.4.4.3, of messages
msg_1, ..., msg_n.
ServerID The identifier that the DSKPP server MUST include in the
<KeyPackage> element of <KeyProvServerFinished>.
If DSKPP-PRF (defined in Section 3.3.1) is used as the MAC algorithm,
then the input parameter s MUST consist of the concatenation of the
(ASCII) string "MAC 1 computation", msg_hash, and ServerID, and the
parameter dsLen MUST be set to the length of msg_hash.
3.5.3.2. Server Authentication in the Case of Key Renewal
A second MAC MUST be present in the <KeyProvServerFinished> message
as proof that the DSKPP server is authorized to replace a key on the
cryptographic module. In 2-pass DSKPP, servers provide the second
MAC in the AuthenticationDataType element of <KeyProvServerFinished>.
The MAC value in the AuthenticationDataType element MUST be computed
on the (ASCII) string "MAC 2 computation", the server identifier
ServerID, and R, using a pre-existing MAC key K_MAC' (the MAC key
that existed before this protocol run). Note that the implementation
may specify K_MAC' to be the value of the K_TOKEN that is being
replaced, or a version of K_MAC from the previous protocol run.
If DSKPP-PRF is used as the MAC algorithm, then the input parameter s
MUST consist of the concatenation of the (ASCII) string "MAC 2
computation" ServerID, and R. The parameter dsLen MUST be set to at
least 16 (i.e. the length of the MAC MUST be at least 16 octets):
dsLen >= 16
MAC = DSKPP-PRF (K_MAC', "MAC 2 computation" || ServerID || R, dsLen)
The MAC algorithm MUST be the same as the algorithm used for key
confirmation purposes.
3.6. Device Identification
The DSKPP server MAY be pre-configured with a unique device
identifier corresponding to a particular cryptographic module. The
DSKPP server MAY then include this identifier in the DSKPP
initialization trigger, in which case the DSKPP client MUST include
it in its message(s) to the DSKPP server for authentication. Note
that it is also legitimate for a DSKPP client to initiate the DSKPP
protocol run without having received an initialization message from a
server, but in this case any provided device identifier MUST NOT be
accepted by the DSKPP server unless the server has access to a unique
key for the identified device and that key will be used in the
Doherty, et al. Expires May 7, 2009 [Page 38]
Internet-Draft DSKPP November 2008
protocol.
3.7. User Authentication
The DSKPP server MUST ensure that a generated key is associated with
the correct cryptographic module, and if applicable, the correct
user. If the user has not been authenticated by some out-of-band
means, then the user SHOULD be authenticated within the DSKPP. When
relying on DSKPP for user authentication, the DSKPP server SHOULD
explicitly rely on client-provided Authentication Data (AD) to verify
that a legitimate user is behind the wheel. For a further discussion
of this, and threats related to man-in-the-middle attacks in this
context, see Section 9.6.4.
3.7.1. Authentication Data
As described in the message flows above (see Section 3.4.1 and
Section 3.5.1), the DSKPP client MAY include Authentication Data (AD)
in its request(s). Note that AD MAY be omitted if client certificate
authentication has been provided by the transport channel such as
TLS. Nonetheless, when AD is provided, the DSKPP server MUST verify
the data before continuing with the protocol run.
The data element that holds AD MUST include a Client ID and a value
derived from an Authentication Code (AC). The Client ID represents a
key request made by the user to the Provisioning Server. AC is a
one-time use value that is a (potentially low entropy) shared secret
between a user and the Provisioning Server. This secret is made
available to the client before the DSKPP message exchange. Below are
examples of how the DSKPP client may obtain the AC:
a. A key issuer may deliver an AC to the user or device in response
to a key request, which the user enters into an application
hosted on their device. For example, a user runs an application
that is resident on their device, e.g., a mobile phone. The
application cannot proceed without a new symmetric key. The user
is redirected to an issuer's Web site from where the user
requests a key. The issuer's Web application processes the
request, and returns an AC, which then appears on the user's
display. The user then invokes a symmetric key-based application
hosted on the device, which asks the user to input the AC using a
keypad. The application invokes the DSKPP client, providing it
with the AC.
b. The provisioning server may send a trigger message,
<KeyProvTrigger>, to the DSKPP client, which sets the value of
the trigger nonce, R_TRIGGER, to AC. When this method is used, a
transport providing confidentiality and integrity MUST be used to
deliver the DSKPP initialization trigger from the DSKPP server to
Doherty, et al. Expires May 7, 2009 [Page 39]
Internet-Draft DSKPP November 2008
the DSKPP client, e.g., HTTPS.
A description of the AC and how it is used to derive AD is contained
in the sub-sections below.
3.7.2. Authentication Code Format
AC is encoded in Type-Length-Value (TLV) format. The format consists
of a minimum of two TLVs and a variable number of additional TLVs,
depending on implementation. See Figure 7 for TLV field layout.
A 1 byte type field identifies the specific TLV, and a 1 byte length,
in hexadecimal, indicates the length of the value field contained in
the TLV. A TLV MUST start on a 4 byte boundary. Pad bytes MUST be
placed at the end of the previous TLV in order to align the next TLV.
These pad bytes are not counted in the length field of the TLV.
0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | Value[0] | ...Value[Length-1]
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 7: TLV Format
The TLV fields are defined as follows:
Type (1 byte) The integer value identifying the type of
information contained in the value field.
Length (1 byte) The length, in hexadecimal, of the value
field to follow.
Value (variable length) A variable-length hexadecimal value
containing the instance-specific
information for this TLV.
Figure 8 summarizes the TLVs defined in this document. Optional TLVs
are allowed for vendor-specific extensions with the constraint that
the high bit MUST be set to indicate a vendor-specific type. Other
TLVs are left for later revisions of this protocol.
Doherty, et al. Expires May 7, 2009 [Page 40]
Internet-Draft DSKPP November 2008
+------+------------+-------------------------------------------+
| Type | TLV Name | Conformance | Example Usage |
+------+------------+-------------------------------------------+
| 1 | Client ID | Mandatory | { "AC00000A" } |
+------+------------+-------------+-----------------------------+
| 2 | Password | Mandatory | { "3582" } |
+------+------------+-------------+-----------------------------+
| 3 | Checksum | Optional | { 0x5F8D } |
+------+------------+-------------+-----------------------------+
Figure 8: TLV Summary
3.7.2.1. Client ID (MANDATORY)
The Client ID is a mandatory TLV that represents the user's key
request. A summary of the Client ID TLV format is given in Figure 9.
The fields are transmitted from left to right.
0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 0x1 | Length | clientID ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 9: ClientID TLV Format
clientID is an ASCII string that identifies the key request. The
clientID MUST be HEX encoded.
For example, suppose clientID is set to "AC00000A", the hexadecimal
equivalent is 0x4143303030303041, resulting in a TLV of {0x1, 0x8,
0x4143303030303041}.
3.7.2.2. Password (MANDATORY)
The Password is a mandatory TLV the contains a one-time use shared
secret known by the user and the Provisioning Server. A summary of
the Password TLV format is given in Figure 10. The fields are
transmitted from left to right.
Doherty, et al. Expires May 7, 2009 [Page 41]
Internet-Draft DSKPP November 2008
0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 0x2 | Length | password ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 10: Password TLV Format
Password is a unique value that SHOULD be a random string to make AC
more difficult to guess. The string MUST be UTF-8 encoded in
accordance with [RFC3629].
For example, suppose password is set to "3582", then the TLV would be
{0x2, 0x4, UTF-8("3582")}.
3.7.2.3. Checksum (OPTIONAL)
The Checksum is an OPTIONAL TLV, which is generated by the issuing
server and sent to the user as part of the AC. A summary of the
Checksum TLV format is given in Figure 11. The fields are
transmitted from left to right.
0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 0x3 | Length | checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 11: Checksum TLV Format
If included, the checksum MUST be computed using the CRC16 algorithm
[ISO3309]. When the user enters the AC, the typed password is
verified with the checksum to ensure it is correctly entered by the
user.
For example, suppose the Password is set to "3582", then the CRC16
calculation would generate a checksum of 0x5F8D, resulting in TLV
{0x3, 0x2, 0x5F8D}.
3.7.3. Authentication Data Calculation
The Authentication Data consists of a Client ID (extracted from the
AC) and a value, which is derived from AC as follows (refer to
Section 3.3.1 for a description of DSKPP-PRF in general and
Appendix C for a description of DSKPP-PRF-AES):
MAC = DSKPP-PRF(K_AC, AC->clientID||URL_S||R_C||[R_S], 16)
Doherty, et al. Expires May 7, 2009 [Page 42]
Internet-Draft DSKPP November 2008
In four-pass DSKPP, the cryptographic module uses R_C, R_S, and URL_S
to calculate the MAC, where URL_S is the URL the DSKPP client uses
when contacting the DSKPP server. In two-pass DSKPP, the
cryptographic module does not have access to R_S, therefore only R_C
is used in combination with URL_S to produce the MAC. In either
case, K_AC MUST be derived from AC>password as follows [PKCS-5]:
K_AC = PBKDF2(AC->password, R_C || K, iter_count, 16)
One of the following values for K MUST be used:
a. In four-pass:
* The public key of the DSKPP server (K_SERVER), or (in the pre-
shared key variant) the pre-shared key between the client and
the server (K_SHARED)
b. In two-pass:
* The public key of the DSKPP client, or the public key of the
device when a device certificate is available
* The pre-shared key between the client and the server
(K_SHARED)
* A passphrase-derived key
The iteration count, iter_count, MUST be set to at least 100,000
except for case (b) and (c), above, in which case it MUST be set to
1.
4. DSKPP Message Formats
The message formats from the DSKPP XML schema, found in Section 7,
are explained in this section. Examples can be found in Appendix A.
The XML format for DSKPP messages has been designed to be extensible.
However, it is possible that the use of extensions will harm
interoperability; therefore, any use of extensions SHOULD be
carefully considered. For example, if a particular implementation
relies on the presence of a proprietary extension, then it may not be
able to interoperate with independent implementations that have no
knowledge of this extension.
4.1. General XML Schema Requirements
Some DSKPP elements rely on the parties being able to compare
received values with stored values. Unless otherwise noted, all
elements in this document that have the XML Schema "xs:string" type,
or a type derived from it, MUST be compared using an exact binary
comparison. In particular, DSKPP implementations MUST NOT depend on
case-insensitive string comparisons, normalization or trimming of
white space, or conversion of locale-specific formats such as
Doherty, et al. Expires May 7, 2009 [Page 43]
Internet-Draft DSKPP November 2008
numbers.
Implementations that compare values that are represented using
different character encodings MUST use a comparison method that
returns the same result as converting both values to the Unicode
character encoding, Normalization Form C [UNICODE], and then
performing an exact binary comparison.
No collation or sorting order for attributes or element values is
defined. Therefore, DSKPP implementations MUST NOT depend on
specific sorting orders for values.
4.2. Components of the <KeyProvTrigger> Message
The DSKPP server MAY initialize the DSKPP protocol by sending a
<KeyProvTrigger> message. This message MAY, e.g., be sent in
response to a user requesting key initialization in a browsing
session.
Doherty, et al. Expires May 7, 2009 [Page 44]
Internet-Draft DSKPP November 2008
<xs:element name="KeyProvTrigger" type="dskpp:KeyProvTriggerType">
</xs:element>
<xs:complexType name="KeyProvTriggerType">
<xs:sequence>
<xs:choice>
<xs:element name="InitializationTrigger"
type="dskpp:InitializationTriggerType" />
<xs:any namespace="##other" processContents="strict" />
</xs:choice>
</xs:sequence>
<xs:attribute name="Version" type="dskpp:VersionType" />
</xs:complexType>
<xs:complexType name="InitializationTriggerType">
<xs:sequence>
<xs:element minOccurs="0" name="DeviceIdentifierData"
type="dskpp:DeviceIdentifierDataType" />
<xs:element minOccurs="0" name="KeyID" type="xs:base64Binary" />
<xs:element minOccurs="0" name="TokenPlatformInfo"
type="dskpp:TokenPlatformInfoType" />
<xs:element name="TriggerNonce" type="dskpp:NonceType" />
<xs:element minOccurs="0" name="ServerUrl" type="xs:anyURI" />
<xs:any minOccurs="0" namespace="##other"
processContents="strict" />
</xs:sequence>
</xs:complexType>
The <KeyProvTrigger> element is intended for the DSKPP client and MAY
inform the DSKPP client about the identifier for the device that
houses the cryptographic module to be initialized, and optionally of
the identifier for the key on that module. The latter would apply to
key renewal. The trigger always contains a nonce to allow the DSKPP
server to couple the trigger with a later DSKPP <KeyProvClientHello>
request. Finally, the trigger MAY contain a URL to use when
contacting the DSKPP server. The <xs:any> elements are for future
extensibility. Any provided <DeviceIdentifierData> or <KeyID> values
MUST be used by the DSKPP client in the subsequent
<KeyProvClientHello> request. The OPTIONAL <TokenPlatformInfo>
element informs the DSKPP client about the characteristics of the
intended cryptographic module platform, and applies in the public-key
variant of DSKPP in situations when the client potentially needs to
decide which one of several modules to initialize.
4.3. Components of the <KeyProvClientHello> Request
This message is the initial message sent from the DSKPP client to the
DSKPP server in both variations of the DSKPP.
Doherty, et al. Expires May 7, 2009 [Page 45]
Internet-Draft DSKPP November 2008
<xs:element name="KeyProvClientHello"
type="dskpp:KeyProvClientHelloPDU">
</xs:element>
<xs:complexType name="KeyProvClientHelloPDU">
<xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractRequestType">
<xs:sequence>
<xs:element minOccurs="0" name="DeviceIdentifierData"
type="dskpp:DeviceIdentifierDataType" />
<xs:element minOccurs="0" name="KeyID"
type="xs:base64Binary" />
<xs:element minOccurs="0" name="ClientNonce"
type="dskpp:NonceType" />
<xs:element minOccurs="0" name="TriggerNonce"
type="dskpp:NonceType" />
<xs:element name="SupportedKeyTypes"
type="dskpp:AlgorithmsType" />
<xs:element name="SupportedEncryptionAlgorithms"
type="dskpp:AlgorithmsType" />
<xs:element name="SupportedMacAlgorithms"
type="dskpp:AlgorithmsType" />
<xs:element minOccurs="0" name="SupportedProtocolVariants"
type="dskpp:ProtocolVariantsType" />
<xs:element minOccurs="0" name="SupportedKeyPackages"
type="dskpp:KeyPackagesFormatType" />
<xs:element minOccurs="0" name="AuthenticationData"
type="dskpp:AuthenticationDataType" />
<xs:element minOccurs="0" name="Extensions"
type="dskpp:ExtensionsType" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
The components of this message have the following meaning:
o Version: (attribute inherited from the AbstractRequestType type)
The highest version of this protocol the client supports. Only
version one ("1.0") is currently specified.
o <DeviceIdentifierData>: An identifier for the cryptographic module
as defined in Section 3.7 above. The identifier MUST only be
present if such shared secrets exist or if the identifier was
provided by the server in a <KeyProvTrigger> element (see
Section 6.2.7). In the latter case, it MUST have the same value
as the identifier provided in that element.
Doherty, et al. Expires May 7, 2009 [Page 46]
Internet-Draft DSKPP November 2008
o <KeyID>: An identifier for the key that will be overwritten if the
protocol run is successful. The identifier MUST only be present
if the key exists or if the identifier was provided by the server
in a <KeyProvTrigger> element, in which case, it MUST have the
same value as the identifier provided in that element (see a
(Section 4.2) and Section 6.2.7).
o <ClientNonce>: This is the nonce R, which, when present, MUST be
used by the server when calculating MAC values (see below). It is
RECOMMENDED that clients include this element whenever the <KeyID>
element is present.
o <TriggerNonce>: This OPTIONAL element MUST be present if and only
if the DSKPP run was initialized with a <KeyProvTrigger> message
(see Section 6.2.7), and MUST, in that case, have the same value
as the <TriggerNonce> child of that message. A server using
nonces in this way MUST verify that the nonce is valid and that
any device or key identifier values provided in the
<KeyProvTrigger> message match the corresponding identifier values
in the <KeyProvClientHello> message.
o <SupportedKeyTypes>: A sequence of container elements that in turn
contain URLs indicating the key types for which the cryptographic
module is willing to generate keys through DSKPP.
o <SupportedEncryptionAlgorithms>: A sequence of container elements
that in turn contain URLs indicating the encryption algorithms
supported by the cryptographic module for the purposes of DSKPP.
The DSKPP client MAY indicate the same algorithm both as a
supported key type and as an encryption algorithm.
o <SupportedMacAlgorithms>: A sequence of container elements that in
turn contain URLs indicating the MAC algorithms supported by the
cryptographic module for the purposes of DSKPP. The DSKPP client
MAY indicate the same algorithm both as an encryption algorithm
and as a MAC algorithm (e.g.,
http://www.ietf.org/keyprov/dskpp#dskpp-prf-aes-128, which is
defined in Appendix C).
o <SupportedProtocolVariants>: This OPTIONAL element is used by the
DSKPP client to indicate support for four-pass or two-pass DSKPP.
If two-pass support is specified, then <KeyProvClientNonce> MUST
be set to nonce R in the <KeyProvClientHello> message unless
<TriggerNonce> is already present.
o <SupportedKeyPackages>: This OPTIONAL element is a sequence of
container elements that in turn contain URLs indicating the key
package formats supported by the DSKPP client. If this element is
not provided, then the DSKPP server MUST proceed with
"http://www.ietf.org/keyprov/pskc#KeyContainer" (see [PSKC]).
o <AuthenticationData>: This OPTIONAL element contains data that the
DSKPP client uses to authenticate the user or device to the DSKPP
server. The element is set as specified in Section 3.7.
Doherty, et al. Expires May 7, 2009 [Page 47]
Internet-Draft DSKPP November 2008
o <Extensions>: A sequence of OPTIONAL extensions. One extension is
defined for this message in this version of DSKPP: the
ClientInfoType (see Section 5).
Some of the core elements of the message are described below.
4.3.1. The DeviceIdentifierDataType Type
The DeviceIdentifierDataType type is used to uniquely identify the
device that houses the cryptographic module, e.g., a mobile phone.
The device identifier allows the DSKPP server to find, e.g., a pre-
shared key transport key for 2-pass DSKPP and/or the correct shared
secret for MAC'ing purposes. The default DeviceIdentifierDataType is
defined in [PSKC].
<xs:complexType name="DeviceIdentifierDataType">
<xs:choice>
<xs:element name="DeviceId" type="pskc:DeviceIdType" />
<xs:any namespace="##other" processContents="strict" />
</xs:choice>
</xs:complexType>
4.3.2. The ProtocolVariantsType Type
The ProtocolVariantsType is a complex type that is a sequence of
elements, each describing a DSKPP protocol variant. The DSKPP client
MAY use the ProtocolVariantsType to identify which protocol variants
it supports, i.e., by providing <SupportProtocolVariants> within a
<KeyProvClientHello> message.
Selecting the <FourPass> element signals client support for 4-pass
DSKPP as described in Section 3.4.1.
Selecting the <TwoPass> element signals client support for the 2-pass
version of DSKPP as described in Section 3.5.1. The <TwoPass>
element is of type KeyProtectionDataType, which carries information
that informs the server of supported two-pass key protection methods
as described in Section 3.5.2, and provides OPTIONAL payload data to
the DSKPP server. The payload is sent in an opportunistic fashion,
and MAY be discarded by the DSKPP server if the server does not
support the key protection method with which the payload is
associated.
If the DSKPP client does not include <SupportedProtocolVariants> in
the <KeyProvClientHello> message, then the DSKPP server MUST proceed
by using the 4-pass DSKPP variant. If the DSKPP server does not
support 4-pass DSKPP, then the server MUST use the two-pass protocol
variant. If it cannot support the two-pass protocol variant, then
Doherty, et al. Expires May 7, 2009 [Page 48]
Internet-Draft DSKPP November 2008
the protocol run MUST fail.
<xs:complexType name="ProtocolVariantsType">
<xs:sequence>
<xs:element name="FourPass" minOccurs="0" />
<xs:element name="TwoPass" type="dskpp:KeyProtectionDataType"
minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="KeyProtectionDataType">
<xs:sequence maxOccurs="unbounded">
<xs:element name="SupportedKeyProtectionMethod" type="xs:anyURI"/>
<xs:element name="Payload" type="dskpp:PayloadType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
The elements of this type have the following meaning:
o <SupportedKeyProtectionMethod>: A two-pass key protection method
supported by the DSKPP client. Multiple supported methods MAY be
present, in which case they MUST be listed in order of precedence.
o <Payload>: An OPTIONAL payload associated with each supported key
protection method.
A DSKPP client that indicates support for two-pass DSKPP MUST also
include the nonce R in its <KeyProvClientHello> message (this will
en