idnits 2.17.1 draft-jhoyla-tls-extended-key-schedule-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 9, 2020) is 1296 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-09) exists of draft-ietf-tls-hybrid-design-00 Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 jhoyla J. Hoyland 3 Internet-Draft Cloudflare Ltd. 4 Intended status: Standards Track C.A. Wood 5 Expires: March 13, 2021 Cloudflare 6 September 9, 2020 8 TLS 1.3 Extended Key Schedule 9 draft-jhoyla-tls-extended-key-schedule-02 11 Abstract 13 TLS 1.3 is sometimes used in situations where it is necessary to 14 inject extra key material into the handshake. This draft aims to 15 describe methods for doing so securely. This key material must be 16 injected in such a way that both parties agree on what is being 17 injected and why, and further, in what order. 19 Note to Readers 21 Discussion of this document takes place on the TLS Working Group 22 mailing list (tls@ietf.org), which is archived at 23 https://mailarchive.ietf.org/arch/browse/tls/ 24 (https://mailarchive.ietf.org/arch/browse/tls/). 26 Source for this draft and an issue tracker can be found at 27 https://github.com/jhoyla/draft-jhoyla-tls-key-injection 28 (https://github.com/jhoyla/draft-jhoyla-tls-key-injection). 30 Status of This Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at https://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on March 13, 2021. 47 Copyright Notice 49 Copyright (c) 2020 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 54 license-info) in effect on the date of publication of this document. 55 Please review these documents carefully, as they describe your rights 56 and restrictions with respect to this document. Code Components 57 extracted from this document must include Simplified BSD License text 58 as described in Section 4.e of the Trust Legal Provisions and are 59 provided without warranty as described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 64 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 3 65 3. Key Schedule Extension . . . . . . . . . . . . . . . . . . . 3 66 3.1. Handshake Secret Injection . . . . . . . . . . . . . . . 3 67 3.2. Main Secret Injection . . . . . . . . . . . . . . . . . . 3 68 4. Key Schedule Injection Negotiation . . . . . . . . . . . . . 4 69 5. Key Schedule Extension Structure . . . . . . . . . . . . . . 4 70 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5 71 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 72 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 73 8.1. Normative References . . . . . . . . . . . . . . . . . . 5 74 8.2. Informative References . . . . . . . . . . . . . . . . . 6 75 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 6 76 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6 78 1. Introduction 80 Introducing additional key material into the TLS handshake is a non- 81 trivial process because both parties need to agree on the injection 82 content and context. If the two parties do not agree then an 83 attacker may exploit the mismatch in so-called channel 84 synchronization attacks, such as those described by [SLOTH]. 86 Injecting key material into the TLS handshake allows other protocols 87 to be bound to the handshake. For example, it may provide additional 88 protections to the ClientHello message, which in the standard TLS 89 handshake only receives protections after the server's Finished 90 message has been received. It may also permit the use of combined 91 shared secrets, possibly from multiple key exchange algorithms, to be 92 included in the key schedule. This pattern is common for Post 93 Quantum key exchange algorithms, as discussed in 94 [I-D.ietf-tls-hybrid-design]. 96 The goal of this document is to provide a standardised way for 97 binding extra context into TLS 1.3 handshakes in a way that is easy 98 to analyse from a security perspective, reducing the need for 99 security analysis of extensions that affect the key schedule. It 100 separates the concerns of whether an extension achieves its goals 101 from the concerns of whether an extension reduces the security of a 102 TLS handshake, either directly or through some unforseen interaction 103 with another extension. 105 2. Conventions and Definitions 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 109 "OPTIONAL" in this document are to be interpreted as described in BCP 110 14 [RFC2119] [RFC8174] when, and only when, they appear in all 111 capitals, as shown here. 113 3. Key Schedule Extension 115 This section describes two places in which additional secrets can be 116 injected into the TLS 1.3 key schedule. 118 3.1. Handshake Secret Injection 120 To inject extra key material into the Handshake Secret it is 121 recommended to prefix it, inside an appropriate frame, to the 122 "(EC)DHE" input, where "||" represents concatenation. 124 | 125 v 126 Derive-Secret(., "derived", "") 127 | 128 v 129 KeyScheduleInput || (EC)DHE -> HKDF-Extract = Handshake Secret 130 | 131 v 133 3.2. Main Secret Injection 135 To inject key material into the Main Secret it is recommended to 136 prefix it, inside an appropriate frame, to the "0" input. 138 | 139 v 140 Derive-Secret(., "derived", "") 141 | 142 v 143 KeyScheduleInput || 0 -> HKDF-Extract = Main Secret 144 | 145 v 147 This structure mirrors the Handshake Injection point. 149 4. Key Schedule Injection Negotiation 151 Applications which make use of additional key schedule inputs MUST 152 define a mechanism for negotiating the content and type of that 153 input. This input MUST be framed in a KeyScheduleSecret struct, as 154 defined in Section 5. Applications must take care that any 155 negotiation that takes place unambiguously agrees a secret. It must 156 be impossible, even under adversarial conditions, that a client and 157 server agree on the transcript of the negotiation, but disagree on 158 the secret that was negotiated. 160 5. Key Schedule Extension Structure 162 In some cases, protocols may require more than one secret to be 163 injected at a particular stage in the key schedule. Thus, we require 164 a generic and extensible way of doing so. To accomplish this, we use 165 a structure - KeyScheduleInput - that encodes well-ordered sequences 166 of secret material to inject into the key schedule. KeyScheduleInput 167 is defined as follows: 169 struct { 170 KeyScheduleSecretType type; 171 opaque secret_data<0..2^16-1>; 172 } KeyScheduleSecret; 174 enum { 175 (65535) 176 } KeyScheduleSecretType; 178 struct { 179 KeyScheduleSecret secrets<0..2^16-1>; 180 } KeyScheduleInput; 182 Each secret included in a KeyScheduleInput structure has a type and 183 corresponding secret data. Each secret MUST have a unique 184 KeyScheduleSecretType. When encoding KeyScheduleInput as the key 185 schedule Input value, the KeyScheduleSecret values MUST be in 186 ascending sorted order. This ensures that endpoints always encode 187 the same KeyScheduleInput value when using the same secret keying 188 material. 190 6. Security Considerations 192 [BINDEL] provides a proof that the concatenation approach in 193 Section 3 is secure as long as either the concatenated secret is 194 secure or the existing KDF input is secure. 196 [[OPEN ISSUE: Is this guarantee sufficient? Do we also need to 197 guarantee that a malicious prefix can't weaken the resulting PRF 198 output?]] 200 7. IANA Considerations 202 This document requests the creation of a new IANA registry: TLS 203 KeyScheduleInput Types. This registry should be under the existing 204 Transport Layer Security (TLS) Parameters heading. It should be 205 administered under a Specification Required policy [RFC8126]. 207 [[OPEN ISSUE: specify initial registry values]] 209 +=======+=============+=========+===========+ 210 | Value | Description | DTLS-OK | Reference | 211 +=======+=============+=========+===========+ 212 | TBD | TBD | TBD | TBD | 213 +-------+-------------+---------+-----------+ 215 Table 1 217 8. References 219 8.1. Normative References 221 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 222 Requirement Levels", BCP 14, RFC 2119, 223 DOI 10.17487/RFC2119, March 1997, 224 . 226 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 227 Writing an IANA Considerations Section in RFCs", BCP 26, 228 RFC 8126, DOI 10.17487/RFC8126, June 2017, 229 . 231 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 232 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 233 May 2017, . 235 8.2. Informative References 237 [BINDEL] Bindel, N., Brendel, J., Fischlin, M., Goncalves, B., and 238 D. Stebila, "Hybrid Key Encapsulation Mechanisms and 239 Authenticated Key Exchange", 240 DOI 10.1007/978-3-030-25510-7_12, Post-Quantum 241 Cryptography pp. 206-226, 2019, 242 . 244 [I-D.ietf-tls-hybrid-design] 245 Steblia, D., Fluhrer, S., and S. Gueron, "Hybrid key 246 exchange in TLS 1.3", Work in Progress, Internet-Draft, 247 draft-ietf-tls-hybrid-design-00, April 15, 2020, 248 . 251 [SLOTH] Bhargavan, K. and G. Leurent, "Transcript Collision 252 Attacks: Breaking Authentication in TLS, IKE, and SSH", 253 DOI 10.14722/ndss.2016.23418, Proceedings 2016 Network and 254 Distributed System Security Symposium, 2016, 255 . 257 Acknowledgments 259 We thank Karthik Bhargavan for his comments. 261 Authors' Addresses 263 Jonathan Hoyland 264 Cloudflare Ltd. 266 Email: jonathan.hoyland@gmail.com 268 Christopher A. Wood 269 Cloudflare 271 Email: caw@heapingbits.net