draft-ietf-keyprov-dskpp-06.txt   draft-ietf-keyprov-dskpp-07.txt 
KEYPROV Working Group A. Doherty KEYPROV Working Group A. Doherty
Internet-Draft RSA, The Security Division of EMC Internet-Draft RSA, The Security Division of EMC
Intended status: Standards Track M. Pei Intended status: Standards Track M. Pei
Expires: May 7, 2009 Verisign, Inc. Expires: August 13, 2009 Verisign, Inc.
S. Machani S. Machani
Diversinet Corp. Diversinet Corp.
M. Nystrom M. Nystrom
RSA, The Security Division of EMC RSA, The Security Division of EMC
November 3, 2008 February 9, 2009
Dynamic Symmetric Key Provisioning Protocol (DSKPP) Dynamic Symmetric Key Provisioning Protocol (DSKPP)
draft-ietf-keyprov-dskpp-06.txt draft-ietf-keyprov-dskpp-07.txt
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any This Internet-Draft is submitted to IETF in full conformance with the
applicable patent or other IPR claims of which he or she is aware provisions of BCP 78 and BCP 79. This document may not be modified,
have been or will be disclosed, and any of which he or she becomes and derivative works of it may not be created, and it may not be
aware will be disclosed, in accordance with Section 6 of BCP 79. published except as an Internet-Draft.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet- other groups may also distribute working documents as Internet-
Drafts. Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on May 7, 2009. This Internet-Draft will expire on August 13, 2009.
Copyright Notice
Copyright (c) 2009 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.
Abstract Abstract
DSKPP is a client-server protocol for initialization (and DSKPP is a client-server protocol for initialization (and
configuration) of symmetric keys to locally and remotely accessible configuration) of symmetric keys to locally and remotely accessible
cryptographic modules. The protocol can be run with or without cryptographic modules. The protocol can be run with or without
private-key capabilities in the cryptographic modules, and with or private-key capabilities in the cryptographic modules, and with or
without an established public-key infrastructure. without an established public-key infrastructure.
Two variations of the protocol support multiple usage scenarios. Two variations of the protocol support multiple usage scenarios.
skipping to change at page 2, line 17 skipping to change at page 3, line 7
not transferred over-the-wire or over-the-air. The two-pass variant not transferred over-the-wire or over-the-air. The two-pass variant
enables secure and efficient download and installation of pre- enables secure and efficient download and installation of pre-
generated symmetric keys to a cryptographic module. generated symmetric keys to a cryptographic module.
This document builds on information contained in [RFC4758], adding This document builds on information contained in [RFC4758], adding
specific enhancements in response to implementation experience and specific enhancements in response to implementation experience and
liaison requests. liaison requests.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1. Usage Scenarios . . . . . . . . . . . . . . . . . . . . . 6 1.1. Key Words . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.1. Single Key Request . . . . . . . . . . . . . . . . . 7 1.2. Versions . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.2. Multiple Key Requests . . . . . . . . . . . . . . . . 7 1.3. Namespace Identifiers . . . . . . . . . . . . . . . . . . 7
1.1.3. User Authentication . . . . . . . . . . . . . . . . . 7 1.3.1. Defined Identifiers . . . . . . . . . . . . . . . . . 7
1.1.4. Provisioning Time-Out Policy . . . . . . . . . . . . 7 1.3.2. Identifiers Defined in Related Specifications . . . . 7
1.1.5. Key Renewal . . . . . . . . . . . . . . . . . . . . . 7 1.3.3. Referenced Identifiers . . . . . . . . . . . . . . . . 7
1.1.6. Pre-Loaded Key Replacement . . . . . . . . . . . . . 8 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.7. Pre-Shared Manufacturing Key . . . . . . . . . . . . 8 2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.8. End-to-End Protection of Key Material . . . . . . . . 8 2.2. Notation . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2. Protocol Entities . . . . . . . . . . . . . . . . . . . . 9 2.3. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 10
1.3. Initiating DSKPP . . . . . . . . . . . . . . . . . . . . 10 3. DSKPP Overview . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4. Determining Which Protocol Variant to Use . . . . . . . . 11 3.1. Protocol Entities . . . . . . . . . . . . . . . . . . . . 11
1.4.1. Criteria for Using the Four-Pass Protocol . . . . . . 11 3.2. Basic DSKPP Exchange . . . . . . . . . . . . . . . . . . . 12
1.4.2. Criteria for Using the Two-Pass Protocol . . . . . . 12 3.2.1. User Authentication . . . . . . . . . . . . . . . . . 12
1.5. Presentation Syntax . . . . . . . . . . . . . . . . . . . 12 3.2.2. Protocol Initiated by the DSKPP Client . . . . . . . . 12
1.5.1. Versions . . . . . . . . . . . . . . . . . . . . . . 12 3.2.3. Protocol Triggered by the DSKPP Server . . . . . . . . 15
1.5.2. Namespaces . . . . . . . . . . . . . . . . . . . . . 12 3.2.4. Variants . . . . . . . . . . . . . . . . . . . . . . . 16
1.5.3. Identifiers . . . . . . . . . . . . . . . . . . . . . 13 3.3. Status Codes . . . . . . . . . . . . . . . . . . . . . . . 17
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.4. Basic Constructs . . . . . . . . . . . . . . . . . . . . . 18
2.1. Key Words . . . . . . . . . . . . . . . . . . . . . . . . 13 3.4.1. User Authentication Data, AD . . . . . . . . . . . . . 18
2.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 13 3.4.2. The DSKPP One-Way Pseudorandom Function, DSKPP-PRF . . 20
2.3. Notation . . . . . . . . . . . . . . . . . . . . . . . . 15 3.4.3. The DSKPP Message Hash Algorithm . . . . . . . . . . . 21
2.4. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 16 4. Four-Pass Protocol Usage . . . . . . . . . . . . . . . . . . . 22
3. DSKPP Protocol Details . . . . . . . . . . . . . . . . . . . 17 4.1. The Key Agreement Mechanism . . . . . . . . . . . . . . . 22
3.1. Protocol Initiation . . . . . . . . . . . . . . . . . . . 17 4.1.1. Data Flow . . . . . . . . . . . . . . . . . . . . . . 22
3.1.1. Server Initiation . . . . . . . . . . . . . . . . . . 17 4.1.2. Computation . . . . . . . . . . . . . . . . . . . . . 24
3.1.2. Client Initiation . . . . . . . . . . . . . . . . . . 18 4.2. Message Flow . . . . . . . . . . . . . . . . . . . . . . . 25
3.2. Protocol Variations . . . . . . . . . . . . . . . . . . . 18 4.2.1. KeyProvTrigger . . . . . . . . . . . . . . . . . . . . 25
3.2.1. Four-Pass Protocol Interaction . . . . . . . . . . . 18 4.2.2. KeyProvClientHello . . . . . . . . . . . . . . . . . . 26
3.2.2. Two-Pass Protocol Interaction . . . . . . . . . . . . 20 4.2.3. KeyProvServerHello . . . . . . . . . . . . . . . . . . 27
3.3. Cryptographic Construction . . . . . . . . . . . . . . . 21 4.2.4. KeyProvClientNonce . . . . . . . . . . . . . . . . . . 29
3.3.1. The DSKPP One-Way Pseudorandom Function, DSKPP-PRF . 21 4.2.5. KeyProvServerFinished . . . . . . . . . . . . . . . . 31
3.4. Four-Pass Protocol Usage . . . . . . . . . . . . . . . . 22 5. Two-Pass Protocol Usage . . . . . . . . . . . . . . . . . . . 32
3.4.1. Message Flow . . . . . . . . . . . . . . . . . . . . 22 5.1. Key Protection Methods . . . . . . . . . . . . . . . . . . 33
3.4.2. Generation of Symmetric Keys for Cryptographic 5.1.1. Key Transport . . . . . . . . . . . . . . . . . . . . 33
Modules . . . . . . . . . . . . . . . . . . . . . . . 25 5.1.2. Key Wrap . . . . . . . . . . . . . . . . . . . . . . . 33
3.4.3. Encryption of Pseudorandom Nonces Sent from the 5.1.3. Passphrase-Based Key Wrap . . . . . . . . . . . . . . 34
DSKPP Client . . . . . . . . . . . . . . . . . . . . 28 5.2. Message Flow . . . . . . . . . . . . . . . . . . . . . . . 34
3.4.4. MAC Calculations . . . . . . . . . . . . . . . . . . 28 5.2.1. KeyProvTrigger . . . . . . . . . . . . . . . . . . . . 35
3.5. Two-Pass Protocol Usage . . . . . . . . . . . . . . . . . 30 5.2.2. KeyProvClientHello . . . . . . . . . . . . . . . . . . 35
3.5.1. Message Flow . . . . . . . . . . . . . . . . . . . . 30 5.2.3. KeyProvServerFinished . . . . . . . . . . . . . . . . 40
3.5.2. Key Protection Profiles . . . . . . . . . . . . . . . 33 6. Protocol Extensions . . . . . . . . . . . . . . . . . . . . . 41
3.5.3. MAC Calculations . . . . . . . . . . . . . . . . . . 37 6.1. The ClientInfoType Extension . . . . . . . . . . . . . . . 41
3.6. Device Identification . . . . . . . . . . . . . . . . . . 38 6.2. The ServerInfoType Extension . . . . . . . . . . . . . . . 41
3.7. User Authentication . . . . . . . . . . . . . . . . . . . 39 7. Protocol Bindings . . . . . . . . . . . . . . . . . . . . . . 41
3.7.1. Authentication Data . . . . . . . . . . . . . . . . . 39 7.1. General Requirements . . . . . . . . . . . . . . . . . . . 41
3.7.2. Authentication Code Format . . . . . . . . . . . . . 40 7.2. HTTP/1.1 Binding for DSKPP . . . . . . . . . . . . . . . . 41
3.7.3. Authentication Data Calculation . . . . . . . . . . . 42 7.2.1. Identification of DSKPP Messages . . . . . . . . . . . 42
4. DSKPP Message Formats . . . . . . . . . . . . . . . . . . . . 43 7.2.2. HTTP Headers . . . . . . . . . . . . . . . . . . . . . 42
4.1. General XML Schema Requirements . . . . . . . . . . . . . 43 7.2.3. HTTP Operations . . . . . . . . . . . . . . . . . . . 42
4.2. Components of the <KeyProvTrigger> Message . . . . . . . 44 7.2.4. HTTP Status Codes . . . . . . . . . . . . . . . . . . 43
4.3. Components of the <KeyProvClientHello> Request . . . . . 45 7.2.5. HTTP Authentication . . . . . . . . . . . . . . . . . 43
4.3.1. The DeviceIdentifierDataType Type . . . . . . . . . . 48 7.2.6. Initialization of DSKPP . . . . . . . . . . . . . . . 43
4.3.2. The ProtocolVariantsType Type . . . . . . . . . . . . 48 7.2.7. Example Messages . . . . . . . . . . . . . . . . . . . 44
4.3.3. The KeyPackagesFormatType Type . . . . . . . . . . . 49 8. DSKPP XML Schema . . . . . . . . . . . . . . . . . . . . . . . 44
4.3.4. The AuthenticationDataType Type . . . . . . . . . . . 50 8.1. General Processing Requirements . . . . . . . . . . . . . 44
4.4. Components of the <KeyProvServerHello> Response (Used 8.2. Schema . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Only in Four-Pass DSKPP) . . . . . . . . . . . . . . . . 50 9. Conformance Requirements . . . . . . . . . . . . . . . . . . . 54
4.5. Components of a <KeyProvClientNonce> Request (Used 10. Security Considerations . . . . . . . . . . . . . . . . . . . 55
Only in Four-Pass DSKPP) . . . . . . . . . . . . . . . . 52 10.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.6. Components of a <KeyProvServerFinished> Response . . . . 53 10.2. Active Attacks . . . . . . . . . . . . . . . . . . . . . . 55
4.7. The StatusCode Type . . . . . . . . . . . . . . . . . . . 55 10.2.1. Introduction . . . . . . . . . . . . . . . . . . . . . 55
5. Protocol Extensions . . . . . . . . . . . . . . . . . . . . . 57 10.2.2. Message Modifications . . . . . . . . . . . . . . . . 55
5.1. The ClientInfoType Type . . . . . . . . . . . . . . . . . 57 10.2.3. Message Deletion . . . . . . . . . . . . . . . . . . . 57
5.2. The ServerInfoType Type . . . . . . . . . . . . . . . . . 57 10.2.4. Message Insertion . . . . . . . . . . . . . . . . . . 57
6. Protocol Bindings . . . . . . . . . . . . . . . . . . . . . . 57 10.2.5. Message Replay . . . . . . . . . . . . . . . . . . . . 57
6.1. General Requirements . . . . . . . . . . . . . . . . . . 57 10.2.6. Message Reordering . . . . . . . . . . . . . . . . . . 58
6.2. HTTP/1.1 Binding for DSKPP . . . . . . . . . . . . . . . 57 10.2.7. Man-in-the-Middle . . . . . . . . . . . . . . . . . . 58
6.2.1. Introduction . . . . . . . . . . . . . . . . . . . . 57 10.3. Passive Attacks . . . . . . . . . . . . . . . . . . . . . 58
6.2.2. Identification of DSKPP Messages . . . . . . . . . . 58 10.4. Cryptographic Attacks . . . . . . . . . . . . . . . . . . 59
6.2.3. HTTP Headers . . . . . . . . . . . . . . . . . . . . 58 10.5. Attacks on the Interaction between DSKPP and User
6.2.4. HTTP Operations . . . . . . . . . . . . . . . . . . . 58 Authentication . . . . . . . . . . . . . . . . . . . . . . 59
6.2.5. HTTP Status Codes . . . . . . . . . . . . . . . . . . 59 10.6. Miscellaneous Considerations . . . . . . . . . . . . . . . 60
6.2.6. HTTP Authentication . . . . . . . . . . . . . . . . . 59 10.6.1. Client Contributions to K_TOKEN Entropy . . . . . . . 60
6.2.7. Initialization of DSKPP . . . . . . . . . . . . . . . 59 10.6.2. Key Confirmation . . . . . . . . . . . . . . . . . . . 60
6.2.8. Example Messages . . . . . . . . . . . . . . . . . . 60 10.6.3. Server Authentication . . . . . . . . . . . . . . . . 60
7. DSKPP Schema . . . . . . . . . . . . . . . . . . . . . . . . 60 10.6.4. User Authentication . . . . . . . . . . . . . . . . . 60
8. Conformance Requirements . . . . . . . . . . . . . . . . . . 69 10.6.5. Key Protection in Two-Pass DSKPP . . . . . . . . . . . 61
9. Security Considerations . . . . . . . . . . . . . . . . . . . 70 11. Internationalization Considerations . . . . . . . . . . . . . 62
9.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 70 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 62
9.2. Active Attacks . . . . . . . . . . . . . . . . . . . . . 70 12.1. URN Sub-Namespace Registration . . . . . . . . . . . . . . 62
9.2.1. Introduction . . . . . . . . . . . . . . . . . . . . 70 12.2. XML Schema Registration . . . . . . . . . . . . . . . . . 63
9.2.2. Message Modifications . . . . . . . . . . . . . . . . 70 12.3. MIME Media Type Registration . . . . . . . . . . . . . . . 63
9.2.3. Message Deletion . . . . . . . . . . . . . . . . . . 72 12.4. Status Code Registry . . . . . . . . . . . . . . . . . . . 64
9.2.4. Message Insertion . . . . . . . . . . . . . . . . . . 72 13. Intellectual Property Considerations . . . . . . . . . . . . . 65
9.2.5. Message Replay . . . . . . . . . . . . . . . . . . . 72 14. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 65
9.2.6. Message Reordering . . . . . . . . . . . . . . . . . 73 15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 65
9.2.7. Man-in-the-Middle . . . . . . . . . . . . . . . . . . 73 16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 66
9.3. Passive Attacks . . . . . . . . . . . . . . . . . . . . . 73 16.1. Normative references . . . . . . . . . . . . . . . . . . . 66
9.4. Cryptographic Attacks . . . . . . . . . . . . . . . . . . 73 16.2. Informative references . . . . . . . . . . . . . . . . . . 67
9.5. Attacks on the Interaction between DSKPP and User Appendix A. Usage Scenarios . . . . . . . . . . . . . . . . . . . 69
Authentication . . . . . . . . . . . . . . . . . . . . . 74 A.1. Single Key Request . . . . . . . . . . . . . . . . . . . . 69
9.6. Miscellaneous Considerations . . . . . . . . . . . . . . 75 A.2. Multiple Key Requests . . . . . . . . . . . . . . . . . . 69
9.6.1. Client Contributions to K_TOKEN Entropy . . . . . . . 75 A.3. User Authentication . . . . . . . . . . . . . . . . . . . 69
9.6.2. Key Confirmation . . . . . . . . . . . . . . . . . . 75 A.4. Provisioning Time-Out Policy . . . . . . . . . . . . . . . 70
9.6.3. Server Authentication . . . . . . . . . . . . . . . . 75 A.5. Key Renewal . . . . . . . . . . . . . . . . . . . . . . . 70
9.6.4. User Authentication . . . . . . . . . . . . . . . . . 75 A.6. Pre-Loaded Key Replacement . . . . . . . . . . . . . . . . 70
9.6.5. Key Protection in Two-Pass DSKPP . . . . . . . . . . 76 A.7. Pre-Shared Manufacturing Key . . . . . . . . . . . . . . . 70
10. Internationalization Considerations . . . . . . . . . . . . . 77 A.8. End-to-End Protection of Key Material . . . . . . . . . . 71
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 77 Appendix B. Examples . . . . . . . . . . . . . . . . . . . . . . 71
11.1. URN Sub-Namespace Registration . . . . . . . . . . . . . 77 B.1. Trigger Message . . . . . . . . . . . . . . . . . . . . . 72
11.2. XML Schema Registration . . . . . . . . . . . . . . . . . 78 B.2. Four-Pass Protocol . . . . . . . . . . . . . . . . . . . . 72
11.3. MIME Media Type Registration . . . . . . . . . . . . . . 78 B.2.1. <KeyProvClientHello> Without a Preceding Trigger . . . 73
11.4. Status Code Registry . . . . . . . . . . . . . . . . . . 79 B.2.2. <KeyProvClientHello> Assuming a Preceding Trigger . . 74
12. Intellectual Property Considerations . . . . . . . . . . . . 80 B.2.3. <KeyProvServerHello> Without a Preceding Trigger . . . 75
13. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 80 B.2.4. <KeyProvServerHello> Assuming Key Renewal . . . . . . 76
14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 80 B.2.5. <KeyProvClientNonce> Using Default Encryption . . . . 76
15. References . . . . . . . . . . . . . . . . . . . . . . . . . 81 B.2.6. <KeyProvServerFinished> Using Default Encryption . . . 78
15.1. Normative references . . . . . . . . . . . . . . . . . . 81 B.3. Two-Pass Protocol . . . . . . . . . . . . . . . . . . . . 78
15.2. Informative references . . . . . . . . . . . . . . . . . 82 B.3.1. Example Using the Key Transport Method . . . . . . . . 78
Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 84 B.3.2. Example Using the Key Wrap Method . . . . . . . . . . 81
A.1. Trigger Message . . . . . . . . . . . . . . . . . . . . . 85 B.3.3. Example Using the Passphrase-Based Key Wrap Method . . 84
A.2. Four-Pass Protocol . . . . . . . . . . . . . . . . . . . 85 Appendix C. Integration with PKCS #11 . . . . . . . . . . . . . . 88
A.2.1. <KeyProvClientHello> Without a Preceding Trigger . . 86 C.1. The 4-pass Variant . . . . . . . . . . . . . . . . . . . . 88
A.2.2. <KeyProvClientHello> Assuming a Preceding Trigger . . 87 C.2. The 2-pass Variant . . . . . . . . . . . . . . . . . . . . 88
A.2.3. <KeyProvServerHello> Without a Preceding Trigger . . 88 Appendix D. Example of DSKPP-PRF Realizations . . . . . . . . . . 90
A.2.4. <KeyProvServerHello> Assuming a Preceding Trigger . . 89 D.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 91
A.2.5. <KeyProvClientNonce> Using Default Encryption . . . . 89 D.2. DSKPP-PRF-AES . . . . . . . . . . . . . . . . . . . . . . 91
A.2.6. <KeyProvServerFinished> Using Default Encryption . . 91 D.2.1. Identification . . . . . . . . . . . . . . . . . . . . 91
A.3. Two-Pass Protocol . . . . . . . . . . . . . . . . . . . . 91 D.2.2. Definition . . . . . . . . . . . . . . . . . . . . . . 91
A.3.1. Example Using the Key Transport Profile . . . . . . . 91 D.2.3. Example . . . . . . . . . . . . . . . . . . . . . . . 92
A.3.2. Example Using the Key Wrap Profile . . . . . . . . . 94 D.3. DSKPP-PRF-SHA256 . . . . . . . . . . . . . . . . . . . . . 92
A.3.3. Example Using the Passphrase-Based Key Wrap Profile . 97 D.3.1. Identification . . . . . . . . . . . . . . . . . . . . 92
Appendix B. Integration with PKCS #11 . . . . . . . . . . . . . 100 D.3.2. Definition . . . . . . . . . . . . . . . . . . . . . . 93
B.1. The 4-pass Variant . . . . . . . . . . . . . . . . . . . 100 D.3.3. Example . . . . . . . . . . . . . . . . . . . . . . . 94
B.2. The 2-pass Variant . . . . . . . . . . . . . . . . . . . 100 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 94
Appendix C. Example of DSKPP-PRF Realizations . . . . . . . . . 103
C.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 103
C.2. DSKPP-PRF-AES . . . . . . . . . . . . . . . . . . . . . . 103
C.2.1. Identification . . . . . . . . . . . . . . . . . . . 103
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
1. Introduction 1. Introduction
While the range of problems for which symmetric key cryptography is Symmetric key based cryptographic systems (e.g., those providing
the solution of choice is somewhat smaller than for public key authentication mechanisms such as one-time passwords and challenge-
cryptography, the problems it does solve, it solves exceedingly well. response) offer performance and operational advantages over public
In particular, symmetric key algorithms are considerably faster than key schemes. Such use requires a mechanism for provisioning of
public key equivalents and allow for smaller key and signature sizes. symmetric keys providing equivalent functionality to mechanisms such
as CMP [RFC4210] and CMMC [RFC5272] in a Public Key Infrastructure.
Despite the clear advantages of employing symmetric keys as long term Traditionally, cryptographic modules have been provisioned with keys
credentials or access keys in certain circumstances, it has generally during device manufacturing, and the keys have been imported to the
been assumed that any protocol in which ease of key management is cryptographic server using, e.g., a CD-ROM disc shipped with the
required will employ public key cryptography. In particular it is devices. Some vendors also have proprietary provisioning protocols,
assumed that only private components of public keypairs will be which often have not been publicly documented (CT-KIP is one
employed as long term secrets and that symmetric cryptography will exception [RFC4758]).
only play a supporting role.
This document describes the Dynamic Symmetric Key Provisioning This document describes the Dynamic Symmetric Key Provisioning
Protocol (DSKPP), which provides a mechanism for provisioning Protocol (DSKPP), a client-server protocol for provisioning symmetric
symmetric keys that provides the same degree of flexibility and keys between a cryptographic module (corresponding to DSKPP client)
convenience in use as equivalent infrastructures for public keys. and a key provisioning server (corresponding to DSKPP server).
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 DSKPP provides an open and interoperable mechanism for initializing
and configuring symmetric keys to cryptographic modules that are and configuring symmetric keys to cryptographic modules that are
accessible over the Internet. The description is based on the accessible over the Internet. The description is based on the
information contained in [RFC4758], and contains specific information contained in [RFC4758], and contains specific
enhancements, such as User Authentication and support for the [PSKC] enhancements, such as User Authentication and support for the [PSKC]
format for transmission of keying material. format for transmission of keying material.
DSKPP has two principal protocol variations. The four pass protocol DSKPP has two principal protocol variants. The four-pass protocol
variation permits a symmetric key to be established that includes variant permits a symmetric key to be established that includes
randomness contributed by both the client and the server. The two randomness contributed by both the client and the server. The two-
pass protocol requires only one round trip instead of two and permits pass protocol requires only one round trip instead of two and permits
a server specified key to be established. a server specified key to be established.
1.1. Usage Scenarios 1.1. Key Words
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.
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
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.
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.
----------- -------------
| 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:
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
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 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
XML syntax. The main goal in using this syntax is to document DSKPP. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
Application of the syntax beyond this goal is OPTIONAL (i.e., an document are to be interpreted as described in [RFC2119].
implementation that does not use XML and instead uses ASN.1 could
claim compliance with this specification).
1.5.1. Versions 1.2. Versions
There is a provision made in the syntax for an explicit version There is a provision made in the syntax for an explicit version
number. Only version "1.0" is currently specified. number. Only version "1.0" is currently specified.
1.5.2. Namespaces 1.3. Namespace Identifiers
The XML namespace [XMLNS] URN that MUST be used by implementations of This document uses Uniform Resource Identifiers [RFC2396] to identify
this syntax is: resources, algorithms, and semantics.
1.3.1. Defined Identifiers
The XML namespace [XMLNS] URI for Version 1.0 of DSKPP protocol is:
xmlns:dskpp="urn:ietf:params:xml:ns:keyprov:dskpp:1.0" xmlns:dskpp="urn:ietf:params:xml:ns:keyprov:dskpp:1.0"
References to qualified elements in the DSKPP schema defined herein References to qualified elements in the DSKPP schema defined herein
use the prefix "dskpp". use the prefix "dskpp".
1.3.2. Identifiers Defined in Related Specifications
This document relies on qualified elements already defined in the This document relies on qualified elements already defined in the
Portable Symmetric Key Container [PSKC] namespace, which is Portable Symmetric Key Container [PSKC] namespace, which is
represented by the prefix "pskc" and declared as: represented by the prefix "pskc" and declared as:
xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc:1.0" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc:1.0"
1.3.3. Referenced Identifiers
Finally, the DSKPP syntax presented in this document relies on Finally, the DSKPP syntax presented in this document relies on
algorithm identifiers defined in the XML Signature [XMLDSIG] algorithm identifiers defined in the XML Signature [XMLDSIG]
namespace: namespace:
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
References to algorithm identifiers in the XML Signature namespace References to algorithm identifiers in the XML Signature namespace
are represented by the prefix "ds". 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. Terminology
2.1. Key Words 2.1. Definitions
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 definitions provided below are defined as used in this document.
The same terms may be defined differently in other documents. The same terms may be defined differently in other documents.
Authentication Code (AC): Client Authentication Code comprised of a Authentication Code (AC): User Authentication Code comprised of a
string of numeric characters known to the device and the server string of numeric characters known to the device and the server
and containing an identifier and a password and containing a client identifier and a password. This
ClientID/password combination is used only once, and then
discarded.
Authentication Data (AD): Client Authentication Data that may be Authentication Data (AD): User Authentication Data that is derived
derived from the Authentication Code (AC) from the Authentication Code (AC)
Client ID: An identifier that the DSKPP Server uses to locate the
real user name 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 Cryptographic Module: A component of an application, which enables
symmetric key cryptographic functionality 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 Device: A physical piece of hardware, or a software framework, that
hosts symmetric key cryptographic modules hosts symmetric key cryptographic modules
Device ID (DeviceID): A unique identifier for the device 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 DSKPP Client: Manages communication between the symmetric key
cryptographic module and the DSKPP server cryptographic module and the DSKPP server
DSKPP Server: The symmetric key provisioning server that DSKPP Server: The symmetric key provisioning server that
participates in the DSKPP protocol run participates in the DSKPP protocol run
DSKPP Server ID (ServerID): The unique identifier of a DSKPP server 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 Issuer: An organization that issues symmetric keys to end-users
Key Package (KP): An object that encapsulates a symmetric key and Key Package (KP): An object that encapsulates a symmetric key and
its configuration data 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 ID (KeyID): A unique identifier for the symmetric key
Key Protection Method (KPM): The key transport method used during Key Protection Method (KPM): The key transport method used during
two-pass DSKPP two-pass DSKPP
Key Protection Method List (KPML): The list of key protection Key Protection Method List (KPML): The list of key protection
methods supported by a cryptographic module methods supported by a cryptographic module
Key Provisioning Server: A lifecycle management system that provides Key Provisioning Server: A lifecycle management system that provides
a key issuer with the ability to provision keys to cryptographic a key issuer with the ability to provision keys to cryptographic
skipping to change at page 15, line 19 skipping to change at page 9, line 28
Keying Material: The data necessary (e.g., keys and key Keying Material: The data necessary (e.g., keys and key
configuration data) necessary to establish and maintain configuration data) necessary to establish and maintain
cryptographic keying relationships [NIST-SP800-57] cryptographic keying relationships [NIST-SP800-57]
Manufacturer's Key A unique master key pre-issued to a hardware Manufacturer's Key A unique master key pre-issued to a hardware
device, e.g., a smart card, during the manufacturing process. If device, e.g., a smart card, during the manufacturing process. If
present, this key may be used by a cryptographic module to derive present, this key may be used by a cryptographic module to derive
secret keys secret keys
Provisioning Service: See "Key Provisioning Server"
Security Attribute List (SAL): A payload that contains the DSKPP Security Attribute List (SAL): A payload that contains the DSKPP
version, DSKPP variation (four- or two-pass), key package version, DSKPP variant (four- or two-pass), key package formats,
formats, key types, and cryptographic algorithms that the key types, and cryptographic algorithms that the cryptographic
cryptographic module is capable of supporting module is capable of supporting
Security Context (SC): A payload that contains the DSKPP version, Security Context (SC): A payload that contains the DSKPP version,
DSKPP variation (four- or two-pass), key package format, key DSKPP variant (four- or two-pass), key package format, key type,
type, and cryptographic algorithms relevant to the current and cryptographic algorithms relevant to the current protocol run
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 2.2. Notation
|| String concatenation || String concatenation
[x] Optional element x [x] Optional element x
A ^ B Exclusive-OR operation on strings A and B (where
A ^ B Exclusive-OR operation on strings A and B (where A A and B are of equal length)
and B are of equal length) <XMLElement> A typographical convention used in the body of
the text
<XMLElement> A typographical convention used in the body of the DSKPP-PRF(k,s,dsLen) A keyed pseudo-random function
text
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 E(k,m) Encryption of m with the key k
K Key used to encrypt R_C (either K_SERVER or K Key used to encrypt R_C (either K_SERVER or
K_SHARED), or in MAC or DSKPP_PRF computations K_SHARED), or in MAC or DSKPP_PRF computations
K_AC Secret key that is derived from the
K_AC Secret key that is derived from the Authentication Authentication Code and used for user
Code and used for user authentication purposes authentication purposes
K_MAC Secret key derived during a DSKPP exchange for
K_MAC Secret key derived during a DSKPP exchange for use use with key confirmation
with key confirmation K_MAC' A second secret key used for server
authentication
K_MAC' A second secret key used for server authentication
K_PROV A provisioning master key from which two keys are K_PROV A provisioning master key from which two keys are
derived: K_TOKEN and K_MAC derived: K_TOKEN and K_MAC
K_SERVER Public key of the DSKPP server; used for
K_SERVER Public key of the DSKPP server; used for encrypting encrypting R_C in the four-pass protocol variant
R_C in the four-pass protocol variant
K_SHARED Secret key that is pre-shared between the DSKPP K_SHARED Secret key that is pre-shared between the DSKPP
client and the DSKPP server; used for encrypting client and the DSKPP server; used for encrypting
R_C in the four-pass protocol variant R_C in the four-pass protocol variant
K_TOKEN Secret key that is established in a cryptographic K_TOKEN Secret key that is established in a cryptographic
module using DSKPP module using DSKPP
R Pseudorandom value chosen by the DSKPP client and R Pseudorandom value chosen by the DSKPP client and
used for MAC computations used for MAC computations
R_C Pseudorandom value chosen by the DSKPP client and R_C Pseudorandom value chosen by the DSKPP client and
used as input to the generation of K_TOKEN used as input to the generation of K_TOKEN
R_S Pseudorandom value chosen by the DSKPP server and R_S Pseudorandom value chosen by the DSKPP server and
used as input to the generation of K_TOKEN 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 URL_S DSKPP server address, as a URL
2.4. Abbreviations 2.3. Abbreviations
AC Authentication Code AC Authentication Code
AD Authentication Data AD Authentication Data
DSKPP Dynamic Symmetric Key Provisioning Protocol DSKPP Dynamic Symmetric Key Provisioning Protocol
HTTP Hypertext Transfer Protocol HTTP Hypertext Transfer Protocol
KP Key Package KP Key Package
KPH Key Package Header
KPM Key Protection Method KPM Key Protection Method
KPML Key Protection Method List KPML Key Protection Method List
MAC Message Authentication Code MAC Message Authentication Code
PC Personal Computer PC Personal Computer
PDU Protocol Data Unit PDU Protocol Data Unit
PKCS Public-Key Cryptography Standards PKCS Public-Key Cryptography Standards
PRF Pseudo-Random Function PRF Pseudo-Random Function
PSKC Portable Symmetric Key Container PSKC Portable Symmetric Key Container
SAL Security Attribute List (see Section 2.2) SAL Security Attribute List (see Section 2.1)
SC Security Context (see Section 2.2) SC Security Context (see Section 2.1)
TLS Transport Layer Security TLS Transport Layer Security
URL Uniform Resource Locator URL Uniform Resource Locator
USB Universal Serial Bus USB Universal Serial Bus
XML eXtensible Markup Language XML eXtensible Markup Language
3. DSKPP Protocol Details 3. DSKPP Overview
DSKPP enables symmetric key provisioning between a DSKPP server and The following sub-sections provide a high-level view of protocol
DSKPP client. internals and how they interact with external provisioning
applications. Usage scenarios are provided in Appendix A.
3.1. Protocol Initiation 3.1. Protocol Entities
The DSKPP protocol has two- and four-pass variations, either of which A DSKPP provisioning transaction has three entities:
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 Server: The DSKPP provisioning server.
The DSKPP protocol may be initiated by the server by means of a Cryptographic Module: The cryptographic module to which the
<KeyProvTrigger> message to which the client responds with a symmetric keys are to be provisioned, e.g., an authentication
<KeyProvClientHello> message as shown in Figure 2. The trigger token.
message always contains a nonce to allow the server to couple the
trigger with a later <KeyProvClientHello> request.
+---------------+ +---------------+ Client: The DSKPP client which manages communication between the
| | | | cryptographic module and the key provisioning server.
| DSKPP Client | | DSKPP Server |
| | | |
+---------------+ +---------------+
| |
| <--------- <KeyProvTrigger> --------- |
| |
| ------- <KeyProvClientHello> -------> |
... ...
Figure 2: Server Initiated DSKPP (start) 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.
3.1.2. Client Initiation 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.
The DSKPP protocol may be initiated by the client by means of the From a client-side security perspective, however, the client and the
<KeyProvClientHello> message Figure 3 message. 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
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].
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
associate the key with the correct user name (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.
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
| | | | | | | |
| DSKPP Client | | DSKPP Server | | | | +---------------+
| | | |Server creates |
| | | |and stores |
| | | |Client ID and |
| | | |Auth. Code and |
| | | |delivers them |
| | | |to user out-of-|
| | | |band. |
| | | +---------------+
| | | | | | | |
+---------------+ +---------------+ | +----------------------+ | |
| | | |User enters Client ID,| | |
| ------- <KeyProvClientHello> -------> | | |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 3: Client Initiated DSKPP (start) Figure 1: Basic DSKPP Exchange
3.2. Protocol Variations 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 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 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.
Once contact has been initiated, the client and server MAY engage in o There must be an account for the user that has an identifier and
either a two-pass or four-pass protocol depending on the protocol long-term user name (or other account identifier) to which the
options specified in the <KeyProvClientHello> message and the server token will be associated. The DSKPP server will use the Client ID
configuration. to find the corresponding Authentication Code for user
authentication
3.2.1. Four-Pass Protocol Interaction In Step 1, the client establishes a TLS connection, and authenticates
the server (that is, validates the certificate, and compares the host
name in the URL with the certificate).
In the four-pass version of the protocol the server responds to the Next, the DSKPP Client and DSKPP Server exchange DSKPP messages
<KeyProvClientHello> message with <KeyProvServerHello>. The client (which are sent over HTTPS). In these messages:
then responds with <KeyProvClientNonce> and the server with o The client and server negotiate which cryptographic algorithms
<KeyProvServerFinished> as shown in Figure 4. they want to use; which algorithms are supported for protecting
DSKPP messages, and other DSKPP protocol 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 protocol run (called
"four-pass variant", since it involves four DSKPP messages), or it
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).
+---------------+ +---------------+ 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 user name. 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 user by some out-of-band
means (such as paper).
Web DSKPP DSKPP Web
Browser Client Server Server
| | | | | | | |
| DSKPP Client | | DSKPP Server | |<-------- HTTPS browsing + some kind of user auth. --------->|
| | | | | | | |
+---------------+ +---------------+ | some HTTP request ----------------------------------------->|
| | | | |
| [ <--------- <KeyProvTrigger> --------- ] | | | |<------------->|
| | | | | |
| ------- <KeyProvClientHello> -------> | |<----------------------- HTTP response with <KeyProvTrigger> |
| | | | | |
| <------ <KeyProvServerHello> -------- | | Trigger ---->| | |
| | | | | |
| ------- <KeyProvClientNonce> -------> | | |<-- 1. TLS handshake with --->| |
| | | | server auth. | |
| <---- <KeyProvServerFinished> ------- | | | | |
| | | | ... continues... | |
Figure 4: Four Pass DSKPP protocol (with OPTIONAL preceding trigger) Figure 2: DSKPP Exchange with Web-Based Authentication
[<KeyProvTrigger> Message]: The <KeyProvTrigger> message is used to In the second message flow, the user first authenticates to a web
initiate a request from the server. The trigger message always server (for example, IT department's "self-service" Intranet page),
contains a nonce to allow the server to couple the trigger with a using an ordinary web browser and some existing credentials.
later <KeyProvClientHello> request.
<KeyProvClientHello>: The <KeyProvClientHello> request is sent by a The user then requests (by clicking a link or submitting a form)
DSKPP client to initiate contact with the DSKPP server, provisioning of a new key to the cryptographic module. The web
indicating which protocol versions and variations (four-pass or server will reply with a <KeyProvTrigger> message that contains the
two-pass), key types, encryption and MAC algorithms that it Client ID, Authentication Code, and URL of the DSKPP server. This
supports. In addition, the request may include client information is also needed by the DSKPP server; how the web server
authentication data that the DSKPP server uses to verify proof- and DSKPP server interact is beyond the scope of this document.
of-possession of the device.
Server Processing of <KeyProvClientHello>: Upon receiving a The <KeyProvTrigger> message is sent in a HTTP response, and it is
<KeyProvClientHello> request, the DSKPP server uses the marked with MIME type "application/vnd.ietf.keyprov.dskpp+xml". It
<KeyProvServerHello> response to specify which protocol version is assumed the web browser has been configured to recognize this MIME
and variation, key type, encryption algorithm, and MAC algorithm type; the browser will start the DSKPP client, and provides it with
that will be used by the DSKPP server and DSKPP client during the the <KeyProvTrigger> message.
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 The DSKPP client then contacts the DSKPP server, and uses the Client
in the four pass protocol, it includes the DSKPP server's random ID and Authentication Code (from the <KeyProvTrigger> messsage) the
nonce, R_S. The response also consists of information about same way as in the first message flow.
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).
Optionally, the DSKPP server may provide a MAC that the DSKPP 3.2.4. Variants
client may use for server authentication.
Client Processing of <KeyProvServerHello>: On receipt of As noted in the previous section, once the protocol has started, the
<KeyProvServerHello>, the client encrypts the random client nonce client and server MAY engage in either a two-pass or four-pass
R_c under the (provided) server key K. 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
negotiation of encryption mechanisms and key types at the beginning
of each protocol run.
<KeyProvClientNonce>: The <KeyProvClientNonce> request is only used 3.2.4.1. Criteria for Using the Four-Pass Variant
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 The four-pass protocol is needed under one or more of the following
confirmation message that includes a key package that holds conditions:
configuration data, but no keying material. 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
on a mobile phone).
Optionally, the DSKPP server may provide a MAC that the DSKPP 3.2.4.2. Criteria for Using the Two-Pass Variant
client may use for server authentication.
3.2.2. Two-Pass Protocol Interaction 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.
In the two-pass version of the protocol the server responds to the 3.3. Status Codes
<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) 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 protocol run. DSKPP servers and DSKPP clients MUST delete any
secret values generated as a result of failed runs of the DSKPP
protocol. 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.
[<KeyProvTrigger> Message]: The <KeyProvTrigger> message is used to When possible, the DSKPP client SHOULD present an appropriate error
initiate a request from the server. The trigger message always message to the user.
contains a nonce to allow the server to couple the trigger with a
later <KeyProvClientHello> request.
<KeyProvClientHello>: The <KeyProvClientHello> request is sent by a These status codes are valid in all DSKPP Response messages unless
DSKPP client to initiate contact with the DSKPP server, explicitly stated otherwise:
indicating which protocol versions and variations (four-pass or o "Continue" indicates that the DSKPP server is ready for a
two-pass), key types, encryption and MAC algorithms that it subsequent request from the DSKPP client. It cannot be sent in
supports. In addition, the request may include client the server's final message.
authentication data that the DSKPP server uses to verify proof- o "Success" indicates successful completion of the DSKPP session.
of-possession of the device. It can only be sent in the server's final message.
o "Abort" indicates that the DSKPP server rejected the DSKPP
client's request for unspecified reasons.
o "AccessDenied" indicates that the DSKPP client is not authorized
to contact this DSKPP server.
o "MalformedRequest" indicates that the DSKPP server failed to parse
the DSKPP client's request.
o "UnknownRequest" indicates that the DSKPP client made a request
that is unknown to the DSKPP server.
o "UnknownCriticalExtension" indicates that a critical DSKPP
extension (see below) used by the DSKPP client was not supported
or recognized by the DSKPP server.
o "UnsupportedVersion" indicates that the DSKPP client used a DSKPP
protocol version not supported by the DSKPP server. This error is
only valid in the DSKPP server's first response message.
o "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.
o "NoSupportedEncryptionAlgorithms" indicates that 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.
o "NoSupportedMacAlgorithms" indicates that 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.
<KeyProvServerFinished>: The <KeyProvServerFinished> response is a o "NoProtocolVariants" indicates that the DSKPP client only
confirmation message that includes a key package that holds suggested a protocol variant (either 2-pass or 4-pass) that is not
configuration data and contain protected keying material. supported by the DSKPP server. This error is only valid in the
DSKPP server's first response message.
o "NoSupportedKeyPackages" indicates that 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.
o "AuthenticationDataMissing" indicates that the DSKPP client didn't
provide authentication data that the DSKPP server required.
o "AuthenticationDataInvalid" indicates that the DSKPP client
supplied user authentication data that the DSKPP server failed to
validate.
o "InitializationFailed" indicates that 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.
o "ProvisioningPeriodExpired" indicates that 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.
Optionally, the DSKPP server may provide a MAC that the DSKPP 3.4. Basic Constructs
client may use for server authentication.
3.3. Cryptographic Construction The following calculations are used in both DSKPP protocol variants.
3.3.1. The DSKPP One-Way Pseudorandom Function, DSKPP-PRF 3.4.1. User Authentication Data, AD
3.3.1.1. Introduction User authentication data (AD) is derived from a Client ID and
Authentication Code that the user enters before the first DSKPP
message is sent.
Regardless of the protocol variation employed, there is a requirement 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 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.
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.
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 | { "3582" } |
+------+------------+-------------+-----------------------------+
| 3 | Checksum | Optional | { 0x5F8D } |
+------+------------+-------------+-----------------------------+
The Client ID is a mandatory TLV that represents the requester's
identifier of maximum length 128. The value is represented as 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}.
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 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")}.
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 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.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
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.
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 for a cryptographic primitive that provides a deterministic
transformation of a secret key k and a varying length octet string s transformation of a secret key k and a varying length octet string s
to a bitstring of specified length dsLen. to a bitstring of specified length dsLen.
This primitive must meet the same requirements as for a keyed hash This primitive must meet the same requirements as for a keyed hash
function: It MUST take an arbitrary length input, and generate an function: It MUST take an arbitrary length input, and generate an
output that is one-way and collision-free (for a definition of these output that is one-way and collision-free (for a definition of these
terms, see, e.g., [FAQ]). Further, its output MUST be unpredictable terms, see, e.g., [FAQ]). Further, its output MUST be unpredictable
even if other outputs for the same key are known. even if other outputs for the same key are known.
From the point of view of this specification, DSKPP-PRF is a "black- From the point of view of this specification, DSKPP-PRF is a "black-
box" function that, given the inputs, generates a pseudorandom value box" function that, given the inputs, generates a pseudorandom value
and MAY be realized by any appropriate and competent cryptographic and MAY be realized by any appropriate and competent cryptographic
technique. Appendix C contains two example realizations of DSKPP- technique. Appendix D contains two example realizations of DSKPP-
PRF. PRF.
3.3.1.2. Declaration
DSKPP-PRF (k, s, dsLen) DSKPP-PRF (k, s, dsLen)
Input: Input:
k secret key in octet string format k secret key in octet string format
s octet string of varying length consisting of variable data s octet string of varying length consisting of variable data
distinguishing the particular string being derived distinguishing the particular string being derived
dsLen desired length of the output dsLen desired length of the output
Output: Output:
DS pseudorandom string, dsLen-octets long DS pseudorandom string, dsLen-octets long
For the purposes of this document, the secret key k MUST be at least For the purposes of this document, the secret key k MUST be at least
16 octets long. 16 octets long.
3.4. Four-Pass Protocol Usage 3.4.3. The DSKPP Message Hash Algorithm
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
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).
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 When sending its last message in a protocol run, the DSKPP server
------------ ------------ generates a MAC that is used by the client for key confirmation.
<--- KP, MAC 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:
If Authentication Data (AD) was received in the <KeyProvClientNonce> a. The sequence of messages contains all DSKPP Request and Response
message, then the DSKPP server MUST authenticate the user in messages up to but not including this message.
accordance with Section 3.7.1. If authentication fails, then DSKPP b. Re-transmitted messages are removed from the sequence of
server MUST abort. Otherwise, the DSKPP server decrypts R_C, messages.
calculates K_TOKEN from the combination of the two random nonces R_S Note: The resulting sequence of messages MUST be an alternating
and R_C, the encryption key K, and possibly some other data (refer to sequence of DSKPP Request and DSKPP Response messages
Section 3.4.2.2 for a description of how K_TOKEN is generated). The c. The contents of each message is concatenated together.
server then associates K_TOKEN with the cryptographic module in a d. The resultant string is hashed using SHA-256 in accordance with
server-side data store. The intent is that the data store later on [FIPS180-SHA].
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 4. Four-Pass Protocol Usage
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 = This section describes the methods and message flow that comprise the
"Success", the DSKPP client MUST verify the MAC. The DSKPP client four-pass protocol variant. Four-pass DSKPP depends on a client-
MUST terminate the DSKPP session if the MAC does not verify, and server key agreement mechanism.
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 4.1. The Key Agreement Mechanism
With 4-pass DSKPP, the symmetric key that is the target of With 4-pass DSKPP, the symmetric key that is the target of
provisioning, is generated on-the-fly without being transferred provisioning, is generated on-the-fly without being transferred
between the DSKPP client and DSKPP server. A sample data flow between the DSKPP client and DSKPP server. The data flow and
depicting how this works followed by computational information are computation are described below.
provided in the subsections below.
3.4.2.1. Data Flow 4.1.1. Data Flow
A sample data flow showing key generation during the 4-pass protocol A sample data flow showing key generation during the 4-pass protocol
is shown in Figure 6. is shown in Figure 3.
+----------------------+ +-------+ +----------------------+ +----------------------+ +-------+ +----------------------+
| +------------+ | | | | | | +------------+ | | | | |
| | Server key | | | | | | | | Server key | | | | | |
| +<-| Public |------>------------->-------------+---------+ | | +<-| Public |------>------------->-------------+---------+ |
| | | Private | | | | | | | | | | | Private | | | | | | | |
| | +------------+ | | | | | | | | | +------------+ | | | | | | |
| | | | | | | | | | | | | | | | | | | |
| V V | | | | V V | | V V | | | | V V |
| | +---------+ | | | | +---------+ | | | | +---------+ | | | | +---------+ | |
skipping to change at page 26, line 36 skipping to change at page 23, line 36
| +------------+ | | | | +------------+ | | +------------+ | | | | +------------+ |
| | | | | | | | | | | | | | | |
| V | | | | V | | V | | | | V |
| +-------+ | | | | +-------+ | | +-------+ | | | | +-------+ |
| | Key | | | | | | Key | | | | Key | | | | | | Key | |
| +-------+ | | | | +-------+ | | +-------+ | | | | +-------+ |
| +-------+ | | | | +-------+ | | +-------+ | | | | +-------+ |
| |Key Id |-------->------------->------|Key Id | | | |Key Id |-------->------------->------|Key Id | |
| +-------+ | | | | +-------+ | | +-------+ | | | | +-------+ |
+----------------------+ +-------+ +----------------------+ +----------------------+ +-------+ +----------------------+
DSKPP Server DSKPP Client DSKPP Client DSKPP Server DSKPP Client Cryptographic Module
(PC Host) (cryptographic module)
Figure 6: Principal data flow for DSKPP key generation - Figure 3: Principal data flow for DSKPP key generation -
using public server key using public server key
Note: Conceptually, although R_C is one pseudorandom string, it may The inclusion of the two random nonces (R_S and R_C) in the key
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 generation provides assurance to both sides (the cryptographic module
and the DSKPP server) that they have contributed to the key's and the DSKPP server) that they have contributed to the key's
randomness and that the key is unique. The inclusion of the randomness and that the key is unique. The inclusion of the
encryption key K ensures that no man-in-the-middle may be present, or encryption key (K) ensures that no man-in-the-middle may be present,
else the cryptographic module will end up with a key different from or else the cryptographic module will end up with a key different
the one stored by the legitimate DSKPP server. from the one stored by the legitimate DSKPP server.
Note: A man-in-the-middle (in the form of corrupt client software or Notes:
a mistakenly contacted server) may present his own public key to the 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.
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 cryptographic module. This will enable the attacker to learn the
client's version of K_TOKEN. However, the attacker is not able to 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, persuade the legitimate server to derive the same value for
since K_TOKEN is a function of the public key involved, and the K_TOKEN, since K_TOKEN is a function of the public key involved,
attacker's public key must be different than the correct server's (or and the attacker's public key must be different than the correct
else the attacker would not be able to decrypt the information server's (or else the attacker would not be able to decrypt the
received from the client). Therefore, once the attacker is no longer information received from the client). Therefore, once the
"in the middle," the client and server will detect that they are "out attacker is no longer "in the middle," the client and server will
of sync" when they try to use their keys. In the case of encrypting detect that they are "out of sync" when they try to use their
R_C with K_SERVER, it is therefore important to verify that K_SERVER keys. In the case of encrypting R_C with K_SERVER, it is
really is the legitimate server's key. One way to do this is to therefore important to verify that K_SERVER really is the
independently validate a newly generated K_TOKEN against some legitimate server's key. One way to do this is to independently
validation service at the server (e.g. using a connection independent validate a newly generated K_TOKEN against some validation service
from the one used for the key generation). 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 4.1.2. Computation
In DSKPP, K_TOKEN and K_MAC are derived from provisioning key, In DSKPP, the client and server both generate K_TOKEN and K_MAC by
K_PROV, which is generated using the DSKPP-PRF function as follows deriving them from a provisioning key (K_PROV) using the DSKPP-PRF
(refer to Section 3.3.1): function (refer to Section 3.4.2) as follows:
K_PROV = DSKPP-PRF(k,s,dsLen), where K_PROV = DSKPP-PRF(k,s,dsLen), where
k = R_C (i.e., the secret random value chosen by the DSKPP k = R_C (i.e., the secret random value chosen by the DSKPP
client) client)
s = "Key generation" || K || R_S (where K is the key used to 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 encrypt R_C and R_S is the random value chosen by the DSKPP
server) server)
dsLen = (desired length of K_PROV whose first half constitutes dsLen = (desired length of K_PROV whose first half constitutes
K_MAC and second half constitutes K_TOKEN) K_MAC and second half constitutes K_TOKEN)
Then K_TOKEN and K_MAC derived from K_PROV, where Then K_TOKEN and K_MAC are derived from K_PROV, where
K_PROV = K_MAC || K_TOKEN K_PROV = K_MAC || K_TOKEN
When computing K_PROV, the derived keys, K_MAC and K_TOKEN, MAY be 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 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 key of the selected type. One example of this is the need for parity
in DES keys. in DES keys.
3.4.3. Encryption of Pseudorandom Nonces Sent from the DSKPP Client 4.2. Message Flow
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)
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) The four-pass protocol flow consists of two message exchanges:
1: Pass 1 = <KeyProvClientHello>, Pass 2 = <KeyProvServerHello>
2: Pass 3 = <KeyProvClientNonce>, Pass 4 = <KeyProvServerFinished>
dsLen = len(msg_hash) 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.
MAC = DSKPP-PRF (K_MAC, "MAC 2 computation" || msg_hash, dsLen) The purpose and content of each message are described below. XML
format and examples are in Section 8 and Appendix B.
where 4.2.1. KeyProvTrigger
MAC The MAC MUST be calculated using the already established DSKPP Client DSKPP Server
MAC algorithm and MUST be computed on the (ASCII) string ------------ ------------
"MAC 2 computation" and msg_hash using the existing the [<---] AD, [DeviceID],
MAC key K_MAC. [KeyID], [URL_S]
K_MAC The key derived from K_PROV, as described in When this message is sent:
Section 3.4.2.2. The "trigger" message is optional. The DSKPP server sends this
message after the following out-of-band steps are performed:
1. A user directed their browser to a key provisioning web
application and signs in (i.e., authenticates)
2. The user requests a key
3. The web application processes the request and returns an
authentication code to the user, e.g., in the form of an email
message
4. The web application retrieves the authentication code from the
user (possibly by asking the user to enter it using a web
form, or alternatively by the user selecting a URL in which
the authentication code is embedded)
5. The web application derives authentication data (AD) from the
authentication code as described in Section 3.4.1
6. The web application passes AD, and possibly a DeviceID
(identifies a particular device to which the key MUST be
provisioned) and/or KeyID (identifies a key that will be
replaced) to the DSKPP server
msg_hash The message hash, defined below, of messages msg_1, ..., Purpose of this message:
msg_n. To start a DSKPP session: The DSKPP server uses this message to
trigger a client-side application to send the first DSKPP message.
If DSKPP-PRF (defined in Section 3.3.1) is used as the MAC algorithm, To provide a way for the key provisioning system to get the DSKPP
then the input parameter s MUST consist of the concatenation of the server URL to the DSKPP client.
(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 So the key provisioning system can point the DSKPP client to a
particular cryptographic module that was pre-configured in the
DSKPP provisioning server.
To compute a message hash for a MAC, given a sequence of DSKPP In the case of key renewal, to identify the key to be replaced.
messages msg_1, ..., msg_n, the following operations MUST be carried
out:
a. The sequence of messages contains all DSKPP Request and Response What is contained in this message:
messages up to but not including this message. AD MUST be provided to allow the DSKPP server to authenticate the
b. Re-transmitted messages are removed from the sequence of user before completing the protocol run.
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 resulting string is hashed using SHA-256 in accordance with
[FIPS180-SHA].
3.5. Two-Pass Protocol Usage A DeviceID MAY be included to allow a key provisioning application
to bind the provisioned key to a specific device.
This section describes the message flow and methods that comprise the A KeyID MAY be included to allow the key provisioning application
two-pass protocol variant. Two-pass DSKPP is essentially a transport to identify a key to be replaced, e.g., in the case of key
of keying material from the DSKPP server to the DSKPP client. The renewal.
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 The Server URL MAY be included to allow the key provisioning
devices. Key transport is carried out application to inform the DSKPP client of which server to contact
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], 4.2.2. KeyProvClientHello
[SKPC-ASN.1], PKCS#12 [PKCS-12], and PKCS#5 XML [PKCS-5-XML].
3.5.1. Message Flow DSKPP Client DSKPP Server
------------ ------------
SAL, [AD],
[DeviceID], [KeyID] --->
The two-pass protocol flow consists of one exchange: When this message is sent:
When a DSKPP client first connects to a DSKPP server, it is
required to send the <KeyProvClientHello> as its first message.
The client can also send a <KeyProvClientHello> in response to a
<KeyProvTrigger>.
1: Pass 1 = <KeyProvClientHello>, Pass 2 = <KeyProvServerFinished> What is contained in this message:
The Security Attribute List (SAL) included with
<KeyProvClientHello> contains the combinations of DSKPP versions,
variants, key package formats, key types, and cryptographic
algorithms that the DSKPP client supports in order of the client's
preference (favorite choice first).
The client's initial <KeyProvClientHello> message is directly If <KeyProvClientHello> was preceded by a <KeyProvTrigger>, then
followed by a <KeyProvServerFinished> message (unlike the four-pass this message MUST also include the Authentication (AD), DeviceID,
variant, there is no exchange of the <KeyProvServerHello> and and/or KeyID that was provided with the trigger.
<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 If <KeyProvClientHello> was not preceded by a <KeyProvTrigger>,
the correct cryptographic module, and if applicable, the correct then this message MAY contain a device ID that was pre-shared with
user. To ensure that the key K_TOKEN ends up associated with the the DSKPP server, and a key ID associated with a key previously
correct cryptographic module and user, the DSKPP server MAY couple an provisioned by the DSKPP provisioning server.
initial user authentication to the DSKPP execution as described in
Section 3.7.
The purpose and content of each message are described below, Application note:
including the optional <KeyProvTrigger>. If this message is preceded by trigger message <KeyProvTrigger>,
then the application will already have AD available (see
Section 4.2.1). However, if this message was not preceded by
<KeyProvTrigger>, then the application MUST retrieve the user
authentication code, possibly by prompting the user to manually
enter their authentication code, e.g., on a device with only a
numeric keypad.
DSKPP Client DSKPP Server The application MUST also derive Authentication Data (AD) from the
------------ ------------ authentication code, as described in Section 3.4.1, and save it
[<---] R_TRIGGER, [DeviceID], for use in its next message, <KeyProvClientNonce>.
[KeyID], [URL_S]
The DSKPP server optionally sends a <KeyProvTrigger> message to the How the DSKPP server uses this message:
DSKPP client. The trigger message MUST contain a nonce, R_TRIGGER, The DSKPP server will look for an acceptable combination of DSKPP
to allow the server to couple the trigger with a later version, variant (in this case, four-pass), key package format,
<KeyProvClientHello> request. <KeyProvTrigger> MAY include a DeviceID key type, and cryptographic algorithms. If the DSKPP Client's SAL
to allow the client to select the device with which it will does not match the capabilities of the DSKPP Server, or does not
communicate (for more information about device identification, refer comply with key provisioning policy, then the DSKPP Server will
to Section 3.6). In the case of key renewal, <KeyProvTrigger> SHOULD set the Status attribute to something other than "Continue".
include the identifier for the key, KeyID, that is being replaced. Otherwise, Status will be set to "Continue".
Finally, the trigger MAY contain a URL for the DSKPP client to use
when contacting the DSKPP server.
DSKPP Client DSKPP Server If included in <KeyProvClientHello>, the DSKPP server will
------------ ------------ validate the Authentication Data (AD), DeviceID, and KeyID. The
R_C, SAL, KPML, [AD], DSKPP server MUST NOT accept the DeviceID unless the server sent
[R_TRIGGER], the DeviceID in a preceding trigger message. Note that it is also
[DeviceID], [KeyID] ---> legitimate for a DSKPP client to initiate the DSKPP protocol run
without having received a <KeyProvTrigger> message from a server,
but in this case any provided DeviceID 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 protocol.
The DSKPP client sends a <KeyProvClientHello> message to the DSKPP 4.2.3. KeyProvServerHello
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,
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 DSKPP Client DSKPP Server
------------ ------------ ------------ ------------
<--- KPH, KP, E(K,K_PROV), <--- SC, R_S, [K], [MAC]
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
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 When this message is sent:
protection. Further profiles MAY be defined by external entities or The DSKPP server will send this message in response to a
through the IETF process. <KeyProvClientHello> message after it looks for an acceptable
combination of DSKPP version, variant (in this case, four-pass),
key package format, key type, and set of cryptographic algorithms.
If it could not find an acceptable combination, then it will still
send the message, but with a failure status.
3.5.2.1. Key Transport Profile Purpose of this message:
This profile establishes a symmetric key, K_TOKEN, in the With this message, the context for the protocol run is set.
cryptographic module using key transport and key derivation. Key Furthermore, the DSKPP server uses this message to transmit a
transport is carried out using a public key whose private key part random nonce, which is required for each side to agree upon the
resides in the cryptographic module as the key transport key. A same symmetric key (K_TOKEN).
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: What is contained in this message:
urn:ietf:params:xml:schema:keyprov:dskpp#transport A status attribute equivalent to the server's return code to
<KeyProvClientHello>. If the server found an acceptable set of
attributes from the client's SAL, then it sets status to Continue
and returns an SC, which specifies the DSKPP version and variant
(in this case, four-pass), key type, cryptographic algorithms, and
key package format that the DSKPP Client MUST use for the
remainder of the protocol run.
In the two-pass version of DSKPP, the client MUST send a payload with A random nonce (R_S) for use in generating a symmetric key through
the Key Transport Profile. This payload MUST be of type <ds: key agreement; the length of R_S may depend on the selected key
KeyInfoType> ([XMLDSIG]), and only those choices of <ds:KeyInfoType> type.
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 A key (K) for the DSKPP Client to use for encrypting the client
of type <xenc:EncryptedKeyType> ([XMLENC]), and only those encryption nonce included with <KeyProvClientNonce>. K represents the
methods utilizing a public key that are supported by the DSKPP client server's public key (K_SERVER) or a pre-shared secret key
(as indicated in the <SupportedEncryptionAlgorithms> element of the (K_SHARED).
<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 A MAC MUST be present if a key is being renewed so that the DSKPP
support the http://www.w3.org/2001/04/xmlenc#rsa-1_5 key wrapping client can confirm that the replacement key came from a trusted
mechanism defined in [XMLENC]. server. This MAC MUST be computed using DSKPP-PRF (see
Section 3.4.2), where 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; 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), and input
parameter dsLen MUST be set to the length of R_S.
When this profile is used, the MacAlgorithm attribute of the <Mac> How the DSKPP client uses this message:
element of the <KeyProvServerFinished> message MUST be present and When the Status attribute is not set to "Continue", this indicates
MUST identify the selected MAC algorithm. The selected MAC algorithm failure and the DSKPP client MUST abort the protocol.
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 If successful execution of the protocol will result in the
element in their <KeyProvServerFinished> messages whenever a replacement of an existing key with a newly generated one, the
successful protocol run will result in an existing K_TOKEN being DSKPP client MUST verify the MAC provided in <KeyProvServerHello>.
replaced. 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.
3.5.2.2. Key Wrap Profile If Status is set to "Continue" the cryptographic module generates
a random nonce (R_C) using the cryptographic algorithm specified
in SC. The length of the nonce R_C will depend on the selected
key type.
This profile establishes a symmetric key, K_TOKEN, in the Encrypt R_C using K and the encryption algorithm included in SC.
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: The method the DSKPP client MUST use to encrypt R_C:
urn:ietf:params:xml:schema:keyprov:dskpp#wrap If K is equivalent to K_SERVER (i.e., the public key of the DSKPP
In the 2-pass version of DSKPP, the client MUST send a payload with server), then an RSA encryption scheme from PKCS #1 [PKCS-1] MAY
the Key Wrap Profile. This payload MUST be of type <ds:KeyInfoType> be used. If K is equivalent to K_SERVER, then the cryptographic
([XMLDSIG]), and only those choices of <ds:KeyInfoType> that identify module SHOULD verify the server's certificate before using it to
a symmetric key are allowed (i.e., <ds:KeyName> and <ds:KeyValue>). encrypt R_C in accordance with [RFC5280].
The <ds:KeyName> alternative is RECOMMENDED.
The server payload associated with this key protection method MUST be If K is equivalent to K_SHARED, the DSKPP client MAY use the
of type <xenc:EncryptedKeyType> ([XMLENC]), and only those encryption DSKPP-PRF function to avoid dependence on other algorithms. In
methods utilizing a symmetric key that are supported by the DSKPP this case, the client uses K_SHARED as input parameter k (K_SHARED
client (as indicated in the <SupportedEncryptionAlgorithms> element SHOULD be used solely for this purpose) as follows:
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 dsLen = len(R_C), where "len" is the length of R_C
support the http://www.w3.org/2001/04/xmlenc#kw-aes128 key wrapping DS = DSKPP-PRF(K_SHARED, "Encryption" || R_S, dsLen)
mechanism defined in [XMLENC].
When this profile is used, the MacAlgorithm attribute of the <Mac> This will produce a pseudorandom string DS of length equal to R_C.
element of the <KeyProvServerFinished> message MUST be present and Encryption of R_C MAY then be achieved by XOR-ing DS with R_C:
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 E(DS, R_C) = DS ^ R_C
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 The DSKPP server will then perform the reverse operation to
extract R_C from E(DS, R_C).
This profile is a variation of the key wrap profile. It establishes 4.2.4. KeyProvClientNonce
a symmetric key, K_TOKEN, in the cryptographic module through key
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: DSKPP Client DSKPP Server
urn:ietf:params:xml:schema:keyprov:dskpp#passphrase-wrap ------------ ------------
E(K,R_C), AD --->
In the 2-pass version of DSKPP, the client MUST send a payload with When this message is sent:
the Passphrase-Based Key Wrap Profile. This payload MUST be of type The DSKPP client will send this message immediately following a
<ds:KeyInfoType> ([XMLDSIG]). The <ds:KeyName> option MUST be used <KeyProvServerHello> message whose status was set to "Continue".
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 Purpose of this message:
of type <xenc:EncryptedKeyType> ([XMLENC]), and only those encryption With this message the DSKPP client transmits user authentication
methods utilizing a passphrase to derive the key wrapping key that data (AD) and a random nonce encrypted with the DSKPP server's key
are supported by the DSKPP client (as indicated in the (K). The client's random nonce is required for each side to agree
<SupportedEncryptionAlgorithms> element of the <KeyProvClientHello> upon the same symmetric key (K_TOKEN).
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 What is contained in this message:
support the PBES2 password based encryption scheme defined in Authentication Data (AD) that was derived from an authentication
[PKCS-5] (and identified as code entered by the user before <KeyProvClientHello> was sent
http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbes2 in (refer to Section 3.2).
[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> The DSKPP client's random nonce (R_C), which was encrypted as
element of the <KeyProvServerFinished> message MUST be present and described in Section 4.2.3.
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 How the DSKPP server uses this message:
element in their <KeyProvServerFinished> messages whenever a The DSKPP server MUST use AD to authenticate the user. If
successful protocol run will result in an existing K_TOKEN being authentication fails, then the DSKPP server MUST set the return
replaced. code to a failure status.
3.5.3. MAC Calculations If user authentication passes, the DSKPP server decrypts R_C using
its key (K). The decryption method is based on whether K that was
transmitted to the client in <KeyProvServerHello> was equal to the
server's public key (K_SERVER) or a pre-shared key (K_SHARED)
(refer to Section 4.2.3 for a description of how the DSKPP client
encrypts R_C).
3.5.3.1. Key Confirmation After extracting R_C, the DSKPP server computes K_TOKEN using a
combination of the two random nonces R_S and R_C and its
encryption key, K, as described in Section 4.1.2. The DSKPP
server then generates a key package that contains key usage
attributes such as expiry date and length. The key package MUST
NOT include K_TOKEN since in the four-pass variant K_TOKEN is
never transmitted between the DSKPP server and client. The server
stores K_TOKEN and the key package with the user's account on the
cryptographic server.
The MAC value in the <KeyProvServerFinished> message MUST be Finally, the server generates a key confirmation MAC that the
calculated as follows: client will use to avoid a false "Commit" message that would cause
the cryptographic module to end up in state in which the server
does not recognize the stored key.
The MAC used for key confirmation MUST be calculated as follows:
msg_hash = SHA-256(msg_1, ..., msg_n) msg_hash = SHA-256(msg_1, ..., msg_n)
dsLen = len(msg_hash) dsLen = len(msg_hash)
MAC = DSKPP-PRF (K_MAC, "MAC 1 computation" || msg_hash || ServerID, MAC = DSKPP-PRF (K_MAC, "MAC 2 computation" || msg_hash, dsLen)
dsLen)
where where
MAC The MAC MUST be calculated using the already established MAC The DSKPP Pseudo-Random Function defined in Section 3.4.2 is
MAC algorithm and MUST be computed on the (ASCII) string used to compute the MAC. The particular realization of DSKPP-
"MAC 1 computation", msg_hash, and ServerID using the PRF (e.g., those defined in Appendix D depends on the MAC
existing the MAC key K_MAC. algorithm contained in the <KeyProvServerHello> message. The
MAC MUST be computed using the existing MAC key (K_MAC), and a
K_MAC The key, along with K_TOKEN, that is derived from K_PROV string that is formed by concatenating the (ASCII) string "MAC
which the DSKPP server MUST provide to the cryptographic 2 computation" and a msg_hash
module. K_MAC The key derived from K_PROV, as described in Section 4.1.2.
msg_hash The message hash, defined in Section 3.4.4.3, of messages msg_hash The message hash (defined in Section 3.4.3) of messages
msg_1, ..., msg_n. msg_1, ..., msg_n.
ServerID The identifier that the DSKPP server MUST include in the 4.2.5. KeyProvServerFinished
<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
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
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.
+------+------------+-------------------------------------------+
| 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) DSKPP Client DSKPP Server
------------ ------------
<--- KP, MAC
The Password is a mandatory TLV the contains a one-time use shared When this message is sent:
secret known by the user and the Provisioning Server. A summary of The DSKPP server will send this message after authenticating the
the Password TLV format is given in Figure 10. The fields are user and, if authentication passed, generating K_TOKEN and a key
transmitted from left to right. package, and associating them with the user's account on the
cryptographic server.
0 1 2 Purpose of this message:
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 With this message the DSKPP server confirms generation of the key
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ (K_TOKEN), and transmits the associated identifier and
| Type = 0x2 | Length | password ... | application-specific attributes, but not the key itself, in a key
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ package to the client for protocol completion.
Figure 10: Password TLV Format What is contained in this message:
A status attribute equivalent to the server's return code to
<KeyProvClientNonce>. If user authentication passed, and the
server successfully computed K_TOKEN, generated a key package, and
associated them with the user's account on the cryptographic
server, then it sets Status to Continue.
Password is a unique value that SHOULD be a random string to make AC If status is Continue, then this message acts as a "commit"
more difficult to guess. The string MUST be UTF-8 encoded in message, instructing the cryptographic module to store the
accordance with [RFC3629]. generated key (K_TOKEN) and associate the given key identifier
with this key. As such, a key package (KP) MUST be included in
this message, which holds an identifier for the generated key (but
not the key itself) and additional configuration, e.g., the
identity of the DSKPP server, key usage attributes, etc. The
default symmetric key package format MUST be 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.
For example, suppose password is set to "3582", then the TLV would be With KP, the server includes a key confirmation MAC that the
{0x2, 0x4, UTF-8("3582")}. client uses to avoid a false "Commit".
3.7.2.3. Checksum (OPTIONAL) How the DSKPP client uses this message:
The Checksum is an OPTIONAL TLV, which is generated by the issuing When the Status attribute is not set to "Continue", this indicates
server and sent to the user as part of the AC. A summary of the failure and the DSKPP client MUST abort the protocol.
Checksum TLV format is given in Figure 11. The fields are
transmitted from left to right.
0 1 2 After receiving a <KeyProvServerFinished> message with Status =
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 "Success", the DSKPP client MUST verify the key confirmation MAC
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ that was transmitted with this message. The DSKPP client MUST
| Type = 0x3 | Length | checksum | 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.
Figure 11: Checksum TLV Format If <KeyProvServerFinished> has Status = "Success" and the MAC was
verified, then the DSKPP client MUST calculate K_TOKEN from the
combination of the two random nonces R_S and R_C and the server's
encryption key, K, as described in Section 4.1.2. The DSKPP
client associates the key package contained in
<KeyProvServerFinished> with the generated key, K_TOKEN, and
stores this data permanently on the cryptographic module.
If included, the checksum MUST be computed using the CRC16 algorithm After this operation, it MUST NOT be possible to overwrite the key
[ISO3309]. When the user enters the AC, the typed password is unless knowledge of an authorizing key is proven through a MAC on
verified with the checksum to ensure it is correctly entered by the a later <KeyProvServerHello> (and <KeyProvServerFinished>)
user. message.
For example, suppose the Password is set to "3582", then the CRC16 5. Two-Pass Protocol Usage
calculation would generate a checksum of 0x5F8D, resulting in TLV
{0x3, 0x2, 0x5F8D}.
3.7.3. Authentication Data Calculation This section describes the methods and message flow 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
DSKPP server transmits keying material in a key package formatted in
accordance with [PSKC], [SKPC-ASN.1], PKCS#12 [PKCS-12], or PKCS#5
XML [PKCS-5-XML].
The Authentication Data consists of a Client ID (extracted from the The keying material includes a provisioning master key, K_PROV, from
AC) and a value, which is derived from AC as follows (refer to which the DSKPP client derives two keys: the symmetric key to be
Section 3.3.1 for a description of DSKPP-PRF in general and established in the cryptographic module, K_TOKEN, and a key, K_MAC,
Appendix C for a description of DSKPP-PRF-AES): used for server authentication and key confirmation. The keying
material also includes key usage attributes, such as expiry date and
length.
MAC = DSKPP-PRF(K_AC, AC->clientID||URL_S||R_C||[R_S], 16) The DSKPP server encrypts K_PROV to ensure that it is not exposed to
In four-pass DSKPP, the cryptographic module uses R_C, R_S, and URL_S any other entity than the DSKPP server and the cryptographic module
to calculate the MAC, where URL_S is the URL the DSKPP client uses itself. The DSKPP server uses any of three key protection methods to
when contacting the DSKPP server. In two-pass DSKPP, the encrypt K_PROV: Key Transport, Key Wrap, and Passphrase-Based Key
cryptographic module does not have access to R_S, therefore only R_C Wrap Key Protection Methods.
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) 5.1. Key Protection Methods
One of the following values for K MUST be used: This section introduces three key protection methods for the two-pass
variant. Additional methods MAY be defined by external entities or
through the IETF process.
a. In four-pass: 5.1.1. Key Transport
* 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 Purpose of this method:
except for case (b) and (c), above, in which case it MUST be set to This method is intended for PKI-capable devices. The DSKPP server
1. encrypts keying material and transports it to the DSKPP client.
The server encrypts the keying material using the public key of
the DSKPP client, whose private key part resides in the
cryptographic module. The DSKPP client decrypts the keying
material and uses it to derive the symmetric key, K_TOKEN.
4. DSKPP Message Formats This method MUST be identified with the following URN:
urn:ietf:params:xml:schema:keyprov:dskpp#transport
The message formats from the DSKPP XML schema, found in Section 7, The DSKPP server and client MUST support the following mechanism:
are explained in this section. Examples can be found in Appendix A. http://www.w3.org/2001/04/xmlenc#rsa-1_5 encryption mechanism
The XML format for DSKPP messages has been designed to be extensible. defined in [XMLENC].
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 5.1.2. Key Wrap
Some DSKPP elements rely on the parties being able to compare Purpose of this method:
received values with stored values. Unless otherwise noted, all This method is ideal for pre-keyed devices, e.g., SIM cards. The
elements in this document that have the XML Schema "xs:string" type, DSKPP server encrypts keying material using a pre-shared key
or a type derived from it, MUST be compared using an exact binary wrapping key and transports it to the DSKPP client. The DSKPP
comparison. In particular, DSKPP implementations MUST NOT depend on client decrypts the keying material, and uses it to derive the
case-insensitive string comparisons, normalization or trimming of symmetric key, K_TOKEN.
white space, or conversion of locale-specific formats such as
numbers.
Implementations that compare values that are represented using This method MUST be identified with the following URN:
different character encodings MUST use a comparison method that urn:ietf:params:xml:schema:keyprov:dskpp#wrap
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 The DSKPP server and client MUST support one of the following key
defined. Therefore, DSKPP implementations MUST NOT depend on wrapping mechanisms:
specific sorting orders for values. KW-AES128 without padding; refer to
http://www.w3.org/2001/04/xmlenc#kw-aes128 in [XMLENC]
4.2. Components of the <KeyProvTrigger> Message KW-AES128 with padding; refer to
http://www.w3.org/2001/04/xmlenc#kw-aes128 in [XMLENC]
The DSKPP server MAY initialize the DSKPP protocol by sending a AES-CBC-128; refer to [FIPS197-AES]
<KeyProvTrigger> message. This message MAY, e.g., be sent in
response to a user requesting key initialization in a browsing
session.
<xs:element name="KeyProvTrigger" type="dskpp:KeyProvTriggerType"> 5.1.3. Passphrase-Based Key Wrap
</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"> Purpose of this method:
<xs:sequence> This method is a variation of the Key Wrap Method that is
<xs:element minOccurs="0" name="DeviceIdentifierData" applicable to constrained devices with keypads, e.g., mobile
type="dskpp:DeviceIdentifierDataType" /> phones. The DSKPP server encrypts keying material using a
<xs:element minOccurs="0" name="KeyID" type="xs:base64Binary" /> wrapping key derived from a user-provided passphrase, and
<xs:element minOccurs="0" name="TokenPlatformInfo" transports the encrypted material to the DSKPP client. The DSKPP
type="dskpp:TokenPlatformInfoType" /> client decrypts the keying material, and uses it to derive the
<xs:element name="TriggerNonce" type="dskpp:NonceType" /> symmetric key, K_TOKEN.
<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 To preserve the property of not exposing K_TOKEN to any other
inform the DSKPP client about the identifier for the device that entity than the DSKPP server and the cryptographic module itself,
houses the cryptographic module to be initialized, and optionally of the method SHOULD be employed only when the device contains
the identifier for the key on that module. The latter would apply to facilities (e.g. a keypad) for direct entry of the passphrase.
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 method MUST be identified with the following URN:
urn:ietf:params:xml:schema:keyprov:dskpp#passphrase-wrap
This message is the initial message sent from the DSKPP client to the The DSKPP server and client MUST support the following:
DSKPP server in both variations of the DSKPP.
<xs:element name="KeyProvClientHello" * The PBES2 password-based encryption scheme defined in [PKCS-5]
type="dskpp:KeyProvClientHelloPDU"> (and identified as
</xs:element> http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbes2 in
[PKCS-5-XML])
<xs:complexType name="KeyProvClientHelloPDU"> * The PBKDF2 passphrase-based key derivation function also
<xs:complexContent mixed="false"> defined in [PKCS-5] (and identified as
<xs:extension base="dskpp:AbstractRequestType"> http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbkdf2
<xs:sequence> in [PKCS-5-XML])
<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: * One of the following key wrapping mechanisms:
a. KW-AES128 without padding; refer to
http://www.w3.org/2001/04/xmlenc#kw-aes128 in [XMLENC]
b. KW-AES128 without padding; refer to
http://www.w3.org/2001/04/xmlenc#kw-aes128 in [XMLENC]
c. AES-CBC-128; refer to [FIPS197-AES]
o Version: (attribute inherited from the AbstractRequestType type) 5.2. Message Flow
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.
o <KeyID>: An identifier for the key that will be overwritten if the The two-pass protocol flow consists of one exchange:
protocol run is successful. The identifier MUST only be present 1: Pass 1 = <KeyProvClientHello>, Pass 2 = <KeyProvServerFinished>
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.
o <Extensions>: A sequence of OPTIONAL extensions. One extension is Although there is no exchange of the <ServerHello> message or the
defined for this message in this version of DSKPP: the <ClientNonce> message, the DSKPP client is still able to specify
ClientInfoType (see Section 5). algorithm preferences and supported key types in the
<KeyProvClientHello> message.
Some of the core elements of the message are described below. The purpose and content of each message are described below. XML
format and examples are in Section 8 and Appendix B.
4.3.1. The DeviceIdentifierDataType Type 5.2.1. KeyProvTrigger
The DeviceIdentifierDataType type is used to uniquely identify the The trigger message is used in exactly the same way for the two-pass
device that houses the cryptographic module, e.g., a mobile phone. variant as for the four-pass variant; refer to Section 4.2.1.
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"> 5.2.2. KeyProvClientHello
<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 DSKPP Client DSKPP Server
------------ ------------
SAL, AD, R_C,
[DeviceID], [KeyID],
KPML --->
The ProtocolVariantsType is a complex type that is a sequence of When this message is sent:
elements, each describing a DSKPP protocol variant. The DSKPP client When a DSKPP client first connects to a DSKPP server, it is
MAY use the ProtocolVariantsType to identify which protocol variants required to send the <KeyProvClientHello> as its first message.
it supports, i.e., by providing <SupportProtocolVariants> within a The client can also send <KeyProvClientHello> in response to a
<KeyProvClientHello> message. <KeyProvTrigger> message.
Selecting the <FourPass> element signals client support for 4-pass Purpose of this message:
DSKPP as described in Section 3.4.1. With this message, the DSKPP client specifies its algorithm
preferences and supported key types as well as which DSKPP
versions, protocol variants (in this case "two-pass"), key package
formats, and key protection methods that it supports.
Furthermore, the DSKPP client facilitates user authentication by
transmitting the authentication data (AD) that was provided by the
user before the first DSKPP message was sent.
Selecting the <TwoPass> element signals client support for the 2-pass Application note:
version of DSKPP as described in Section 3.5.1. The <TwoPass> This message MUST send user authentication data (AD) to the DSKPP
element is of type KeyProtectionDataType, which carries information server. If this message is preceded by trigger message
that informs the server of supported two-pass key protection methods <KeyProvTrigger>, then the application will already have AD
as described in Section 3.5.2, and provides OPTIONAL payload data to available (see Section 4.2.1). However, if this message was not
the DSKPP server. The payload is sent in an opportunistic fashion, preceded by <KeyProvTrigger>, then the application MUST retrieve
and MAY be discarded by the DSKPP server if the server does not the user authentication code, possibly by prompting the user to
support the key protection method with which the payload is manually enter their authentication code, e.g., on a device with
associated. only a numeric keypad.
The application MUST also derive Authentication Data (AD) from the
authentication code, as described in Section 3.4.1, and save it
for use in its next message, <KeyProvClientNonce>.
If the DSKPP client does not include <SupportedProtocolVariants> in What is contained in this message:
the <KeyProvClientHello> message, then the DSKPP server MUST proceed The Security Attribute List (SAL) included with
by using the 4-pass DSKPP variant. If the DSKPP server does not <KeyProvClientHello> contains the combinations of DSKPP versions,
support 4-pass DSKPP, then the server MUST use the two-pass protocol variants, key package formats, key types, and cryptographic
variant. If it cannot support the two-pass protocol variant, then algorithms that the DSKPP client supports in order of the client's
the protocol run MUST fail. preference (favorite choice first).
<xs:complexType name="ProtocolVariantsType"> Authentication Data (AD) that was either included with
<xs:sequence> <KeyProvTrigger>, or generated as described in the "Application
<xs:element name="FourPass" minOccurs="0" /> Note" above.
<xs:element name="TwoPass" type="dskpp:KeyProtectionDataType"
minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="KeyProtectionDataType"> The DSKPP client's random nonce (R_C), which is used to compute
<xs:sequence maxOccurs="unbounded"> provisioning key (K_PROV). By inserting R_C into the DSKPP
<xs:element name="SupportedKeyProtectionMethod" type="xs:anyURI"/> session, the DSKPP client is able to ensure the DSKPP server is
<xs:element name="Payload" type="dskpp:PayloadType" minOccurs="0"/> live before committing the key.
</xs:sequence>
</xs:complexType>
The elements of this type have the following meaning: If <KeyProvClientHello> was preceded by a <KeyProvTrigger>, then
this message MUST also include the DeviceID and/or KeyID that was
provided with the trigger. Otherwise, if a trigger message did
not precede <KeyProvClientHello>, then this message MAY include a
device ID that was pre-shared with the DSKPP server, and MAY
contain a key ID associated with a key previously provisioned by
the DSKPP provisioning server.
o <SupportedKeyProtectionMethod>: A two-pass key protection method The list of key protection methods (KPML) that the DSKPP client
supported by the DSKPP client. Multiple supported methods MAY be supports. Each item in the list MAY include an encryption key
present, in which case they MUST be listed in order of precedence. "payload" for the DSKPP server to use to protect keying material
o <Payload>: An OPTIONAL payload associated with each supported key that it sends back to the client. The payload MUST be of type
protection method. <ds:KeyInfoType> ([XMLDSIG]). For each key protection method, the
allowable choices for <ds:KeyInfoType> are:
A DSKPP client that indicates support for two-pass DSKPP MUST also * Key Transport
include the nonce R in its <KeyProvClientHello> message (this will Only those choices of <ds:KeyInfoType> that identify a public
enable the client to verify that the DSKPP server it is communicating key (i.e., <ds:KeyName>, <ds:KeyValue>, <ds:X509Data>, or <ds:
with is alive). 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.
4.3.3. The KeyPackagesFormatType Type * Key Wrap
Only those choices of <ds:KeyInfoType> that identify a
symmetric key (i.e., <ds:KeyName> and <ds:KeyValue>). The <ds:
KeyName> alternative is RECOMMENDED.
The OPTIONAL KeyPackagesFormatType type is a list of type-value pairs * Passphrase-Based Key Wrap
that a DSKPP client or server MAY use to define key package formats The <ds:KeyName> option MUST be used and the key name MUST
it supports. Key package formats are identified through URLs, e.g., identify the passphrase that will be used by the server to
the PSKC KeyContainer URL generate the key wrapping key. The identifier and passphrase
"http://www.ietf.org/keyprov/pskc#KeyContainer" (see [PSKC]). components of <ds:KeyName> MUST be set to the Client ID and
authentication code components of AD (same AD as contained in
this message).
<xs:complexType name="KeyPackagesFormatType"> How the DSKPP server uses this message:
<xs:sequence maxOccurs="unbounded"> The DSKPP server will look for an acceptable combination of DSKPP
<xs:element name="KeyPackageFormat" version, variant (in this case, two-pass), key package format, key
type="dskpp:KeyPackageFormatType"/> type, and cryptographic algorithms. If the DSKPP Client's SAL
</xs:sequence> does not match the capabilities of the DSKPP Server, or does not
comply with key provisioning policy, then the DSKPP Server will
set the Status attribute to something other than "Continue".
Otherwise, Status will be set to "Continue".
</xs:complexType> The DSKPP server will validate the DeviceID and KeyID if included
<xs:simpleType name="KeyPackageFormatType"> in <KeyProvClientHello>. The DSKPP server MUST NOT accept the
<xs:restriction base="xs:anyURI" /> DeviceID unless the server sent the DeviceID in a preceding
</xs:simpleType> trigger message. Note that it is also legitimate for a DSKPP
client to initiate the DSKPP protocol run without having received
a <KeyProvTrigger> message from a server, but in this case any
provided DeviceID 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 protocol.
4.3.4. The AuthenticationDataType Type The DSKPP server MUST use AD to authenticate the user. If
authentication fails, then the DSKPP server MUST set the return
code to a failure status.
The OPTIONAL AuthenticationDataType type is used by DSKPP clients to If user authentication passes, the DSKPP server generates a key
carry authentication values in DSKPP messages as described in K_PROV, which MUST consist of two parts of equal length, where the
Section 3.7. first half constitutes K_MAC and the second half constitutes
K_TOKEN, i.e.,
<xs:complexType name="AuthenticationDataType"> K_PROV = K_MAC || K_TOKEN
<xs:sequence>
<xs:element name="ClientID"
type="dskpp:IdentifierType" />
<xs:element name="AuthenticationCodeMac"
type="dskpp:AuthenticationMacType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="AuthenticationMacType"> The length of K_TOKEN (and hence also the length of K_MAC) is
<xs:sequence> determined by the type of K_TOKEN, which MUST be one of the key
<xs:element minOccurs="0" name="Nonce" type="dskpp:NonceType" /> types supported by the DSKPP client.
<xs:element minOccurs="0" name="IterationCount" type="xs:int" /> Once K_PROV is computed, the DSKPP server selects one of the key
<xs:element name="Mac" type="dskpp:MacType" /> protection methods from the DSKPP client's KPML, and uses that
</xs:sequence> method and corresponding payload to encrypt K_PROV. The result of
</xs:complexType> the operation MUST be of type <xenc:EncryptedKeyType> ([XMLENC]).
For all three key protection methods, the Type attribute of the
<xenc:EncryptedKeyType> MUST be present and MUST identify the type
of the encrypted key. <xenc:CarriedKeyName> MAY also be present,
but MUST, when present, contain the same value as the <KeyID>
element of the <KeyProvServerFinished> message. For each key
protection method, the following encryption method and key info
values are allowed:
The elements of the AuthenticationDataType type have the following * Key Transport
meaning: <xenc:EncryptMethod> Only those encryption methods that
utilize a public key and are supported by
the DSKPP client
<ds:KeyInfo> This element MUST identify the same
public key as the key protection
"payload" that was received in
<KeyProvClientHello>
o <ClientID>: A requester's identifier of maximum length 128. The * Key Wrap
value MAY be a user ID, a device ID, or a keyID associated with <xenc:EncryptMethod> Only those encryption methods that
the requester's authentication value. utilize a symmetric key and are supported
o <AuthenticationCodeMac>: An authentication MAC and additional by the DSKPP client
information (e.g., MAC algorithm), derived as described in <ds:KeyInfo> This element MUST identify the same
Section 3.7.3. symmetric key as the key protection
"payload" that was received in
<KeyProvClientHello>
4.4. Components of the <KeyProvServerHello> Response (Used Only in * Passphrase-Based Key Wrap
Four-Pass DSKPP) <xenc:EncryptMethod> Only those encryption methods that
utilize a passphrase to derive the key
wrapping key and are supported by the
DSKPP client
<ds:KeyInfo> This element MUST identify the same
symmetric key as the key protection
"payload" that was received in
<KeyProvClientHello>
In a four-pass exchange, this message is the first message sent from After encrypting K_PROV, the DSKPP server generates a key package
the DSKPP server to the DSKPP client (assuming a trigger message has that includes key usage attributes such as expiry date and length.
not been sent to initiate the protocol, in which case, this message The key package MUST include the encrypted provisioning key
is the second message sent from the DSKPP server to the DSKPP (K_PROV). The server stores the key package and K_TOKEN with a
client). It is sent upon reception of a <KeyProvClientHello> user account on the cryptographic server.
message. The server generates two MAC's, one for key confirmation and
another for server authentication) that the client will use to
avoid a false "Commit" message that would cause the cryptographic
module to end up in state in which the server does not recognize
the stored key.
<xs:element name="KeyProvServerHello" The method the DSKPP server MUST use to calculate the key
type="dskpp:KeyProvServerHelloPDU"> confirmation MAC:
</xs:element> msg_hash = SHA-256(msg_1, ..., msg_n)
<xs:complexType name="KeyProvServerHelloPDU">
<xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractResponseType">
<xs:sequence minOccurs="0">
<xs:element name="KeyType" type="dskpp:AlgorithmType" />
<xs:element name="EncryptionAlgorithm"
type="dskpp:AlgorithmType" />
<xs:element name="MacAlgorithm" type="dskpp:AlgorithmType" />
<xs:element name="EncryptionKey" type="ds:KeyInfoType" />
<xs:element name="KeyPackageFormat"
type="dskpp:KeyPackageFormatType" />
<xs:element name="Payload" type="dskpp:PayloadType" />
<xs:element minOccurs="0" name="Extensions"
type="dskpp:ExtensionsType" />
<xs:element minOccurs="0" name="Mac" type="dskpp:MacType" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
The components of this message have the following meaning: dsLen = len(msg_hash)
o Version: (attribute inherited from the AbstractResponseType type) MAC = DSKPP-PRF (K_MAC, "MAC 1 computation" || msg_hash ||
The version selected by the DSKPP server. MAY be lower than the ServerID, dsLen)
version indicated by the DSKPP client, in which case, local policy where
at the client MUST determine whether or not to continue the
session.
o SessionID: (attribute inherited from the AbstractResponseType
type) An identifier for this session. The SessionID has a maximum
length of 128.
o Status: (attribute inherited from the AbstractResponseType type)
Return code for the <KeyProvClientHello>. If Status is not
"Continue", only the Status and Version attributes will be
present; otherwise, all the other element MUST be present as well.
o <KeyType>: The type of the key to be generated.
o <EncryptionAlgorithm>: The encryption algorithm to use when
protecting R_C.
o <MacAlgorithm>: The MAC algorithm to be used by the DSKPP server. MAC The MAC MUST be calculated using the already
o <EncryptionKey>: Information about the key to use when encrypting established MAC algorithm and MUST be computed on the
R_C. It will either be the server's public key (the <ds:KeyValue> (ASCII) string "MAC 1 computation", msg_hash, and
alternative of ds:KeyInfoType) or an identifier for a shared ServerID using the existing the MAC key K_MAC.
secret key (the <ds:KeyName> alternative of ds:KeyInfoType).
o <KeyPackageFormat>: The key package format type to be used by the
DSKPP server. The default setting relies on the KeyPackageType
element defined in "urn:ietf:params:xml:schema:keyprov:pskc"
[PSKC].
o <Payload>: The actual payload. For this version of the protocol,
only one payload is defined: the pseudorandom string R_S.
o <Extensions>: A list of server extensions. Two extensions are
defined for this message in this version of DSKPP: the
ClientInfoType and the ServerInfoType (see Section 5).
o <Mac>: The MAC MUST be present if the DSKPP run will result in the
replacement of an existing symmetric key with a new one (i.e., if
the <KeyID> element was present in the <ClientHello message). In
this case, the DSKPP server MUST prove to the cryptographic module
that it is authorized to replace it.
4.5. Components of a <KeyProvClientNonce> Request (Used Only in Four- K_MAC The key, along with K_TOKEN, that is derived from
Pass DSKPP) K_PROV which the DSKPP server MUST provide to the
cryptographic module.
In a four-pass DSKPP exchange, this message contains the nonce R_C msg_hash The message hash, defined in Section 3.4.3, of
that was chosen by the cryptographic module, and encrypted by the messages msg_1, ..., msg_n.
negotiated encryption key and encryption algorithm.
<xs:element name="KeyProvClientNonce" ServerID The identifier that the DSKPP server MUST include in
type="dskpp:KeyProvClientNoncePDU"> the <KeyPackage> element of <KeyProvServerFinished>.
</xs:element>
<xs:complexType name="KeyProvClientNoncePDU">
<xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractRequestType">
<xs:sequence>
<xs:element name="EncryptedNonce" type="xs:base64Binary" />
<xs:element minOccurs="0" name="AuthenticationData"
type="dskpp:AuthenticationDataType" />
<xs:element minOccurs="0" name="Extensions"
type="dskpp:ExtensionsType" />
</xs:sequence>
<xs:attribute name="SessionID" type="dskpp:IdentifierType"
use="required" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
The components of this message have the following meaning: If DSKPP-PRF (defined in Section 3.4.2) 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.
o Version: (inherited from the AbstractRequestType type) MUST be the The method the DSKPP server MUST use to calculate the server
same version as in the <KeyProvServerHello> message. authentication MAC:
o <SessionID>: (attribute inherited from the AbstractResponseType The MAC MUST be computed on the (ASCII) string "MAC 2
type) MUST have the same value as the SessionID attribute in the computation", the server identifier ServerID, and R, using a pre-
received <KeyProvServerHello> message. SessionID has maximum existing MAC key K_MAC' (the MAC key that existed before this
length of 128. protocol run). Note that the implementation may specify K_MAC' to
o <EncryptedNonce>: The nonce generated and encrypted by the be the value of the K_TOKEN that is being replaced, or a version
cryptographic module. The encryption MUST be made using the of K_MAC from the previous protocol run.
selected encryption algorithm and identified key, and as specified
in Section 3.3.1.
o <AuthenticationData>: The authentication data value MUST be set as
specified in Section 3.7 and Section 4.3.4.
o <Extensions>: A list of OPTIONAL extensions. Two extensions are
defined for this message in this version of DSKPP: the
ClientInfoType and the ServerInfoType (see Section 5).
4.6. Components of a <KeyProvServerFinished> Response 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):
This message is the last message of the DSKPP protocol run. In a dsLen >= 16
4-pass exchange, the DSKPP server sends this message in response to a
<KeyProvClientNonce> message, whereas in a 2-pass exchange, the DSKPP
server sends this message in response to a <KeyProvClientHello>
message.
<xs:element name="KeyProvServerFinished" MAC = DSKPP-PRF (K_MAC', "MAC 2 computation" || ServerID || R,
type="dskpp:KeyProvServerFinishedPDU"> dsLen)
</xs:element>
<xs:complexType name="KeyProvServerFinishedPDU">
<xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractResponseType">
<xs:sequence minOccurs="0">
<xs:element name="KeyPackage"
type="dskpp:KeyPackageType" />
<xs:element minOccurs="0" name="Extensions"
type="dskpp:ExtensionsType" />
<xs:element name="Mac" type="dskpp:MacType" />
<xs:element minOccurs="0" name="AuthenticationData"
type="dskpp:AuthenticationMacType" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
The components of this message have the following meaning: The MAC algorithm MUST be the same as the algorithm used by the
DSKPP server to calculate the key confirmation MAC.
o Version: (inherited from the AbstractResponseType type) The DSKPP 5.2.3. KeyProvServerFinished
version used in this session.
o SessionID: (inherited from the AbstractResponseType type) The
previously established identifier for this session. The SessionID
is of maximum length 128.
o Status: (inherited from the AbstractResponseType type) Return code
for the <KeyProvServerFinished> message. If Status is not
"Success", only the Status, SessionID, and Version attributes will
be present (the presence of the SessionID attribute is dependent
on the type of reported error); otherwise, all the other elements
MUST be present as well. In this latter case, the
<KeyProvServerFinished> message can be seen as a "Commit" message,
instructing the cryptographic module to store the generated key
and associate the given key identifier with this key.
o <KeyPackage>: The key package containing keying material in
accordance with four- and two-pass DSKPP usage (see Section 3.4
and Section 3.5). The default package format is based on the
KeyContainerType type from PSKC, as defined in [PSKC].
o <Extensions>: A list of extensions chosen by the DSKPP server.
For this message, this version of DSKPP defines one extension, the
ClientInfoType (see Section 5).
o <Mac>: To avoid a false "Commit" message causing the cryptographic
module to end up in an initialized state for which the server does
not know the stored key, <KeyProvServerFinished> messages MUST
always be authenticated with a MAC. The MAC MUST be made using
the already established MAC algorithm.
o <AuthenticationData>: This OPTIONAL element contains a MAC value DSKPP Client DSKPP Server
that the DSKPP server provides in a two-pass message exchange as ------------ ------------
proof that the server is authorized to replace a key on the <--- KP, MAC, AD
cryptographic module. The MAC MUST be calculated as specified in
Section 3.5.3.2.
4.7. The StatusCode Type When this message is sent:
The DSKPP server will send this message after authenticating the
user and, if authentication passed, generating K_TOKEN and a key
package, and associating them with the user's account on the
cryptographic server.
The StatusCode type enumerates all possible return codes: Purpose of this message:
With this message the DSKPP server transports a key package
containing the encrypted provisioning key (K_PROV) and key usage
attributes.
<xs:simpleType name="StatusCode"> What is contained in this message:
<xs:restriction base="xs:string"> A status attribute equivalent to the server's return code to
<xs:enumeration value="Continue" /> <KeyProvClientHello>. If the server found an acceptable set of
<xs:enumeration value="Success" /> attributes from the client's SAL, then it sets status to Continue.
<xs:enumeration value="Abort" />
<xs:enumeration value="AccessDenied" />
<xs:enumeration value="MalformedRequest" />
<xs:enumeration value="UnknownRequest" />
<xs:enumeration value="UnknownCriticalExtension" />
<xs:enumeration value="UnsupportedVersion" />
<xs:enumeration value="NoSupportedKeyTypes" />
<xs:enumeration value="NoSupportedEncryptionAlgorithms" />
<xs:enumeration value="NoSupportedMacAlgorithms" />
<xs:enumeration value="NoProtocolVariants" />
<xs:enumeration value="NoSupportedKeyPackages" />
<xs:enumeration value="AuthenticationDataMissing" />
<xs:enumeration value="AuthenticationDataInvalid" />
<xs:enumeration value="InitializationFailed" />
</xs:restriction>
</xs:simpleType>
Upon transmission or receipt of a message for which the Status The confirmation message MUST include the Key Package (KP) that
attribute's value is not "Success" or "Continue", the default holds the DSKPP Server's ID, key ID,key type, encrypted
behavior, unless explicitly stated otherwise below, is that both the provisioning key (K_PROV), encryption method, and additional
DSKPP server and the DSKPP client MUST immediately terminate the configuration information. The default symmetric key package
DSKPP protocol run. DSKPP servers and DSKPP clients MUST delete any format is based on the Portable Symmetric Key Container (PSKC)
secret values generated as a result of failed runs of the DSKPP defined in [PSKC]. Alternative formats MAY include [SKPC-ASN.1],
protocol. Session identifiers MAY be retained from successful or PKCS#12 [PKCS-12], or PKCS#5 XML [PKCS-5-XML].
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 Finally, this message MUST include a MAC that the DSKPP client
message to the user. will use for key confirmation. It MUST also include a server
authentication MAC (AD). These MACs are calculated as described
in the previous section.
These status codes are valid in all DSKPP Response messages unless How the DSKPP client uses this message:
explicitly stated otherwise: After receiving a <KeyProvServerFinished> message with Status =
"Success", the DSKPP client MUST verify both MACs (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.
o "Continue" indicates that the DSKPP server is ready for a If <KeyProvServerFinished> has Status = "Success" and the MACs
subsequent request from the DSKPP client. It cannot be sent in were verified, then the DSKPP client MUST extract K_PROV from the
the server's final message. provided key package, and derive K_TOKEN. Finally, the DSKPP
o "Success" indicates successful completion of the DSKPP session. client initializes the cryptographic module with K_TOKEN and the
It can only be sent in the server's final message. corresponding key usage attributes. After this operation, it MUST
o "Abort" indicates that the DSKPP server rejected the DSKPP NOT be possible to overwrite the key unless knowledge of an
client's request for unspecified reasons. authorizing key is proven through a MAC on a later
o "AccessDenied" indicates that the DSKPP client is not authorized <KeyProvServerFinished> message.
to contact this DSKPP server.
o "MalformedRequest" indicates that the DSKPP server failed to parse
the DSKPP client's request.
o "UnknownRequest" indicates that the DSKPP client made a request
that is unknown to the DSKPP server.
o "UnknownCriticalExtension" indicates that a critical DSKPP
extension (see below) used by the DSKPP client was not supported
or recognized by the DSKPP server.
o "UnsupportedVersion" indicates that the DSKPP client used a DSKPP
protocol version not supported by the DSKPP server. This error is
only valid in the DSKPP server's first response message.
o "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.
o "NoSupportedEncryptionAlgorithms" indicates that 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.
o "NoSupportedMacAlgorithms" indicates that 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.
o "NoProtocolVariants" indicates that the DSKPP client only
suggested a protocol variation (either 2-pass or 4-pass) that is
not supported by the DSKPP server. This error is only valid in
the DSKPP server's first response message.
o "NoSupportedKeyPackages" indicates that 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.
o "AuthenticationDataMissing" indicates that the DSKPP client didn't
provide authentication data that the DSKPP server required.
o "AuthenticationDataInvalid" indicates that the DSKPP client
supplied user authentication data that the DSKPP server failed to
validate.
o "InitializationFailed" indicates that 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.
o "ProvisioningPeriodExpired" indicates that the provisioning period 6. Protocol Extensions
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.
5. Protocol Extensions DSKPP 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.
5.1. The ClientInfoType Type 6.1. The ClientInfoType Extension
Present in a <KeyProvClientHello> or a <KeyProvClientNonce> message, The ClientInfoType extension MAY contain any client-specific data
the OPTIONAL ClientInfoType extension contains DSKPP client-specific required of an application. This extension MAY be present in a
information that is custom to an implementation. DSKPP servers MUST <KeyProvClientHello> or <KeyProvClientNonce> message. DSKPP servers
support this extension. DSKPP servers MUST NOT attempt to interpret MUST support this extension. DSKPP servers MUST NOT attempt to
the data it carries and, if received, MUST include it unmodified in interpret the data it carries and, if received, MUST include it
the current protocol run's next server response. Servers need not unmodified in the current protocol run's next server response. DSKPP
retain the ClientInfoType's data after that response has been servers need not retain the ClientInfoType data.
generated.
5.2. The ServerInfoType Type 6.2. The ServerInfoType Extension
When present, the OPTIONAL ServerInfoType extension contains DSKPP The ServerInfoType extension MAY contain any server-specific data
server-specific information that is custom to an implementation. required of an application, e.g., state information. This extension
This extension is only valid in <KeyProvServerHello> messages for is only valid in <KeyProvServerHello> messages for which the Status
which Status = "Continue". DSKPP clients MUST support this attribute is set to "Continue". DSKPP clients MUST support this
extension. DSKPP clients MUST NOT attempt to interpret the data it extension. DSKPP clients MUST NOT attempt to interpret the data it
carries and, if received, MUST include it unmodified in the current carries and, if received, MUST include it unmodified in the current
protocol run's next client request (i.e., the <KeyProvClientNonce> protocol run's next client request (i.e., the <KeyProvClientNonce>
message). DSKPP clients need not retain the ServerInfoType's data message). DSKPP clients need not retain the ServerInfoType data.
after that request has been generated. This extension MAY be used,
e.g., for state management in the DSKPP server.
6. Protocol Bindings 7. Protocol Bindings
6.1. General Requirements 7.1. General Requirements
DSKPP assumes a reliable transport. DSKPP assumes a reliable transport.
6.2. HTTP/1.1 Binding for DSKPP 7.2. HTTP/1.1 Binding for DSKPP
6.2.1. Introduction
This section presents a binding of the previous messages to HTTP/1.1 This section presents a binding of the previous messages to HTTP/1.1
[RFC2616]. Note that the HTTP client normally will be different from [RFC2616]. Note that the HTTP client will normally be different from
the DSKPP client, i.e., the HTTP client will only exist to "proxy" the DSKPP client (i.e., the HTTP client will "proxy" DSKPP messages
DSKPP messages from the DSKPP client to the DSKPP server. Likewise, from the DSKPP client to the DSKPP server). Likewise, on the HTTP
on the HTTP server side, the DSKPP server MAY receive DSKPP PDUs from server side, the DSKPP server MAY receive DSKPP message from a
a "front-end" HTTP server. The DSKPP server will be identified by a "front-end" HTTP server. The DSKPP server will be identified by a
specific URL, which may be pre-configured, or provided to the client specific URL, which may be pre-configured, or provided to the client
during initialization. during initialization.
6.2.2. Identification of DSKPP Messages 7.2.1. Identification of DSKPP Messages
The MIME-type for all DSKPP messages MUST be The MIME-type for all DSKPP messages MUST be
application/vnd.ietf.keyprov.dskpp+xml application/vnd.ietf.keyprov.dskpp+xml
6.2.3. HTTP Headers 7.2.2. HTTP Headers
In order to avoid caching of responses carrying DSKPP messages by In order to avoid caching of responses carrying DSKPP messages by
proxies, the following holds: proxies, the following holds:
o When using HTTP/1.1, requesters SHOULD: o When using HTTP/1.1, requesters SHOULD:
* Include a Cache-Control header field set to "no-cache, no- * Include a Cache-Control header field set to "no-cache, no-
store". store".
* Include a Pragma header field set to "no-cache". * Include a Pragma header field set to "no-cache".
o When using HTTP/1.1, responders SHOULD: o When using HTTP/1.1, responders SHOULD:
* Include a Cache-Control header field set to "no-cache, no-must- * Include a Cache-Control header field set to "no-cache, no-must-
revalidate, private". revalidate, private".
* Include a Pragma header field set to "no-cache". * Include a Pragma header field set to "no-cache".
* NOT include a Validator, such as a Last-Modified or ETag * NOT include a Validator, such as a Last-Modified or ETag
header. header.
To handle content negotiation, HTTP requests MAY include an HTTP To handle content negotiation, HTTP requests MAY include an HTTP
Accept header field. This header field SHOULD have the value Accept header field. This header field SHOULD should be identified
application/vnd.ietf.keyprov.dskpp+xml as defined in Section 6.2.2. using the MIME type specified in Section 7.2.1. The Accept header
The Accept header MAY include additional content types defined by MAY include additional content types defined by future versions of
future versions of this protocol. this protocol.
There are no other restrictions on HTTP headers, besides the There are no other restrictions on HTTP headers, besides the
requirement to set the Content-Type header value according to requirement to set the Content-Type header value to the MIME type
Section 6.2.2. specified in Section 7.2.1.
6.2.4. HTTP Operations 7.2.3. HTTP Operations
Persistent connections as defined in HTTP/1.1 are OPTIONAL. DSKPP Persistent connections as defined in HTTP/1.1 are OPTIONAL. DSKPP
requests are mapped to HTTP requests with the POST method. DSKPP requests are mapped to HTTP requests with the POST method. DSKPP
responses are mapped to HTTP responses. responses are mapped to HTTP responses.
For the 4-pass DSKPP, messages within the protocol run are bound For the 4-pass DSKPP, messages within the protocol run are bound
together. In particular, <KeyProvServerHello> is bound to the together. In particular, <KeyProvServerHello> is bound to the
preceding <KeyProvClientHello> by being transmitted in the preceding <KeyProvClientHello> by being transmitted in the
corresponding HTTP response. <KeyProvServerHello> MUST have a corresponding HTTP response. <KeyProvServerHello> MUST have a
SessionID attribute, and the SessionID attribute of the subsequent SessionID attribute, and the SessionID attribute of the subsequent
<KeyProvClientNonce> message MUST be identical. <KeyProvClientNonce> message MUST be identical.
<KeyProvServerFinished> is then once again bound to the rest through <KeyProvServerFinished> is then once again bound to the rest through
HTTP (and possibly through a SessionID). HTTP (and possibly through a SessionID).
6.2.5. HTTP Status Codes 7.2.4. HTTP Status Codes
A DSKPP HTTP responder that refuses to perform a message exchange A DSKPP HTTP responder that refuses to perform a message exchange
with a DSKPP HTTP requester SHOULD return a 403 (Forbidden) response. with a DSKPP HTTP requester SHOULD return a 403 (Forbidden) response.
In this case, the content of the HTTP body is not significant. In In this case, the content of the HTTP body is not significant. In
the case of an HTTP error while processing a DSKPP request, the HTTP the case of an HTTP error while processing a DSKPP request, the HTTP
server MUST return a 500 (Internal Server Error) response. This type server MUST return a 500 (Internal Server Error) response. This type
of error SHOULD be returned for HTTP-related errors detected before of error SHOULD be returned for HTTP-related errors detected before
control is passed to the DSKPP processor, or when the DSKPP processor control is passed to the DSKPP processor, or when the DSKPP processor
reports an internal error (for example, the DSKPP XML namespace is reports an internal error (for example, the DSKPP XML namespace is
incorrect, or the DSKPP schema cannot be located). If a request is incorrect, or the DSKPP schema cannot be located). If a request is
skipping to change at page 59, line 33 skipping to change at page 43, line 33
In these cases (i.e., when the HTTP response code is 4xx or 5xx), the In these cases (i.e., when the HTTP response code is 4xx or 5xx), the
content of the HTTP body is not significant. content of the HTTP body is not significant.
Redirection status codes (3xx) apply as usual. Redirection status codes (3xx) apply as usual.
Whenever the HTTP POST is successfully invoked, the DSKPP HTTP Whenever the HTTP POST is successfully invoked, the DSKPP HTTP
responder MUST use the 200 status code and provide a suitable DSKPP responder MUST use the 200 status code and provide a suitable DSKPP
message (possibly with DSKPP error information included) in the HTTP message (possibly with DSKPP error information included) in the HTTP
body. body.
6.2.6. HTTP Authentication 7.2.5. HTTP Authentication
No support for HTTP/1.1 authentication is assumed. No support for HTTP/1.1 authentication is assumed.
6.2.7. Initialization of DSKPP 7.2.6. Initialization of DSKPP
If a user requests key initialization in a browsing session, and if If a user requests key initialization in a browsing session, and if
that request has an appropriate Accept header (e.g., to a specific that request has an appropriate Accept header (e.g., to a specific
DSKPP server URL), the DSKPP server MAY respond by sending a DSKPP DSKPP server URL), the DSKPP server MAY respond by sending a DSKPP
initialization message in an HTTP response with Content-Type set initialization message in an HTTP response with Content-Type set
according to Section 6.2.2 and response code set to 200 (OK). The according to Section 7.2.1 and response code set to 200 (OK). The
initialization message MAY carry data in its body, such as the URL initialization message MAY carry data in its body, such as the URL
for the DSKPP client to use when contacting the DSKPP server. If the for the DSKPP client to use when contacting the DSKPP server. If the
message does carry data, the data MUST be a valid instance of a message does carry data, the data MUST be a valid instance of a
<KeyProvTrigger> element. <KeyProvTrigger> element.
Note that if the user's request was directed to some other resource, Note that if the user's request was directed to some other resource,
the DSKPP server MUST NOT respond by combining the DSKPP content type the DSKPP server MUST NOT respond by combining the DSKPP content type
with response code 200. In that case, the DSKPP server SHOULD with response code 200. In that case, the DSKPP server SHOULD
respond by sending a DSKPP initialization message in an HTTP response respond by sending a DSKPP initialization message in an HTTP response
with Content-Type set according to Section 6.2.2 and response code with Content-Type set according to Section 7.2.1 and response code
set to 406 (Not Acceptable). set to 406 (Not Acceptable).
6.2.8. Example Messages 7.2.7. Example Messages
a. Initialization from DSKPP server: a. Initialization from DSKPP server:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Cache-Control: no-store Cache-Control: no-store
Content-Type: application/vnd.ietf.keyprov.dskpp+xml Content-Type: application/vnd.ietf.keyprov.dskpp+xml
Content-Length: <some value> Content-Length: <some value>
DSKPP initialization data in XML form... DSKPP initialization data in XML form...
skipping to change at page 60, line 42 skipping to change at page 44, line 42
HTTP/1.1 200 OK HTTP/1.1 200 OK
Cache-Control: no-cache, no-must-revalidate, private Cache-Control: no-cache, no-must-revalidate, private
Pragma: no-cache Pragma: no-cache
Content-Type: application/vnd.ietf.keyprov.dskpp+xml Content-Type: application/vnd.ietf.keyprov.dskpp+xml
Content-Length: <some value> Content-Length: <some value>
DSKPP data in XML form (server random nonce, server public key, DSKPP data in XML form (server random nonce, server public key,
...) ...)
7. DSKPP Schema 8. DSKPP XML Schema
8.1. General Processing Requirements
Some DSKPP elements rely on the parties being able to compare
received values with stored values. Unless otherwise noted, all
elements 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 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.
8.2. Schema
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xs:schema <xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dskpp="urn:ietf:params:xml:ns:keyprov:dskpp:1.0" xmlns:dskpp="urn:ietf:params:xml:ns:keyprov:dskpp:1.0"
xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc:1.0" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc:1.0"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
targetNamespace="urn:ietf:params:xml:ns:keyprov:dskpp:1.0" targetNamespace="urn:ietf:params:xml:ns:keyprov:dskpp:1.0"
elementFormDefault="qualified" attributeFormDefault="unqualified" elementFormDefault="qualified" attributeFormDefault="unqualified"
version="1.0"> version="1.0">
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" <xs:import namespace="http://www.w3.org/2000/09/xmldsig#"
schemaLocation= schemaLocation=
"http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/> "http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/
xmldsig-core-schema.xsd"/>
<xs:import namespace="urn:ietf:params:xml:ns:keyprov:pskc:1.0" <xs:import namespace="urn:ietf:params:xml:ns:keyprov:pskc:1.0"
schemaLocation="keyprov-pskc-1.0.xsd"/> schemaLocation="keyprov-pskc-1.0.xsd"/>
<xs:complexType name="AbstractRequestType" abstract="true"> <xs:complexType name="AbstractRequestType" abstract="true">
<xs:annotation> <xs:annotation>
<xs:documentation> Basic types </xs:documentation> <xs:documentation> Basic types </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:attribute name="Version" type="dskpp:VersionType" <xs:attribute name="Version" type="dskpp:VersionType"
use="required"/> use="required"/>
</xs:complexType> </xs:complexType>
<xs:complexType name="AbstractResponseType" abstract="true"> <xs:complexType name="AbstractResponseType" abstract="true">
<xs:annotation> <xs:annotation>
<xs:documentation> Basic types </xs:documentation> <xs:documentation> Basic types </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:attribute name="Version" type="dskpp:VersionType" <xs:attribute name="Version" type="dskpp:VersionType"
use="required"/> use="required"/>
<xs:attribute name="SessionID" type="dskpp:IdentifierType" /> <xs:attribute name="SessionID" type="dskpp:IdentifierType" />
<xs:attribute name="Status" type="dskpp:StatusCode" use="required"/> <xs:attribute name="Status" type="dskpp:StatusCode"
use="required"/>
</xs:complexType> </xs:complexType>
<xs:simpleType name="VersionType"> <xs:simpleType name="VersionType">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:pattern value="\d{1,2}\.\d{1,3}" /> <xs:pattern value="\d{1,2}\.\d{1,3}" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="IdentifierType"> <xs:simpleType name="IdentifierType">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="128" /> <xs:maxLength value="128" />
</xs:restriction> </xs:restriction>
skipping to change at page 62, line 12 skipping to change at page 46, line 34
<xs:enumeration value="UnknownCriticalExtension" /> <xs:enumeration value="UnknownCriticalExtension" />
<xs:enumeration value="UnsupportedVersion" /> <xs:enumeration value="UnsupportedVersion" />
<xs:enumeration value="NoSupportedKeyTypes" /> <xs:enumeration value="NoSupportedKeyTypes" />
<xs:enumeration value="NoSupportedEncryptionAlgorithms" /> <xs:enumeration value="NoSupportedEncryptionAlgorithms" />
<xs:enumeration value="NoSupportedMacAlgorithms" /> <xs:enumeration value="NoSupportedMacAlgorithms" />
<xs:enumeration value="NoProtocolVariants" /> <xs:enumeration value="NoProtocolVariants" />
<xs:enumeration value="NoSupportedKeyPackages" /> <xs:enumeration value="NoSupportedKeyPackages" />
<xs:enumeration value="AuthenticationDataMissing" /> <xs:enumeration value="AuthenticationDataMissing" />
<xs:enumeration value="AuthenticationDataInvalid" /> <xs:enumeration value="AuthenticationDataInvalid" />
<xs:enumeration value="InitializationFailed" /> <xs:enumeration value="InitializationFailed" />
<xs:enumeration value="ProvisioningPeriodExpired" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="DeviceIdentifierDataType"> <xs:complexType name="DeviceIdentifierDataType">
<xs:choice> <xs:choice>
<xs:element name="DeviceId" type="pskc:DeviceIdType" /> <xs:element name="DeviceId" type="pskc:DeviceIdType" />
<xs:any namespace="##other" processContents="strict" /> <xs:any namespace="##other" processContents="strict" />
</xs:choice> </xs:choice>
</xs:complexType> </xs:complexType>
skipping to change at page 62, line 29 skipping to change at page 47, line 4
</xs:choice> </xs:choice>
</xs:complexType> </xs:complexType>
<xs:simpleType name="PlatformType"> <xs:simpleType name="PlatformType">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="Hardware" /> <xs:enumeration value="Hardware" />
<xs:enumeration value="Software" /> <xs:enumeration value="Software" />
<xs:enumeration value="Unspecified" /> <xs:enumeration value="Unspecified" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="TokenPlatformInfoType"> <xs:complexType name="TokenPlatformInfoType">
<xs:attribute name="KeyLocation" type="dskpp:PlatformType"/> <xs:attribute name="KeyLocation" type="dskpp:PlatformType"/>
<xs:attribute name="AlgorithmLocation" type="dskpp:PlatformType"/> <xs:attribute name="AlgorithmLocation"
type="dskpp:PlatformType"/>
</xs:complexType> </xs:complexType>
<xs:simpleType name="NonceType"> <xs:simpleType name="NonceType">
<xs:restriction base="xs:base64Binary"> <xs:restriction base="xs:base64Binary">
<xs:minLength value="16" /> <xs:minLength value="16" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="AlgorithmsType"> <xs:complexType name="AlgorithmsType">
<xs:sequence maxOccurs="unbounded"> <xs:sequence maxOccurs="unbounded">
skipping to change at page 63, line 6 skipping to change at page 47, line 29
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:simpleType name="AlgorithmType"> <xs:simpleType name="AlgorithmType">
<xs:restriction base="xs:anyURI" /> <xs:restriction base="xs:anyURI" />
</xs:simpleType> </xs:simpleType>
<xs:complexType name="ProtocolVariantsType"> <xs:complexType name="ProtocolVariantsType">
<xs:sequence> <xs:sequence>
<xs:element name="FourPass" minOccurs="0" /> <xs:element name="FourPass" minOccurs="0" />
<xs:element name="TwoPass" type="dskpp:KeyProtectionDataType" <xs:element name="TwoPass"
type="dskpp:KeyProtectionDataType"
minOccurs="0"/> minOccurs="0"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="KeyProtectionDataType"> <xs:complexType name="KeyProtectionDataType">
<xs:annotation> <xs:annotation>
<xs:documentation xml:lang="en"> <xs:documentation xml:lang="en">
This element is only valid for two-pass DSKPP. This element is only valid for two-pass DSKPP.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:sequence maxOccurs="unbounded"> <xs:sequence maxOccurs="unbounded">
<xs:element name="SupportedKeyProtectionMethod" type="xs:anyURI"/> <xs:element name="SupportedKeyProtectionMethod"
<xs:element name="Payload" type="dskpp:PayloadType" minOccurs="0"/> type="xs:anyURI"/>
<xs:element name="Payload" type="dskpp:PayloadType"
minOccurs="0"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="PayloadType"> <xs:complexType name="PayloadType">
<xs:choice> <xs:choice>
<xs:element name="Nonce" type="dskpp:NonceType" /> <xs:element name="Nonce" type="dskpp:NonceType" />
<xs:any namespace="##other" processContents="strict" /> <xs:any namespace="##other" processContents="strict" />
</xs:choice> </xs:choice>
</xs:complexType> </xs:complexType>
skipping to change at page 64, line 12 skipping to change at page 48, line 38
<xs:choice> <xs:choice>
<xs:element name="AuthenticationCodeMac" <xs:element name="AuthenticationCodeMac"
type="dskpp:AuthenticationMacType" type="dskpp:AuthenticationMacType"
<xs:any namespace="##other" processContents="strict" /> <xs:any namespace="##other" processContents="strict" />
</xs:choice> </xs:choice>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="AuthenticationMacType"> <xs:complexType name="AuthenticationMacType">
<xs:sequence> <xs:sequence>
<xs:element minOccurs="0" name="Nonce" type="dskpp:NonceType" /> <xs:element minOccurs="0" name="Nonce"
<xs:element minOccurs="0" name="IterationCount" type="xs:int" /> type="dskpp:NonceType"/>
<xs:element minOccurs="0" name="IterationCount"
type="xs:int"/>
<xs:element name="Mac" type="dskpp:MacType" /> <xs:element name="Mac" type="dskpp:MacType" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="MacType"> <xs:complexType name="MacType">
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="xs:base64Binary"> <xs:extension base="xs:base64Binary">
<xs:attribute name="MacAlgorithm" type="xs:anyURI" /> <xs:attribute name="MacAlgorithm" type="xs:anyURI" />
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>
<xs:complexType name="KeyPackageType"> <xs:complexType name="KeyPackageType">
<xs:sequence> <xs:sequence>
<xs:element minOccurs="0" name="ServerID" type="xs:anyURI" /> <xs:element minOccurs="0" name="ServerID"
type="xs:anyURI"/>
<xs:element minOccurs="0" name="KeyProtectionMethod" <xs:element minOccurs="0" name="KeyProtectionMethod"
type="xs:anyURI" /> type="xs:anyURI" />
<xs:choice> <xs:choice>
<xs:element name="KeyPackage" type="pskc:KeyContainerType" /> <xs:element name="KeyPackage"
<xs:any namespace="##other" processContents="strict" /> type="pskc:KeyContainerType"/>
<xs:any namespace="##other"
processContents="strict"/>
</xs:choice> </xs:choice>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="InitializationTriggerType"> <xs:complexType name="InitializationTriggerType">
<xs:sequence> <xs:sequence>
<xs:element minOccurs="0" name="DeviceIdentifierData" <xs:element minOccurs="0" name="DeviceIdentifierData"
type="dskpp:DeviceIdentifierDataType" /> type="dskpp:DeviceIdentifierDataType" />
<xs:element minOccurs="0" name="KeyID" type="xs:base64Binary" /> <xs:element minOccurs="0" name="KeyID"
type="xs:base64Binary"/>
<xs:element minOccurs="0" name="TokenPlatformInfo" <xs:element minOccurs="0" name="TokenPlatformInfo"
type="dskpp:TokenPlatformInfoType" /> type="dskpp:TokenPlatformInfoType" />
<xs:element name="TriggerNonce" type="dskpp:NonceType" /> <xs:element name="AuthenticationData"
<xs:element minOccurs="0" name="ServerUrl" type="xs:anyURI" /> type="dskpp:AuthenticationDataType" />
<xs:element minOccurs="0" name="ServerUrl"
type="xs:anyURI"/>
<xs:any minOccurs="0" namespace="##other" <xs:any minOccurs="0" namespace="##other"
processContents="strict" /> processContents="strict" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="ExtensionsType"> <xs:complexType name="ExtensionsType">
<xs:annotation> <xs:annotation>
<xs:documentation> Extension types </xs:documentation> <xs:documentation> Extension types </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:sequence maxOccurs="unbounded"> <xs:sequence maxOccurs="unbounded">
<xs:element name="Extension" type="dskpp:AbstractExtensionType" /> <xs:element name="Extension"
type="dskpp:AbstractExtensionType"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="AbstractExtensionType" abstract="true"> <xs:complexType name="AbstractExtensionType" abstract="true">
<xs:attribute name="Critical" type="xs:boolean" /> <xs:attribute name="Critical" type="xs:boolean" />
</xs:complexType> </xs:complexType>
<xs:complexType name="ClientInfoType"> <xs:complexType name="ClientInfoType">
<xs:complexContent mixed="false"> <xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractExtensionType"> <xs:extension base="dskpp:AbstractExtensionType">
<xs:sequence> <xs:sequence>
<xs:element name="Data" type="xs:base64Binary" /> <xs:element name="Data" type="xs:base64Binary" />
</xs:sequence> </xs:sequence>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
skipping to change at page 65, line 37 skipping to change at page 50, line 24
<xs:complexType name="ServerInfoType"> <xs:complexType name="ServerInfoType">
<xs:complexContent mixed="false"> <xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractExtensionType"> <xs:extension base="dskpp:AbstractExtensionType">
<xs:sequence> <xs:sequence>
<xs:element name="Data" type="xs:base64Binary" /> <xs:element name="Data" type="xs:base64Binary" />
</xs:sequence> </xs:sequence>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
<xs:element name="KeyProvTrigger" type="dskpp:KeyProvTriggerType"> <xs:element name="KeyProvTrigger"
type="dskpp:KeyProvTriggerType">
<xs:annotation> <xs:annotation>
<xs:documentation> DSKPP PDUs </xs:documentation> <xs:documentation> DSKPP PDUs </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="KeyProvTriggerType"> <xs:complexType name="KeyProvTriggerType">
<xs:annotation> <xs:annotation>
<xs:documentation xml:lang="en"> <xs:documentation xml:lang="en">
Message used to trigger the device to initiate a Message used to trigger the device to initiate a
DSKPP protocol run. DSKPP protocol run.
</xs:documentation> </xs:documentation>
skipping to change at page 66, line 14 skipping to change at page 50, line 50
type="dskpp:InitializationTriggerType" /> type="dskpp:InitializationTriggerType" />
<xs:any namespace="##other" processContents="strict" /> <xs:any namespace="##other" processContents="strict" />
</xs:choice> </xs:choice>
</xs:sequence> </xs:sequence>
<xs:attribute name="Version" type="dskpp:VersionType" /> <xs:attribute name="Version" type="dskpp:VersionType" />
</xs:complexType> </xs:complexType>
<xs:element name="KeyProvClientHello" <xs:element name="KeyProvClientHello"
type="dskpp:KeyProvClientHelloPDU"> type="dskpp:KeyProvClientHelloPDU">
<xs:annotation> <xs:annotation>
<xs:documentation> KeyProvClientHello PDU </xs:documentation> <xs:documentation>
KeyProvClientHello PDU
</xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="KeyProvClientHelloPDU"> <xs:complexType name="KeyProvClientHelloPDU">
<xs:annotation> <xs:annotation>
<xs:documentation xml:lang="en"> <xs:documentation xml:lang="en">
Message sent from DSKPP client to DSKPP server to initiate a Message sent from DSKPP client to DSKPP server to
DSKPP session. initiate a DSKPP session.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:complexContent mixed="false"> <xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractRequestType"> <xs:extension base="dskpp:AbstractRequestType">
<xs:sequence> <xs:sequence>
<xs:element minOccurs="0" name="DeviceIdentifierData" <xs:element minOccurs="0" name="DeviceIdentifierData"
type="dskpp:DeviceIdentifierDataType" /> type="dskpp:DeviceIdentifierDataType" />
<xs:element minOccurs="0" name="KeyID" <xs:element minOccurs="0" name="KeyID"
type="xs:base64Binary" /> type="xs:base64Binary" />
<xs:element minOccurs="0" name="ClientNonce" <xs:element minOccurs="0" name="ClientNonce"
type="dskpp:NonceType" /> type="dskpp:NonceType" />
<xs:element minOccurs="0" name="TriggerNonce"
type="dskpp:NonceType" />
<xs:element name="SupportedKeyTypes" <xs:element name="SupportedKeyTypes"
type="dskpp:AlgorithmsType" /> type="dskpp:AlgorithmsType" />
<xs:element name="SupportedEncryptionAlgorithms" <xs:element name="SupportedEncryptionAlgorithms"
type="dskpp:AlgorithmsType" /> type="dskpp:AlgorithmsType" />
<xs:element name="SupportedMacAlgorithms" <xs:element name="SupportedMacAlgorithms"
type="dskpp:AlgorithmsType" /> type="dskpp:AlgorithmsType" />
<xs:element minOccurs="0" name="SupportedProtocolVariants" <xs:element minOccurs="0"
name="SupportedProtocolVariants"
type="dskpp:ProtocolVariantsType" /> type="dskpp:ProtocolVariantsType" />
<xs:element minOccurs="0" name="SupportedKeyPackages" <xs:element minOccurs="0" name="SupportedKeyPackages"
type="dskpp:KeyPackagesFormatType" /> type="dskpp:KeyPackagesFormatType" />
<xs:element minOccurs="0" name="AuthenticationData" <xs:element minOccurs="0" name="AuthenticationData"
type="dskpp:AuthenticationDataType" /> type="dskpp:AuthenticationDataType" />
<xs:element minOccurs="0" name="Extensions" <xs:element minOccurs="0" name="Extensions"
type="dskpp:ExtensionsType" /> type="dskpp:ExtensionsType" />
</xs:sequence> </xs:sequence>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
<xs:element name="KeyProvServerHello" <xs:element name="KeyProvServerHello"
type="dskpp:KeyProvServerHelloPDU"> type="dskpp:KeyProvServerHelloPDU">
<xs:annotation> <xs:annotation>
<xs:documentation> KeyProvServerHello PDU </xs:documentation> <xs:documentation>
KeyProvServerHello PDU
</xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="KeyProvServerHelloPDU"> <xs:complexType name="KeyProvServerHelloPDU">
<xs:annotation> <xs:annotation>
<xs:documentation xml:lang="en"> <xs:documentation xml:lang="en">
Response message sent from DSKPP server to DSKPP client Response message sent from DSKPP server to DSKPP client
in four-pass DSKPP. in four-pass DSKPP.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:complexContent mixed="false"> <xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractResponseType"> <xs:extension base="dskpp:AbstractResponseType">
<xs:sequence minOccurs="0"> <xs:sequence minOccurs="0">
<xs:element name="KeyType" type="dskpp:AlgorithmType" /> <xs:element name="KeyType"
type="dskpp:AlgorithmType"/>
<xs:element name="EncryptionAlgorithm" <xs:element name="EncryptionAlgorithm"
type="dskpp:AlgorithmType" /> type="dskpp:AlgorithmType" />
<xs:element name="MacAlgorithm" type="dskpp:AlgorithmType" /> <xs:element name="MacAlgorithm"
<xs:element name="EncryptionKey" type="ds:KeyInfoType" /> type="dskpp:AlgorithmType"/>
<xs:element name="EncryptionKey"
type="ds:KeyInfoType"/>
<xs:element name="KeyPackageFormat" <xs:element name="KeyPackageFormat"
type="dskpp:KeyPackageFormatType" /> type="dskpp:KeyPackageFormatType" />
<xs:element name="Payload" type="dskpp:PayloadType" /> <xs:element name="Payload"
type="dskpp:PayloadType"/>
<xs:element minOccurs="0" name="Extensions" <xs:element minOccurs="0" name="Extensions"
type="dskpp:ExtensionsType" /> type="dskpp:ExtensionsType" />
<xs:element minOccurs="0" name="Mac" type="dskpp:MacType" /> <xs:element minOccurs="0" name="Mac"
type="dskpp:MacType"/>
</xs:sequence> </xs:sequence>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
<xs:element name="KeyProvClientNonce" <xs:element name="KeyProvClientNonce"
type="dskpp:KeyProvClientNoncePDU"> type="dskpp:KeyProvClientNoncePDU">
<xs:annotation> <xs:annotation>
<xs:documentation> KeyProvClientNonce PDU </xs:documentation> <xs:documentation>
KeyProvClientNonce PDU
</xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="KeyProvClientNoncePDU"> <xs:complexType name="KeyProvClientNoncePDU">
<xs:annotation> <xs:annotation>
<xs:documentation xml:lang="en"> <xs:documentation xml:lang="en">
Response message sent from DSKPP client to Response message sent from DSKPP client to
DSKPP server in a four-pass DSKPP session. DSKPP server in a four-pass DSKPP session.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:complexContent mixed="false"> <xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractRequestType"> <xs:extension base="dskpp:AbstractRequestType">
<xs:sequence> <xs:sequence>
<xs:element name="EncryptedNonce" type="xs:base64Binary" /> <xs:element name="EncryptedNonce"
type="xs:base64Binary"/>
<xs:element minOccurs="0" name="AuthenticationData" <xs:element minOccurs="0" name="AuthenticationData"
type="dskpp:AuthenticationDataType" /> type="dskpp:AuthenticationDataType" />
<xs:element minOccurs="0" name="Extensions" <xs:element minOccurs="0" name="Extensions"
type="dskpp:ExtensionsType" /> type="dskpp:ExtensionsType" />
</xs:sequence> </xs:sequence>
<xs:attribute name="SessionID" type="dskpp:IdentifierType" <xs:attribute name="SessionID"
type="dskpp:IdentifierType"
use="required" /> use="required" />
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
<xs:element name="KeyProvServerFinished" <xs:element name="KeyProvServerFinished"
type="dskpp:KeyProvServerFinishedPDU"> type="dskpp:KeyProvServerFinishedPDU">
<xs:annotation> <xs:annotation>
<xs:documentation> KeyProvServerFinished PDU </xs:documentation> <xs:documentation>
KeyProvServerFinished PDU
</xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="KeyProvServerFinishedPDU"> <xs:complexType name="KeyProvServerFinishedPDU">
<xs:annotation> <xs:annotation>
<xs:documentation xml:lang="en"> <xs:documentation xml:lang="en">
Final message sent from DSKPP server to DSKPP client in a DSKPP Final message sent from DSKPP server to DSKPP client in
session. A MAC value serves for key confirmation, and optional a DSKPP session. A MAC value serves for key confirmation
AuthenticationData serves for server authentication. and optional AuthenticationData serves for server
authentication.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:complexContent mixed="false"> <xs:complexContent mixed="false">
<xs:extension base="dskpp:AbstractResponseType"> <xs:extension base="dskpp:AbstractResponseType">
<xs:sequence minOccurs="0"> <xs:sequence minOccurs="0">
<xs:element name="KeyPackage" <xs:element name="KeyPackage"
type="dskpp:KeyPackageType" /> type="dskpp:KeyPackageType" />
<xs:element minOccurs="0" name="Extensions" <xs:element minOccurs="0" name="Extensions"
type="dskpp:ExtensionsType" /> type="dskpp:ExtensionsType" />
<xs:element name="Mac" type="dskpp:MacType" /> <xs:element name="Mac" type="dskpp:MacType" />
<xs:element minOccurs="0" name="AuthenticationData" <xs:element minOccurs="0" name="AuthenticationData"
type="dskpp:AuthenticationMacType" /> type="dskpp:AuthenticationMacType" />
</xs:sequence> </xs:sequence>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
</xs:schema> </xs:schema>
8. Conformance Requirements 9. Conformance Requirements
In order to assure that all implementations of DSKPP can In order to assure that all implementations of DSKPP can
interoperate, the DSKPP server: interoperate, the DSKPP server:
a. MUST implement the four-pass variation of the protocol a. MUST implement the four-pass variation of the protocol
(Section 3.4) (Section 4)
b. MUST implement the two-pass variation of the protocol b. MUST implement the two-pass variation of the protocol (Section 5)
(Section 3.5)
c. MUST support user authentication (Section 3.7) c. MUST support user authentication (Section 3.2.1)
d. MUST support the following Key Derivation Functions: d. MUST support the following key derivation functions:
* DSKPP-PRF-AES DSKPP-PRF realization (Appendix C) * DSKPP-PRF-AES DSKPP-PRF realization (Appendix D)
* DSKPP-PRF-SHA256 DSKPP-PRF realization (Appendix C) * DSKPP-PRF-SHA256 DSKPP-PRF realization (Appendix D)
e. MUST support the following Encryption mechanisms for protection e. MUST support the following encryption mechanisms for protection
of the client nonce in the four-pass protocol: of the client nonce in the four-pass protocol:
* Mechanism described in Section 3.4.3 * Mechanism described in Section 4.2.4
f. MUST support the following Encryption algorithms for symmetric f. MUST support one of the following encryption algorithms for
key operations, e.g., key wrap: symmetric key operations, e.g., key wrap:
* AES-CBC-128 [FIPS197-AES] * KW-AES128 without padding; refer to
http://www.w3.org/2001/04/xmlenc#kw-aes128 in [XMLENC]
* KW-AES128 without padding; refer to
http://www.w3.org/2001/04/xmlenc#kw-aes128 in [XMLENC]
* AES-CBC-128; refer to [FIPS197-AES]
g. MUST support the following Encryption algorithms for asymmetric g. MUST support the following encryption algorithms for asymmetric
key operations, e.g., key transport: key operations, e.g., key transport:
* RSA Encryption Scheme [PKCS-1] * RSA Encryption Scheme [PKCS-1]
h. MUST support the following Integrity/KDF MAC functions: h. MUST support the following integrity/KDF MAC functions:
* HMAC-SHA256 [FIPS180-SHA] * HMAC-SHA256 [FIPS180-SHA]
* AES-CMAC-128 [FIPS197-AES] * AES-CMAC-128 [FIPS197-AES]
i. MUST support the PSKC key package [PSKC]; all three PSKC key i. MUST support the PSKC key package [PSKC]; all three PSKC key
protection profiles (Key Transport, Key Wrap, and Passphrase- protection methods (Key Transport, Key Wrap, and Passphrase-Based
Based Key Wrap) MUST be implemented Key Wrap) MUST be implemented
j. MAY support the ASN.1 key package as defined in [SKPC-ASN.1] j. MAY support the ASN.1 key package as defined in [SKPC-ASN.1]
DSKPP clients MUST support either the two-pass or the four-pass DSKPP clients MUST support either the two-pass or the four-pass
variant of the protocol. DSKPP clients MUST fulfill all requirements variant of the protocol. DSKPP clients MUST fulfill all requirements
listed in item (c) - (j). listed in item (c) - (j).
Of course, DSKPP is a security protocol, and one of its major Of course, DSKPP is a security protocol, and one of its major
functions is to allow only authorized parties to successfully functions is to allow only authorized parties to successfully
initialize a cryptographic module with a new symmetric key. initialize a cryptographic module with a new symmetric key.
Therefore, a particular implementation may be configured with any of Therefore, a particular implementation may be configured with any of
a number of restrictions concerning algorithms and trusted a number of restrictions concerning algorithms and trusted
authorities that will prevent universal interoperability. authorities that will prevent universal interoperability.
9. Security Considerations 10. Security Considerations
9.1. General 10.1. General
DSKPP is designed to protect generated keying material from exposure. DSKPP is designed to protect generated keying material from exposure.
No other entities than the DSKPP server and the cryptographic module No other entities than the DSKPP server and the cryptographic module
will have access to a generated K_TOKEN if the cryptographic will have access to a generated K_TOKEN if the cryptographic
algorithms used are of sufficient strength and, on the DSKPP client algorithms used are of sufficient strength and, on the DSKPP client
side, generation and encryption of R_C and generation of K_TOKEN take side, generation and encryption of R_C and generation of K_TOKEN take
place as specified in the cryptographic module. This applies even if place as specified in the cryptographic module. This applies even if
malicious software is present in the DSKPP client. However, as malicious software is present in the DSKPP client. However, as
discussed in the following sub-sections, DSKPP does not protect discussed in the following sub-sections, DSKPP does not protect
against certain other threats resulting from man-in-the-middle against certain other threats resulting from man-in-the-middle
attacks and other forms of attacks. DSKPP SHOULD, therefore, be run attacks and other forms of attacks. DSKPP SHOULD, therefore, be run
over a transport providing confidentiality and integrity, such as over a transport providing confidentiality and integrity, such as
HTTP over Transport Layer Security (TLS) with a suitable ciphersuite, HTTP over Transport Layer Security (TLS) with a suitable
when such threats are a concern. Note that TLS ciphersuites with ciphersuite,when such threats are a concern. Note that TLS
anonymous key exchanges are not suitable in those situations. ciphersuites with anonymous key exchanges are not suitable in those
situations.
9.2. Active Attacks 10.2. Active Attacks
9.2.1. Introduction 10.2.1. Introduction
An active attacker MAY attempt to modify, delete, insert, replay, or An active attacker MAY attempt to modify, delete, insert, replay, or
reorder messages for a variety of purposes including service denial reorder messages for a variety of purposes including service denial
and compromise of generated keying material. Section 9.2.2 through and compromise of generated keying material.
Section 9.2.7.
9.2.2. Message Modifications 10.2.2. Message Modifications
Modifications to a <KeyProvTrigger> message will either cause denial- Modifications to a <KeyProvTrigger> message will either cause denial-
of-service (modifications of any of the identifiers or the nonce) or of-service (modifications of any of the identifiers or the
will cause the DSKPP client to contact the wrong DSKPP server. The authentication code) or will cause the DSKPP client to contact the
latter is in effect a man-in-the-middle attack and is discussed wrong DSKPP server. The latter is in effect a man-in-the-middle
further in Section 9.2.7. attack and is discussed further in Section 10.2.7.
An attacker may modify a <KeyProvClientHello> message. This means An attacker may modify a <KeyProvClientHello> message. This means
that the attacker could indicate a different key or device than the that the attacker could indicate a different key or device than the
one intended by the DSKPP client, and could also suggest other one intended by the DSKPP client, and could also suggest other
cryptographic algorithms than the ones preferred by the DSKPP client, cryptographic algorithms than the ones preferred by the DSKPP client,
e.g., cryptographically weaker ones. The attacker could also suggest e.g., cryptographically weaker ones. The attacker could also suggest
earlier versions of the DSKPP protocol, in case these versions have earlier versions of the DSKPP protocol, in case these versions have
been shown to have vulnerabilities. These modifications could lead been shown to have vulnerabilities. These modifications could lead
to an attacker succeeding in initializing or modifying another to an attacker succeeding in initializing or modifying another
cryptographic module than the one intended (i.e., the server cryptographic module than the one intended (i.e., the server
skipping to change at page 71, line 18 skipping to change at page 56, line 21
they support and accept. The former threat (assignment of a they support and accept. The former threat (assignment of a
generated key to the wrong module) is not possible when the shared- generated key to the wrong module) is not possible when the shared-
key variant of DSKPP is employed (assuming existing shared keys are key variant of DSKPP is employed (assuming existing shared keys are
unique per cryptographic module), but is possible in the public-key unique per cryptographic module), but is possible in the public-key
variation. Therefore, DSKPP servers MUST NOT accept unilaterally variation. Therefore, DSKPP servers MUST NOT accept unilaterally
provided device identifiers in the public-key variation. This is provided device identifiers in the public-key variation. This is
also indicated in the protocol description. In the shared-key also indicated in the protocol description. In the shared-key
variation, however, an attacker may be able to provide the wrong variation, however, an attacker may be able to provide the wrong
identifier (possibly also leading to the incorrect user being identifier (possibly also leading to the incorrect user being
associated with the generated key) if the attacker has real-time associated with the generated key) if the attacker has real-time
access to the cryptographic module with the identified key. In other access to the cryptographic module with the identified key. The
words, the generated key is associated with the correct cryptographic result of this attack could be that the generated key is associated
module but the module is associated with the incorrect user. See with the correct cryptographic module but the module is associated
further Section 9.5 for a discussion of this threat and possible with the incorrect user. See further Section 10.5 for a discussion
countermeasures. of this threat and possible countermeasures.
An attacker may also modify a <KeyProvServerHello> message. This An attacker may also modify a <KeyProvServerHello> message. This
means that the attacker could indicate different key types, means that the attacker could indicate different key types,
algorithms, or protocol versions than the legitimate server would, algorithms, or protocol versions than the legitimate server would,
e.g., cryptographically weaker ones. The attacker may also provide a e.g., cryptographically weaker ones. The attacker may also provide a
different nonce than the one sent by the legitimate server. Clients different nonce than the one sent by the legitimate server. Clients
MAY protect against the former through strict adherence to policies MAY protect against the former through strict adherence to policies
regarding permissible algorithms and protocol versions. The latter regarding permissible algorithms and protocol versions. The latter
(wrong nonce) will not constitute a security problem, as a generated (wrong nonce) will not constitute a security problem, as a generated
key will not match the key generated on the legitimate server. Also, key will not match the key generated on the legitimate server. Also,
whenever the DSKPP run would result in the replacement of an existing whenever the DSKPP run would result in the replacement of an existing
key, the <Mac> element protects against modifications of R_S. key, the <Mac> element protects against modifications of R_S.
Modifications of <KeyProvClientNonce> messages are also possible. If Modifications of <KeyProvClientNonce> messages are also,possible. If
an attacker modifies the SessionID attribute, then, in effect, a an attacker modifies the SessionID attribute, then, in effect, a
switch to another session will occur at the server, assuming the new switch to another session will occur at the server, assuming the new
SessionID is valid at that time on the server. It still will not SessionID is valid at that time on the server. It still will not
allow the attacker to learn a generated K_TOKEN since R_C has been allow the attacker to learn a generated K_TOKEN since R_C has been
wrapped for the legitimate server. Modifications of the wrapped for the legitimate server. Modifications of the
<EncryptedNonce> element, e.g., replacing it with a value for which <EncryptedNonce> element, e.g., replacing it with a value for which
the attacker knows an underlying R'C, will not result in the client the attacker knows an underlying R'C, will not result in the client
changing its pre-DSKPP state, since the server will be unable to changing its pre-DSKPP state, since the server will be unable to
provide a valid MAC in its final message to the client. The server provide a valid MAC in its final message to the client. The server
MAY, however, end up storing K'TOKEN rather than K_TOKEN. If the MAY, however, end up storing K'TOKEN rather than K_TOKEN. If the
cryptographic module has been associated with a particular user, then cryptographic module has been associated with a particular user, then
this could constitute a security problem. For a further discussion this could constitute a security problem. For a further discussion
about this threat, and a possible countermeasure, see Section 9.5 about this threat, and a possible countermeasure, see Section 10.5
below. Note that use of TLS does not protect against this attack if below. Note that use of TLS does not protect against this attack if
the attacker has access to the DSKPP client (e.g., through malicious the attacker has access to the DSKPP client (e.g., through malicious
software, "Trojans"). software, "Trojans").
Finally, attackers may also modify the <KeyProvServerFinished> Finally, attackers may also modify the <KeyProvServerFinished>
message. Replacing the <Mac> element will only result in denial-of- message. Replacing the <Mac> element will only result in denial-of-
service. Replacement of any other element may cause the DSKPP client service. Replacement of any other element may cause the DSKPP client
to associate, e.g., the wrong service with the generated key. DSKPP to associate, e.g., the wrong service with the generated key. DSKPP
SHOULD be run over a transport providing confidentiality and SHOULD be run over a transport providing confidentiality and
integrity when this is a concern. integrity when this is a concern.
9.2.3. Message Deletion 10.2.3. Message Deletion
Message deletion will not cause any other harm than denial-of- Message deletion will not cause any other harm than denial-of-
service, since a cryptographic module MUST NOT change its state service, since a cryptographic module MUST NOT change its state
(i.e., "commit" to a generated key) until it receives the final (i.e., "commit" to a generated key) until it receives the final
message from the DSKPP server and successfully has processed that message from the DSKPP server and successfully has processed that
message, including validation of its MAC. A deleted message, including validation of its MAC. A deleted
<KeyProvServerFinished> message will not cause the server to end up <KeyProvServerFinished> message will not cause the server to end up
in an inconsistent state vis-a-vis the cryptographic module if the in an inconsistent state vis-a-vis the cryptographic module if the
server implements the suggestions in Section 9.5. server implements the suggestions in Section 10.5.
9.2.4. Message Insertion 10.2.4. Message Insertion
An active attacker may initiate a DSKPP run at any time, and suggest An active attacker may initiate a DSKPP run at any time, and suggest
any device identifier. DSKPP server implementations MAY receive some any device identifier. DSKPP server implementations MAY receive some
protection against inadvertently initializing a key or inadvertently protection against inadvertently initializing a key or inadvertently
replacing an existing key or assigning a key to a cryptographic replacing an existing key or assigning a key to a cryptographic
module by initializing the DSKPP run by use of the <KeyProvTrigger>. module by initializing the DSKPP run by use of the <KeyProvTrigger>.
The <TriggerNonce> element allows the server to associate a DSKPP The <AuthenticationData> element allows the server to associate a
protocol run with, e.g., an earlier user-authenticated session. The DSKPP protocol run with, e.g., an earlier user-authenticated session.
security of this method, therefore, depends on the ability to protect The security of this method, therefore, depends on the ability to
the <TriggerNonce> element in the DSKPP initialization message. If protect the <AuthenticationData> element in the DSKPP initialization
an eavesdropper is able to capture this message, he may race the message. If an eavesdropper is able to capture this message, he may
legitimate user for a key initialization. DSKPP over a transport race the legitimate user for a key initialization. DSKPP over a
providing confidentiality and integrity, coupled with the transport providing confidentiality and integrity, coupled with the
recommendations in Section 9.5, is RECOMMENDED when this is a recommendations in Section 10.5, is RECOMMENDED when this is a
concern. concern.
Insertion of other messages into an existing protocol run is seen as Insertion of other messages into an existing protocol run is seen as
equivalent to modification of legitimately sent messages. equivalent to modification of legitimately sent messages.
9.2.5. Message Replay 10.2.5. Message Replay
During 4-pass DSKPP, attempts to replay a previously recorded DSKPP During 4-pass DSKPP, attempts to replay a previously recorded DSKPP
message will be detected, as the use of nonces ensures that both message will be detected, as the use of nonces ensures that both
parties are live. For example, a DSKPP client knows that a server it parties are live. For example, a DSKPP client knows that a server it
is communicating with is "live" since the server MUST create a MAC on is communicating with is "live" since the server MUST create a MAC on
information sent by the client. information sent by the client.
The same is true for 2-pass DSKPP thanks to the requirement that the The same is true for 2-pass DSKPP thanks to the requirement that the
client sends R in the <KeyProvClientHello> message and that the client sends R in the <KeyProvClientHello> message and that the
server includes R in the MAC computation. server includes R in the MAC computation.
9.2.6. Message Reordering 10.2.6. Message Reordering
An attacker may attempt to re-order 4-pass DSKPP messages but this An attacker may attempt to re-order 4-pass DSKPP messages but this
will be detected, as each message is of a unique type. Note: Message will be detected, as each message is of a unique type. Note: Message
re-ordering attacks cannot occur in 2-pass DSKPP since each party re-ordering attacks cannot occur in 2-pass DSKPP since each party
sends at most one message each. sends at most one message each.
9.2.7. Man-in-the-Middle 10.2.7. Man-in-the-Middle
In addition to other active attacks, an attacker posing as a man in In addition to other active attacks, an attacker posing as a man-in-
the middle may be able to provide his own public key to the DSKPP the-middle may be able to provide his own public key to the DSKPP
client. This threat and countermeasures to it are discussed in client. This threat and countermeasures to it are discussed in
Section 3.4.2.1. An attacker posing as a man-in-the-middle may also Section 4.1.1. An attacker posing as a man-in-the-middle may also be
be acting as a proxy and, hence, may not interfere with DSKPP runs acting as a proxy and, hence, may not interfere with DSKPP runs but
but still learn valuable information; see Section 9.3. still learn valuable information; see Section 10.3.
9.3. Passive Attacks 10.3. Passive Attacks
Passive attackers may eavesdrop on DSKPP runs to learn information Passive attackers may eavesdrop on DSKPP runs to learn information
that later on may be used to impersonate users, mount active attacks, that later on may be used to impersonate users, mount active attacks,
etc. etc.
If DSKPP is not run over a transport providing confidentiality, a If DSKPP is not run over a transport providing confidentiality, a
passive attacker may learn: passive attacker may learn:
o What cryptographic modules a particular user is in possession of; o What cryptographic modules a particular user is in possession of
o The identifiers of keys on those cryptographic modules and other o The identifiers of keys on those cryptographic modules and other
attributes pertaining to those keys, e.g., the lifetime of the attributes pertaining to those keys, e.g., the lifetime of the
keys; keys
o DSKPP versions and cryptographic algorithms supported by a o DSKPP versions and cryptographic algorithms supported by a
particular DSKPP client or server; and particular DSKPP client or server
o Any value present in an <extension> that is part of o Any value present in an <extension> that is part of
<KeyProvClientHello> <KeyProvClientHello>
Whenever the above is a concern, DSKPP SHOULD be run over a transport Whenever the above is a concern, DSKPP SHOULD be run over a transport
providing confidentiality. If man-in-the-middle attacks for the providing confidentiality. If man-in-the-middle attacks for the
purposes described above are a concern, the transport SHOULD also purposes described above are a concern, the transport SHOULD also
offer server-side authentication. offer server-side authentication.
9.4. Cryptographic Attacks 10.4. Cryptographic Attacks
An attacker with unlimited access to an initialized cryptographic An attacker with unlimited access to an initialized cryptographic
module may use the module as an "oracle" to pre-compute values that module may use the module as an "oracle" to pre-compute values that
later on may be used to impersonate the DSKPP server. Section 3.4.3 later on may be used to impersonate the DSKPP server. Section 4.1.1
and Section 3 contain discussions of this threat and steps contains a discussion of this threat and steps RECOMMENDED to protect
RECOMMENDED to protect against it. against it.
Implementers SHOULD also be aware that cryptographic algorithms Implementers SHOULD also be aware that cryptographic algorithms
become weaker with time. As new cryptographic techniques are become weaker with time. As new cryptographic techniques are
developed and computing performance improves, the work factor to developed and computing performance improves, the work factor to
break a particular cryptographic algorithm will reduce. Therefore, break a particular cryptographic algorithm will reduce. Therefore,
cryptographic algorithm implementations SHOULD be modular allowing cryptographic algorithm implementations SHOULD be modular allowing
new algorithms to be readily inserted. That is, implementers SHOULD new algorithms to be readily inserted. That is, implementers SHOULD
be prepared to regularly update the algorithms in their be prepared to regularly update the algorithms in their
implementations. implementations.
9.5. Attacks on the Interaction between DSKPP and User Authentication 10.5. Attacks on the Interaction between DSKPP and User Authentication
If keys generated in DSKPP will be associated with a particular user If keys generated in DSKPP will be associated with a particular user
at the DSKPP server (or a server trusted by, and communicating with at the DSKPP server (or a server trusted by, and communicating with
the DSKPP server), then in order to protect against threats where an the DSKPP server), then in order to protect against threats where an
attacker replaces a client-provided encrypted R_C with his own R'C attacker replaces a client-provided encrypted R_C with his own R'C
(regardless of whether the public-key variation or the shared-secret (regardless of whether the public-key variation or the shared-secret
variation of DSKPP is employed to encrypt the client nonce), the variation of DSKPP is employed to encrypt the client nonce), the
server SHOULD not commit to associate a generated K_TOKEN with the server SHOULD NOT commit to associate a generated K_TOKEN with the
given cryptographic module until the user simultaneously has proven given cryptographic module until the user simultaneously has proven
both possession of the device that hosts the cryptographic module both possession of the device that hosts the cryptographic module
containing K_TOKEN and some out-of-band provided authenticating containing K_TOKEN and some out-of-band provided authenticating
information (e.g., a temporary password). For example, if the information (e.g., an authentication code). For example, if the
cryptographic module is a one-time password token, the user could be cryptographic module is a one-time password token, the user could be
required to authenticate with both a one-time password generated by required to authenticate with both a one-time password generated by
the cryptographic module and an out-of-band provided temporary PIN in the cryptographic module and an out-of-band provided authentication
order to have the server "commit" to the generated OTP value for the code in order to have the server "commit" to the generated OTP value
given user. Preferably, the user SHOULD perform this operation from for the given user. Preferably, the user SHOULD perform this
another host than the one used to initialize keys on the operation from another host than the one used to initialize keys on
cryptographic module, in order to minimize the risk of malicious the cryptographic module, in order to minimize the risk of malicious
software on the client interfering with the process. software on the client interfering with the process.
Note: This scenario, wherein the attacker replaces a client-provided Note: This scenario, wherein the attacker replaces a client-provided
R_C with his own R'C, does not apply to 2-pass DSKPP as the client R_C with his own R'C, does not apply to 2-pass DSKPP as the client
does not provide any entropy to K_TOKEN. The attack as such (and its does not provide any entropy to K_TOKEN. The attack as such (and its
countermeasures) still applies to 2-pass DSKPP, however, as it countermeasures) still applies to 2-pass DSKPP, however, as it
essentially is a man-in-the-middle attack. essentially is a man-in-the-middle attack.
Another threat arises when an attacker is able to trick a user to Another threat arises when an attacker is able to trick a user to
authenticate to the attacker rather than to the legitimate service authenticate to the attacker rather than to the legitimate service
before the DSKPP protocol run. If successful, the attacker will then before the DSKPP protocol run. If successful, the attacker will then
be able to impersonate the user towards the legitimate service, and be able to impersonate the user towards the legitimate service, and
subsequently receive a valid DSKPP trigger. If the public-key subsequently receive a valid DSKPP trigger. If the public-key
variant of DSKPP is used, this may result in the attacker being able variant of DSKPP is used, this may result in the attacker being able
to (after a successful DSKPP protocol run) impersonate the user. to (after a successful DSKPP protocol run) impersonate the user.
Ordinary precautions MUST, therefore, be in place to ensure that Ordinary precautions MUST, therefore, be in place to ensure that
users authenticate only to legitimate services. users authenticate only to legitimate services.
9.6. Miscellaneous Considerations 10.6. Miscellaneous Considerations
9.6.1. Client Contributions to K_TOKEN Entropy 10.6.1. Client Contributions to K_TOKEN Entropy
In 4-pass DSKPP, both the client and the server provide randomizing In 4-pass DSKPP, both the client and the server provide randomizing
material to K_TOKEN, in a manner that allows both parties to verify material to K_TOKEN, in a manner that allows both parties to verify
that they did contribute to the resulting key. In the 2-pass DSKPP that they did contribute to the resulting key. In the 2-pass DSKPP
version defined herein, only the server contributes to the entropy of version defined herein, only the server contributes to the entropy of
K_TOKEN. This means that a broken or compromised (pseudo-)random K_TOKEN. This means that a broken or compromised (pseudo-)random
number generator in the server may cause more damage than it would in number generator in the server may cause more damage than it would in
the 4-pass variation. Server implementations SHOULD therefore take the 4-pass variant. Server implementations SHOULD therefore take
extreme care to ensure that this situation does not occur. extreme care to ensure that this situation does not occur.
9.6.2. Key Confirmation 10.6.2. Key Confirmation
4-pass DSKPP servers provide key confirmation through the MAC on R_C 4-pass DSKPP servers provide key confirmation through the MAC on R_C
in the <KeyProvServerFinished> message. In the 2-pass DSKPP in the <KeyProvServerFinished> message. In the 2-pass DSKPP variant
variation described herein, key confirmation is provided by the MAC described herein, key confirmation is provided by the MAC including
including R, using K_MAC. R, using K_MAC.
9.6.3. Server Authentication 10.6.3. Server Authentication
DSKPP servers MUST authenticate themselves whenever a successful DSKPP servers MUST authenticate themselves whenever a successful
DSKPP 2-pass protocol run would result in an existing K_TOKEN being DSKPP 2-pass protocol run would result in an existing K_TOKEN being
replaced by a K_TOKEN', or else a denial-of-service attack where an replaced by a K_TOKEN', or else a denial-of-service attack where an
unauthorized DSKPP server replaces a K_TOKEN with another key would unauthorized DSKPP server replaces a K_TOKEN with another key would
be possible. In 2-pass DSKPP, servers authenticate by including the be possible. In 2-pass DSKPP, servers authenticate by including the
AuthenticationDataType extension containing a MAC as described in AuthenticationDataType extension containing a MAC as described in
Section 3.5 for two-pass DSKPP. Section 5 for two-pass DSKPP.
9.6.4. User Authentication 10.6.4. User Authentication
A DSKPP server MUST authenticate a client to ensure that K_TOKEN is A DSKPP server MUST authenticate a client to ensure that K_TOKEN is
delivered to the intended device. The following measures SHOULD be delivered to the intended device. The following measures SHOULD be
considered: considered:
o When an Authentication Code is used for client authentication, a o When an Authentication Code is used for client authentication, a
password dictionary attack on the authentication data is possible. password dictionary attack on the authentication data is possible.
o The length of the Authentication Code when used over a non-secure o The length of the Authentication Code when used over a non-secure
channel SHOULD be longer than what is used over a secure channel. channel SHOULD be longer than what is used over a secure channel.
When a device, e.g., some mobile phones with small screens, cannot When a device, e.g., some mobile phones with small screens, cannot
handle a long Authentication Code in a user-friendly manner, DSKPP handle a long Authentication Code in a user-friendly manner, DSKPP
SHOULD rely on a secure channel for communication. SHOULD rely on a secure channel for communication.
o In the case that a non-secure channel has to be used, the o In the case that a non-secure channel has to be used, the
Authentication Code SHOULD be sent to the server MAC'd as Authentication Code SHOULD be sent to the server MAC'd as
specified in Section 3.7. The Authentication Code and nonce value specified in Section 3.4.1. The Authentication Code and nonce
MUST be strong enough to prevent offline brute-force recovery of value MUST be strong enough to prevent offline brute-force
the Authentication Code from the HMAC data. Given that the nonce recovery of the Authentication Code from the HMAC data. Given
value is sent in plaintext format over a non-secure transport, the that the nonce value is sent in plaintext format over a non-secure
cryptographic strength of the Authentication Data depends more on transport, the cryptographic strength of the Authentication Data
the quality of the Authentication Code. depends more on the quality of the Authentication Code.
o When the Authentication Code is sent from the DSKPP server to the o When the Authentication Code is sent from the DSKPP server to the
device in a DSKPP initialization trigger message, an eavesdropper device in a DSKPP initialization trigger message, an eavesdropper
may be able to capture this message and race the legitimate user may be able to capture this message and race the legitimate user
for a key initialization. To prevent this, the transport layer for a key initialization. To prevent this, the transport layer
used to send the DSKPP trigger MUST provide confidentiality and used to send the DSKPP trigger MUST provide confidentiality and
integrity e.g. secure browser session. integrity, e.g. a secure browser session.
9.6.5. Key Protection in Two-Pass DSKPP 10.6.5. Key Protection in Two-Pass DSKPP
Three key protection profiles are defined for the different usages of Three key protection methods are defined for the different usages of
2-pass DSKPP, which MUST be supported by a key package format, such 2-pass DSKPP, which MUST be supported by a key package format, such
as [PSKC] and [SKPC-ASN.1]. Therefore, key protection in the two- as [PSKC] and [SKPC-ASN.1]. Therefore, key protection in the two-
pass DSKPP is dependent upon the security of the key package format pass DSKPP is dependent upon the security of the key package format
selected for a protocol run. Some considerations for the Passphrase selected for a protocol run. Some considerations for the Passphrase-
profile follow. Based Key Wrap method follow.
The passphrase-based key wrap profile SHOULD depend upon the PBKDF2 The passphrase-based key wrap method SHOULD depend upon the PBKDF2
function from [PKCS-5] to generate an encryption key from a function from [PKCS-5] to generate an encryption key from a
passphrase and salt string. It is important to note that passphrase- passphrase and salt string. It is important to note that passphrase-
based encryption is generally limited in the security that it based encryption is generally limited in the security that it
provides despite the use of salt and iteration count in PBKDF2 to provides despite the use of salt and iteration count in PBKDF2 to
increase the complexity of attack. Implementations SHOULD therefore increase the complexity of attack. Implementations SHOULD therefore
take additional measures to strengthen the security of the take additional measures to strengthen the security of the
passphrase-based key wrap profile. The following measures SHOULD be passphrase-based key wrap method. The following measures SHOULD be
considered where applicable: considered where applicable:
o The passphrase SHOULD be selected well, and usage guidelines such o The passphrase is the same as the one-time password component of
as the ones in [NIST-PWD] SHOULD be taken into account. the authentication code (see Section 3.4.1) for a description of
the AC format). The passphrase SHOULD be selected well, and usage
guidelines such as the ones in [NIST-PWD] SHOULD be taken into
account.
o A different passphrase SHOULD be used for every key initialization o A different passphrase SHOULD be used for every key initialization
wherever possible (the use of a global passphrase for a batch of wherever possible (the use of a global passphrase for a batch of
cryptographic modules SHOULD be avoided, for example). One way to cryptographic modules SHOULD be avoided, for example). One way to
achieve this is to use randomly-generated passphrases. achieve this is to use randomly-generated passphrases.
o The passphrase SHOULD be protected well if stored on the server o The passphrase SHOULD be protected well if stored on the server
and/or on the cryptographic module and SHOULD be delivered to the and/or on the cryptographic module and SHOULD be delivered to the
device's user using secure methods. device's user using secure methods.
o User per-authentication SHOULD be implemented to ensure that o User per-authentication SHOULD be implemented to ensure that
K_TOKEN is not delivered to a rogue recipient. K_TOKEN is not delivered to a rogue recipient.
o The iteration count in PBKDF2 SHOULD be high to impose more work o The iteration count in PBKDF2 SHOULD be high to impose more work
for an attacker using brute-force methods (see [PKCS-5] for for an attacker using brute-force methods (see [PKCS-5] for
recommendations). However, it MUST be noted that the higher the recommendations). However, it MUST be noted that the higher the
count, the more work is required on the legitimate cryptographic count, the more work is required on the legitimate cryptographic
module to decrypt the newly delivered K_TOKEN. Servers MAY use module to decrypt the newly delivered K_TOKEN. Servers MAY use
relatively low iteration counts to accommodate devices with relatively low iteration counts to accommodate devices with
limited processing power such as some PDA and cell phones when limited processing power such as some PDA and cell phones when
other security measures are implemented and the security of the other security measures are implemented and the security of the
skipping to change at page 77, line 10 skipping to change at page 62, line 21
module to decrypt the newly delivered K_TOKEN. Servers MAY use module to decrypt the newly delivered K_TOKEN. Servers MAY use
relatively low iteration counts to accommodate devices with relatively low iteration counts to accommodate devices with
limited processing power such as some PDA and cell phones when limited processing power such as some PDA and cell phones when
other security measures are implemented and the security of the other security measures are implemented and the security of the
passphrase-based key wrap method is not weakened. passphrase-based key wrap method is not weakened.
o Transport level security (e.g. TLS) SHOULD be used where possible o Transport level security (e.g. TLS) SHOULD be used where possible
to protect a two-pass protocol run. Transport level security to protect a two-pass protocol run. Transport level security
provides a second layer of protection for the newly generated provides a second layer of protection for the newly generated
K_TOKEN. K_TOKEN.
10. Internationalization Considerations 11. Internationalization Considerations
The DSKPP protocol is mostly meant for machine-to-machine The DSKPP protocol is mostly meant for machine-to-machine
communications; as such, most of its elements are tokens not meant communications; as such, most of its elements are tokens not meant
for direct human consumption. If these tokens are presented to the for direct human consumption. If these tokens are presented to the
end user, some localization may need to occur. DSKPP exchanges end user, some localization may need to occur. DSKPP exchanges
information using XML. All XML processors are required to understand information using XML. All XML processors are required to understand
UTF-8 and UTF-16 encoding, and therefore all DSKPP clients and UTF-8 and UTF-16 encoding, and therefore all DSKPP clients and
servers MUST understand UTF-8 and UTF-16 encoded XML. Additionally, servers MUST understand UTF-8 and UTF-16 encoded XML. Additionally,
DSKPP servers and clients MUST NOT encode XML with encodings other DSKPP servers and clients MUST NOT encode XML with encodings other
than UTF-8 or UTF-16. than UTF-8 or UTF-16.
11. IANA Considerations 12. IANA Considerations
This document requires several IANA registrations, detailed below. This document requires several IANA registrations, detailed below.
11.1. URN Sub-Namespace Registration 12.1. URN Sub-Namespace Registration
This section registers a new XML namespace, This section registers a new XML namespace,
"urn:ietf:params:xml:ns:keyprov:dskpp:1.0" per the guidelines in "urn:ietf:params:xml:ns:keyprov:dskpp:1.0" per the guidelines in
[RFC3688]: [RFC3688]:
URI: urn:ietf:params:xml:ns:keyprov:dskpp:1.0 URI: urn:ietf:params:xml:ns:keyprov:dskpp:1.0
Registrant Contact: IETF, KEYPROV Working Group (keyprov@ietf.org), Registrant Contact:
Andrea Doherty (andrea.doherty@rsa.com) IETF, KEYPROV Working Group (keyprov@ietf.org), Andrea Doherty
(andrea.doherty@rsa.com)
XML: XML:
BEGIN BEGIN
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head> <head>
<title>DSKPP Messsages</title> <title>DSKPP Messsages</title>
</head> </head>
<body> <body>
<h1>Namespace for DSKPP Messages</h1> <h1>Namespace for DSKPP Messages</h1>
skipping to change at page 78, line 23 skipping to change at page 63, line 23
<body> <body>
<h1>Namespace for DSKPP Messages</h1> <h1>Namespace for DSKPP Messages</h1>
<h2>urn:ietf:params:xml:ns:keyprov:dskpp:1.0</h2> <h2>urn:ietf:params:xml:ns:keyprov:dskpp:1.0</h2>
[NOTE TO IANA/RFC-EDITOR: Please replace XXXX below [NOTE TO IANA/RFC-EDITOR: Please replace XXXX below
with the RFC number for this specification.] with the RFC number for this specification.]
<p>See RFCXXXX</p> <p>See RFCXXXX</p>
</body> </body>
</html> </html>
END END
11.2. XML Schema Registration 12.2. XML Schema Registration
This section registers an XML schema as per the guidelines in This section registers an XML schema as per the guidelines in
[RFC3688]. [RFC3688].