Tech-invite3GPPspaceIETFspace
96959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 6063

Dynamic Symmetric Key Provisioning Protocol (DSKPP)

Pages: 105
Proposed Standard
Errata
Part 1 of 4 – Pages 1 to 25
None   None   Next

Top   ToC   RFC6063 - Page 1
Internet Engineering Task Force (IETF)                        A. Doherty
Request for Comments: 6063             RSA, The Security Division of EMC
Category: Standards Track                                         M. Pei
ISSN: 2070-1721                                           VeriSign, Inc.
                                                              S. Machani
                                                        Diversinet Corp.
                                                              M. Nystrom
                                                         Microsoft Corp.
                                                           December 2010


          Dynamic Symmetric Key Provisioning Protocol (DSKPP)

Abstract

The Dynamic Symmetric Key Provisioning Protocol (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. 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. Status of This Memo This is an Internet Standards Track document. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741. Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6063.
Top   ToC   RFC6063 - Page 2
Copyright Notice

   Copyright (c) 2010 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

   This document may contain material from IETF Documents or IETF
   Contributions published or made publicly available before November
   10, 2008.  The person(s) controlling the copyright in some of this
   material may not have granted the IETF Trust the right to allow
   modifications of such material outside the IETF Standards Process.
   Without obtaining an adequate license from the person(s) controlling
   the copyright in such materials, this document may not be modified
   outside the IETF Standards Process, and derivative works of it may
   not be created outside the IETF Standards Process, except to format
   it for publication as an RFC or to translate it into languages other
   than English.
Top   ToC   RFC6063 - Page 3

Table of Contents

1. Introduction ....................................................6 1.1. Key Words ..................................................6 1.2. Version Support ............................................6 1.3. Namespace Identifiers ......................................7 1.3.1. Defined Identifiers .................................7 1.3.2. Identifiers Defined in Related Specifications .......7 1.3.3. Referenced Identifiers ..............................8 2. Terminology .....................................................8 2.1. Definitions ................................................8 2.2. Notation ..................................................10 2.3. Abbreviations .............................................11 3. DSKPP Overview .................................................11 3.1. Protocol Entities .........................................12 3.2. Basic DSKPP Exchange ......................................12 3.2.1. User Authentication ................................12 3.2.2. Protocol Initiated by the DSKPP Client .............14 3.2.3. Protocol Triggered by the DSKPP Server .............16 3.2.4. Variants ...........................................17 3.2.4.1. Criteria for Using the Four-Pass Variant ..17 3.2.4.2. Criteria for Using the Two-Pass Variant ...18 3.3. Status Codes ..............................................18 3.4. Basic Constructs ..........................................20 3.4.1. User Authentication Data (AD) ......................20 3.4.1.1. Authentication Code Format ................20 3.4.1.2. User Authentication Data Calculation ......23 3.4.2. The DSKPP One-Way Pseudorandom Function, DSKPP-PRF ..........................................24 3.4.3. The DSKPP Message Hash Algorithm ...................24 4. Four-Pass Protocol Usage .......................................25 4.1. The Key Agreement Mechanism ...............................25 4.1.1. Data Flow ..........................................25 4.1.2. Computation ........................................27 4.2. Message Flow ..............................................28 4.2.1. KeyProvTrigger .....................................28 4.2.2. KeyProvClientHello .................................29 4.2.3. KeyProvServerHello .................................30 4.2.4. KeyProvClientNonce .................................32 4.2.5. KeyProvServerFinished ..............................34 5. Two-Pass Protocol Usage ........................................35 5.1. Key Protection Methods ....................................36 5.1.1. Key Transport ......................................36 5.1.2. Key Wrap ...........................................37 5.1.3. Passphrase-Based Key Wrap ..........................37 5.2. Message Flow ..............................................38 5.2.1. KeyProvTrigger .....................................38 5.2.2. KeyProvClientHello .................................39
Top   ToC   RFC6063 - Page 4
           5.2.3. KeyProvServerFinished ..............................43
   6. Protocol Extensions ............................................44
      6.1. The ClientInfoType Extension ..............................45
      6.2. The ServerInfoType Extension ..............................45
   7. Protocol Bindings ..............................................45
      7.1. General Requirements ......................................45
      7.2. HTTP/1.1 Binding for DSKPP ................................46
           7.2.1. Identification of DSKPP Messages ...................46
           7.2.2. HTTP Headers .......................................46
           7.2.3. HTTP Operations ....................................47
           7.2.4. HTTP Status Codes ..................................47
           7.2.5. HTTP Authentication ................................47
           7.2.6. Initialization of DSKPP ............................47
           7.2.7. Example Messages ...................................48
   8. DSKPP XML Schema ...............................................49
      8.1. General Processing Requirements ...........................49
      8.2. Schema ....................................................49
   9. Conformance Requirements .......................................58
   10. Security Considerations .......................................59
      10.1. General ..................................................59
      10.2. Active Attacks ...........................................60
           10.2.1. Introduction ......................................60
           10.2.2. Message Modifications .............................60
           10.2.3. Message Deletion ..................................61
           10.2.4. Message Insertion .................................62
           10.2.5. Message Replay ....................................62
           10.2.6. Message Reordering ................................62
           10.2.7. Man in the Middle .................................63
      10.3. Passive Attacks ..........................................63
      10.4. Cryptographic Attacks ....................................63
      10.5. Attacks on the Interaction between DSKPP and User
            Authentication ...........................................64
      10.6. Miscellaneous Considerations .............................65
           10.6.1. Client Contributions to K_TOKEN Entropy ...........65
           10.6.2. Key Confirmation ..................................65
           10.6.3. Server Authentication .............................65
           10.6.4. User Authentication ...............................66
           10.6.5. Key Protection in Two-Pass DSKPP ..................66
           10.6.6. Algorithm Agility .................................67
   11. Internationalization Considerations ...........................68
   12. IANA Considerations ...........................................68
      12.1. URN Sub-Namespace Registration ...........................68
      12.2. XML Schema Registration ..................................69
      12.3. MIME Media Type Registration .............................69
      12.4. Status Code Registration .................................70
      12.5. DSKPP Version Registration ...............................70
      12.6. PRF Algorithm ID Sub-Registry ............................70
           12.6.1. DSKPP-PRF-AES .....................................71
Top   ToC   RFC6063 - Page 5
           12.6.2. DSKPP-PRF-SHA256 ..................................71
      12.7. Key Container Registration ...............................72
   13. Intellectual Property Considerations ..........................73
   14. Contributors ..................................................73
   15. Acknowledgements ..............................................73
   16. References ....................................................74
      16.1. Normative References .....................................74
      16.2. Informative References ...................................76
   Appendix A.  Usage Scenarios ......................................78
     A.1.  Single Key Request ........................................78
     A.2.  Multiple Key Requests .....................................78
     A.3.  User Authentication .......................................78
     A.4.  Provisioning Time-Out Policy ..............................78
     A.5.  Key Renewal ...............................................79
     A.6.  Pre-Loaded Key Replacement ................................79
     A.7.  Pre-Shared Manufacturing Key ..............................79
     A.8.  End-to-End Protection of Key Material .....................80
   Appendix B.  Examples .............................................80
     B.1.  Trigger Message ...........................................80
     B.2.  Four-Pass Protocol ........................................81
       B.2.1.  <KeyProvClientHello> without a Preceding Trigger ......81
       B.2.2.  <KeyProvClientHello> Assuming a Preceding Trigger .....82
       B.2.3.  <KeyProvServerHello> Without a Preceding Trigger ......83
       B.2.4.  <KeyProvServerHello> Assuming Key Renewal .............84
       B.2.5.  <KeyProvClientNonce> Using Default Encryption .........85
       B.2.6.  <KeyProvServerFinished> Using Default Encryption ......85
     B.3.  Two-Pass Protocol .........................................86
       B.3.1.  Example Using the Key Transport Method ................86
       B.3.2.  Example Using the Key Wrap Method .....................90
       B.3.3.  Example Using the Passphrase-Based Key Wrap Method ....94
   Appendix C.  Integration with PKCS #11 ............................98
     C.1.  The Four-Pass Variant .....................................98
     C.2.  The Two-Pass Variant ......................................98
   Appendix D.  Example of DSKPP-PRF Realizations ...................101
     D.1.  Introduction .............................................101
     D.2.  DSKPP-PRF-AES ............................................101
       D.2.1.  Identification .......................................101
       D.2.2.  Definition ...........................................101
       D.2.3.  Example ..............................................102
     D.3.  DSKPP-PRF-SHA256 .........................................103
       D.3.1.  Identification .......................................103
       D.3.2.  Definition ...........................................103
       D.3.3.  Example ..............................................104
Top   ToC   RFC6063 - Page 6

1. Introduction

Symmetric-key-based cryptographic systems (e.g., those providing authentication mechanisms such as one-time passwords and challenge- response) offer performance and operational advantages over public key schemes. Such use requires a mechanism for the provisioning of symmetric keys providing equivalent functionality to mechanisms such as the Certificate Management Protocol (CMP) [RFC4210] and Certificate Management over CMS (CMC) [RFC5272] in a Public Key Infrastructure. Traditionally, cryptographic modules have been provisioned with keys during device manufacturing, and the keys have been imported to the cryptographic server using, e.g., a CD-ROM disc shipped with the devices. Some vendors also have proprietary provisioning protocols, which often have not been publicly documented (the Cryptographic Token Key Initialization Protocol (CT-KIP) is one exception [RFC4758]). This document describes the Dynamic Symmetric Key Provisioning Protocol (DSKPP), a client-server protocol for provisioning symmetric keys between a cryptographic module (corresponding to DSKPP Client) and a key provisioning server (corresponding to DSKPP Server). 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 [RFC6030] format for transmission of keying material. DSKPP has two principal protocol variants. The four-pass protocol variant 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. 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].

