| rfc9258.original | rfc9258.txt | |||
|---|---|---|---|---|
| tls D. Benjamin | Internet Engineering Task Force (IETF) D. Benjamin | |||
| Internet-Draft Google, LLC. | Request for Comments: 9258 Google, LLC. | |||
| Intended status: Standards Track C.A. Wood | Category: Standards Track C. A. Wood | |||
| Expires: 24 October 2022 Cloudflare | ISSN: 2070-1721 Cloudflare | |||
| 22 April 2022 | July 2022 | |||
| Importing External PSKs for TLS | Importing External Pre-Shared Keys (PSKs) for TLS 1.3 | |||
| draft-ietf-tls-external-psk-importer-08 | ||||
| Abstract | Abstract | |||
| This document describes an interface for importing external Pre- | This document describes an interface for importing external Pre- | |||
| Shared Keys (PSKs) into TLS 1.3. | Shared Keys (PSKs) into TLS 1.3. | |||
| Discussion Venues | ||||
| This note is to be removed before publishing as an RFC. | ||||
| Source for this draft and an issue tracker can be found at | ||||
| https://github.com/tlswg/draft-ietf-tls-external-psk-importer. | ||||
| 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 https://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 24 October 2022. | Information about the current status of this document, any errata, | |||
| and how to provide feedback on it may be obtained at | ||||
| https://www.rfc-editor.org/info/rfc9258. | ||||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2022 IETF Trust and the persons identified as the | Copyright (c) 2022 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 (https://trustee.ietf.org/ | Provisions Relating to IETF Documents | |||
| license-info) in effect on the date of publication of this document. | (https://trustee.ietf.org/license-info) in effect on the date of | |||
| Please review these documents carefully, as they describe your rights | publication of this document. Please review these documents | |||
| and restrictions with respect to this document. Code Components | carefully, as they describe your rights and restrictions with respect | |||
| extracted from this document must include Revised BSD License text as | to this document. Code Components extracted from this document must | |||
| described in Section 4.e of the Trust Legal Provisions and are | include Revised BSD License text as described in Section 4.e of the | |||
| provided without warranty as described in the Revised BSD License. | Trust Legal Provisions and are provided without warranty as described | |||
| in the Revised BSD License. | ||||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction | |||
| 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 3 | 2. Conventions and Definitions | |||
| 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 | 3. Terminology | |||
| 4. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 4. Overview | |||
| 5. PSK Import . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 5. PSK Importer | |||
| 5.1. External PSK Diversification . . . . . . . . . . . . . . 4 | 5.1. External PSK Diversification | |||
| 5.2. Binder Key Derivation . . . . . . . . . . . . . . . . . . 6 | 5.2. Binder Key Derivation | |||
| 6. Deprecating Hash Functions . . . . . . . . . . . . . . . . . 7 | 6. Deprecating Hash Functions | |||
| 7. Incremental Deployment . . . . . . . . . . . . . . . . . . . 7 | 7. Incremental Deployment | |||
| 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 | 8. Security Considerations | |||
| 9. Privacy Considerations . . . . . . . . . . . . . . . . . . . 9 | 9. Privacy Considerations | |||
| 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 | 10. IANA Considerations | |||
| 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 11. References | |||
| 11.1. Normative References . . . . . . . . . . . . . . . . . . 10 | 11.1. Normative References | |||
| 11.2. Informative References . . . . . . . . . . . . . . . . . 10 | 11.2. Informative References | |||
| Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 12 | Appendix A. Addressing Selfie | |||
| Appendix B. Addressing Selfie . . . . . . . . . . . . . . . . . 12 | Acknowledgements | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 | Authors' Addresses | |||
| 1. Introduction | 1. Introduction | |||
| TLS 1.3 [RFC8446] supports Pre-Shared Key (PSK) authentication, | TLS 1.3 [RFC8446] supports Pre-Shared Key (PSK) authentication, | |||
| wherein PSKs can be established via session tickets from prior | wherein PSKs can be established via session tickets from prior | |||
| connections or externally via some out-of-band mechanism. The | connections or via some external, out-of-band mechanism. The | |||
| protocol mandates that each PSK only be used with a single hash | protocol mandates that each PSK only be used with a single hash | |||
| function. This was done to simplify protocol analysis. TLS 1.2 | function. This was done to simplify protocol analysis. TLS 1.2 | |||
| [RFC5246], in contrast, has no such requirement, as a PSK may be used | [RFC5246], in contrast, has no such requirement, as a PSK may be used | |||
| with any hash algorithm and the TLS 1.2 pseudorandom function (PRF). | with any hash algorithm and the TLS 1.2 pseudorandom function (PRF). | |||
| While there is no known way in which the same external PSK might | While there is no known way in which the same external PSK might | |||
| produce related output in TLS 1.3 and prior versions, only limited | produce related output in TLS 1.3 and prior versions, only limited | |||
| analysis has been done. Applications SHOULD provision separate PSKs | analysis has been done. Applications SHOULD provision separate PSKs | |||
| for (D)TLS 1.3 and prior versions. In cases where this is not | for (D)TLS 1.3 and prior versions. In cases where this is not | |||
| possible, e.g., there are already deployed external PSKs or | possible (e.g., there are already-deployed external PSKs or | |||
| provisioning is otherwise limited, re-using external PSKs across | provisioning is otherwise limited), reusing external PSKs across | |||
| different versions of TLS may produce related outputs, which may in | different versions of TLS may produce related outputs, which may, in | |||
| turn lead to security problems; see [RFC8446], Section E.7. | turn, lead to security problems; see Appendix E.7 of [RFC8446]. | |||
| To mitigate against such problems, this document specifies a PSK | To mitigate such problems, this document specifies a PSK importer | |||
| Importer interface by which external PSKs may be imported and | interface by which external PSKs may be imported and subsequently | |||
| subsequently bound to a specific key derivation function (KDF) and | bound to a specific key derivation function (KDF) and hash function | |||
| hash function for use in TLS 1.3 [RFC8446] and DTLS 1.3 [DTLS13]. In | for use in TLS 1.3 [RFC8446] and DTLS 1.3 [RFC9147]. In particular, | |||
| particular, it describes a mechanism for importing PSKs derived from | it describes a mechanism for importing PSKs derived from external | |||
| external PSKs by including the target KDF, (D)TLS protocol version, | PSKs by including the target KDF, (D)TLS protocol version, and an | |||
| and an optional context string to ensure uniqueness. This process | optional context string to ensure uniqueness. This process yields a | |||
| yields a set of candidate PSKs, each of which are bound to a target | set of candidate PSKs, each of which are bound to a target KDF and | |||
| KDF and protocol, that are separate from those used in (D)TLS 1.2 and | protocol, that are separate from those used in (D)TLS 1.2 and prior | |||
| prior versions. This expands what would normally have been a single | versions. This expands what would normally have been a single PSK | |||
| PSK and identity into a set of PSKs and identities. | and identity into a set of PSKs and identities. | |||
| 2. Conventions and Definitions | 2. Conventions and Definitions | |||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
| "OPTIONAL" in this document are to be interpreted as described in BCP | "OPTIONAL" in this document are to be interpreted as described in | |||
| 14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
| capitals, as shown here. | capitals, as shown here. | |||
| 3. Terminology | 3. Terminology | |||
| The following terms are used throughout this document: | The following terms are used throughout this document: | |||
| * External PSK (EPSK): A PSK established or provisioned out-of-band | External PSK (EPSK): A PSK established or provisioned out of band | |||
| (i.e., not from a TLS connection) which is a tuple of (Base Key, | (i.e., not from a TLS connection) that is a tuple of (Base Key, | |||
| External Identity, Hash). | External Identity, Hash). | |||
| * Base Key: The secret value of an EPSK. | Base Key: The secret value of an EPSK. | |||
| * External Identity: A sequence of bytes used to identify an EPSK. | External Identity: A sequence of bytes used to identify an EPSK. | |||
| * Target protocol: The protocol for which a PSK is imported for use. | Target protocol: The protocol for which a PSK is imported for use. | |||
| * Target KDF: The KDF for which a PSK is imported for use. | Target KDF: The KDF for which a PSK is imported for use. | |||
| * Imported PSK (IPSK): A TLS PSK derived from an EPSK, optional | Imported PSK (IPSK): A TLS PSK derived from an EPSK, optional | |||
| context string, target protocol, and target KDF. | context string, target protocol, and target KDF. | |||
| * Non-imported PSK: An EPSK which used directly as a TLS PSK without | Non-imported PSK: An EPSK that is used directly as a TLS PSK without | |||
| being imported. | being imported. | |||
| * Imported Identity: A sequence of bytes used to identify an IPSK. | Imported Identity: A sequence of bytes used to identify an IPSK. | |||
| This document uses presentation language from [RFC8446], Section 3. | This document uses presentation language from Section 3 of [RFC8446]. | |||
| 4. Overview | 4. Overview | |||
| The PSK Importer interface mirrors that of the TLS Exporters | The PSK importer interface mirrors that of the TLS exporter interface | |||
| interface (see [RFC8446]) in that it diversifies a key based on some | (see [RFC8446]) in that it diversifies a key based on some contextual | |||
| contextual information. In contrast to the Exporters interface, | information. In contrast to the exporter interface, wherein output | |||
| wherein output uniqueness is achieved via an explicit label and | uniqueness is achieved via an explicit label and context string, the | |||
| context string, the PSK Importer interface defined herein takes an | PSK importer interface defined herein takes an external PSK and | |||
| external PSK and identity and "imports" it into TLS, creating a set | identity and "imports" it into TLS, creating a set of "derived" PSKs | |||
| of "derived" PSKs and identities that are each unique. Each of these | and identities that are each unique. Each of these derived PSKs are | |||
| derived PSKs are bound to a target protocol, KDF identifier, and | bound to a target protocol, KDF identifier, and optional context | |||
| optional context string. Additionally, the resulting PSK binder keys | string. Additionally, the resulting PSK binder keys are modified | |||
| are modified with a new derivation label to prevent confusion with | with a new derivation label to prevent confusion with non-imported | |||
| non-imported PSKs. Through this interface, importing external PSKs | PSKs. Through this interface, importing external PSKs with different | |||
| with different identities yields distinct PSK binder keys. | identities yields distinct PSK binder keys. | |||
| Imported keys do not require negotiation for use since a client and | Imported keys do not require negotiation for use since a client and | |||
| server will not agree upon identities if imported incorrectly. | server will not agree upon identities if imported incorrectly. | |||
| Endpoints may incrementally deploy PSK Importer support by offering | Endpoints may incrementally deploy PSK importer support by offering | |||
| non-imported PSKs for TLS versions prior to TLS 1.3. Non-imported | non-imported PSKs for TLS versions prior to TLS 1.3. Non-imported | |||
| and imported PSKs are distinct since their identities are different. | and imported PSKs are not equivalent since their identities are | |||
| See Section 7 for more details. | different. See Section 7 for more details. | |||
| Endpoints which import external keys MUST NOT use the keys that are | Endpoints that import external keys MUST NOT use the keys that are | |||
| input to the import process for any purpose other than the importer, | input to the import process for any purpose other than the importer, | |||
| and MUST NOT use the derived keys for any purpose other than TLS | and they MUST NOT use the derived keys for any purpose other than TLS | |||
| PSKs. Moreover, each external PSK fed to the importer process MUST | PSKs. Moreover, each external PSK fed to the importer process MUST | |||
| be associated with at most one hash function. This is analogous to | be associated with one hash function at most. This is analogous to | |||
| the rules in Section 4.2.11 of [RFC8446]. See Section 8 for more | the rules in Section 4.2.11 of [RFC8446]. See Section 8 for more | |||
| discussion. | discussion. | |||
| 5. PSK Import | 5. PSK Importer | |||
| This section describes the PSK Importer interface and its underlying | This section describes the PSK importer interface and its underlying | |||
| diversification mechanism and binder key computation modification. | diversification mechanism and binder key computation modification. | |||
| 5.1. External PSK Diversification | 5.1. External PSK Diversification | |||
| The PSK Importer interface takes as input an EPSK with External | As input, the PSK importer interface takes an EPSK with External | |||
| Identity external_identity and base key epsk, as defined in | Identity external_identity and base key epsk (as defined in | |||
| Section 3, along with an optional context, and transforms it into a | Section 3) along with an optional context. It then transforms the | |||
| set of PSKs and imported identities for use in a connection based on | input into a set of PSKs and imported identities for use in a | |||
| target protocols and KDFs. In particular, for each supported target | connection based on target protocols and KDFs. In particular, for | |||
| protocol target_protocol and KDF target_kdf, the importer constructs | each supported target protocol target_protocol and KDF target_kdf, | |||
| an ImportedIdentity structure as follows: | the importer constructs an ImportedIdentity structure as follows: | |||
| struct { | struct { | |||
| opaque external_identity<1...2^16-1>; | opaque external_identity<1...2^16-1>; | |||
| opaque context<0..2^16-1>; | opaque context<0..2^16-1>; | |||
| uint16 target_protocol; | uint16 target_protocol; | |||
| uint16 target_kdf; | uint16 target_kdf; | |||
| } ImportedIdentity; | } ImportedIdentity; | |||
| The list of ImportedIdentity.target_kdf values is maintained by IANA | The list of ImportedIdentity.target_kdf values is maintained by IANA | |||
| as described in Section 10. External PSKs MUST NOT be imported for | as described in Section 10. External PSKs MUST NOT be imported for | |||
| (D)TLS 1.2 or prior versions. See Section 7 for discussion on how | (D)TLS 1.2 or prior versions. See Section 7 for discussion on how | |||
| imported PSKs for TLS 1.3 and non-imported PSKs for earlier versions | imported PSKs for TLS 1.3 and non-imported PSKs for earlier versions | |||
| co-exist for incremental deployment. | coexist for incremental deployment. | |||
| ImportedIdentity.context MUST include the context used to determine | ImportedIdentity.context MUST include the context used to determine | |||
| the EPSK, if any exists. For example, ImportedIdentity.context may | the EPSK, if any exists. For example, ImportedIdentity.context may | |||
| include information about peer roles or identities to mitigate | include information about peer roles or identities to mitigate | |||
| Selfie-style reflection attacks [Selfie]. See Appendix B for more | Selfie-style reflection attacks [Selfie]. See Appendix A for more | |||
| details. Since the EPSK is a key derived from an external protocol | details. Since the EPSK is a key derived from an external protocol | |||
| or sequence of protocols, ImportedIdentity.context MUST include a | or sequence of protocols, ImportedIdentity.context MUST include a | |||
| channel binding for the deriving protocols [RFC5056]. The details of | channel binding for the deriving protocols [RFC5056]. The details of | |||
| this binding are protocol specific and out of scope for this | this binding are protocol specific and out of scope for this | |||
| document. | document. | |||
| ImportedIdentity.target_protocol MUST be the (D)TLS protocol version | ImportedIdentity.target_protocol MUST be the (D)TLS protocol version | |||
| for which the PSK is being imported. For example, TLS 1.3 [RFC8446] | for which the PSK is being imported. For example, TLS 1.3 [RFC8446] | |||
| uses 0x0304, which will therefore also be used by QUICv1 [QUIC]. | uses 0x0304, which will therefore also be used by QUICv1 [QUIC]. | |||
| Note that this means the number of PSKs derived from an EPSK is a | Note that this means the number of PSKs derived from an EPSK is a | |||
| function of the number of target protocols. | function of the number of target protocols. | |||
| Given an ImportedIdentity and corresponding EPSK with base key epsk, | Given an ImportedIdentity and corresponding EPSK with base key epsk, | |||
| an Imported PSK IPSK with base key ipskx is computed as follows: | an imported PSK IPSK with base key ipskx is computed as follows: | |||
| epskx = HKDF-Extract(0, epsk) | epskx = HKDF-Extract(0, epsk) | |||
| ipskx = HKDF-Expand-Label(epskx, "derived psk", | ipskx = HKDF-Expand-Label(epskx, "derived psk", | |||
| Hash(ImportedIdentity), L) | Hash(ImportedIdentity), L) | |||
| L corresponds to the KDF output length of ImportedIdentity.target_kdf | L corresponds to the KDF output length of ImportedIdentity.target_kdf | |||
| as defined in Section 10. For hash-based KDFs, such as | as defined in Section 10. For hash-based KDFs, such as HKDF_SHA256 | |||
| HKDF_SHA256(0x0001), this is the length of the hash function output, | (0x0001), this is the length of the hash function output, e.g., 32 | |||
| e.g., 32 octets for SHA256. This is required for the IPSK to be of | octets for SHA256. This is required for the IPSK to be of length | |||
| length suitable for supported ciphersuites. Internally, HKDF-Expand- | suitable for supported ciphersuites. Internally, HKDF-Expand-Label | |||
| Label uses a label corresponding to ImportedIdentity.target_protocol, | uses a label corresponding to ImportedIdentity.target_protocol (e.g., | |||
| e.g., "tls13" for TLS 1.3, as per [RFC8446], Section 7.1, or "dtls13" | "tls13" for TLS 1.3, as per Section 7.1 of [RFC8446] or "dtls13" for | |||
| for DTLS 1.3, as per [I-D.ietf-tls-dtls13], Section 5.10. | DTLS 1.3, as per Section 5.10 of [RFC9147]). | |||
| The identity of ipskx as sent on the wire is ImportedIdentity, i.e., | The identity of ipskx as sent on the wire is ImportedIdentity, i.e., | |||
| the serialized content of ImportedIdentity is used as the content of | the serialized content of ImportedIdentity is used as the content of | |||
| PskIdentity.identity in the PSK extension. The corresponding PSK | PskIdentity.identity in the PSK extension. The corresponding PSK | |||
| input for the TLS 1.3 key schedule is 'ipskx'. | input for the TLS 1.3 key schedule is "ipskx". | |||
| As the maximum size of the PSK extension is 2^16 - 1 octets, an | As the maximum size of the PSK extension is 2^16 - 1 octets, an | |||
| Imported Identity that exceeds this size is likely to cause a | Imported Identity that exceeds this size is likely to cause a | |||
| decoding error. Therefore, the PSK Importer interface SHOULD reject | decoding error. Therefore, the PSK importer interface SHOULD reject | |||
| any ImportedIdentity that exceeds this size. | any ImportedIdentity that exceeds this size. | |||
| The hash function used for HKDF [RFC5869] is that which is associated | The hash function used for HMAC-based Key Derivation Function (HKDF) | |||
| with the EPSK. It is not the hash function associated with | [RFC5869] is that which is associated with the EPSK. It is not the | |||
| ImportedIdentity.target_kdf. If the EPSK does not have such an | hash function associated with ImportedIdentity.target_kdf. If the | |||
| associated hash function, SHA-256 [SHA2] SHOULD be used. | EPSK does not have such an associated hash function, SHA-256 [SHA2] | |||
| Diversifying EPSK by ImportedIdentity.target_kdf ensures that an IPSK | SHOULD be used. Diversifying EPSK by ImportedIdentity.target_kdf | |||
| is only used as input keying material to at most one KDF, thus | ensures that an IPSK is only used as input keying material to one KDF | |||
| satisfying the requirements in [RFC8446]. See Section 8 for more | at most, thus satisfying the requirements in [RFC8446]. See | |||
| details. | Section 8 for more details. | |||
| Endpoints SHOULD generate a compatible ipskx for each target | Endpoints SHOULD generate a compatible ipskx for each target | |||
| ciphersuite they offer. For example, importing a key for | ciphersuite they offer. For example, importing a key for | |||
| TLS_AES_128_GCM_SHA256 and TLS_AES_256_GCM_SHA384 would yield two | TLS_AES_128_GCM_SHA256 and TLS_AES_256_GCM_SHA384 would yield two | |||
| PSKs, one for HKDF-SHA256 and another for HKDF-SHA384. In contrast, | PSKs: one for HKDF-SHA256 and another for HKDF-SHA384. In contrast, | |||
| if TLS_AES_128_GCM_SHA256 and TLS_CHACHA20_POLY1305_SHA256 are | if TLS_AES_128_GCM_SHA256 and TLS_CHACHA20_POLY1305_SHA256 are | |||
| supported, only one derived key is necessary. Each ciphersuite | supported, only one derived key is necessary. Each ciphersuite | |||
| uniquely identifies the target KDF. Future specifications that | uniquely identifies the target KDF. Future specifications that | |||
| change the way the KDF is negotiated will need to update this | change the way the KDF is negotiated will need to update this | |||
| specification to make clear how target KDFs are determined for the | specification to make clear how target KDFs are determined for the | |||
| import process. | import process. | |||
| EPSKs MAY be imported before the start of a connection if the target | EPSKs MAY be imported before the start of a connection if the target | |||
| KDFs, protocols, and context string(s) are known a priori. EPSKs MAY | KDFs, protocols, and context string(s) are known a priori. EPSKs MAY | |||
| also be imported for early data use if they are bound to the protocol | also be imported for early data use if they are bound to the protocol | |||
| settings and configuration that are required for sending early data. | settings and configuration that are required for sending early data. | |||
| Minimally, this means that the Application-Layer Protocol Negotiation | Minimally, this means that the Application-Layer Protocol Negotiation | |||
| value [RFC7301], QUIC transport parameters (if used for QUIC), and | (ALPN) value [RFC7301], QUIC transport parameters (if used for QUIC), | |||
| any other relevant parameters that are negotiated for early data MUST | and any other relevant parameters that are negotiated for early data | |||
| be provisioned alongside these EPSKs. | MUST be provisioned alongside these EPSKs. | |||
| 5.2. Binder Key Derivation | 5.2. Binder Key Derivation | |||
| To prevent confusion between imported and non-imported PSKs, imported | To prevent confusion between imported and non-imported PSKs, imported | |||
| PSKs change the PSK binder key derivation label. In particular, the | PSKs change the PSK binder key derivation label. In particular, the | |||
| standard TLS 1.3 PSK binder key computation is defined as follows: | standard TLS 1.3 PSK binder key computation is defined as follows: | |||
| 0 | 0 | |||
| | | | | |||
| v | v | |||
| skipping to change at page 7, line 37 ¶ | skipping to change at line 296 ¶ | |||
| V | V | |||
| This new label ensures a client and server will negotiate use of an | This new label ensures a client and server will negotiate use of an | |||
| external PSK if and only if (a) both endpoints import the PSK or (b) | external PSK if and only if (a) both endpoints import the PSK or (b) | |||
| neither endpoint imports the PSK. As binder_key is a leaf key, | neither endpoint imports the PSK. As binder_key is a leaf key, | |||
| changing its computation does not affect any other key. | changing its computation does not affect any other key. | |||
| 6. Deprecating Hash Functions | 6. Deprecating Hash Functions | |||
| If a client or server wishes to deprecate a hash function and no | If a client or server wishes to deprecate a hash function and no | |||
| longer use it for TLS 1.3, they remove the corresponding KDF from the | longer use it for TLS 1.3, it removes the corresponding KDF from the | |||
| set of target KDFs used for importing keys. This does not affect the | set of target KDFs used for importing keys. This does not affect the | |||
| KDF operation used to derive Imported PSKs. | KDF operation used to derive imported PSKs. | |||
| 7. Incremental Deployment | 7. Incremental Deployment | |||
| In deployments that already have PSKs provisioned and in use with TLS | In deployments that already have PSKs provisioned and in use with TLS | |||
| 1.2, attempting to incrementally deploy the importer mechanism would | 1.2, attempting to incrementally deploy the importer mechanism would | |||
| then result in concurrent use of the already provisioned PSK both | result in concurrent use of the already-provisioned PSK directly as | |||
| directly as a TLS 1.2 PSK and as an EPSK, which in turn could mean | both a TLS 1.2 PSK and an EPSK, which, in turn, could mean that the | |||
| that the same KDF and key would be used in two different protocol | same KDF and key would be used in two different protocol contexts. | |||
| contexts. This is not a recommended configuration; see Section 8 for | This is not a recommended configuration; see Section 8 for more | |||
| more details. However, the benefits of using TLS 1.3 and of using | details. However, the benefits of using TLS 1.3 and PSK importers | |||
| PSK importers may prove sufficiently compelling that existing | may prove sufficiently compelling that existing deployments choose to | |||
| deployments choose to enable this noncompliant configuration for a | enable this noncompliant configuration for a brief transition period | |||
| brief transition period while new software (using TLS 1.3 and | while new software (using TLS 1.3 and importers) is deployed. | |||
| importers) is deployed. Operators are advised to make any such | Operators are advised to make any such transition period as short as | |||
| transition period as short as possible. | possible. | |||
| 8. Security Considerations | 8. Security Considerations | |||
| The PSK Importer security goals can be roughly stated as follows: | The PSK importer security goals can be roughly stated as follows: | |||
| avoid PSK re-use across KDFs while properly authenticating endpoints. | avoid PSK reuse across KDFs while properly authenticating endpoints. | |||
| When modeled as computational extractors, KDFs assume that input | When modeled as computational extractors, KDFs assume that input | |||
| keying material (IKM) is sampled from some "source" probability | keying material (IKM) is sampled from some "source" probability | |||
| distribution and that any two IKM values are chosen independently of | distribution and that any two IKM values are chosen independently of | |||
| each other [Kraw10]. This source-independence requirement implies | each other [Kraw10]. This source-independence requirement implies | |||
| that the same IKM value cannot be used for two different KDFs. | that the same IKM value cannot be used for two different KDFs. | |||
| PSK-based authentication is functionally equivalent to session | PSK-based authentication is functionally equivalent to session | |||
| resumption in that a connection uses existing key material to | resumption in that a connection uses existing key material to | |||
| authenticate both endpoints. Following the work of [BAA15], this is | authenticate both endpoints. Following the work of [BAA15], this is | |||
| a form of compound authentication. Loosely speaking, compound | a form of compound authentication. Loosely speaking, compound | |||
| authentication is the property that an execution of multiple | authentication is the property that an execution of multiple | |||
| authentication protocols, wherein at least one is uncompromised, | authentication protocols, wherein at least one is uncompromised, | |||
| jointly authenticates all protocols. Authenticating with an | jointly authenticates all protocols. Therefore, authenticating with | |||
| externally provisioned PSK, therefore, should ideally authenticate | an externally provisioned PSK should ideally authenticate both the | |||
| both the TLS connection and the external provisioning process. | TLS connection and the external provisioning process. Typically, the | |||
| Typically, the external provision process produces a PSK and | external provisioning process produces a PSK and corresponding | |||
| corresponding context from which the PSK was derived and in which it | context from which the PSK was derived and in which it should be | |||
| should be used. If available, this is used as the | used. If available, this is used as the ImportedIdentity.context | |||
| ImportedIdentity.context value. We refer to an external PSK without | value. We refer to an external PSK without such context as "context- | |||
| such context as "context-free". | free". | |||
| Thus, in considering the source-independence and compound | Thus, in considering the source-independence and compound | |||
| authentication requirements, the PSK Import interface described in | authentication requirements, the PSK importer interface described in | |||
| this document aims to achieve the following goals: | this document aims to achieve the following goals: | |||
| 1. Externally provisioned PSKs imported into a TLS connection | 1. Externally provisioned PSKs imported into a TLS connection | |||
| achieve compound authentication of the provisioning process and | achieve compound authentication of the provisioning process and | |||
| connection. | connection. | |||
| 2. Context-free PSKs only achieve authentication within the context | 2. Context-free PSKs only achieve authentication within the context | |||
| of a single connection. | of a single connection. | |||
| 3. Imported PSKs are not used as IKM for two different KDFs. | 3. Imported PSKs are not used as IKM for two different KDFs. | |||
| 4. Imported PSKs do not collide with future protocol versions and | 4. Imported PSKs do not collide with future protocol versions and | |||
| KDFs. | KDFs. | |||
| There are no known related outputs or security issues caused from the | There are no known related outputs or security issues caused from the | |||
| process for computing Imported PSKs from an external PSK and the | process for computing imported PSKs from an external PSK and the | |||
| processing of existing external PSKs used in (D)TLS 1.2 and below, as | processing of existing external PSKs used in (D)TLS 1.2 and below, as | |||
| noted in Section 7. However, only limited analysis has been done, | noted in Section 7. However, only limited analysis has been done, | |||
| which is an additional reason why applications SHOULD provision | which is an additional reason why applications SHOULD provision | |||
| separate PSKs for (D)TLS 1.3 and prior versions, even when the | separate PSKs for (D)TLS 1.3 and prior versions, even when the | |||
| importer interface is used in (D)TLS 1.3. | importer interface is used in (D)TLS 1.3. | |||
| The PSK Importer does not prevent applications from constructing non- | The PSK importer does not prevent applications from constructing non- | |||
| importer PSK identities that collide with imported PSK identities. | importer PSK identities that collide with imported PSK identities. | |||
| 9. Privacy Considerations | 9. Privacy Considerations | |||
| External PSK identities are commonly static by design so that | External PSK identities are commonly static by design so that | |||
| endpoints may use them to lookup keying material. As a result, for | endpoints may use them to look up keying material. As a result, for | |||
| some systems and use cases, this identity may become a persistent | some systems and use cases, this identity may become a persistent | |||
| tracking identifier. | tracking identifier. | |||
| Note also that ImportedIdentity.context is visible in cleartext on | Note also that ImportedIdentity.context is visible in cleartext on | |||
| the wire as part of the PSK identity. Unless otherwise protected by | the wire as part of the PSK identity. Unless otherwise protected by | |||
| a mechanism such as TLS Encrypted ClientHello [ECH], applications | a mechanism such as TLS Encrypted ClientHello [ECH], applications | |||
| SHOULD NOT put sensitive information in this field. | SHOULD NOT put sensitive information in this field. | |||
| 10. IANA Considerations | 10. IANA Considerations | |||
| This specification introduces a new registry for TLS KDF identifiers, | IANA has created the "TLS KDF Identifiers" registry under the | |||
| titled "TLS KDF Identifiers", under the existing "Transport Layer | existing "Transport Layer Security (TLS) Parameters" registry. | |||
| Security (TLS) Parameters" heading. | ||||
| The entries in the registry are: | The entries in the registry are as follows: | |||
| +=================+========+===========+ | +========+=================+===========+ | |||
| | KDF Description | Value | Reference | | | Value | KDF Description | Reference | | |||
| +=================+========+===========+ | +========+=================+===========+ | |||
| | Reserved | 0x0000 | N/A | | | 0x0000 | Reserved | RFC 9258 | | |||
| +-----------------+--------+-----------+ | +--------+-----------------+-----------+ | |||
| | HKDF_SHA256 | 0x0001 | [RFC5869] | | | 0x0001 | HKDF_SHA256 | [RFC5869] | | |||
| +-----------------+--------+-----------+ | +--------+-----------------+-----------+ | |||
| | HKDF_SHA384 | 0x0002 | [RFC5869] | | | 0x0002 | HKDF_SHA384 | [RFC5869] | | |||
| +-----------------+--------+-----------+ | +--------+-----------------+-----------+ | |||
| Table 1: Target KDF Registry | Table 1: TLS KDF Identifiers Registry | |||
| New target KDF values are allocated according to the following | New target KDF values are allocated according to the following | |||
| process: | process: | |||
| * Values in the range 0x0000-0xfeff are assigned via Specification | * Values in the range 0x0000-0xfeff are assigned via Specification | |||
| Required [RFC8126]. | Required [RFC8126]. | |||
| * Values in the range 0xff00-0xffff are reserved for Private Use | * Values in the range 0xff00-0xffff are reserved for Private Use | |||
| [RFC8126]. | [RFC8126]. | |||
| The procedures for requesting values in the Specification Required | The procedures for requesting values in the Specification Required | |||
| space are specified in Section 17 of [RFC8447]. | space are specified in Section 17 of [RFC8447]. | |||
| 11. References | 11. References | |||
| 11.1. Normative References | 11.1. Normative References | |||
| [DTLS13] Rescorla, E., Tschofenig, H., and N. Modadugu, "The | ||||
| Datagram Transport Layer Security (DTLS) Protocol Version | ||||
| 1.3", Work in Progress, Internet-Draft, draft-ietf-tls- | ||||
| dtls13-43, 30 April 2021, | ||||
| <https://www.ietf.org/archive/id/draft-ietf-tls- | ||||
| dtls13-43.txt>. | ||||
| [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, | |||
| <https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure | [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure | |||
| Channels", RFC 5056, DOI 10.17487/RFC5056, November 2007, | Channels", RFC 5056, DOI 10.17487/RFC5056, November 2007, | |||
| <https://www.rfc-editor.org/info/rfc5056>. | <https://www.rfc-editor.org/info/rfc5056>. | |||
| [RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand | [RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand | |||
| skipping to change at page 10, line 50 ¶ | skipping to change at line 445 ¶ | |||
| May 2017, <https://www.rfc-editor.org/info/rfc8174>. | May 2017, <https://www.rfc-editor.org/info/rfc8174>. | |||
| [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol | [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol | |||
| Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, | Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, | |||
| <https://www.rfc-editor.org/info/rfc8446>. | <https://www.rfc-editor.org/info/rfc8446>. | |||
| [RFC8447] Salowey, J. and S. Turner, "IANA Registry Updates for TLS | [RFC8447] Salowey, J. and S. Turner, "IANA Registry Updates for TLS | |||
| and DTLS", RFC 8447, DOI 10.17487/RFC8447, August 2018, | and DTLS", RFC 8447, DOI 10.17487/RFC8447, August 2018, | |||
| <https://www.rfc-editor.org/info/rfc8447>. | <https://www.rfc-editor.org/info/rfc8447>. | |||
| [RFC9147] Rescorla, E., Tschofenig, H., and N. Modadugu, "The | ||||
| Datagram Transport Layer Security (DTLS) Protocol Version | ||||
| 1.3", RFC 9147, DOI 10.17487/RFC9147, April 2022, | ||||
| <https://www.rfc-editor.org/info/rfc9147>. | ||||
| 11.2. Informative References | 11.2. Informative References | |||
| [BAA15] Bhargavan, K., Delignat-Lavaud, A., and A. Pironti, | [BAA15] Bhargavan, K., Delignat-Lavaud, A., and A. Pironti, | |||
| "Verified Contributive Channel Bindings for Compound | "Verified Contributive Channel Bindings for Compound | |||
| Authentication", DOI 10.14722/ndss.2015.23277, Proceedings | Authentication", Proceedings 2015 Network and Distributed | |||
| 2015 Network and Distributed System Security Symposium, | System Security, DOI 10.14722/ndss.2015.23277, February | |||
| 2015, <https://doi.org/10.14722/ndss.2015.23277>. | 2015, <https://doi.org/10.14722/ndss.2015.23277>. | |||
| [ECH] Rescorla, E., Oku, K., Sullivan, N., and C. A. Wood, "TLS | [ECH] Rescorla, E., Oku, K., Sullivan, N., and C. A. Wood, "TLS | |||
| Encrypted Client Hello", Work in Progress, Internet-Draft, | Encrypted Client Hello", Work in Progress, Internet-Draft, | |||
| draft-ietf-tls-esni-14, 13 February 2022, | draft-ietf-tls-esni-14, 13 February 2022, | |||
| <https://www.ietf.org/archive/id/draft-ietf-tls-esni- | <https://datatracker.ietf.org/doc/html/draft-ietf-tls- | |||
| 14.txt>. | esni-14>. | |||
| [I-D.ietf-tls-dtls13] | ||||
| Rescorla, E., Tschofenig, H., and N. Modadugu, "The | ||||
| Datagram Transport Layer Security (DTLS) Protocol Version | ||||
| 1.3", Work in Progress, Internet-Draft, draft-ietf-tls- | ||||
| dtls13-43, 30 April 2021, | ||||
| <https://www.ietf.org/archive/id/draft-ietf-tls- | ||||
| dtls13-43.txt>. | ||||
| [Kraw10] Krawczyk, H., "Cryptographic Extraction and Key | [Kraw10] Krawczyk, H., "Cryptographic Extraction and Key | |||
| Derivation: The HKDF Scheme", Proceedings of CRYPTO 2010 , | Derivation: The HKDF Scheme", Proceedings of Crypto 2010, | |||
| 2010, <https://eprint.iacr.org/2010/264>. | May 2010, <https://eprint.iacr.org/2010/264>. | |||
| [QUIC] Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based | [QUIC] Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based | |||
| Multiplexed and Secure Transport", RFC 9000, | Multiplexed and Secure Transport", RFC 9000, | |||
| DOI 10.17487/RFC9000, May 2021, | DOI 10.17487/RFC9000, May 2021, | |||
| <https://www.rfc-editor.org/info/rfc9000>. | <https://www.rfc-editor.org/info/rfc9000>. | |||
| [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security | [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security | |||
| (TLS) Protocol Version 1.2", RFC 5246, | (TLS) Protocol Version 1.2", RFC 5246, | |||
| DOI 10.17487/RFC5246, August 2008, | DOI 10.17487/RFC5246, August 2008, | |||
| <https://www.rfc-editor.org/info/rfc5246>. | <https://www.rfc-editor.org/info/rfc5246>. | |||
| [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, | [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, | |||
| "Transport Layer Security (TLS) Application-Layer Protocol | "Transport Layer Security (TLS) Application-Layer Protocol | |||
| Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, | Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, | |||
| July 2014, <https://www.rfc-editor.org/info/rfc7301>. | July 2014, <https://www.rfc-editor.org/info/rfc7301>. | |||
| [Selfie] Drucker, N. and S. Gueron, "Selfie: reflections on TLS 1.3 | [Selfie] Drucker, N. and S. Gueron, "Selfie: reflections on TLS 1.3 | |||
| with PSK", 2019, <https://eprint.iacr.org/2019/347.pdf>. | with PSK", DOI 10.1007/s00145-021-09387-y, May 2021, | |||
| <https://eprint.iacr.org/2019/347.pdf>. | ||||
| [SHA2] National Institute of Standards and Technology, "Secure | [SHA2] National Institute of Standards and Technology, "Secure | |||
| Hash Standard", FIPS PUB 180-3 , October 2008. | Hash Standard (SHS)", FIPS PUB 180-4, | |||
| DOI 10.6028/NIST.FIPS.180-4, August 2015, | ||||
| Appendix A. Acknowledgements | <https://doi.org/10.6028/NIST.FIPS.180-4>. | |||
| The authors thank Eric Rescorla and Martin Thomson for discussions | ||||
| that led to the production of this document, as well as Christian | ||||
| Huitema for input regarding privacy considerations of external PSKs. | ||||
| John Mattsson provided input regarding PSK importer deployment | ||||
| considerations. Hugo Krawczyk provided guidance for the security | ||||
| considerations. Martin Thomson, Jonathan Hoyland, Scott Hollenbeck, | ||||
| Benjamin Kaduk, and others all provided reviews, feedback, and | ||||
| suggestions for improving the document. | ||||
| Appendix B. Addressing Selfie | Appendix A. Addressing Selfie | |||
| The Selfie attack [Selfie] relies on a misuse of the PSK interface. | The Selfie attack [Selfie] relies on a misuse of the PSK interface. | |||
| The PSK interface makes the implicit assumption that each PSK is | The PSK interface makes the implicit assumption that each PSK is | |||
| known only to one client and one server. If multiple clients or | known only to one client and one server. If multiple clients or | |||
| multiple servers with distinct roles share a PSK, TLS only | multiple servers with distinct roles share a PSK, TLS only | |||
| authenticates the entire group. A node successfully authenticates | authenticates the entire group. A node successfully authenticates | |||
| its peer as being in the group whether the peer is another node or | its peer as being in the group whether the peer is another node or | |||
| itself. Note that this case can also occur when there are two nodes | itself. Note that this case can also occur when there are two nodes | |||
| sharing a PSK without predetermined roles. | sharing a PSK without predetermined roles. | |||
| Applications which require authenticating finer-grained roles while | Applications that require authenticating finer-grained roles while | |||
| still configuring a single shared PSK across all nodes can resolve | still configuring a single shared PSK across all nodes can resolve | |||
| this mismatch either by exchanging roles over the TLS connection | this mismatch either by exchanging roles over the TLS connection | |||
| after the handshake or by incorporating the roles of both the client | after the handshake or by incorporating the roles of both the client | |||
| and server into the IPSK context string. For instance, if an | and the server into the IPSK context string. For instance, if an | |||
| application identifies each node by MAC address, it could use the | application identifies each node by the Media Access Control (MAC) | |||
| following context string. | address, it could use the following context string. | |||
| struct { | struct { | |||
| opaque client_mac<0..2^8-1>; | opaque client_mac<0..2^8-1>; | |||
| opaque server_mac<0..2^8-1>; | opaque server_mac<0..2^8-1>; | |||
| } Context; | } Context; | |||
| If an attacker then redirects a ClientHello intended for one node to | If an attacker then redirects a ClientHello intended for one node to | |||
| a different node, including the node that generated the ClientHello, | a different node, including the node that generated the ClientHello, | |||
| the receiver will compute a different context string and the | the receiver will compute a different context string and the | |||
| handshake will not complete. | handshake will not complete. | |||
| Note that, in this scenario, there is still a single shared PSK | Note that, in this scenario, there is still a single shared PSK | |||
| across all nodes, so each node must be trusted not to impersonate | across all nodes, so each node must be trusted not to impersonate | |||
| another node's role. | another node's role. | |||
| Acknowledgements | ||||
| The authors thank Eric Rescorla and Martin Thomson for discussions | ||||
| that led to the production of this document, as well as Christian | ||||
| Huitema for input regarding privacy considerations of external PSKs. | ||||
| John Preuß Mattsson provided input regarding PSK importer deployment | ||||
| considerations. Hugo Krawczyk provided guidance for the security | ||||
| considerations. Martin Thomson, Jonathan Hoyland, Scott Hollenbeck, | ||||
| Benjamin Kaduk, and others all provided reviews, feedback, and | ||||
| suggestions for improving the document. | ||||
| Authors' Addresses | Authors' Addresses | |||
| David Benjamin | David Benjamin | |||
| Google, LLC. | Google, LLC. | |||
| Email: davidben@google.com | Email: davidben@google.com | |||
| Christopher A. Wood | Christopher A. Wood | |||
| Cloudflare | Cloudflare | |||
| Email: caw@heapingbits.net | Email: caw@heapingbits.net | |||
| End of changes. 64 change blocks. | ||||
| 210 lines changed or deleted | 191 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. | ||||