idnits 2.17.1 draft-jhoyla-tls-extended-key-schedule-01.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 (9 March 2020) is 1508 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 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: 10 September 2020 Apple, Inc. 6 9 March 2020 8 TLS 1.3 Extended Key Schedule 9 draft-jhoyla-tls-extended-key-schedule-01 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 10 September 2020. 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. Master Secret Injection . . . . . . . . . . . . . . . . . 3 68 4. Key Schedule Extension Structure . . . . . . . . . . . . . . 4 69 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 70 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 71 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 72 7.1. Normative References . . . . . . . . . . . . . . . . . . 5 73 7.2. Informative References . . . . . . . . . . . . . . . . . 5 74 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 5 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 5 77 1. Introduction 79 Introducing additional key material into the TLS handshake is a non- 80 trivial process because both parties need to agree on the injection 81 content and context. If the two parties do not agree then an 82 attacker may exploit the mismatch in so-called channel 83 synchronization attacks. 85 Injecting key material into the TLS handshake allows other protocols 86 to be bound to the handshake. For example, it may provide additional 87 protections to the ClientHello message, which in the standard TLS 88 handshake only receives protections after the server's Finished 89 message has been received. It may also permit the use of combined 90 shared secrets, possibly from multiple key exchange algorithms, to be 91 included in the key schedule. This pattern is common for Post 92 Quantum key exchange algorithms, as discussed in 93 [I-D.stebila-tls-hybrid-design]. 95 2. Conventions and Definitions 97 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 98 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 99 "OPTIONAL" in this document are to be interpreted as described in BCP 100 14 [RFC2119] [RFC8174] when, and only when, they appear in all 101 capitals, as shown here. 103 3. Key Schedule Extension 105 This section describes two places in which additional secrets can be 106 injected into the TLS 1.3 key schedule. 108 3.1. Handshake Secret Injection 110 To inject key material into the Handshake Secret it is recommended to 111 use an extra derive secret. 113 | 114 v 115 Derive-Secret(., "derived early", "") 116 | 117 v 118 Input -> HKDF-Extract 119 | 120 v 121 Derive-Secret(., "derived", "") 122 | 123 v 124 (EC)DHE -> HKDF-Extract = Handshake Secret 125 | 126 v 128 As shown in the figure above, the key schedule has an extra derive 129 secret and HKDF-Extract step. This extra step isolates the Input 130 material from the rest of the handshake secret, such that even 131 maliciously chosen values cannot weaken the security of the key 132 schedule overall. 134 The additional Derive-Secret with the "derived early" label enforces 135 the separation of the key schedule from vanilla TLS handshakes, 136 because HKDFs can be assumed to ensure that keys derived with 137 different labels are independent. 139 3.2. Master Secret Injection 141 To inject key material into the Master Secret it is recommended to 142 use an extra derive secret. 144 | 145 v 146 Derive-Secret(., "derived early", "") 147 | 148 v 149 Input -> HKDF-Extract 150 | 151 v 152 Derive-Secret(., "derived", "") 153 | 154 v 155 0 -> HKDF-Extract = Master Secret 156 | 157 v 159 This structrue mirrors the Handshake Injection point, the key 160 schedule has an extra Extract, Derive-Secret pattern. This, again, 161 should isolate the Input material from the rest of the Master Secret. 163 4. Key Schedule Extension Structure 165 In some cases, protocols may require more than one secret to be 166 injected at a particular stage in the key schedule. Thus, we require 167 a generic and extensible way of doing so. To accomplish this, we use 168 a structure - KeyScheduleInput - that encodes well-ordered sequences 169 of secret material to inject into the key schedule. KeyScheduleInput 170 is defined as follows: 172 struct { 173 KeyScheduleSecretType type; 174 opaque secret_data<0..2^16-1>; 175 } KeyScheduleSecret; 177 enum { 178 (65535) 179 } KeyScheduleSecretType; 181 struct { 182 KeyScheduleSecret secrets<0..2^16-1>; 183 } KeyScheduleInput; 185 Each secret included in a KeyScheduleInput structure has a type and 186 corresponding secret data. Each secret MUST have a unique 187 KeyScheduleSecretType. When encoding KeyScheduleInput as the key 188 schedule Input value, the KeyScheduleSecret values MUST be in 189 ascending sorted order. This ensures that endpoints always encode 190 the same KeyScheduleInput value when using the same secret keying 191 material. 193 5. Security Considerations 195 [[OPEN ISSUE: This draft has not seen any security analysis.]] 197 6. IANA Considerations 199 [[TODO: define secret registry structure]] 201 7. References 203 7.1. Normative References 205 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 206 Requirement Levels", BCP 14, RFC 2119, 207 DOI 10.17487/RFC2119, March 1997, 208 . 210 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 211 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 212 May 2017, . 214 7.2. Informative References 216 [I-D.stebila-tls-hybrid-design] 217 Steblia, D., Fluhrer, S., and S. Gueron, "Hybrid key 218 exchange in TLS 1.3", Work in Progress, Internet-Draft, 219 draft-stebila-tls-hybrid-design-03, 12 February 2020, 220 . 223 Acknowledgments 225 We thank Karthik Bhargavan for his comments. 227 Authors' Addresses 229 Jonathan Hoyland 230 Cloudflare Ltd. 232 Email: jonathan.hoyland@gmail.com 234 Christopher A. Wood 235 Apple, Inc. 237 Email: cawood@apple.com