1.2. Version Support

There is a provision made in the syntax for an explicit version number. Only version "1.0" is currently specified.
Top   ToC   RFC6063 - Page 7
   The purpose for versioning the protocol is to provide a mechanism by
   which changes to required cryptographic algorithms (e.g., SHA-256)
   and attributes (e.g., key size) can be deployed without disrupting
   existing implementations; likewise, outdated implementations can be
   de-commissioned without disrupting operations involving newer
   protocol versions.

   The numbering scheme for DSKPP versions is "<major>.<minor>".  The
   major and minor numbers MUST be treated as separate integers and each
   number MAY be incremented higher than a single digit.  Thus, "DSKPP
   2.4" would be a lower version than "DSKPP 2.13", which in turn would
   be lower than "DSKPP 12.3".  Leading zeros (e.g., "DSKPP 6.01") MUST
   be ignored by recipients and MUST NOT be sent.

   The major version number should be incremented only if the data
   formats or security algorithms have changed so dramatically that an
   older version implementation would not be able to interoperate with a
   newer version (e.g., removing support for a previously mandatory-to-
   implement algorithm now found to be insecure).  The minor version
   number indicates new capabilities (e.g., introducing a new algorithm
   option) and MUST be ignored by an entity with a smaller minor version
   number but be used for informational purposes by the entity with the
   larger minor version number.

