idnits 2.17.00 (12 Aug 2021) /tmp/idnits41639/draft-jhoyla-tls-extended-key-schedule-03.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 (4 December 2020) is 526 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 (-04) exists of draft-friel-tls-eap-dpp-01 == Outdated reference: A later version (-04) exists of draft-ietf-tls-hybrid-design-01 -- No information found for draft-ietf-tls-semistatic-dh - is the name correct? Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). 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: 7 June 2021 Cloudflare 6 4 December 2020 8 TLS 1.3 Extended Key Schedule 9 draft-jhoyla-tls-extended-key-schedule-03 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 7 June 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 Appendix A. Potential Use Cases . . . . . . . . . . . . . . . . 6 76 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 7 77 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 79 1. Introduction 81 Introducing additional key material into the TLS handshake is a non- 82 trivial process because both parties need to agree on the injection 83 content and context. If the two parties do not agree then an 84 attacker may exploit the mismatch in so-called channel 85 synchronization attacks, such as those described by [SLOTH]. 87 Injecting key material into the TLS handshake allows other protocols 88 to be bound to the handshake. For example, it may provide additional 89 protections to the ClientHello message, which in the standard TLS 90 handshake only receives protections after the server's Finished 91 message has been received. It may also permit the use of combined 92 shared secrets, possibly from multiple key exchange algorithms, to be 93 included in the key schedule. This pattern is common for Post 94 Quantum key exchange algorithms, as discussed in 96 [I-D.ietf-tls-hybrid-design]. In particular, 97 [I-D.ietf-tls-hybrid-design] uses the concatenation pattern described 98 in this draft, but does not add the requisite framing. 100 The goal of this document is to provide a standardised way for 101 binding extra context into TLS 1.3 handshakes in a way that is easy 102 to analyse from a security perspective, reducing the need for 103 security analysis of extensions that affect the key schedule. It 104 separates the concerns of whether an extension achieves its goals 105 from the concerns of whether an extension reduces the security of a 106 TLS handshake, either directly or through some unforseen interaction 107 with another extension. 109 2. Conventions and Definitions 111 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 112 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 113 "OPTIONAL" in this document are to be interpreted as described in BCP 114 14 [RFC2119] [RFC8174] when, and only when, they appear in all 115 capitals, as shown here. 117 3. Key Schedule Extension 119 This section describes two places in which additional secrets can be 120 injected into the TLS 1.3 key schedule. 122 3.1. Handshake Secret Injection 124 To inject extra key material into the Handshake Secret it is 125 recommended to prefix it, inside an appropriate frame, to the 126 "(EC)DHE" input, where "||" represents concatenation. 128 | 129 v 130 Derive-Secret(., "derived", "") 131 | 132 v 133 KeyScheduleInput || (EC)DHE -> HKDF-Extract = Handshake Secret 134 | 135 v 137 3.2. Main Secret Injection 139 To inject key material into the Main Secret it is recommended to 140 prefix it, inside an appropriate frame, to the "0" input. 142 | 143 v 144 Derive-Secret(., "derived", "") 145 | 146 v 147 KeyScheduleInput || 0 -> HKDF-Extract = Main Secret 148 | 149 v 151 This structure mirrors the Handshake Injection point. 153 4. Key Schedule Injection Negotiation 155 Applications which make use of additional key schedule inputs MUST 156 define a mechanism for negotiating the content and type of that 157 input. This input MUST be framed in a KeyScheduleSecret struct, as 158 defined in Section 5. Applications must take care that any 159 negotiation that takes place unambiguously agrees a secret. It must 160 be impossible, even under adversarial conditions, that a client and 161 server agree on the transcript of the negotiation, but disagree on 162 the secret that was negotiated. 164 5. Key Schedule Extension Structure 166 In some cases, protocols may require more than one secret to be 167 injected at a particular stage in the key schedule. Thus, we require 168 a generic and extensible way of doing so. To accomplish this, we use 169 a structure - KeyScheduleInput - that encodes well-ordered sequences 170 of secret material to inject into the key schedule. KeyScheduleInput 171 is defined as follows: 173 struct { 174 KeyScheduleSecretType type; 175 opaque secret_data<0..2^16-1>; 176 } KeyScheduleSecret; 178 enum { 179 (65535) 180 } KeyScheduleSecretType; 182 struct { 183 KeyScheduleSecret secrets<0..2^16-1>; 184 } KeyScheduleInput; 186 Each secret included in a KeyScheduleInput structure has a type and 187 corresponding secret data. Each secret MUST have a unique 188 KeyScheduleSecretType. When encoding KeyScheduleInput as the key 189 schedule Input value, the KeyScheduleSecret values MUST be in 190 ascending sorted order. This ensures that endpoints always encode 191 the same KeyScheduleInput value when using the same secret keying 192 material. 194 6. Security Considerations 196 [BINDEL] provides a proof that the concatenation approach in 197 Section 3 is secure as long as either the concatenated secret is 198 secure or the existing KDF input is secure. 200 [[OPEN ISSUE: Is this guarantee sufficient? Do we also need to 201 guarantee that a malicious prefix can't weaken the resulting PRF 202 output?]] 204 7. IANA Considerations 206 This document requests the creation of a new IANA registry: TLS 207 KeyScheduleInput Types. This registry should be under the existing 208 Transport Layer Security (TLS) Parameters heading. It should be 209 administered under a Specification Required policy [RFC8126]. 211 [[OPEN ISSUE: specify initial registry values]] 213 +=======+=============+=========+===========+ 214 | Value | Description | DTLS-OK | Reference | 215 +=======+=============+=========+===========+ 216 | TBD | TBD | TBD | TBD | 217 +-------+-------------+---------+-----------+ 219 Table 1 221 8. References 223 8.1. Normative References 225 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 226 Requirement Levels", BCP 14, RFC 2119, 227 DOI 10.17487/RFC2119, March 1997, 228 . 230 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 231 Writing an IANA Considerations Section in RFCs", BCP 26, 232 RFC 8126, DOI 10.17487/RFC8126, June 2017, 233 . 235 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 236 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 237 May 2017, . 239 8.2. Informative References 241 [BINDEL] Bindel, N., Brendel, J., Fischlin, M., Goncalves, B., and 242 D. Stebila, "Hybrid Key Encapsulation Mechanisms and 243 Authenticated Key Exchange", Post-Quantum Cryptography pp. 244 206-226, DOI 10.1007/978-3-030-25510-7_12, 2019, 245 . 247 [I-D.friel-tls-eap-dpp] 248 Friel, O. and D. Harkins, "Bootstrapped TLS 249 Authentication", Work in Progress, Internet-Draft, draft- 250 friel-tls-eap-dpp-01, 13 July 2020, . 253 [I-D.ietf-tls-hybrid-design] 254 Steblia, D., Fluhrer, S., and S. Gueron, "Hybrid key 255 exchange in TLS 1.3", Work in Progress, Internet-Draft, 256 draft-ietf-tls-hybrid-design-01, 15 October 2020, 257 . 260 [I-D.ietf-tls-semistatic-dh] 261 Rescorla, E., Sullivan, N., and C. Wood, "Semi-Static 262 Diffie-Hellman Key Establishment for TLS 1.3", Work in 263 Progress, Internet-Draft, draft-ietf-tls-semistatic-dh-01, 264 7 March 2020, . 267 [SLOTH] Bhargavan, K. and G. Leurent, "Transcript Collision 268 Attacks: Breaking Authentication in TLS, IKE, and SSH", 269 Proceedings 2016 Network and Distributed System 270 Security Symposium, DOI 10.14722/ndss.2016.23418, 2016, 271 . 273 Appendix A. Potential Use Cases 275 The draft provides a mechanism for importing additional information 276 into the TLS key schedule. Future applications and specifications 277 can use this mechanism to layer TLS on to other protocols, as opposed 278 to layering other protocols over TLS. For example, as discussed in 279 Section 1, this can be used for hybrid key exchange, which, in 280 effect, is layering TLS over a secondary AKE. Although the key 281 exchanges are interleaved, the post-quantum AKE completes first, as 282 demonstrated by its output key being used as an input for computing 283 TLS's master secret. 285 This can also be used in more direct ways, such as bootstrapping EAP- 286 TLS as in [I-D.friel-tls-eap-dpp]. This draft also allows for more 287 direct implementations of things such as semi-static DH 288 [I-D.ietf-tls-semistatic-dh]. The aim of this draft is to be 289 sufficiently flexible that it can be used as the basis for layering 290 TLS on top of any protocol that outputs a secure channel binding, 291 where secure is defined by the goals of the overall layered protocol. 292 This draft does not provide security itself, it simply provides a 293 standard format for layering. 295 Acknowledgments 297 We thank Karthik Bhargavan for his comments. 299 Authors' Addresses 301 Jonathan Hoyland 302 Cloudflare Ltd. 304 Email: jonathan.hoyland@gmail.com 306 Christopher A. Wood 307 Cloudflare 309 Email: caw@heapingbits.net