idnits 2.17.1 draft-ietf-quic-version-aliasing-00.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 document seems to lack a Security Considerations section. ** The abstract seems to contain references ([QUIC-TRANSPORT]), 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 -- The document date (April 6, 2020) is 1479 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- No information found for draft-ietf-tls-esni-latest - is the name correct? -- No information found for draft-ietf-quic-tls-latest - is the name correct? -- No information found for draft-ietf-quic-version-negotiation-latest - is the name correct? Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 QUIC M. Duke 3 Internet-Draft F5 Networks, Inc. 4 Intended status: Experimental April 6, 2020 5 Expires: October 8, 2020 7 QUIC Version Aliasing 8 draft-ietf-quic-version-aliasing-00 10 Abstract 12 The QUIC transport protocol [QUIC-TRANSPORT] preserves its future 13 extensibility partly by specifying its version number. There will be 14 a relatively small number of published version numbers for the 15 foreseeable future. This document provides a method for clients and 16 servers to negotiate the use of other version numbers in subsequent 17 connections. If a sizeable subset of QUIC connections use this 18 mechanism, this should prevent middlebox ossification around the 19 current set of published version numbers and the contents of QUIC 20 Initial packets. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on October 8, 2020. 39 Copyright Notice 41 Copyright (c) 2020 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (https://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 58 2. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 3 59 3. The Version Alias Transport Parameter . . . . . . . . . . . . 4 60 3.1. Version Number Generation . . . . . . . . . . . . . . . . 4 61 3.2. Salt Generation . . . . . . . . . . . . . . . . . . . . . 4 62 3.3. Expiration Time . . . . . . . . . . . . . . . . . . . . . 5 63 3.4. Format . . . . . . . . . . . . . . . . . . . . . . . . . 5 64 4. Client Behavior . . . . . . . . . . . . . . . . . . . . . . . 6 65 5. Server Actions on Non-standard Version Numbers . . . . . . . 6 66 6. Considerations for Retry Packets . . . . . . . . . . . . . . 7 67 7. Security and Privacy Considerations . . . . . . . . . . . . . 8 68 7.1. Version Downgrade . . . . . . . . . . . . . . . . . . . . 8 69 7.2. Increased Linkability . . . . . . . . . . . . . . . . . . 8 70 7.3. Seed Polling Attack . . . . . . . . . . . . . . . . . . . 8 71 7.4. Increased Processing of Garbage UDP Packets . . . . . . . 9 72 7.5. Increased Retry Overhead . . . . . . . . . . . . . . . . 9 73 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 74 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 75 9.1. Normative References . . . . . . . . . . . . . . . . . . 10 76 9.2. Informative References . . . . . . . . . . . . . . . . . 10 77 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 10 78 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 10 79 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 11 81 1. Introduction 83 The QUIC version number is critical to future extensibility of the 84 protocol. Past experience with other protocols, such as TLS1.3 85 [RFC8446], shows that middleboxes might attempt to enforce that QUIC 86 packets use versions known at the time the middlebox was implemented. 87 This has a chilling effect on deploying experimental and standard 88 versions on the internet. 90 Each version of QUIC has a "salt" [QUIC-TLS] that is used to derive 91 the keys used to encrypt Initial packets. As each salt is published 92 in a standards document, any observer can decrypt these packets and 93 inspect the contents, including a TLS Client Hello. A subsidiary 94 mechanism like Encrypted SNI [ENCRYPTED-SNI] might protect some of 95 the TLS fields inside a TLS Client Hello. 97 This document proposes "QUIC Version Aliasing," a standard way of 98 servers advertising the availability of other versions inside the 99 cryptographic protection of a QUIC handshake. These versions are 100 syntactically identical to the QUIC version in which the 101 communication takes place, but use a different salt. In subsequent 102 communications, the client uses the new version number and encrypts 103 its Initial packets with a key derived from the provided salt. These 104 version numbers and salts are unique to the client. 106 If a large subset of QUIC traffic adopts his technique, middleboxes 107 will be unable to enforce particular version numbers or policy based 108 on Client Hello contents without incurring unacceptable penalties on 109 users. This would simultaneously protect the protocol against 110 ossification and improve its privacy properties. 112 1.1. Terminology 114 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 115 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 116 document are to be interpreted as described in RFC 2119 [RFC2119]. 118 In this document, these words will appear with that interpretation 119 only when in ALL CAPS. Lower case uses of these words are not to be 120 interpreted as carrying significance described in RFC 2119. 122 A "syntax version" is a QUIC version that would be advertised in a 123 QUIC version negotiation and conforms to a specification. Any 124 aliased version corresponds to a syntax version in all its formats 125 and behaviors, except for the version number field in long headers. 127 An "aliased version" is a version with a number generated in 128 accordance with this document. Except for the version field in long 129 headers, it conforms entirely to the specification of the syntax 130 version. 132 2. Protocol Overview 134 When they instantiate a connection, servers select an alternate 135 32-bit version number for the next connection at random and securely 136 derive a salt from that version number using a repeatable process. 137 They communicate this using a transport parameter extension including 138 the version, salt, and an expiration time for that value. 140 The next time a client connects to that server, if it is within the 141 indicated expiration time, it MAY use the provided version number and 142 encrypt its Initial Packets using a key derived from the provided 143 salt. The server can reconstruct the salt from the requested version 144 and proceed with the connection normally. 146 3. The Version Alias Transport Parameter 148 3.1. Version Number Generation 150 Servers MUST use a random process to generate version numbers. This 151 version number MUST NOT correspond to a QUIC version the server 152 advertises in QUIC Version Negotiation packets. 154 Servers MAY encode the syntax version as long as this information is 155 cryptographically protected. For example, a server advertises 156 support for QUIC version 1 and QUIC version 2 in Version Negotiation 157 packets, each corresponding to a particular packet syntax. In a 158 Version 1 connection, it might provide an aliased version in the 159 transport parameter, 0x45f3213b, that encodes the fact the syntax 160 version is 1. When the client initiates a connection using version 161 0x45f3213b, the server knows the Initial Packet is formatted in 162 accordance with QUIC version 1. A subsequent aliased version 163 provided in the transport parameters would also encode version 1, 164 even though this is sent in a connection ostensibly of version 165 0x45f3213b. 167 Servers MUST NOT use client-controlled information (e.g. the client 168 IP address) in the random process, see Section 7.3. 170 Servers MUST NOT advertise these versions in QUIC Version Negotiation 171 packets. 173 If multiple servers represent the same entity behind a load balancer, 174 all such servers SHOULD have a common configuration for how to encode 175 and extract syntax version to use. They MUST NOT generate version 176 numbers that any of them would advertise in a Version Negotiation 177 Packet. 179 3.2. Salt Generation 181 The salt is an opaque 20-octet field. It is used to generate a 182 Initial connection keys using the process described in {QUIC-TLS}. 184 Servers MUST generate the SALT using a cryptographic method that uses 185 the version number and only server state that is persistent across 186 connections. That is, servers MUST implement a method that it can 187 repeat deterministically at a later time to derive the salt from the 188 incoming version number. It MUST NOT use client controlled 189 information other than the version number; for example, the client's 190 IP address and port. 192 3.3. Expiration Time 194 Servers should select an expiration time in seconds, measured from 195 the instant the transport parameter is first sent. This time SHOULD 196 be less than the time until the server expects to support new QUIC 197 versions, rotate the keys used to encode information in the version 198 number, or rotate the keys use in salt generation. 200 Furthermore, the expiration time SHOULD be short enough to frustrate 201 a seed polling attack Section 7.3. 203 Conversely, an extremely short expiration time will often force the 204 client to use standard QUIC version numbers and salts. 206 3.4. Format 208 This document defines a new transport parameter extension for QUIC 209 with identifier 0x5641. The contents of the value field are 210 indicated below. 212 0 1 2 3 213 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 214 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 215 | Version (32) | 216 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 217 | | 218 + + 219 | | 220 + + 221 | Salt (160) | 222 + + 223 | | 224 + + 225 | | 226 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 227 | Expiration (i) | 228 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 230 Figure 1: Version Alias Transport Parameter value 232 The definition of the fields is described above. Note that the 233 "Expiration" field is in seconds, and its length is encoded using the 234 Variable Length Integer encoding from Section 16 of [QUIC-TRANSPORT]. 236 4. Client Behavior 238 When a client receives the Version Alias Transport Parameter, it MAY 239 cache the version number, salt, and the expiration of this value. It 240 MAY use the version number in a subsequent connection and compute the 241 initial keys using the provided salt. 243 Clients SHOULD NOT attempt to use the provided version number and 244 salt after the provided Expiration time has elapsed. 246 Clients SHOULD NOT use the provided version number or salt in more 247 than one connection, particularly if its IP address has changed 248 between two connection attempts. Using a consistent version number 249 can link the client across IP address changes. 251 Clients MUST use the same syntax version to format the Initial Packet 252 as the syntax version used in the connection that provided the 253 aliased version. 255 If the response to an Initial packet using the provided version is a 256 Version Negotiation Packet, the client SHOULD cease attempting to use 257 that version and salt to the server unless it later determines that 258 the packet was the result of a version downgrade, see Section 7.1. 260 5. Server Actions on Non-standard Version Numbers 262 When a server receives an Initial Packet with an unknown version 263 number, it SHOULD send a Version Negotiation Packet if it is 264 specifically configured not to generate that version number at 265 random. Otherwise, it derives a salt from the version number using 266 the algorithm and inputs it uses to generate salts to put in 267 transport parameters. 269 If the syntax version was encoded in the version number, the server 270 extracts it so that it can properly parse the packet. If not, it can 271 try trial parsing of the packet for each syntax version it supports. 273 If the computed seed results in a packet that fails authentication, 274 or the encoded syntax version is not supported at the server, or 275 trial parsing fails for all supported versions, the server SHOULD 276 send a Version Negotiation Packet. 278 Servers SHOULD provide a new Version Alias transport parameter, with 279 a new version number and salt, each time a client connects, to reduce 280 linkability for the client. However, issuing version numbers to a 281 client SHOULD be rate-limited to mitigate the seed polling attack 282 Section 7.3. 284 6. Considerations for Retry Packets 286 QUIC Retry packets reduce the load on servers during periods of 287 stress by forcing the client to prove it possesses the IP address 288 before the server decrypts any Initial Packets or establishing any 289 connection state. Version aliasing substantially complicates the 290 process. 292 If a server has to send a Retry packet, the required format is 293 ambiguous without understanding which syntax version to use. If all 294 supported syntax versions use the same Retry format, it simply uses 295 that format with the provided version number. 297 If the supported syntax versions use different Retry formats, the 298 server MUST either extract the syntax version from the version field 299 and format the Retry accordingly using the aliased version number, or 300 it MUST send a valid Retry packet for each supported version using 301 the syntax version number instead of the aliased version number. It 302 MUST NOT do both. 304 The Retry integrity Tag of a Retry Packet for an aliased version uses 305 the procedure in Section 5.8 of [QUIC-TLS]. However, the secret key 306 K uses the first 16 octets of the aliased salt instead of the key 307 provided in the specification. 309 Clients MUST accept Retry packets that contain either the aliased 310 version or syntax version. It MUST ignore Retry packets with other 311 syntax versions. It it receives Retry packets with both the aliased 312 version and the correct syntax version, it MUST discard the second 313 one it receives in accordance with section 17.2.5 of [QUIC-TRANSPORT] 314 unless the other one failed integrity validation. 316 After a client receives a Retry, it sends a new Initial Packet with 317 the provided Retry token. It MAY use the aliased version and salt or 318 the syntax version and salt, regardless of which type of Retry it 319 received. Note that if the server is not able to generate the 320 correct salt for an aliased version due to lost keys or other errors, 321 this might result in a Version Negotiation packet, which violates the 322 usual order of server responses (QUIC servers would normally send 323 Version Negotiation before Retry). 325 Clients that receive a Version Negotiation packet in response to an 326 Initial with a valid Retry token MAY interpret this to mean that the 327 server can no longer process the aliased version. They can retry the 328 connection with a syntax version number, but see Section 7.1. These 329 MUST include the Retry token so that the client can verify that the 330 Retry was authentic. 332 7. Security and Privacy Considerations 334 This document intends to improve the existing security and privacy 335 properties of QUIC by dramatically improving the secrecy of QUIC 336 Initial Packets. However, there are new attacks against this 337 mechanism. 339 7.1. Version Downgrade 341 A countermeasure against version aliasing is the downgrade attack. 342 Middleboxes may drop a packet containing a random version and imitate 343 the server's failure to correctly process it. Clients and servers 344 MUST implement the parts of [QUIC-VERSION-NEGOTIATION] relevant to 345 downgrade detection. 347 Note that downgrade detection only works after receiving a response 348 from the server. If a client immediately responds to a Version 349 Negotiation Packet with an Initial Packet with a syntax version 350 number, it will have exposed its request in a format readable to 351 observers before it discovers if the Version Negotiation Packet is 352 authentic. A client SHOULD wait for an interval to see if a valid 353 response comes from the server before assuming the version 354 negotiation is valid. The client MAY also alter its Initial Packet 355 (e.g., its ALPN field) to sanitize sensitive information and obtain 356 another aliased version before proceeding with its true request. 358 Servers that support version aliasing SHOULD be liberal about the 359 Initial Packet formats they receive, keeping the connection open long 360 enough to deliver their transport parameters, to support this 361 mechanism. 363 7.2. Increased Linkability 365 As each version number is theoretically unique to each client, if a 366 client uses one twice, those two connections are extremely likely to 367 be from the same host. If the client has changed IP address, this is 368 a significant increase in linkability relative to QUIC with a 369 standard version numbers. 371 7.3. Seed Polling Attack 373 Observers that wish to decode Initial Packets might open a large 374 number of connections to the server in an effort to obtain a large 375 portion of the mapping of version numbers to salts to a server. 376 While storage-intensive, this attack could increase the probability 377 that at least some version-aliased connections are observable. There 378 are two mitigations servers can execute against this attack: 380 o rate-limit transport parameters sent to a particular client; and/ 381 or 383 o set a low expiration time to reduce the lifetime of the attacker's 384 database. 386 Segmenting the version number space based on client information, i.e. 387 using only a subset of version numbers for a certain IP address 388 range, would significantly amplify an attack. Observers will 389 generally be on the path to the client and be able to mimic having an 390 identical IP address. Segmentation in this way would dramatically 391 reduce the search space for attackers. Thus, servers are prohibited 392 from using these mechanisms. 394 7.4. Increased Processing of Garbage UDP Packets 396 As QUIC shares the UDP protocol number with other UDP applications, 397 in some deployments it may be possible for traffic intended for other 398 UDP applications to arrive at a QUIC server endpoint. When servers 399 support a finite set of version numbers, a valid version number field 400 is a strong indicator the packet is, in fact, QUIC. If the version 401 number is invalid, a QUIC Version Negotiation is a low-cost response 402 that triggers very early in packet processing. 404 However, a server that provides version aliasing is prepared to 405 accept almost any version number. As a result, many more 406 sufficiently sized UDP payloads with the first bit set to '1' are 407 potential QUIC Initial Packets that require generation of a salt, 408 some initial connection state, and a decryption operation. 410 While not a more potent attack then simply sending valid Initial 411 Packets, servers may have to provision additional resources to 412 address this possibility. 414 7.5. Increased Retry Overhead 416 This document requires two small cryptographic operations to build a 417 Retry packet instead of one, placing more load on servers when 418 already under load. 420 8. IANA Considerations 422 This draft chooses a transport parameter (0x5641) to minimize the 423 risk of collision. IANA should assign a permanent value from the 424 QUIC Transport Parameter Registry. 426 9. References 428 9.1. Normative References 430 [ENCRYPTED-SNI] 431 Rescorla, E., Ed., Oku, K., Ed., Sullivan, N., Ed., and C. 432 Wood, Ed., "Encrypted Server Name Indication for TLS 1.3", 433 draft-ietf-tls-esni-latest (work in progress). 435 [QUIC-TLS] 436 Thomson, M., Ed. and S. Turner, Ed., "Using Transport 437 Layer Security (TLS) to Secure QUIC", draft-ietf-quic-tls- 438 latest (work in progress). 440 [QUIC-TRANSPORT] 441 Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based 442 Multiplexed and Secure Transport", draft-ietf-quic- 443 transport (work in progress). 445 [QUIC-VERSION-NEGOTIATION] 446 Schinazi, D., Ed. and E. Rescorla, Ed., "Compatible 447 Version Negotiation for QUIC", draft-ietf-quic-version- 448 negotiation-latest (work in progress). 450 9.2. Informative References 452 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 453 Requirement Levels", BCP 14, RFC 2119, 454 DOI 10.17487/RFC2119, March 1997, 455 . 457 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 458 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 459 . 461 Appendix A. Acknowledgments 463 Marten Seemann was the original progenitor of the version aliasing 464 approach. 466 Appendix B. Change Log 468 *RFC Editor's Note:* Please remove this section prior to 469 publication of a final version of this document. 471 Author's Address 473 Martin Duke 474 F5 Networks, Inc. 476 Email: martin.h.duke@gmail.com