1.3. Namespace Identifiers

This document uses Uniform Resource Identifiers (URIs) [RFC3986] to identify resources, algorithms, and semantics.

1.3.1. Defined Identifiers

The XML namespace [XMLNS] URI for Version 1.0 of DSKPP is: "urn:ietf:params:xml:ns:keyprov:dskpp" References to qualified elements in the DSKPP schema defined herein use the prefix "dskpp", but any prefix is allowed.

1.3.2. Identifiers Defined in Related Specifications

This document relies on qualified elements already defined in the Portable Symmetric Key Container [RFC6030] namespace, which is represented by the prefix "pskc" and declared as: xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc"
Top   ToC   RFC6063 - Page 8

1.3.3. Referenced Identifiers

Finally, the DSKPP syntax presented in this document relies on algorithm identifiers defined in the XML Signature [XMLDSIG] 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".

2. Terminology

2.1. Definitions

Terms are defined below as they are used in this document. The same terms may be defined differently in other documents. Authentication Code (AC): User Authentication Code comprised of a string of hexadecimal characters known to the device and the server and containing at a minimum a client identifier and a password. This ClientID/password combination is used only once and may have a time limit, and then discarded. Authentication Data (AD): User Authentication Data that is derived from the Authentication Code (AC) Client ID: An identifier that the DSKPP Server uses to locate the real username or account identifier on the server. It can be a short random identifier that is unrelated to any real usernames. Cryptographic Module: A component of an application, which enables symmetric key cryptographic functionality 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 that houses the cryptographic module, e.g., a mobile phone 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 run
Top   ToC   RFC6063 - Page 9
   DSKPP Server ID (ServerID):  The unique identifier of a DSKPP Server

   Key Agreement:  A key establishment protocol whereby two or more
      parties can agree on a key in such a way that both influence the
      outcome

   Key Confirmation:  The assurance of the rightful participants in a
      key-establishment protocol that the intended recipient of the
      shared key actually possesses the shared key

   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 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., Open AUTHentication HMAC-Based One-
      Time Password (OATH HOTP) or RSA SecurID authentication, AES
      encryption, etc.)

   Key Wrapping:  A method of encrypting keys for key transport
      [NIST-SP800-57]
