idnits 2.17.1 draft-ietf-quic-tls-13.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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([2], [3], [1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: o If the packet is from a previously installed encryption level, it MUST not contain data which extends past the end of previously received data in that flow. Implementations MUST treat any violations of this requirement as a connection error of type PROTOCOL_VIOLATION. -- The document date (June 28, 2018) is 2122 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 1231 -- Looks like a reference, but probably isn't: '2' on line 1233 -- Looks like a reference, but probably isn't: '3' on line 1235 == Unused Reference: 'QUIC-HTTP' is defined on line 1209, but no explicit reference was found in the text == Unused Reference: 'QUIC-RECOVERY' is defined on line 1214, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'AES' ** Obsolete normative reference: RFC 7539 (ref. 'CHACHA') (Obsoleted by RFC 8439) == Outdated reference: A later version (-34) exists of draft-ietf-quic-transport-13 -- Possible downref: Non-RFC (?) normative reference: ref. 'SHA' == Outdated reference: A later version (-28) exists of draft-ietf-tls-tls13-21 == Outdated reference: A later version (-34) exists of draft-ietf-quic-http-13 == Outdated reference: A later version (-34) exists of draft-ietf-quic-recovery-13 -- Obsolete informational reference (is this intentional?): RFC 2818 (Obsoleted by RFC 9110) Summary: 2 errors (**), 0 flaws (~~), 8 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 QUIC M. Thomson, Ed. 3 Internet-Draft Mozilla 4 Intended status: Standards Track S. Turner, Ed. 5 Expires: December 30, 2018 sn3rd 6 June 28, 2018 8 Using Transport Layer Security (TLS) to Secure QUIC 9 draft-ietf-quic-tls-13 11 Abstract 13 This document describes how Transport Layer Security (TLS) is used to 14 secure QUIC. 16 Note to Readers 18 Discussion of this draft takes place on the QUIC working group 19 mailing list (quic@ietf.org), which is archived at 20 https://mailarchive.ietf.org/arch/search/?email_list=quic [1]. 22 Working Group information can be found at https://github.com/quicwg 23 [2]; source code and issues list for this draft can be found at 24 https://github.com/quicwg/base-drafts/labels/-tls [3]. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at https://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on December 30, 2018. 43 Copyright Notice 45 Copyright (c) 2018 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (https://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 61 2. Notational Conventions . . . . . . . . . . . . . . . . . . . 3 62 2.1. TLS Overview . . . . . . . . . . . . . . . . . . . . . . 4 63 3. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 6 64 4. Carrying TLS Messages . . . . . . . . . . . . . . . . . . . . 7 65 4.1. Interface to TLS . . . . . . . . . . . . . . . . . . . . 8 66 4.1.1. Sending and Receiving Handshake Messages . . . . . . 9 67 4.1.2. Encryption Level Changes . . . . . . . . . . . . . . 10 68 4.1.3. TLS Interface Summary . . . . . . . . . . . . . . . . 11 69 4.2. TLS Version . . . . . . . . . . . . . . . . . . . . . . . 12 70 4.3. ClientHello Size . . . . . . . . . . . . . . . . . . . . 12 71 4.4. Peer Authentication . . . . . . . . . . . . . . . . . . . 12 72 4.5. Enabling 0-RTT . . . . . . . . . . . . . . . . . . . . . 13 73 4.6. Rejecting 0-RTT . . . . . . . . . . . . . . . . . . . . . 13 74 4.7. HelloRetryRequest . . . . . . . . . . . . . . . . . . . . 13 75 4.8. TLS Errors . . . . . . . . . . . . . . . . . . . . . . . 14 76 5. QUIC Packet Protection . . . . . . . . . . . . . . . . . . . 14 77 5.1. QUIC Packet Encryption Keys . . . . . . . . . . . . . . . 14 78 5.1.1. Initial Secrets . . . . . . . . . . . . . . . . . . . 14 79 5.2. QUIC AEAD Usage . . . . . . . . . . . . . . . . . . . . . 15 80 5.3. Packet Number Protection . . . . . . . . . . . . . . . . 16 81 5.3.1. AES-Based Packet Number Protection . . . . . . . . . 17 82 5.3.2. ChaCha20-Based Packet Number Protection . . . . . . . 18 83 5.4. Receiving Protected Packets . . . . . . . . . . . . . . . 18 84 5.5. Use of 0-RTT Keys . . . . . . . . . . . . . . . . . . . . 18 85 5.6. Receiving Out-of-Order Protected Frames . . . . . . . . . 19 86 6. Key Update . . . . . . . . . . . . . . . . . . . . . . . . . 19 87 7. Security of Initial Messages . . . . . . . . . . . . . . . . 21 88 8. QUIC-Specific Additions to the TLS Handshake . . . . . . . . 21 89 8.1. Protocol and Version Negotiation . . . . . . . . . . . . 22 90 8.2. QUIC Transport Parameters Extension . . . . . . . . . . . 22 91 9. Security Considerations . . . . . . . . . . . . . . . . . . . 23 92 9.1. Packet Reflection Attack Mitigation . . . . . . . . . . . 23 93 9.2. Peer Denial of Service . . . . . . . . . . . . . . . . . 23 94 9.3. Packet Number Protection Analysis . . . . . . . . . . . . 24 95 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 96 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 25 97 11.1. Normative References . . . . . . . . . . . . . . . . . . 25 98 11.2. Informative References . . . . . . . . . . . . . . . . . 26 99 11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 26 100 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 27 101 A.1. Since draft-ietf-quic-tls-12 . . . . . . . . . . . . . . 27 102 A.2. Since draft-ietf-quic-tls-11 . . . . . . . . . . . . . . 27 103 A.3. Since draft-ietf-quic-tls-10 . . . . . . . . . . . . . . 27 104 A.4. Since draft-ietf-quic-tls-09 . . . . . . . . . . . . . . 27 105 A.5. Since draft-ietf-quic-tls-08 . . . . . . . . . . . . . . 27 106 A.6. Since draft-ietf-quic-tls-07 . . . . . . . . . . . . . . 28 107 A.7. Since draft-ietf-quic-tls-05 . . . . . . . . . . . . . . 28 108 A.8. Since draft-ietf-quic-tls-04 . . . . . . . . . . . . . . 28 109 A.9. Since draft-ietf-quic-tls-03 . . . . . . . . . . . . . . 28 110 A.10. Since draft-ietf-quic-tls-02 . . . . . . . . . . . . . . 28 111 A.11. Since draft-ietf-quic-tls-01 . . . . . . . . . . . . . . 28 112 A.12. Since draft-ietf-quic-tls-00 . . . . . . . . . . . . . . 29 113 A.13. Since draft-thomson-quic-tls-01 . . . . . . . . . . . . . 29 114 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 29 115 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 29 116 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 29 118 1. Introduction 120 This document describes how QUIC [QUIC-TRANSPORT] is secured using 121 Transport Layer Security (TLS) version 1.3 [TLS13]. TLS 1.3 provides 122 critical latency improvements for connection establishment over 123 previous versions. Absent packet loss, most new connections can be 124 established and secured within a single round trip; on subsequent 125 connections between the same client and server, the client can often 126 send application data immediately, that is, using a zero round trip 127 setup. 129 This document describes how the standardized TLS 1.3 acts as a 130 security component of QUIC. 132 2. Notational Conventions 134 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 135 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 136 "OPTIONAL" in this document are to be interpreted as described in BCP 137 14 [RFC2119] [RFC8174] when, and only when, they appear in all 138 capitals, as shown here. 140 This document uses the terminology established in [QUIC-TRANSPORT]. 142 For brevity, the acronym TLS is used to refer to TLS 1.3. 144 2.1. TLS Overview 146 TLS provides two endpoints with a way to establish a means of 147 communication over an untrusted medium (that is, the Internet) that 148 ensures that messages they exchange cannot be observed, modified, or 149 forged. 151 Internally, TLS is a layered protocol, with the structure shown 152 below: 154 +--------------+--------------+--------------+ 155 | Handshake | Alerts | Application | 156 | Layer | | Data | 157 | | | | 158 +--------------+--------------+--------------+ 159 | | 160 | Record Layer | 161 | | 162 +--------------------------------------------+ 164 Each upper layer (handshake, alerts, and application data) is carried 165 as a series of typed TLS records. Records are individually 166 cryptographically protected and then transmitted over a reliable 167 transport (typically TCP) which provides sequencing and guaranteed 168 delivery. 170 The TLS authenticated key exchange occurs between two entities: 171 client and server. The client initiates the exchange and the server 172 responds. If the key exchange completes successfully, both client 173 and server will agree on a secret. TLS supports both pre-shared key 174 (PSK) and Diffie-Hellman (DH) key exchanges. PSK is the basis for 175 0-RTT; the latter provides perfect forward secrecy (PFS) when the DH 176 keys are destroyed. 178 After completing the TLS handshake, the client will have learned and 179 authenticated an identity for the server and the server is optionally 180 able to learn and authenticate an identity for the client. TLS 181 supports X.509 [RFC5280] certificate-based authentication for both 182 server and client. 184 The TLS key exchange is resistent to tampering by attackers and it 185 produces shared secrets that cannot be controlled by either 186 participating peer. 188 TLS 1.3 provides two basic handshake modes of interest to QUIC: 190 o A full 1-RTT handshake in which the client is able to send 191 application data after one round trip and the server immediately 192 responds after receiving the first handshake message from the 193 client. 195 o A 0-RTT handshake in which the client uses information it has 196 previously learned about the server to send application data 197 immediately. This application data can be replayed by an attacker 198 so it MUST NOT carry a self-contained trigger for any non- 199 idempotent action. 201 A simplified TLS 1.3 handshake with 0-RTT application data is shown 202 in Figure 1, see [TLS13] for more options and details. 204 Client Server 206 ClientHello 207 (0-RTT Application Data) --------> 208 ServerHello 209 {EncryptedExtensions} 210 {Finished} 211 <-------- [Application Data] 212 (EndOfEarlyData) 213 {Finished} --------> 215 [Application Data] <-------> [Application Data] 217 () Indicates messages protected by early data (0-RTT) keys 218 {} Indicates messages protected using handshake keys 219 [] Indicates messages protected using application data 220 (1-RTT) keys 222 Figure 1: TLS Handshake with 0-RTT 224 Data is protected using a number of encryption levels: 226 o Plaintext 228 o Early Data (0-RTT) Keys 230 o Handshake Keys 232 o Application Data (1-RTT) Keys 234 Application data may appear only in the early data and application 235 data levels. Handshake and Alert messages may appear in any level. 237 The 0-RTT handshake is only possible if the client and server have 238 previously communicated. In the 1-RTT handshake, the client is 239 unable to send protected application data until it has received all 240 of the handshake messages sent by the server. 242 3. Protocol Overview 244 QUIC [QUIC-TRANSPORT] assumes responsibility for the confidentiality 245 and integrity protection of packets. For this it uses keys derived 246 from a TLS 1.3 handshake [TLS13], but instead of carrying TLS records 247 over QUIC (as with TCP), TLS Handshake and Alert messages are carried 248 directly over the QUIC transport, which takes over the 249 responsibilities of the TLS record layer, as shown below. 251 +--------------+--------------+ +-------------+ 252 | TLS | TLS | | QUIC | 253 | Handshake | Alerts | | Applications| 254 | | | | (h2q, etc.) | 255 +--------------+--------------+-+-------------+ 256 | | 257 | QUIC Transport | 258 | (streams, reliability, congestion, etc.) | 259 | | 260 +---------------------------------------------+ 261 | | 262 | QUIC Packet Protection | 263 | | 264 +---------------------------------------------+ 266 QUIC also relies on TLS 1.3 for authentication and negotiation of 267 parameters that are critical to security and performance. 269 Rather than a strict layering, these two protocols are co-dependent: 270 QUIC uses the TLS handshake; TLS uses the reliability and ordered 271 delivery provided by QUIC streams. 273 At a high level, there are two main interactions between the TLS and 274 QUIC components: 276 o The TLS component sends and receives messages via the QUIC 277 component, with QUIC providing a reliable stream abstraction to 278 TLS. 280 o The TLS component provides a series of updates to the QUIC 281 component, including (a) new packet protection keys to install (b) 282 state changes such as handshake completion, the server 283 certificate, etc. 285 Figure 2 shows these interactions in more detail, with the QUIC 286 packet protection being called out specially. 288 +------------+ +------------+ 289 | |<- Handshake Messages ->| | 290 | |<---- 0-RTT Keys -------| | 291 | |<--- Handshake Keys-----| | 292 | QUIC |<---- 1-RTT Keys -------| TLS | 293 | |<--- Handshake Done ----| | 294 +------------+ +------------+ 295 | ^ 296 | Protect | Protected 297 v | Packet 298 +------------+ 299 | QUIC | 300 | Packet | 301 | Protection | 302 +------------+ 304 Figure 2: QUIC and TLS Interactions 306 Unlike TLS over TCP, QUIC applications which want to send data do not 307 send it through TLS "application_data" records. Rather, they send it 308 as QUIC STREAM frames which are then carried in QUIC packets. 310 4. Carrying TLS Messages 312 QUIC carries TLS handshake data in CRYPTO frames, each of which 313 consists of a contiguous block of handshake data identified by an 314 offset and length. Those frames are packaged into QUIC packets and 315 encrypted under the current TLS encryption level. As with TLS over 316 TCP, once TLS handshake data has been delivered to QUIC, it is QUIC's 317 responsibility to deliver it reliably. Each chunk of data that is 318 produced by TLS is associated with the set of keys that TLS is 319 currently using. If QUIC needs to retransmit that data, it MUST use 320 the same keys even if TLS has already updated to newer keys. 322 One important difference between TLS 1.3 records (used with TCP) and 323 QUIC CRYPTO frames is that in QUIC multiple frames may appear in the 324 same QUIC packet as long as they are associated with the same 325 encryption level. For instance, an implementation might bundle a 326 Handshake message and an ACK for some Handshake data into the same 327 packet. 329 Each encryption level has a specific list of frames which may appear 330 in it. The rules here generalize those of TLS, in that frames 331 associated with establishing the connection can usually appear at any 332 encryption level, whereas those associated with transferring data can 333 only appear in the 0-RTT and 1-RTT encryption levels 335 o CRYPTO frames MAY appear in packets of any encryption level. 337 o CONNECTION_CLOSE MAY appear in packets of any encryption level 338 other than 0-RTT. 340 o PADDING and PING frames MAY appear in packets of any encryption 341 level. 343 o ACK frames MAY appear in packets of any encryption level other 344 than 0-RTT, but can only acknowledge packets which appeared in 345 that encryption level. 347 o STREAM frames MUST ONLY appear in the 0-RTT and 1-RTT levels. 349 o All other frame types MUST only appear at the 1-RTT levels. 351 Because packets could be reordered on the wire, QUIC uses the packet 352 type to indicate which level a given packet was encrypted under, as 353 shown in Table 1. When multiple packets of different encryption 354 levels need to be sent, endpoints SHOULD use coalesced packets to 355 send them in the same UDP datagram. 357 +-----------------+------------------+-----------+ 358 | Packet Type | Encryption Level | PN Space | 359 +-----------------+------------------+-----------+ 360 | Initial | Initial secrets | Initial | 361 | | | | 362 | 0-RTT Protected | 0-RTT | 0/1-RTT | 363 | | | | 364 | Handshake | Handshake | Handshake | 365 | | | | 366 | Retry | N/A | N/A | 367 | | | | 368 | Short Header | 1-RTT | 0/1-RTT | 369 +-----------------+------------------+-----------+ 371 Table 1: Encryption Levels by Packet Type 373 Section 6.3 of [QUIC-TRANSPORT] shows how packets at the various 374 encryption levels fit into the handshake process. 376 4.1. Interface to TLS 378 As shown in Figure 2, the interface from QUIC to TLS consists of 379 three primary functions: 381 o Sending and receiving handshake messages 383 o Rekeying (both transmit and receive) 384 o Handshake state updates 386 Additional functions might be needed to configure TLS. 388 4.1.1. Sending and Receiving Handshake Messages 390 In order to drive the handshake, TLS depends on being able to send 391 and receive handshake messages. There are two basic functions on 392 this interface: one where QUIC requests handshake messages and one 393 where QUIC provides handshake packets. 395 Before starting the handshake QUIC provides TLS with the transport 396 parameters (see Section 8.2) that it wishes to carry. 398 A QUIC client starts TLS by requesting TLS handshake octets from TLS. 399 The client acquires handshake octets before sending its first packet. 400 A QUIC server starts the process by providing TLS with the client's 401 handshake octets. 403 At any given time, the TLS stack at an endpoint will have a current 404 sending encryption level and receiving encryption level. Each 405 encryption level is associated with a different flow of bytes, which 406 is reliably transmitted to the peer in CRYPTO frames. When TLS 407 provides handshake octets to be sent, they are appended to the 408 current flow and any packet that includes the CRYPTO frame is 409 protected using keys from the corresponding encryption level. 411 When an endpoint receives a QUIC packet containing a CRYPTO frame 412 from the network, it proceeds as follows: 414 o If the packet was in the TLS receiving encryption level, sequence 415 the data into the input flow as usual. As with STREAM frames, the 416 offset is used to find the proper location in the data sequence. 417 If the result of this process is that new data is available, then 418 it is delivered to TLS in order. 420 o If the packet is from a previously installed encryption level, it 421 MUST not contain data which extends past the end of previously 422 received data in that flow. Implementations MUST treat any 423 violations of this requirement as a connection error of type 424 PROTOCOL_VIOLATION. 426 o If the packet is from a new encryption level, it is saved for 427 later processing by TLS. Once TLS moves to receiving from this 428 encryption level, saved data can be provided. When providing data 429 from any new encryption level to TLS, if there is data from a 430 previous encryption level that TLS has not consumed, this MUST be 431 treated as a connection error of type PROTOCOL_VIOLATION. 433 Each time that TLS is provided with new data, new handshake octets 434 are requested from TLS. TLS might not provide any octets if the 435 handshake messages it has received are incomplete or it has no data 436 to send. 438 Once the TLS handshake is complete, this is indicated to QUIC along 439 with any final handshake octets that TLS needs to send. TLS also 440 provides QUIC with the transport parameters that the peer advertised 441 during the handshake. 443 Once the handshake is complete, TLS becomes passive. TLS can still 444 receive data from its peer and respond in kind, but it will not need 445 to send more data unless specifically requested - either by an 446 application or QUIC. One reason to send data is that the server 447 might wish to provide additional or updated session tickets to a 448 client. 450 When the handshake is complete, QUIC only needs to provide TLS with 451 any data that arrives in CRYPTO streams. In the same way that is 452 done during the handshake, new data is requested from TLS after 453 providing received data. 455 Important: Until the handshake is reported as complete, the 456 connection and key exchange are not properly authenticated at the 457 server. Even though 1-RTT keys are available to a server after 458 receiving the first handshake messages from a client, the server 459 cannot consider the client to be authenticated until it receives 460 and validates the client's Finished message. 462 The requirement for the server to wait for the client Finished 463 message creates a dependency on that message being delivered. A 464 client can avoid the potential for head-of-line blocking that this 465 implies by sending a copy of the STREAM frame that carries the 466 Finished message in multiple packets. This enables immediate 467 server processing for those packets. 469 4.1.2. Encryption Level Changes 471 At each change of encryption level in either direction, TLS signals 472 QUIC, providing the new level and the encryption keys. These events 473 are not asynchronous, they always occur immediately after TLS is 474 provided with new handshake octets, or after TLS produces handshake 475 octets. 477 If 0-RTT is possible, it is ready after the client sends a TLS 478 ClientHello message or the server receives that message. After 479 providing a QUIC client with the first handshake octets, the TLS 480 stack might signal the change to 0-RTT keys. On the server, after 481 receiving handshake octets that contain a ClientHello message, a TLS 482 server might signal that 0-RTT keys are available. 484 Note that although TLS only uses one encryption level at a time, QUIC 485 may use more than one level. For instance, after sending its 486 Finished message (using a CRYPTO frame in Handshake encryption) may 487 send STREAM data (in 1-RTT encryption). However, if the Finished is 488 lost, the client would have to retransmit the Finished, in which case 489 it would use Handshake encryption. 491 4.1.3. TLS Interface Summary 493 Figure 3 summarizes the exchange between QUIC and TLS for both client 494 and server. Each arrow is tagged with the encryption level used for 495 that transmission. 497 Client Server 499 Get Handshake 500 Initial ------------> 501 Rekey tx to 0-RTT Keys 502 0-RTT --------------> 503 Handshake Received 504 Get Handshake 505 <------------ Initial 506 Rekey rx to 0-RTT keys 507 Handshake Received 508 Rekey rx to Handshake keys 509 Get Handshake 510 <----------- Handshake 511 Rekey tx to 1-RTT keys 512 Handshake Received 513 Rekey rx to Handshake keys 514 Handshake Received 515 Get Handshake 516 Handshake Complete 517 Rekey tx to 1-RTT keys 518 Handshake ----------> 519 Handshake Received 520 Rekey rx to 1-RTT keys 521 Get Handshake 522 Handshake Complete 523 <--------------- 1-RTT 524 Handshake Received 526 Figure 3: Interaction Summary between QUIC and TLS 528 4.2. TLS Version 530 This document describes how TLS 1.3 [TLS13] is used with QUIC. 532 In practice, the TLS handshake will negotiate a version of TLS to 533 use. This could result in a newer version of TLS than 1.3 being 534 negotiated if both endpoints support that version. This is 535 acceptable provided that the features of TLS 1.3 that are used by 536 QUIC are supported by the newer version. 538 A badly configured TLS implementation could negotiate TLS 1.2 or 539 another older version of TLS. An endpoint MUST terminate the 540 connection if a version of TLS older than 1.3 is negotiated. 542 4.3. ClientHello Size 544 QUIC requires that the initial handshake packet from a client fit 545 within the payload of a single packet. The size limits on QUIC 546 packets mean that a record containing a ClientHello needs to fit 547 within 1129 octets, though endpoints can reduce the size of their 548 connection ID to increase by up to 22 octets. 550 A TLS ClientHello can fit within this limit with ample space 551 remaining. However, there are several variables that could cause 552 this limit to be exceeded. Implementations are reminded that large 553 session tickets or HelloRetryRequest cookies, multiple or large key 554 shares, and long lists of supported ciphers, signature algorithms, 555 versions, QUIC transport parameters, and other negotiable parameters 556 and extensions could cause this message to grow. 558 For servers, the size of the session tickets and HelloRetryRequest 559 cookie extension can have an effect on a client's ability to connect. 560 Choosing a small value increases the probability that these values 561 can be successfully used by a client. 563 The TLS implementation does not need to ensure that the ClientHello 564 is sufficiently large. QUIC PADDING frames are added to increase the 565 size of the packet as necessary. 567 4.4. Peer Authentication 569 The requirements for authentication depend on the application 570 protocol that is in use. TLS provides server authentication and 571 permits the server to request client authentication. 573 A client MUST authenticate the identity of the server. This 574 typically involves verification that the identity of the server is 575 included in a certificate and that the certificate is issued by a 576 trusted entity (see for example [RFC2818]). 578 A server MAY request that the client authenticate during the 579 handshake. A server MAY refuse a connection if the client is unable 580 to authenticate when requested. The requirements for client 581 authentication vary based on application protocol and deployment. 583 A server MUST NOT use post-handshake client authentication (see 584 Section 4.6.2 of [TLS13]). 586 4.5. Enabling 0-RTT 588 In order to be usable for 0-RTT, TLS MUST provide a NewSessionTicket 589 message that contains the "max_early_data" extension with the value 590 0xffffffff; the amount of data which the client can send in 0-RTT is 591 controlled by the "initial_max_data" transport parameter supplied by 592 the server. A client MUST treat receipt of a NewSessionTicket that 593 contains a "max_early_data" extension with any other value as a 594 connection error of type PROTOCOL_VIOLATION. 596 Early data within the TLS connection MUST NOT be used. As it is for 597 other TLS application data, a server MUST treat receiving early data 598 on the TLS connection as a connection error of type 599 PROTOCOL_VIOLATION. 601 4.6. Rejecting 0-RTT 603 A server rejects 0-RTT by rejecting 0-RTT at the TLS layer. This 604 also prevents QUIC from sending 0-RTT data. A client that attempts 605 0-RTT MUST also consider 0-RTT to be rejected if it receives a 606 Version Negotiation packet. 608 When 0-RTT is rejected, all connection characteristics that the 609 client assumed might be incorrect. This includes the choice of 610 application protocol, transport parameters, and any application 611 configuration. The client therefore MUST reset the state of all 612 streams, including application state bound to those streams. 614 4.7. HelloRetryRequest 616 In TLS over TCP, the HelloRetryRequest feature (see Section 4.1.4 of 617 [TLS13]) can be used to correct a client's incorrect KeyShare 618 extension as well as for a stateless round-trip check. From the 619 perspective of QUIC, this just looks like additional messages carried 620 in the Initial encryption level. Although it is in principle 621 possible to use this feature for address verification in QUIC, QUIC 622 implementations SHOULD instead use the Retry feature (see 623 Section 4.4.2 of [QUIC-TRANSPORT]). HelloRetryRequest is still used 624 to request key shares. 626 4.8. TLS Errors 628 If TLS experiences an error, it generates an appropriate alert as 629 defined in Section 6 of [TLS13]. 631 A TLS alert is turned into a QUIC connection error by converting the 632 one-octet alert description into a QUIC error code. The alert 633 description is added to 0x100 to produce a QUIC error code from the 634 range reserved for CRYPTO_ERROR. The resulting value is sent in a 635 QUIC CONNECTION_CLOSE frame. 637 The alert level of all TLS alerts is "fatal"; a TLS stack MUST NOT 638 generate alerts at the "warning" level. 640 5. QUIC Packet Protection 642 As with TLS over TCP, QUIC encrypts packets with keys derived from 643 the TLS handshake, using the AEAD algorithm negotiated by TLS. 645 5.1. QUIC Packet Encryption Keys 647 QUIC derives packet encryption keys in the same way as TLS 1.3: Each 648 encryption level/direction pair has a secret value, which is then 649 used to derive the traffic keys using as described in Section 7.3 of 650 [TLS13] 652 The keys for the Initial encryption level are computed based on the 653 client's initial Destination Connection ID, as described in 654 Section 5.1.1. 656 The keys for the remaining encryption level are computed in the same 657 fashion as the corresponding TLS keys (see Section 7 of [TLS13]), 658 except that the label for HKDF-Expand-Label uses the prefix "quic " 659 rather than "tls13 ". A different label provides key separation 660 between TLS and QUIC. 662 5.1.1. Initial Secrets 664 Initial packets are protected with a secret derived from the 665 Destination Connection ID field from the client's first Initial 666 packet of the connection. Specifically: 668 initial_salt = 0x9c108f98520a5c5c32968e950e8a2c5fe06d6c38 669 initial_secret = 670 HKDF-Extract(initial_salt, client_dst_connection_id) 672 client_initial_secret = 673 HKDF-Expand-Label(initial_secret, "client in", Hash.length) 674 server_initial_secret = 675 HKDF-Expand-Label(initial_secret, "server in", Hash.length) 677 Note that if the server sends a Retry, the client's Initial will 678 correspond to a new connection and thus use the server provided 679 Destination Connection ID. 681 The hash function for HKDF when deriving handshake secrets and keys 682 is SHA-256 [SHA]. The connection ID used with HKDF-Expand-Label is 683 the initial Destination Connection ID. 685 The value of initial_salt is a 20 octet sequence shown in the figure 686 in hexadecimal notation. Future versions of QUIC SHOULD generate a 687 new salt value, thus ensuring that the keys are different for each 688 version of QUIC. This prevents a middlebox that only recognizes one 689 version of QUIC from seeing or modifying the contents of handshake 690 packets from future versions. 692 Note: The Destination Connection ID is of arbitrary length, and it 693 could be zero length if the server sends a Retry packet with a 694 zero-length Source Connection ID field. In this case, the Initial 695 keys provide no assurance to the client that the server received 696 its packet; the client has to rely on the exchange that included 697 the Retry packet for that property. 699 5.2. QUIC AEAD Usage 701 The Authentication Encryption with Associated Data (AEAD) [AEAD] 702 function used for QUIC packet protection is the AEAD that is 703 negotiated for use with the TLS connection. For example, if TLS is 704 using the TLS_AES_128_GCM_SHA256, the AEAD_AES_128_GCM function is 705 used. 707 QUIC packets are protected prior to applying packet number encryption 708 (Section 5.3). The unprotected packet number is part of the 709 associated data (A). When removing packet protection, an endpoint 710 first removes the protection from the packet number. 712 All QUIC packets other than Version Negotiation and Retry packets are 713 protected with an AEAD algorithm [AEAD]. Prior to establishing a 714 shared secret, packets are protected with AEAD_AES_128_GCM and a key 715 derived from the destination connection ID in the client's first 716 Initial packet (see Section 5.1.1). This provides protection against 717 off-path attackers and robustness against QUIC version unaware 718 middleboxes, but not against on-path attackers. 720 All ciphersuites currently defined for TLS 1.3 - and therefore QUIC - 721 have a 16-byte authentication tag and produce an output 16 bytes 722 larger than their input. 724 The key and IV for the packet are computed as described in 725 Section 5.1. The nonce, N, is formed by combining the packet 726 protection IV with the packet number. The 64 bits of the 727 reconstructed QUIC packet number in network byte order are left- 728 padded with zeros to the size of the IV. The exclusive OR of the 729 padded packet number and the IV forms the AEAD nonce. 731 The associated data, A, for the AEAD is the contents of the QUIC 732 header, starting from the flags octet in either the short or long 733 header. 735 The input plaintext, P, for the AEAD is the content of the QUIC frame 736 following the header, as described in [QUIC-TRANSPORT]. 738 The output ciphertext, C, of the AEAD is transmitted in place of P. 740 Some AEAD functions have limits for how many packets can be encrypted 741 under the same key and IV (see for example [AEBounds]). This might 742 be lower than the packet number limit. An endpoint MUST initiate a 743 key update (Section 6) prior to exceeding any limit set for the AEAD 744 that is in use. 746 5.3. Packet Number Protection 748 QUIC packet numbers are protected using a key that is derived from 749 the current set of secrets. The key derived using the "pn" label is 750 used to protect the packet number from casual observation. The 751 packet number protection algorithm depends on the negotiated AEAD. 753 Packet number protection is applied after packet protection is 754 applied (see Section 5.2). The ciphertext of the packet is sampled 755 and used as input to an encryption algorithm. 757 In sampling the packet ciphertext, the packet number length is 758 assumed to be 4 octets (its maximum possible encoded length), unless 759 there is insufficient space in the packet for sampling. The sampled 760 ciphertext starts after allowing for a 4 octet packet number unless 761 this would cause the sample to extend past the end of the packet. If 762 the sample would extend past the end of the packet, the end of the 763 packet is sampled. 765 For example, the sampled ciphertext for a packet with a short header 766 can be determined by: 768 sample_offset = 1 + len(connection_id) + 4 770 if sample_offset + sample_length > packet_length then 771 sample_offset = packet_length - sample_length 772 sample = packet[sample_offset..sample_offset+sample_length] 774 A packet with a long header is sampled in the same way, noting that 775 multiple QUIC packets might be included in the same UDP datagram and 776 that each one is handled separately. 778 sample_offset = 6 + len(destination_connection_id) + 779 len(source_connection_id) + 780 len(payload_length) + 4 782 To ensure that this process does not sample the packet number, packet 783 number protection algorithms MUST NOT sample more ciphertext than the 784 minimum expansion of the corresponding AEAD. 786 Packet number protection is applied to the packet number encoded as 787 described in Section 4.8 of [QUIC-TRANSPORT]. Since the length of 788 the packet number is stored in the first octet of the encoded packet 789 number, it may be necessary to progressively decrypt the packet 790 number. 792 Before a TLS ciphersuite can be used with QUIC, a packet protection 793 algorithm MUST be specifed for the AEAD used with that ciphersuite. 794 This document defines algorithms for AEAD_AES_128_GCM, 795 AEAD_AES_128_CCM, AEAD_AES_256_GCM, AEAD_AES_256_CCM (all AES AEADs 796 are defined in [AEAD]), and AEAD_CHACHA20_POLY1305 ([CHACHA]). 798 5.3.1. AES-Based Packet Number Protection 800 This section defines the packet protection algorithm for 801 AEAD_AES_128_GCM, AEAD_AES_128_CCM, AEAD_AES_256_GCM, and 802 AEAD_AES_256_CCM. AEAD_AES_128_GCM and AEAD_AES_128_CCM use 128-bit 803 AES [AES] in counter (CTR) mode. AEAD_AES_256_GCM, and 804 AEAD_AES_256_CCM use 256-bit AES in CTR mode. 806 This algorithm samples 16 octets from the packet ciphertext. This 807 value is used as the counter input to AES-CTR. 809 encrypted_pn = AES-CTR(pn_key, sample, packet_number) 811 5.3.2. ChaCha20-Based Packet Number Protection 813 When AEAD_CHACHA20_POLY1305 is in use, packet number protection uses 814 the raw ChaCha20 function as defined in Section 2.4 of [CHACHA]. 815 This uses a 256-bit key and 16 octets sampled from the packet 816 protection output. 818 The first 4 octets of the sampled ciphertext are interpreted as a 819 32-bit number in little-endian order and are used as the block count. 820 The remaining 12 octets are interpreted as three concatenated 32-bit 821 numbers in little-endian order and used as the nonce. 823 The encoded packet number is then encrypted with ChaCha20 directly. 824 In pseudocode: 826 counter = DecodeLE(sample[0..3]) 827 nonce = DecodeLE(sample[4..7], sample[8..11], sample[12..15]) 828 encrypted_pn = ChaCha20(pn_key, counter, nonce, packet_number) 830 5.4. Receiving Protected Packets 832 Once an endpoint successfully receives a packet with a given packet 833 number, it MUST discard all packets in the same packet number space 834 with higher packet numbers if they cannot be successfully unprotected 835 with either the same key, or - if there is a key update - the next 836 packet protection key (see Section 6). Similarly, a packet that 837 appears to trigger a key update, but cannot be unprotected 838 successfully MUST be discarded. 840 Failure to unprotect a packet does not necessarily indicate the 841 existence of a protocol error in a peer or an attack. The truncated 842 packet number encoding used in QUIC can cause packet numbers to be 843 decoded incorrectly if they are delayed significantly. 845 5.5. Use of 0-RTT Keys 847 If 0-RTT keys are available (see Section 4.5), the lack of replay 848 protection means that restrictions on their use are necessary to 849 avoid replay attacks on the protocol. 851 A client MUST only use 0-RTT keys to protect data that is idempotent. 852 A client MAY wish to apply additional restrictions on what data it 853 sends prior to the completion of the TLS handshake. A client 854 otherwise treats 0-RTT keys as equivalent to 1-RTT keys, except that 855 it MUST NOT send ACKs with 0-RTT keys. 857 A client that receives an indication that its 0-RTT data has been 858 accepted by a server can send 0-RTT data until it receives all of the 859 server's handshake messages. A client SHOULD stop sending 0-RTT data 860 if it receives an indication that 0-RTT data has been rejected. 862 A server MUST NOT use 0-RTT keys to protect packets; it uses 1-RTT 863 keys to protect acknowledgements of 0-RTT packets. Clients MUST NOT 864 attempt to decrypt 0-RTT packets it receives and instead MUST discard 865 them. 867 Note: 0-RTT data can be acknowledged by the server as it receives 868 it, but any packets containing acknowledgments of 0-RTT data 869 cannot have packet protection removed by the client until the TLS 870 handshake is complete. The 1-RTT keys necessary to remove packet 871 protection cannot be derived until the client receives all server 872 handshake messages. 874 5.6. Receiving Out-of-Order Protected Frames 876 Due to reordering and loss, protected packets might be received by an 877 endpoint before the final TLS handshake messages are received. A 878 client will be unable to decrypt 1-RTT packets from the server, 879 whereas a server will be able to decrypt 1-RTT packets from the 880 client. 882 However, a server MUST NOT process data from incoming 1-RTT protected 883 packets before verifying either the client Finished message or - in 884 the case that the server has chosen to use a pre-shared key - the 885 pre-shared key binder (see Section 4.2.11 of [TLS13]). Verifying 886 these values provides the server with an assurance that the 887 ClientHello has not been modified. Packets protected with 1-RTT keys 888 MAY be stored and later decrypted and used once the handshake is 889 complete. 891 A server could receive packets protected with 0-RTT keys prior to 892 receiving a TLS ClientHello. The server MAY retain these packets for 893 later decryption in anticipation of receiving a ClientHello. 895 6. Key Update 897 Once the 1-RTT keys are established and the short header is in use, 898 it is possible to update the keys. The KEY_PHASE bit in the short 899 header is used to indicate whether key updates have occurred. The 900 KEY_PHASE bit is initially set to 0 and then inverted with each key 901 update Section 6. 903 The KEY_PHASE bit allows a recipient to detect a change in keying 904 material without necessarily needing to receive the first packet that 905 triggered the change. An endpoint that notices a changed KEY_PHASE 906 bit can update keys and decrypt the packet that contains the changed 907 bit, see Section 6. 909 An endpoint MUST NOT initiate more than one key update at a time. A 910 new key cannot be used until the endpoint has received and 911 successfully decrypted a packet with a matching KEY_PHASE. 913 A receiving endpoint detects an update when the KEY_PHASE bit doesn't 914 match what it is expecting. It creates a new secret (see Section 7.2 915 of [TLS13]) and the corresponding read key and IV. If the packet can 916 be decrypted and authenticated using these values, then the keys it 917 uses for packet protection are also updated. The next packet sent by 918 the endpoint will then use the new keys. 920 An endpoint doesn't need to send packets immediately when it detects 921 that its peer has updated keys. The next packet that it sends will 922 simply use the new keys. If an endpoint detects a second update 923 before it has sent any packets with updated keys it indicates that 924 its peer has updated keys twice without awaiting a reciprocal update. 925 An endpoint MUST treat consecutive key updates as a fatal error and 926 abort the connection. 928 An endpoint SHOULD retain old keys for a short period to allow it to 929 decrypt packets with smaller packet numbers than the packet that 930 triggered the key update. This allows an endpoint to consume packets 931 that are reordered around the transition between keys. Packets with 932 higher packet numbers always use the updated keys and MUST NOT be 933 decrypted with old keys. 935 Keys and their corresponding secrets SHOULD be discarded when an 936 endpoint has received all packets with packet numbers lower than the 937 lowest packet number used for the new key. An endpoint might discard 938 keys if it determines that the length of the delay to affected 939 packets is excessive. 941 This ensures that once the handshake is complete, packets with the 942 same KEY_PHASE will have the same packet protection keys, unless 943 there are multiple key updates in a short time frame succession and 944 significant packet reordering. 946 Initiating Peer Responding Peer 948 @M QUIC Frames 949 New Keys -> @N 950 @N QUIC Frames 951 --------> 952 QUIC Frames @M 953 New Keys -> @N 954 QUIC Frames @N 955 <-------- 957 Figure 4: Key Update 959 A packet that triggers a key update could arrive after successfully 960 processing a packet with a higher packet number. This is only 961 possible if there is a key compromise and an attack, or if the peer 962 is incorrectly reverting to use of old keys. Because the latter 963 cannot be differentiated from an attack, an endpoint MUST immediately 964 terminate the connection if it detects this condition. 966 7. Security of Initial Messages 968 Initial packets are not protected with a secret key, so they are 969 subject to potential tampering by an attacker. QUIC provides 970 protection against attackers that cannot read packets, but does not 971 attempt to provide additional protection against attacks where the 972 attacker can observe and inject packets. Some forms of tampering - 973 such as modifying the TLS messages themselves - are detectable, but 974 some - such as modifying ACKs - are not. 976 For example, an attacker could inject a packet containing an ACK 977 frame that makes it appear that a packet had not been received or to 978 create a false impression of the state of the connection (e.g., by 979 modifying the ACK Delay). Note that such a packet could cause a 980 legitimate packet to be dropped as a duplicate. Implementations 981 SHOULD use caution in relying on any data which is contained in 982 Initial packets that is not otherwise authenticated. 984 It is also possible for the attacker to tamper with data that is 985 carried in Handshake packets, but because that tampering requires 986 modifying TLS handshake messages, that tampering will cause the TLS 987 handshake to fail. 989 8. QUIC-Specific Additions to the TLS Handshake 991 QUIC uses the TLS handshake for more than just negotiation of 992 cryptographic parameters. The TLS handshake validates protocol 993 version selection, provides preliminary values for QUIC transport 994 parameters, and allows a server to perform return routeability checks 995 on clients. 997 8.1. Protocol and Version Negotiation 999 The QUIC version negotiation mechanism is used to negotiate the 1000 version of QUIC that is used prior to the completion of the 1001 handshake. However, this packet is not authenticated, enabling an 1002 active attacker to force a version downgrade. 1004 To ensure that a QUIC version downgrade is not forced by an attacker, 1005 version information is copied into the TLS handshake, which provides 1006 integrity protection for the QUIC negotiation. This does not prevent 1007 version downgrade prior to the completion of the handshake, though it 1008 means that a downgrade causes a handshake failure. 1010 TLS uses Application Layer Protocol Negotiation (ALPN) [RFC7301] to 1011 select an application protocol. The application-layer protocol MAY 1012 restrict the QUIC versions that it can operate over. Servers MUST 1013 select an application protocol compatible with the QUIC version that 1014 the client has selected. 1016 If the server cannot select a compatible combination of application 1017 protocol and QUIC version, it MUST abort the connection. A client 1018 MUST abort a connection if the server picks an incompatible 1019 combination of QUIC version and ALPN identifier. 1021 8.2. QUIC Transport Parameters Extension 1023 QUIC transport parameters are carried in a TLS extension. Different 1024 versions of QUIC might define a different format for this struct. 1026 Including transport parameters in the TLS handshake provides 1027 integrity protection for these values. 1029 enum { 1030 quic_transport_parameters(0xffa5), (65535) 1031 } ExtensionType; 1033 The "extension_data" field of the quic_transport_parameters extension 1034 contains a value that is defined by the version of QUIC that is in 1035 use. The quic_transport_parameters extension carries a 1036 TransportParameters when the version of QUIC defined in 1037 [QUIC-TRANSPORT] is used. 1039 The quic_transport_parameters extension is carried in the ClientHello 1040 and the EncryptedExtensions messages during the handshake. 1042 While the transport parameters are technically available prior to the 1043 completion of the handshake, they cannot be fully trusted until the 1044 handshake completes, and reliance on them should be minimized. 1045 However, any tampering with the parameters will cause the handshake 1046 to fail. 1048 9. Security Considerations 1050 There are likely to be some real clangers here eventually, but the 1051 current set of issues is well captured in the relevant sections of 1052 the main text. 1054 Never assume that because it isn't in the security considerations 1055 section it doesn't affect security. Most of this document does. 1057 9.1. Packet Reflection Attack Mitigation 1059 A small ClientHello that results in a large block of handshake 1060 messages from a server can be used in packet reflection attacks to 1061 amplify the traffic generated by an attacker. 1063 QUIC includes three defenses against this attack. First, the packet 1064 containing a ClientHello MUST be padded to a minimum size. Second, 1065 if responding to an unverified source address, the server is 1066 forbidden to send more than three UDP datagrams in its first flight 1067 (see Section 4.4.3 of [QUIC-TRANSPORT]). Finally, because 1068 acknowledgements of Handshake packets are authenticated, a blind 1069 attacker cannot forge them. Put together, these defenses limit the 1070 level of amplification. 1072 9.2. Peer Denial of Service 1074 QUIC, TLS and HTTP/2 all contain a messages that have legitimate uses 1075 in some contexts, but that can be abused to cause a peer to expend 1076 processing resources without having any observable impact on the 1077 state of the connection. If processing is disproportionately large 1078 in comparison to the observable effects on bandwidth or state, then 1079 this could allow a malicious peer to exhaust processing capacity 1080 without consequence. 1082 QUIC prohibits the sending of empty "STREAM" frames unless they are 1083 marked with the FIN bit. This prevents "STREAM" frames from being 1084 sent that only waste effort. 1086 While there are legitimate uses for some redundant packets, 1087 implementations SHOULD track redundant packets and treat excessive 1088 volumes of any non-productive packets as indicative of an attack. 1090 9.3. Packet Number Protection Analysis 1092 Packet number protection relies on the packet protection AEAD being a 1093 pseudorandom function (PRF), which is not a property that AEAD 1094 algorithms guarantee. Therefore, no strong assurances about the 1095 general security of this mechanism can be shown in the general case. 1096 The AEAD algorithms described in this document are assumed to be 1097 PRFs. 1099 The packet number protection algorithms defined in this document take 1100 the form: 1102 encrypted_pn = packet_number XOR PRF(pn_key, sample) 1104 This construction is secure against chosen plaintext attacks (IND- 1105 CPA) [IMC]. 1107 Use of the same key and ciphertext sample more than once risks 1108 compromising packet number protection. Protecting two different 1109 packet numbers with the same key and ciphertext sample reveals the 1110 exclusive OR of those packet numbers. Assuming that the AEAD acts as 1111 a PRF, if L bits are sampled, the odds of two ciphertext samples 1112 being identical approach 2^(-L/2), that is, the birthday bound. For 1113 the algorithms described in this document, that probability is one in 1114 2^64. 1116 Note: In some cases, inputs shorter than the full size required by 1117 the packet protection algorithm might be used. 1119 To prevent an attacker from modifying packet numbers, values of 1120 packet numbers are transitively authenticated using packet 1121 protection; packet numbers are part of the authenticated additional 1122 data. A falsified or modified packet number can only be detected 1123 once the packet protection is removed. 1125 An attacker can guess values for packet numbers and have an endpoint 1126 confirm guesses through timing side channels. If the recipient of a 1127 packet discards packets with duplicate packet numbers without 1128 attempting to remove packet protection they could reveal through 1129 timing side-channels that the packet number matches a received 1130 packet. For authentication to be free from side-channels, the entire 1131 process of packet number protection removal, packet number recovery, 1132 and packet protection removal MUST be applied together without timing 1133 and other side-channels. 1135 For the sending of packets, construction and protection of packet 1136 payloads and packet numbers MUST be free from side-channels that 1137 would reveal the packet number or its encoded size. 1139 10. IANA Considerations 1141 This document does not create any new IANA registries, but it 1142 registers the values in the following registries: 1144 o TLS ExtensionsType Registry [TLS-REGISTRIES] - IANA is to register 1145 the quic_transport_parameters extension found in Section 8.2. The 1146 Recommended column is to be marked Yes. The TLS 1.3 Column is to 1147 include CH and EE. 1149 11. References 1151 11.1. Normative References 1153 [AEAD] McGrew, D., "An Interface and Algorithms for Authenticated 1154 Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008, 1155 . 1157 [AES] "Advanced encryption standard (AES)", National Institute 1158 of Standards and Technology report, 1159 DOI 10.6028/nist.fips.197, November 2001. 1161 [CHACHA] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF 1162 Protocols", RFC 7539, DOI 10.17487/RFC7539, May 2015, 1163 . 1165 [QUIC-TRANSPORT] 1166 Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based 1167 Multiplexed and Secure Transport", draft-ietf-quic- 1168 transport-13 (work in progress), June 2018. 1170 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1171 Requirement Levels", BCP 14, RFC 2119, 1172 DOI 10.17487/RFC2119, March 1997, 1173 . 1175 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 1176 "Transport Layer Security (TLS) Application-Layer Protocol 1177 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 1178 July 2014, . 1180 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1181 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1182 May 2017, . 1184 [SHA] Dang, Q., "Secure Hash Standard", National Institute of 1185 Standards and Technology report, 1186 DOI 10.6028/nist.fips.180-4, July 2015. 1188 [TLS-REGISTRIES] 1189 Salowey, J. and S. Turner, "IANA Registry Updates for 1190 Transport Layer Security (TLS) and Datagram Transport 1191 Layer Security (DTLS)", draft-ietf-tls-iana-registry- 1192 updates-05 (work in progress), May 2018. 1194 [TLS13] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1195 Version 1.3", draft-ietf-tls-tls13-21 (work in progress), 1196 July 2017. 1198 11.2. Informative References 1200 [AEBounds] 1201 Luykx, A. and K. Paterson, "Limits on Authenticated 1202 Encryption Use in TLS", March 2016, 1203 . 1205 [IMC] Katz, J. and Y. Lindell, "Introduction to Modern 1206 Cryptography, Second Edition", ISBN 978-1466570269, 1207 November 2014. 1209 [QUIC-HTTP] 1210 Bishop, M., Ed., "Hypertext Transfer Protocol (HTTP) over 1211 QUIC", draft-ietf-quic-http-13 (work in progress), June 1212 2018. 1214 [QUIC-RECOVERY] 1215 Iyengar, J., Ed. and I. Swett, Ed., "QUIC Loss Detection 1216 and Congestion Control", draft-ietf-quic-recovery-13 (work 1217 in progress), June 2018. 1219 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 1220 DOI 10.17487/RFC2818, May 2000, 1221 . 1223 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1224 Housley, R., and W. Polk, "Internet X.509 Public Key 1225 Infrastructure Certificate and Certificate Revocation List 1226 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 1227 . 1229 11.3. URIs 1231 [1] https://mailarchive.ietf.org/arch/search/?email_list=quic 1233 [2] https://github.com/quicwg 1235 [3] https://github.com/quicwg/base-drafts/labels/-tls 1237 Appendix A. Change Log 1239 *RFC Editor's Note:* Please remove this section prior to 1240 publication of a final version of this document. 1242 Issue and pull request numbers are listed with a leading octothorp. 1244 A.1. Since draft-ietf-quic-tls-12 1246 o Changes to integration of the TLS handshake (#829, #1018, #1094, 1247 #1165, #1190, #1233, #1242, #1252, #1450) 1249 * The cryptographic handshake uses CRYPTO frames, not stream 0 1251 * QUIC packet protection is used in place of TLS record 1252 protection 1254 * Separate QUIC packet number spaces are used for the handshake 1256 * Changed Retry to be independent of the cryptographic handshake 1258 * Limit the use of HelloRetryRequest to address TLS needs (like 1259 key shares) 1261 o Changed codepoint of TLS extension (#1395, #1402) 1263 A.2. Since draft-ietf-quic-tls-11 1265 o Encrypted packet numbers. 1267 A.3. Since draft-ietf-quic-tls-10 1269 o No significant changes. 1271 A.4. Since draft-ietf-quic-tls-09 1273 o Cleaned up key schedule and updated the salt used for handshake 1274 packet protection (#1077) 1276 A.5. Since draft-ietf-quic-tls-08 1278 o Specify value for max_early_data_size to enable 0-RTT (#942) 1280 o Update key derivation function (#1003, #1004) 1282 A.6. Since draft-ietf-quic-tls-07 1284 o Handshake errors can be reported with CONNECTION_CLOSE (#608, 1285 #891) 1287 A.7. Since draft-ietf-quic-tls-05 1289 No significant changes. 1291 A.8. Since draft-ietf-quic-tls-04 1293 o Update labels used in HKDF-Expand-Label to match TLS 1.3 (#642) 1295 A.9. Since draft-ietf-quic-tls-03 1297 No significant changes. 1299 A.10. Since draft-ietf-quic-tls-02 1301 o Updates to match changes in transport draft 1303 A.11. Since draft-ietf-quic-tls-01 1305 o Use TLS alerts to signal TLS errors (#272, #374) 1307 o Require ClientHello to fit in a single packet (#338) 1309 o The second client handshake flight is now sent in the clear (#262, 1310 #337) 1312 o The QUIC header is included as AEAD Associated Data (#226, #243, 1313 #302) 1315 o Add interface necessary for client address validation (#275) 1317 o Define peer authentication (#140) 1319 o Require at least TLS 1.3 (#138) 1321 o Define transport parameters as a TLS extension (#122) 1323 o Define handling for protected packets before the handshake 1324 completes (#39) 1326 o Decouple QUIC version and ALPN (#12) 1328 A.12. Since draft-ietf-quic-tls-00 1330 o Changed bit used to signal key phase 1332 o Updated key phase markings during the handshake 1334 o Added TLS interface requirements section 1336 o Moved to use of TLS exporters for key derivation 1338 o Moved TLS error code definitions into this document 1340 A.13. Since draft-thomson-quic-tls-01 1342 o Adopted as base for draft-ietf-quic-tls 1344 o Updated authors/editors list 1346 o Added status note 1348 Acknowledgments 1350 This document has benefited from input from Dragana Damjanovic, 1351 Christian Huitema, Jana Iyengar, Adam Langley, Roberto Peon, Eric 1352 Rescorla, Ian Swett, and many others. 1354 Contributors 1356 Ryan Hamilton was originally an author of this specification. 1358 Authors' Addresses 1360 Martin Thomson (editor) 1361 Mozilla 1363 Email: martin.thomson@gmail.com 1365 Sean Turner (editor) 1366 sn3rd 1368 Email: sean@sn3rd.com