draft-ietf-kitten-pkinit-freshness-07.txt   rfc8070.txt 
Kitten Working Group M. Short, Ed. Internet Engineering Task Force (IETF) M. Short, Ed.
Internet-Draft S. Moore Request for Comments: 8070 S. Moore
Intended status: Standards Track P. Miller Category: Standards Track P. Miller
Expires: November 24, 2016 Microsoft Corporation ISSN: 2070-1721 Microsoft Corporation
May 23, 2016 February 2017
Public Key Cryptography for Initial Authentication in Kerberos (PKINIT) Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)
Freshness Extension Freshness Extension
draft-ietf-kitten-pkinit-freshness-07
Abstract Abstract
This document describes how to further extend the Public Key This document describes how to further extend the Public Key
Cryptography for Initial Authentication in Kerberos (PKINIT) Cryptography for Initial Authentication in Kerberos (PKINIT)
extension [RFC4556] to exchange an opaque data blob that a KDC can extension (defined in RFC 4556) to exchange an opaque data blob that
validate to ensure that the client is currently in possession of the a Key Distribution Center (KDC) can validate to ensure that the
private key during a PKINIT AS exchange. client is currently in possession of the private key during a PKINIT
Authentication Service (AS) exchange.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 7841.
This Internet-Draft will expire on November 24, 2016. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc8070.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction ....................................................2
1.1. Kerberos message flow using KRB_AS_REQ without pre- 1.1. Kerberos Message Flow Using KRB_AS_REQ without
authentication . . . . . . . . . . . . . . . . . . . . . 3 Pre-authentication .........................................3
1.2. Requirements Language . . . . . . . . . . . . . . . . . . 3 1.2. Requirements Language ......................................3
2. Message Exchanges . . . . . . . . . . . . . . . . . . . . . . 3 2. Message Exchanges ...............................................4
2.1. Generation of KRB_AS_REQ Message . . . . . . . . . . . . 4 2.1. Generation of KRB_AS_REQ Message ...........................4
2.2. Generation of KRB_ERROR Message . . . . . . . . . . . . . 4 2.2. Generation of KRB_ERROR Message ............................4
2.3. Generation of KRB_AS_REQ Message . . . . . . . . . . . . 4 2.3. Generation of KRB_AS_REQ Message ...........................4
2.4. Receipt of KRB_AS_REQ Message . . . . . . . . . . . . . . 4 2.4. Receipt of KRB_AS_REQ Message ..............................5
2.5. Receipt of second KRB_ERROR Message . . . . . . . . . . . 5 2.5. Receipt of Second KRB_ERROR Message ........................5
3. PreAuthentication Data Types . . . . . . . . . . . . . . . . 5 3. PreAuthentication Data Types ....................................5
4. Extended PKAuthenticator . . . . . . . . . . . . . . . . . . 5 4. Extended PKAuthenticator ........................................6
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 5. IANA Considerations .............................................6
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 6. Security Considerations .........................................7
7. Security Considerations . . . . . . . . . . . . . . . . . . . 7 7. Interoperability Considerations .................................7
8. Interoperability Considerations . . . . . . . . . . . . . . . 7 8. Normative References ............................................8
9. Normative References . . . . . . . . . . . . . . . . . . . . 7 Acknowledgements ...................................................8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses .................................................9
1. Introduction 1. Introduction
The Kerberos PKINIT extension [RFC4556] defines two schemes for using The Kerberos PKINIT extension [RFC4556] defines two schemes for using
asymmetric cryptography in a Kerberos preauthenticator. One uses asymmetric cryptography in a Kerberos pre-authenticator. One uses
Diffie-Hellman key exchange and the other depends on public key Diffie-Hellman key exchange and the other depends on public key
encryption. The public key encryption scheme is less commonly used encryption. The public key encryption scheme is less commonly used
for two reasons: for two reasons:
o Elliptic Curve Cryptography (ECC) Support for PKINIT [RFC5349] o Elliptic Curve Cryptography (ECC) Support for PKINIT [RFC5349]
only specified Elliptic Curve Diffie-Hellman (ECDH) key agreement, only specified Elliptic Curve Diffie-Hellman (ECDH) key agreement,
so it cannot be used for public key encryption. so it cannot be used for public key encryption.
o Public key encryption requires certificates with an encryption o Public key encryption requires certificates with an encryption
key, that is not deployed on many existing smart cards. key, which is not deployed on many existing smart cards.
In the Diffie-Hellman exchange, the client uses its private key only In the Diffie-Hellman exchange, the client uses its private key only
to sign the AuthPack structure (specified in Section 3.2.1 of to sign the AuthPack structure (specified in Section 3.2.1 of
[RFC4556]), that is performed before any traffic is sent to the KDC. [RFC4556]), which is performed before any traffic is sent to the KDC.
Thus a client can generate requests with future times in the Thus, a client can generate requests with future times in the
PKAuthenticator, and then send those requests at those future times. PKAuthenticator, and then send those requests at those future times.
Unless the time is outside the validity period of the client's Unless the time is outside the validity period of the client's
certificate, the KDC will validate the PKAuthenticator and return a certificate, the KDC will validate the PKAuthenticator and return a
TGT the client can use without possessing the private key. Ticket-Granting Ticket (TGT) the client can use without possessing
the private key.
As a result, a client performing PKINIT with the Diffie-Hellman key As a result, a client performing PKINIT with the Diffie-Hellman key
exchange does not prove current possession of the private key being exchange does not prove current possession of the private key being
used for authentication. It proves only prior use of that key. used for authentication. It proves only prior use of that key.
Ensuring that the client has current possession of the private key Ensuring that the client has current possession of the private key
requires that the signed PKAuthenticator data include information requires that the signed PKAuthenticator data include information
that the client could not have predicted. that the client could not have predicted.
1.1. Kerberos message flow using KRB_AS_REQ without pre-authentication 1.1. Kerberos Message Flow Using KRB_AS_REQ without Pre-authentication
Today, password-based AS exchanges [RFC4120] often begin with the Today, password-based AS exchanges [RFC4120] often begin with the
client sending a KRB_AS_REQ without pre-authentication. When the client sending a KRB_AS_REQ without pre-authentication. When the
principal requires pre-authentication, the KDC responds with a principal requires pre-authentication, the KDC responds with a
KRB_ERROR containing information needed to complete an AS exchange, KRB_ERROR containing information needed to complete an AS exchange,
such as the supported encryption types and salt values. This message such as the supported encryption types and salt values. This message
flow is illustrated below: flow is illustrated below:
KDC Client Client KDC
<---- AS-REQ without pre-authentication AS-REQ without pre-authentication ---->
KRB-ERROR ----> <---- KRB-ERROR
<---- AS-REQ AS-REQ ---->
AS-REP ----> <---- AS-REP
<---- TGS-REQ TGS-REQ ---->
TGS-REP ----> <---- TGS-REP
Figure 1 Figure 1
We can use a similar message flow with PKINIT, allowing the KDC to We can use a similar message flow with PKINIT, allowing the KDC to
provide a token for the client to include in its KRB_AS_REQ to ensure provide a token for the client to include in its KRB_AS_REQ to ensure
that the PA_PK_AS_REQ [RFC4556] was not pregenerated. that the PA_PK_AS_REQ [RFC4556] was not pre-generated.
1.2. Requirements Language 1.2. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in [RFC2119].
2. Message Exchanges 2. Message Exchanges
The following summarizes the message flow with extensions to The following summarizes the message flow with extensions to
[RFC4120] and [RFC4556] required to support a KDC-provided freshness [RFC4120] and [RFC4556] required to support a KDC-provided freshness
token during the initial request for a ticket: token during the initial request for a ticket:
1. The client generates a KRB_AS_REQ as specified in Section 2.9.3 1. The client generates a KRB_AS_REQ, as specified in Section 2.9.3
of [RFC4120] that contains no PA_PK_AS_REQ and includes a of [RFC4120], that contains no PA_PK_AS_REQ and includes a
freshness token request. freshness token request.
2. The KDC generates a KRB_ERROR as specified in Section 3.1.3 of 2. The KDC generates a KRB_ERROR, as specified in Section 3.1.4 of
[RFC4120] providing a freshness token. [RFC4120], providing a freshness token.
3. The client receives the error as specified in Section 3.1.4 of 3. The client receives the error, as specified in Section 3.1.5 of
[RFC4120], extracts the freshness token, and includes it as part [RFC4120], extracts the freshness token, and includes it as part
of the KRB_AS_REQ as specified in [RFC4120] and [RFC4556]. of the KRB_AS_REQ as specified in [RFC4120] and [RFC4556].
4. The KDC receives and validates the KRB_AS_REQ as specified in 4. The KDC receives and validates the KRB_AS_REQ, as specified in
Section 3.2.2 of [RFC4556], then additionally validates the Section 3.2.2 of [RFC4556], then additionally validates the
freshness token. freshness token.
5. The KDC and client continue as specified in [RFC4120] and 5. The KDC and client continue, as specified in [RFC4120] and
[RFC4556]. [RFC4556].
2.1. Generation of KRB_AS_REQ Message 2.1. Generation of KRB_AS_REQ Message
The client indicates support of freshness tokens by adding a padata The client indicates support of freshness tokens by adding a padata
element with padata-type PA_AS_FRESHNESS and padata-value of an empty element with padata-type PA_AS_FRESHNESS and padata-value of an empty
octet string. octet string.
2.2. Generation of KRB_ERROR Message 2.2. Generation of KRB_ERROR Message
skipping to change at page 5, line 8 skipping to change at page 5, line 19
[RFC4120] message with the error-code KDC_ERR_PREAUTH_FAILED [RFC4120] message with the error-code KDC_ERR_PREAUTH_FAILED
[RFC4120] with a padata element with padata-type PA_AS_FRESHNESS and [RFC4120] with a padata element with padata-type PA_AS_FRESHNESS and
padata-value of the freshness token to the METHOD-DATA object. padata-value of the freshness token to the METHOD-DATA object.
When the PA_PK_AS_REQ message contains a freshness token, after When the PA_PK_AS_REQ message contains a freshness token, after
validating the PA_PK_AS_REQ message normally, the KDC will validate validating the PA_PK_AS_REQ message normally, the KDC will validate
the freshnessToken value in the PKAuthenticator in an implementation- the freshnessToken value in the PKAuthenticator in an implementation-
specific way. If the freshness token is not valid, the KDC MUST specific way. If the freshness token is not valid, the KDC MUST
return a KRB_ERROR [RFC4120] message with the error-code return a KRB_ERROR [RFC4120] message with the error-code
KDC_ERR_PREAUTH_EXPIRED [RFC6113]. The e-data field of the error KDC_ERR_PREAUTH_EXPIRED [RFC6113]. The e-data field of the error
contains a METHOD-DATA object [RFC4120] which specifies a valid contains a METHOD-DATA object [RFC4120], which specifies a valid
PA_AS_FRESHNESS padata-value. Since the freshness tokens are PA_AS_FRESHNESS padata-value. Since the freshness tokens are
validated by KDCs in the same realm, standardizing the contents of validated by KDCs in the same realm, standardizing the contents of
the freshness token is not a concern for interoperability. the freshness token is not a concern for interoperability.
2.5. Receipt of second KRB_ERROR Message 2.5. Receipt of Second KRB_ERROR Message
If a client receives a KDC_ERR_PREAUTH_EXPIRED KRB_ERROR message that If a client receives a KDC_ERR_PREAUTH_EXPIRED KRB_ERROR message that
includes a freshness token, it SHOULD retry using the new freshness includes a freshness token, it SHOULD retry using the new freshness
token. token.
3. PreAuthentication Data Types 3. PreAuthentication Data Types
The following are the new PreAuthentication data types: The following are the new PreAuthentication data types:
+----------------------+-------------------+ +----------------------+-------------------+
| Padata and Data Type | Padata-type Value | | Padata and Data Type | Padata-type Value |
+----------------------+-------------------+ +----------------------+-------------------+
| PA_AS_FRESHNESS | 150 | | PA_AS_FRESHNESS | 150 |
+----------------------+-------------------+ +----------------------+-------------------+
4. Extended PKAuthenticator 4. Extended PKAuthenticator
The PKAuthenticator structure specified in Section 3.2.1 of [RFC4556] The PKAuthenticator structure specified in Section 3.2.1 of [RFC4556]
is extended to include a new freshnessToken as follows: is extended to include a new freshnessToken as follows:
PKAuthenticator ::= SEQUENCE { PKAuthenticator ::= SEQUENCE {
cusec [0] INTEGER (0..999999), cusec [0] INTEGER (0..999999),
ctime [1] KerberosTime, ctime [1] KerberosTime,
-- cusec and ctime are used as in [RFC4120], for -- cusec and ctime are used as in [RFC4120], for
-- replay prevention. -- replay prevention.
nonce [2] INTEGER (0..4294967295), nonce [2] INTEGER (0..4294967295),
-- Chosen randomly; this nonce does not need to -- Chosen randomly; this nonce does not need to
skipping to change at page 6, line 21 skipping to change at page 6, line 24
-- replay prevention. -- replay prevention.
nonce [2] INTEGER (0..4294967295), nonce [2] INTEGER (0..4294967295),
-- Chosen randomly; this nonce does not need to -- Chosen randomly; this nonce does not need to
-- match with the nonce in the KDC-REQ-BODY. -- match with the nonce in the KDC-REQ-BODY.
paChecksum [3] OCTET STRING OPTIONAL, paChecksum [3] OCTET STRING OPTIONAL,
-- MUST be present. -- MUST be present.
-- Contains the SHA1 checksum, performed over -- Contains the SHA1 checksum, performed over
-- KDC-REQ-BODY. -- KDC-REQ-BODY.
..., ...,
freshnessToken [4] OCTET STRING OPTIONAL, freshnessToken [4] OCTET STRING OPTIONAL,
-- PA_AS_FRESHNESS padata value as recieved from the -- PA_AS_FRESHNESS padata value as received from the
-- KDC. MUST be present if sent by KDC -- KDC. MUST be present if sent by KDC
... ...
} }
5. Acknowledgements 5. IANA Considerations
Douglas E. Engert, Sam Hartman, Henry B. Hotz, Nikos
Mavrogiannopoulos, Martin Rex, Nico Williams, and Tom Yu were key
contributors to the discovery of the freshness issue in PKINIT.
Sam Hartman, Greg Hudson, Jeffrey Hutzelman, Nathan Ide, Benjamin
Kaduk, Bryce Nordgren, Magnus Nystrom, Nico Williams and Tom Yu
reviewed the document and provided suggestions for improvements.
6. IANA Considerations
IANA is requested to assign numbers for PA_AS_FRESHNESS listed in the IANA has assigned numbers for PA_AS_FRESHNESS listed in a subregistry
Kerberos Parameters registry Pre-authentication and Typed Data as of the "Kerberos Parameters" registry titled "Pre-authentication and
follows: Typed Data" as follows:
+------+-----------------+------------+ +------+-----------------+-----------+
| Type | Value | Reference | | Type | Value | Reference |
+------+-----------------+------------+ +------+-----------------+-----------+
| 150 | PA_AS_FRESHNESS | [This RFC] | | 150 | PA_AS_FRESHNESS | [RFC8070] |
+------+-----------------+------------+ +------+-----------------+-----------+
7. Security Considerations 6. Security Considerations
The freshness token SHOULD include signing, encrypting or sealing The freshness token SHOULD include signing, encrypting, or sealing
data from the KDC to determine authenticity and prevent tampering. data from the KDC to determine authenticity and prevent tampering.
Freshness tokens serve to guarantee that the client had the key when Freshness tokens serve to guarantee that the client had the key when
constructing the AS-REQ. They are not required to be single use constructing the AS-REQ. They are not required to be single use
tokens or bound to specific AS exchanges. Part of the reason the tokens or bound to specific AS exchanges. Part of the reason the
token is opaque is to allow KDC implementers the freedom to add token is opaque is to allow KDC implementers the freedom to add
additional functionality as long as the "freshness" guarantee additional functionality as long as the tokens expire so that the
remains. "freshness" guarantee remains.
8. Interoperability Considerations 7. Interoperability Considerations
Since the client treats the KDC-provided data blob as opaque, Since the client treats the KDC-provided data blob as opaque,
changing the contents will not impact existing clients. Thus changing the contents will not impact existing clients. Thus,
extensions to the freshness token do not impact client extensions to the freshness token do not impact client
interoperability. interoperability.
Clients SHOULD NOT reuse freshness tokens across multiple exchanges. Clients SHOULD NOT reuse freshness tokens across multiple exchanges.
There is no guarantee that a KDC will allow a once-valid token to be There is no guarantee that a KDC will allow a once-valid token to be
used again. Thus clients that do not retry with a new freshness used again. Thus, clients that do not retry with a new freshness
token may not be compatible with KDCs, depending on how they choose token may not be compatible with KDCs, depending on how they choose
to implement freshness validation. to implement freshness validation.
Since upgrading clients takes time, implementers may consider Since upgrading clients takes time, implementers may consider
allowing both freshness-token based exchanges and "legacy" exchanges allowing both freshness-token based exchanges and "legacy" exchanges
without use of freshness tokens. However, until freshness tokens are without use of freshness tokens. However, until freshness tokens are
required by the realm, the existing risks of pre-generated required by the realm, the existing risks of pre-generated
PKAuthenticators will remain. PKAuthenticators will remain.
9. Normative References 8. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
[RFC4120] Neuman, C., Yu, T., Hartman, S., and K. Raeburn, "The [RFC4120] Neuman, C., Yu, T., Hartman, S., and K. Raeburn, "The
Kerberos Network Authentication Service (V5)", RFC 4120, Kerberos Network Authentication Service (V5)", RFC 4120,
DOI 10.17487/RFC4120, July 2005, DOI 10.17487/RFC4120, July 2005,
<http://www.rfc-editor.org/info/rfc4120>. <http://www.rfc-editor.org/info/rfc4120>.
skipping to change at page 8, line 16 skipping to change at page 8, line 33
Cryptography (ECC) Support for Public Key Cryptography for Cryptography (ECC) Support for Public Key Cryptography for
Initial Authentication in Kerberos (PKINIT)", RFC 5349, Initial Authentication in Kerberos (PKINIT)", RFC 5349,
DOI 10.17487/RFC5349, September 2008, DOI 10.17487/RFC5349, September 2008,
<http://www.rfc-editor.org/info/rfc5349>. <http://www.rfc-editor.org/info/rfc5349>.
[RFC6113] Hartman, S. and L. Zhu, "A Generalized Framework for [RFC6113] Hartman, S. and L. Zhu, "A Generalized Framework for
Kerberos Pre-Authentication", RFC 6113, Kerberos Pre-Authentication", RFC 6113,
DOI 10.17487/RFC6113, April 2011, DOI 10.17487/RFC6113, April 2011,
<http://www.rfc-editor.org/info/rfc6113>. <http://www.rfc-editor.org/info/rfc6113>.
Acknowledgements
Douglas E. Engert, Sam Hartman, Henry B. Hotz, Nikos
Mavrogiannopoulos, Martin Rex, Nico Williams, and Tom Yu were key
contributors to the discovery of the freshness issue in PKINIT.
Sam Hartman, Greg Hudson, Jeffrey Hutzelman, Nathan Ide, Benjamin
Kaduk, Bryce Nordgren, Magnus Nystrom, Nico Williams, and Tom Yu
reviewed the document and provided suggestions for improvements.
Authors' Addresses Authors' Addresses
Michiko Short (editor) Michiko Short (editor)
Microsoft Corporation Microsoft Corporation
USA United States of America
Email: michikos@microsoft.com Email: michikos@microsoft.com
Seth Moore Seth Moore
Microsoft Corporation Microsoft Corporation
USA United States of America
Email: sethmo@microsoft.com Email: sethmo@microsoft.com
Paul Miller Paul Miller
Microsoft Corporation Microsoft Corporation
USA United States of America
Email: paumil@microsoft.com Email: paumil@microsoft.com
 End of changes. 44 change blocks. 
97 lines changed or deleted 96 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/