Top   ToC   RFC6063 - Page 10
   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

   Protocol Run:  Complete execution of the DSKPP that involves one
      exchange (two-pass) or two exchanges (four-pass)

   Security Attribute List (SAL):  A payload that contains the DSKPP
      version, DSKPP variant (four- or two-pass), key package formats,
      key types, and cryptographic algorithms that the cryptographic
      module is capable of supporting

2.2. 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 DSKPP-PRF(k,s,dsLen) A keyed pseudorandom function 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
Top   ToC   RFC6063 - Page 11
   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
   URL_S                 DSKPP Server address, as a URL

2.3. Abbreviations

AC Authentication Code AD Authentication Data DSKPP Dynamic Symmetric Key Provisioning Protocol HTTP Hypertext Transfer Protocol KP Key Package 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 Pseudorandom Function PSKC Portable Symmetric Key Container SAL Security Attribute List (see Section 2.1) TLS Transport Layer Security URL Uniform Resource Locator USB Universal Serial Bus XML eXtensible Markup Language

3. DSKPP Overview

The following sub-sections provide a high-level view of protocol internals and how they interact with external provisioning applications. Usage scenarios are provided in Appendix A.
Top   ToC   RFC6063 - Page 12

3.1. 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, e.g., an authentication token. Client: The DSKPP Client that manages communication between the cryptographic module and the key provisioning server. The principal syntax is XML [XML] and it is layered on a transport mechanism such as HTTP [RFC2616] and HTTP Over TLS [RFC2818]. 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 DSKPP 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. 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 elements to and from the cryptographic module is transparent to the DSKPP Server. One method for this transfer is described in [CT-KIP-P11].

3.2. Basic DSKPP Exchange

3.2.1. User Authentication

In a DSKPP message flow, the user has obtained a new hardware or software device embedded with a cryptographic module. The goal of DSKPP is to provision the same symmetric key and related information to the cryptographic module and the key management server, and
Top   ToC   RFC6063 - Page 13
   associate the key with the correct username (or other account
   identifier) on the server.  To do this, the DSKPP Server MUST
   authenticate the user to be sure he is authorized for the new key.

   User authentication occurs within the protocol itself *after* the
   DSKPP Client initiates the first message.  In this case, the DSKPP
   Client MUST have access to the DSKPP Server URL.

   Alternatively, a DSKPP web service or other form of web application
   can authenticate a user *before* the first message is exchanged.  In
   this case, the DSKPP Server MUST trigger the DSKPP Client to initiate
   the first message in the protocol transaction.
Top   ToC   RFC6063 - Page 14

3.2.2. Protocol Initiated by the DSKPP Client

In the following example, the DSKPP Client first initiates DSKPP, and then the user is authenticated using a Client ID and Authentication Code. Crypto DSKPP DSKPP Key Provisioning Module Client Server Server | | | | | | | +---------------+ | | | |Server creates | | | | |and stores | | | | |Client ID and | | | | |Auth. Code and | | | | |delivers them | | | | |to user out-of-| | | | |band. | | | | +---------------+ | | | | | +----------------------+ | | | |User enters Client ID,| | | | |Auth. Code, and URL | | | | +----------------------+ | | | | | | | |<-- 1. TLS handshake with --->| | | | server auth. | | | | | | | | 2. <KeyProvClientHello> ---->| User -->| | | | Auth. | | |<-- [3. <KeyProvServerHello>] | | | | | | | | [4. <KeyProvClientNonce>] -->| | | | | | | |<- 5. <KeyProvServerFinished> | | | | | | | | | | |<-- Key | | Key -->| | Package | | Package | Figure 1: Basic DSKPP Exchange
Top   ToC   RFC6063 - Page 15
   Before DSKPP begins:
   o  The Authentication Code is generated by the DSKPP Server, and
      delivered to the user via an out-of-band trustworthy channel
      (e.g., a paper slip delivered by IT department staff).
   o  The user typically enters the Client ID and Authentication Code
      manually, possibly on a device with only a numeric keypad.  Thus,
      they are often short numeric values (for example, 8 decimal
      digits).  However, the DSKPP Server is free to generate them in
      any way it wishes.
   o  The DSKPP Client needs the URL [RFC3986] of the DSKPP Server
      (which is not user specific or secret, and may be pre-configured
      somehow), and a set of trust anchors for verifying the server
      certificate.
   o  There must be an account for the user that has an identifier and
      long-term username (or other account identifier) to which the
      token will be associated.  The DSKPP Server will use the Client ID
      to find the corresponding Authentication Code for user
      authentication.

   In Step 1, the client establishes a TLS connection, authenticates the
   server (that is, validates the certificate, and compares the host
   name in the URL with the certificate) as described in Section 3.1 of
   [RFC2818].

   Next, the DSKPP Client and DSKPP Server exchange DSKPP messages
   (which are sent over HTTPS).  In these messages:
   o  The client and server negotiate which cryptographic algorithms
      they want to use, which algorithms are supported for protecting
      DSKPP messages, and other DSKPP details.
   o  The client sends the Client ID to the server, and proves that it
      knows the corresponding Authentication Code.
   o  The client and server agree on a secret key (token key or
      K_TOKEN); depending on the negotiated protocol variant, this is
      either a fresh key derived during the DSKPP run (called "four-pass
      variant", since it involves four DSKPP messages) or is generated
      by (or pre-exists on) the server and transported to the client
      (called "two-pass variant" in the rest of this document, since it
      involves two DSKPP messages).
   o  The server sends a "key package" to the client.  The package only
      includes the key itself in the case of the "two-pass variant";
      with either variant, the key package contains attributes that
      influence how the provisioned key will be later used by the
      cryptographic module and cryptographic server.  The exact contents
      depend on the cryptographic algorithm (e.g., for a one-time
      password algorithm that supports variable-length OTP values, the
      length of the OTP value would be one attribute in the key
      package).
Top   ToC   RFC6063 - Page 16
   After the protocol run has been successfully completed, the
   cryptographic modules stores the contents of the key package.
   Likewise, the DSKPP provisioning server stores the contents of the
   key package with the cryptographic server, and associates these with
   the correct username.  The user can now use the their device to
   perform symmetric-key based operations.

   The exact division of work between the cryptographic module and the
   DSKPP Client -- and key Provisioning server and DSKPP Server -- are
   not specified in this document.  The figure above shows one possible
   case, but this is intended for illustrative purposes only.

3.2.3. Protocol Triggered by the DSKPP Server

In the first message flow (previous section), the Client ID and Authentication Code were delivered to the client by some out-of-band means (such as paper sent to the user). Web DSKPP DSKPP Web Browser Client Server Server | | | | |<-------- HTTPS browsing + some kind of user auth. --------->| | | | | | some HTTP request ----------------------------------------->| | | | | | |<------------->| | | | | |<----------------------- HTTP response with <KeyProvTrigger> | | | | | | Trigger ---->| | | | | | | | |<-- 1. TLS handshake with --->| | | | server auth. | | | | | | | | ... continues... | | Figure 2: DSKPP Exchange with Web-Based Authentication In the second message flow, the user first authenticates to a web server (for example, an IT department's "self-service" Intranet page), using an ordinary web browser and some existing credentials. The user then requests (by clicking a link or submitting a form) provisioning of a new key to the cryptographic module. The web server will reply with a <KeyProvTrigger> message that contains the Client ID, Authentication Code, and URL of the DSKPP Server. This information is also needed by the DSKPP Server; how the web server and DSKPP Server interact is beyond the scope of this document.
Top   ToC   RFC6063 - Page 17
   The <KeyProvTrigger> message is sent in an HTTP response, and it is
   marked with MIME type "application/dskpp+xml".  It is assumed the web
   browser has been configured to recognize this MIME type; the browser
   will start the DSKPP Client and provide it with the <KeyProvTrigger>
   message.

   The DSKPP Client then contacts the DSKPP Server and uses the Client
   ID and Authentication Code (from the <KeyProvTrigger> message) the
   same way as in the first message flow.

3.2.4. Variants

As noted in the previous section, once the protocol has started, the client and server MAY engage in either a two-pass or four-pass message exchange. The four-pass and two-pass protocols are appropriate in different deployment scenarios. 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 the negotiation of encryption mechanisms and key types at the beginning of each protocol run.
3.2.4.1. Criteria for Using the Four-Pass Variant
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 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 neither was pre-issued with a manufacturer's key or other form of pre-shared key (as might be the case with a smart card or Subscriber Identity Module (SIM) card) nor has a keypad that can be used for entering a passphrase (such as present on a mobile phone).
Top   ToC   RFC6063 - Page 18
3.2.4.2. Criteria for Using the Two-Pass Variant
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.

3.3. Status Codes

Upon transmission or receipt of a message for which the Status attribute's value is not "Success" or "Continue", the default behavior, unless explicitly stated otherwise below, is that both the DSKPP Server and the DSKPP Client MUST immediately terminate the DSKPP run. DSKPP Servers and DSKPP Clients MUST delete any secret values generated as a result of failed runs of DSKPP. Session identifiers MAY be retained from successful or failed protocol runs for replay detection purposes, but such retained identifiers MUST NOT be reused for subsequent runs of the protocol. When possible, the DSKPP Client SHOULD present an appropriate error message to the user. These status codes are valid in all DSKPP Response messages unless explicitly stated otherwise: Continue: The DSKPP Server is ready for a subsequent request from the DSKPP Client. It cannot be sent in the server's final message. Success: Successful completion of the DSKPP session. It can only be sent in the server's final message. Abort: The DSKPP Server rejected the DSKPP Client's request for unspecified reasons. AccessDenied: The DSKPP Client is not authorized to contact this DSKPP Server.
Top   ToC   RFC6063 - Page 19
   MalformedRequest:  The DSKPP Server failed to parse the DSKPP
      Client's request.

   UnknownRequest:  The DSKPP Client made a request that is unknown to
      the DSKPP Server.

   UnknownCriticalExtension:  A DSKPP extension marked as "Critical"
      could not be interpreted by the receiving party.

   UnsupportedVersion:  The DSKPP Client used a DSKPP version not
      supported by the DSKPP Server.  This error is only valid in the
      DSKPP Server's first response message.

   NoSupportedKeyTypes:  "NoSupportedKeyTypes" indicates that the DSKPP
      Client only suggested key types that are not supported by the
      DSKPP Server.  This error is only valid in the DSKPP Server's
      first response message.

   NoSupportedEncryptionAlgorithms:  The DSKPP Client only suggested
      encryption algorithms that are not supported by the DSKPP Server.
      This error is only valid in the DSKPP Server's first response
      message.

   NoSupportedMacAlgorithms:  The DSKPP Client only suggested MAC
      algorithms that are not supported by the DSKPP Server.  This error
      is only valid in the DSKPP Server's first response message.

   NoProtocolVariants:  The DSKPP Client did not suggest a required
      protocol variant (either two-pass or four-pass).  This error is
      only valid in the DSKPP Server's first response message.

   NoSupportedKeyPackages:  The DSKPP Client only suggested key package
      formats that are not supported by the DSKPP Server.  This error is
      only valid in the DSKPP Server's first response message.

   AuthenticationDataMissing:  The DSKPP Client didn't provide
      Authentication Data that the DSKPP Server required.

   AuthenticationDataInvalid:  The DSKPP Client supplied User
      Authentication Data that the DSKPP Server failed to validate.

   InitializationFailed:  The DSKPP Server could not generate a valid
      key given the provided data.  When this status code is received,
      the DSKPP Client SHOULD try to restart DSKPP, as it is possible
      that a new run will succeed.
Top   ToC   RFC6063 - Page 20
   ProvisioningPeriodExpired:  The provisioning period set by the DSKPP
      Server has expired.  When the status code is received, the DSKPP
      Client SHOULD report the reason for key initialization failure to
      the user and the user MUST register with the DSKPP Server to
      initialize a new key.

3.4. Basic Constructs

The following calculations are used in both DSKPP variants.

3.4.1. User Authentication Data (AD)

User Authentication Data (AD) is derived from a Client ID and Authentication Code that the user enters before the first DSKPP message is sent. Note: The user will typically enter the Client ID and Authentication Code manually, possibly on a device with only numeric keypad. Thus, they are often short numeric values (for example, 8 decimal digits). However, the DSKPP Server is free to generate them in any way it wishes.
3.4.1.1. 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. The TLV fields are defined as follows: Type (1 character) A hexadecimal character identifying the type of information contained in the Value field. Length (2 characters) Two hexadecimal characters indicating the length of the Value field to follow. The field value MAY be up to 255 characters. The Length value 00 MAY be used to specify custom tags without any field values. Value (variable length) A variable-length string of hexadecimal characters containing the instance-specific information for this TLV.
Top   ToC   RFC6063 - Page 21
   The following table 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.

   +------+------------+-------------------------------------------+
   | Type | TLV Name   | Conformance | Example Usage               |
   +------+------------+-------------------------------------------+
   |  1   | Client ID  | Mandatory   | { "AC00000A" }              |
   +------+------------+-------------+-----------------------------+
   |  2   | Password   | Mandatory   | { "3582AF0C3E" }            |
   +------+------------+-------------+-----------------------------+
   |  3   | Checksum   | Optional    | { "4D5" }                   |
   +------+------------+-------------+-----------------------------+

   The Client ID is a mandatory TLV that represents the requester's
   identifier of maximum length 255.  The value is represented as a
   string of hexadecimal characters that identifies the key request.
   For example, suppose Client ID is set to "AC00000A", the Client ID
   TLV in the AC will be represented as "108AC00000A".

   The Password is a mandatory TLV the contains a one-time use shared
   secret known by the user and the Provisioning Server.  The Password
   value is unique and SHOULD be a random string to make AC more
   difficult to guess.  The string MUST contain hexadecimal characters
   only.  For example, suppose password is set to "3582AF0C3E", then the
   Password TLV would be "20A3582AF0C3E".

   The Checksum is an OPTIONAL TLV, which is generated by the issuing
   server and sent to the user as part of the AC.  If the TLV is
   provided, the checksum value MUST be computed using the CRC16
   algorithm [ISO3309].  When the user enters the AC, the typed AC
   string of characters is verified with the checksum to ensure it is
   correctly entered by the user.  For example, suppose the AC with
   combined Client ID tag and Password tag is set to
   "108AC00000A20A3582AF0C3E", then the CRC16 calculation would generate
   a checksum of 0x356, resulting in a Checksum TLV of "334D5".  The
   complete AC string in this example would be
   "108AC00000A20A3582AF0C3E3034D5".

   Although this specification recommends using hexadecimal characters
   only for the AC at the application's user interface layer and making
   the TLV triples non-transparent to the user as described in the
   example above; implementations MAY additionally choose to use other
   printable Unicode characters [UNICODE] at the application's user
   interface layer in order to meet specific local, context or usability
   requirements.  When non-hexadecimal characters are desired at the
Top   ToC   RFC6063 - Page 22
   user interface layer such as when other printable US-ASCII characters
   or international characters are used, SASLprep [RFC4013] MUST be used
   to normalize user input before converting it to a string of
   hexadecimal characters.  For example, if a given application allows
   the use of any printable US-ASCII characters and extended ASCII
   characters for Client ID and Password fields, and the Client ID is
   set to "myclient!D" and the associated Password is set to
   "mYpas&#rD", the user enters through the keyboard or other means a
   Client ID of "myclient!D" and a Password of "mYpas&#rD" in separate
   form fields or as instructed by the provider.  The application's
   layer processing user input MUST then convert the values entered by
   the user to the following string for use in the protocol:
   "1146D79636C69656E7421442126D5970617326237244" (note that in this
   example the Checksum TLV is not added).

   The example is explained further below in detail:

   Assume that the raw Client ID value or the value entered by the use
   is: myclient!ID

   The Client ID value as characters names is:

      U+006D LATIN SMALL LETTER M character
      U+0079 LATIN SMALL LETTER Y character
      U+0063 LATIN SMALL LETTER C character
      U+006C LATIN SMALL LETTER L character
      U+0069 LATIN SMALL LETTER I character
      U+0065 LATIN SMALL LETTER E character
      U+006E LATIN SMALL LETTER N character
      U+0074 LATIN SMALL LETTER T character
      U+0021 EXCLAMATION MARK character (!)
      U+0044 LATIN CAPITAL LETTER D character

   The UTF-8 conversion of the Client ID value is: 6D 79 63 6C 69 65 6E
   74 21 44

   The length of the Client ID value in hexadecimal characters is: 14

   The TLV presentation of the Client ID field is:
   1146D79636C69656E742144

   The raw Password value or the value entered by the user is: mYpas&#rD

   The Password value as character names is:

      U+006D LATIN SMALL LETTER M character
      U+0059 LATIN LARGE LETTER Y character
      U+0070 LATIN SMALL LETTER P character
Top   ToC   RFC6063 - Page 23
      U+0061 LATIN SMALL LETTER A character
      U+0073 LATIN SMALL LETTER S character
      U+0026 AMPERSAND character (&)
      U+0023 POUND SIGN character (#)
      U+0072 LATIN SMALL LETTER R character
      U+0044 LATIN LARGE LETTER D character

   The UTF-8 conversion of the password value is: 6D 59 70 61 73 26 23
   72 44

   The length of the password value in hexadecimal characters is: 12

   The TLV presentation of the password field is: 2126D5970617326237244

   The combined Client ID and password fields value or the AC value is:
   1146D79636C69656E7421442126D5970617326237244

3.4.1.2. User 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.4.2 for a description of DSKPP-PRF in general and Appendix D for a description of DSKPP-PRF-AES): MAC = DSKPP-PRF(K_AC, AC->ClientID||URL_S||R_C||[R_S], 16) 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.
Top   ToC   RFC6063 - Page 24
   The iteration count, iter_count, MUST be set to at least 100,000
   except in the last two two-pass cases (where K is set to K_SHARED or
   a passphrase-derived key), in which case iter_count MUST be set to 1.

3.4.2. The DSKPP One-Way Pseudorandom Function, DSKPP-PRF

Regardless of the protocol variant 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 bit string 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 D contains two example realizations of DSKPP- PRF. DSKPP-PRF(k, s, dsLen) Input: 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.3. The DSKPP Message Hash Algorithm

When sending its last message in a protocol run, the DSKPP Server generates a MAC that is used by the client for key confirmation. Computation of the MAC MUST include a hash of all DSKPP messages sent by the client and server during the transaction. To compute a message hash for the MAC given a sequence of DSKPP messages msg_1, ..., msg_n, the following operations MUST be carried out:
Top   ToC   RFC6063 - Page 25
   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
   c.  The contents of each message is concatenated together.
   d.  The resultant string is hashed using SHA-256 in accordance with
       [FIPS180-SHA].



(page 25 continued on part 2)

Next Section