RFC 9368
Compatible Version Negotiation for QUIC
RFC 9368 ๐ Compatible Version Negotiation for QUIC
okay bestie, this is RFC 9368, and it's called Compatible Version Negotiation for QUIC ๐ฆ It was written by D. Schinazi (Google LLC) and E. Rescorla (Mozilla). It came out in May 2023 as a Standards Track document from the IETF (Internet Engineering Task Force), with ISSN 2070-1721. It also updates RFC 8999 (Updates: 8999), so it's basically a glow-up on that one ๐
Here's the table of contents, verbatim:
Table of Contents
1. Introduction
1.1. Conventions
1.2. Definitions
2. Version Negotiation Mechanism
2.1. Incompatible Version Negotiation
2.2. Compatible Versions
2.3. Compatible Version Negotiation
2.4. Connections and Version Negotiation
2.5. Client Choice of Original Version
3. Version Information
4. Version Downgrade Prevention
5. Server Deployments of QUIC
6. Application-Layer Protocol Considerations
7. Considerations for Future Versions
7.1. Interaction with Retry
7.2. Interaction with TLS Resumption
7.3. Interaction with 0-RTT
8. Special Handling for QUIC Version 1
9. Security Considerations
10. IANA Considerations
10.1. QUIC Transport Parameter
10.2. QUIC Transport Error Code
11. References
11.1. Normative References
11.2. Informative References
Acknowledgments
Authors' Addresses
Abstract โจ
okay so QUIC doesn't really have a full version negotiation system ๐ฅบ The only thing it gives the server is a way to say "nah, the version you picked isn't cool with me." This doc adds a version negotiation mechanism so a client and server can land on a version they both support ๐ค There's also an optional bonus: if the client's chosen version and the negotiated version have a compatible first flight format, they can negotiate without eating an extra round trip. Main character energy ๐ And yes, this document updates RFC 8999.
Status of This Memo ๐
This is an Internet Standards Track document.
This document is a product of the IETF (Internet Engineering Task Force). It represents the consensus of the IETF community, it's been through public review, and the IESG (Internet Engineering Steering Group) approved it for publication. If you want more info on Internet Standards, check Section 2 of RFC 7841. For the current status, any errata, and how to send feedback, head to https://www.rfc-editor.org/info/rfc9368 ๐ธ
Copyright Notice ๐
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as in effect on the date of publication. Please read these carefully, because they spell out your rights and restrictions for this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Revised BSD License ๐
1. Introduction ๐ฆ
okay so QUIC's version-invariant properties (see [QUIC-INVARIANTS]) define a Version Negotiation packet, but they don't say how an endpoint should react when it gets one ๐ซ QUIC version 1 ([QUIC]) lets the server use a Version Negotiation packet to say the client's version isn't acceptable, but the client can't safely use that info to start a new connection on a version they both support. This document updates [QUIC-INVARIANTS] by defining version negotiation mechanisms that use the Version Negotiation packet ๐
With the right safety mechanisms in place, the Version Negotiation packet can be part of a system that lets two QUIC implementations negotiate between two totally disjoint versions of QUIC. This document covers version negotiation using Version Negotiation packets, which adds an extra round trip to connection setup when it's needed ๐ง
Avoiding extra round trips is always the goal, especially since most incremental versions are pretty similar to the one before them. So this spec also defines a simple mechanism that takes advantage of those similarities and can negotiate between "compatible" versions with no additional round trips ๐
1.1. Conventions ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
1.2. Definitions ๐
The document uses the following terms:
- In the context of a given QUIC connection, the "first flight" of packets is the set of packets the client creates and sends to start the connection before it has heard back from the server โ๏ธ
- In the context of a given QUIC connection, the "client's Chosen Version" is the QUIC version of the connection's first flight ๐
- The "Original Version" is the QUIC version of the very first packet the client sends to the server. If version negotiation spans multiple connections (see Section 2.4), the Original Version is equal to the client's Chosen Version of the first QUIC connection ๐
- The "Negotiated Version" is the QUIC version in use on the connection once the version negotiation process finishes ๐ค
- The "Maximum Segment Lifetime" (MSL) is how long a QUIC packet can exist in the network. Implementations can make this configurable, and a RECOMMENDED value is one minute โฐ Fun fact (well, fun for us nerds): the term "segment" here came from Section 3.4.1 of [TCP] ๐ค
2. Version Negotiation Mechanism ๐
okay so this document specifies two ways to do version negotiation ๐ First, "incompatible", which takes a round trip and works for all versions. Second, "compatible", which saves that round trip but only works when the versions are compatible (see Section 2.2) โจ
The client starts a QUIC connection by picking an Original Version and sending a first flight of QUIC packets with a long header to the server [QUIC-INVARIANTS]. That first flight includes Version Information (see Section 3), which is used to optionally turn on compatible version negotiation (see Section 2.3) and to stop version downgrade attacks (see Section 4) ๐ก๏ธ
When the server gets this first flight, it checks whether it knows how to parse first flights from the Chosen Version (which is also the Original Version in this case). If it can't, it starts incompatible version negotiation (see Section 2.1), which makes the client start a new connection with a different version ๐ For example, say the client starts a connection with version A and the server can't parse it. The server starts incompatible version negotiation. Then, when the client starts a new connection with version B, the first connection's client Chosen Version is A, the second connection's client Chosen Version is B, and the Original Version for the whole sequence is A ๐ฆ
If the server can parse the first flight, it can set up the connection using the client's Chosen Version, or it MAY select any other compatible version, as described in Section 2.3 ๐
Heads up: a server can be able to parse the first flight of a given version without fully supporting it. In other words, it implements enough of that version's spec to read first flight packets, but not enough to fully set up a connection on that version ๐
2.1. Incompatible Version Negotiation ๐ธ
The server starts incompatible version negotiation by sending a Version Negotiation packet. This packet SHALL include each entry from the server's set of Offered Versions (see Section 5) in a Supported Version field. The server MAY add reserved versions (as defined in Section 6.3 of [QUIC]) in Supported Version fields ๐ง
Clients will ignore a Version Negotiation packet if it contains the Original Version the client attempted, as required by Section 4. The client also ignores a Version Negotiation packet that contains incorrect connection ID fields, as required by Section 6 of [QUIC-INVARIANTS] ๐ โโ๏ธ
When the client gets the Version Negotiation packet, it SHALL search the list the server provided for a version it supports. If it doesn't find one, it SHALL abort the connection attempt. Otherwise, it SHALL select a mutually supported version and send a new first flight with that version. This version is now the Negotiated Version ๐
That new first flight lets the endpoints set up a connection on the Negotiated Version. The handshake of the Negotiated Version exchanges the Version Information (see Section 3) needed to confirm that version negotiation was genuine. In other words, it checks that no attacker injected packets to mess with the version negotiation process (see Section 4) ๐ต๏ธโโ๏ธ
Only servers can start incompatible version negotiation. Clients MUST NOT send Version Negotiation packets, and servers MUST ignore all received Version Negotiation packets ๐ซ
2.2. Compatible Versions ๐
okay so, if A and B are two different versions of QUIC, A is "compatible" with B if you can take A's first flight of packets and turn it into a first flight of packets from B ๐ฆ for example, if A and B look EXACTLY the same on the wire and act the same during the handshake but differ after it, then A is compatible with B and B is compatible with A. the conversion of the first flight can be lossy though. some data, like QUIC version 1 0-RTT packets, could get ignored during the conversion and then retransmitted later ๐ฅบ
now, version compatibility is NOT symmetric ๐ version A can be compatible with version B while B is not compatible with A. this could happen if version B is a strict superset of version A. like, say A has streams and STREAM frames, but B has streams AND a hypothetical concept of tubes with STREAM and TUBE frames. then A would be compatible with B, but B would not be compatible with A ๐
also, compatibility doesn't mean every single possible first flight will convert successfully. a first flight using version A is "compatible" with version B only if two things are true: (1) version A is compatible with version B and (2) converting this first flight to version B is well defined. for example, say version B is identical to version A except it added a new frame in its first flight that version A can't parse or even ignore. version B could still be compatible with version A, because conversions would work fine for connections that don't use that frame. but first flights using version B that carry that new frame would NOT be compatible with version A ๐ซถ
when a brand new version of QUIC gets defined, it's assumed to NOT be compatible with any other version, unless the spec says otherwise. and no other version is compatible with the new one unless specified either. so basically, implementations MUST NOT assume compatibility between versions unless it's explicitly specified ๐ซ
one more tea โ both endpoints might not agree on whether two versions are compatible. two versions could be defined at the same time and then declared compatible in a third document way later. in that case, one endpoint might know about the compatibility document and the other one might not ๐ญ
2.3. Compatible Version Negotiation ๐
when the server can parse the client's first flight using the client's Chosen Version, it can pull out the client's Version Information structure (see Section 3). that structure has the list of versions the client knows its first flight is compatible with.
so to do compatible version negotiation, the server MUST pick one of those versions that it (1) supports and (2) knows the client's Chosen Version is compatible with. that picked version becomes the Negotiated Version โจ then the server tries to convert the client's first flight into that version and replies to the client as if it had received the converted first flight.
if the formats are identical (like when the Negotiated Version is the same as the client's Chosen Version), the conversion is just the identity transformation. if the first flight is formatted correctly, the conversion can't fail, because that's what it means for the first flight to be compatible. but if the server can't convert the first flight, it MUST abort the handshake ๐
if a document says a QUIC version is compatible with another, that document MUST specify how clients find out about the Negotiated Version. one example is having the client figure out the server's Negotiated Version by checking the Version field in the QUIC long header. with that example, the server might first send packets using the client's Chosen Version and only switch to the Negotiated Version afterwards. this can happen when the client's Version Information spans multiple packets. the server might acknowledge the first packet in the Chosen Version and then switch to a different Negotiated Version later ๐ also, mutually compatible versions SHOULD use the same mechanism ๐ค
after the first flight gets converted to the Negotiated Version, the handshake finishes in that Negotiated Version. if the Negotiated Version has requirements that apply during the handshake, those requirements cover the WHOLE handshake, including the converted first flight. so if the Negotiated Version says endpoints have to validate Handshake packets, endpoints MUST also do those validations on the converted first flight ๐ฏ for example, if the Negotiated Version requires the 5-tuple to stay stable for the entire handshake (like QUIC version 1 does), then BOTH endpoints need to validate the 5-tuple of every packet received during the handshake, including the converted first flight ๐
btw, the client can turn off compatible version negotiation by only putting the Chosen Version in the Available Versions field of the Version Information (see Section 3) ๐ โโ๏ธ
if the server doesn't find a compatible version (including the client's Chosen Version), it'll do incompatible version negotiation instead (see Section 2.1) ๐
it's also possible to have incompatible version negotiation followed by compatible version negotiation. say version A is compatible with version B, and version C is compatible with version D. this could happen:
Client Server
Chosen = A, Available Versions = (A, B) ------------->
<------------------------ Version Negotiation = (D, C)
Chosen = C, Available Versions = (C, D) ------------->
<------------- Chosen = D, Available Versions = (D, C)
Figure 1: Combined Negotiation Example
in this example, the client picked C from the server's Version Negotiation packet, but the server preferred D, so it picked D from the client's offer ๐ง
2.4. Connections and Version Negotiation ๐
QUIC connections are shared state between a client and a server [QUIC-INVARIANTS]. the compatible version negotiation mechanism in this document (see Section 2.3) happens inside ONE QUIC connection. so the packets with the client's Chosen Version are part of the same connection as the packets with the Negotiated Version ๐
compare that with incompatible version negotiation, which uses QUIC Version Negotiation packets (see Section 2.1). that one conceptually works across TWO QUIC connections. the connection attempt before the Version Negotiation packet arrives is separate from the connection with the incompatible version that comes after ๐ธ
and to be clear, that split across two connections is just conceptual ๐ค it applies to the normative requirements on QUIC connections, but implementations do NOT have to actually use two separate connection objects internally.
2.5. Client Choice of Original Version ๐
when the client picks its Original Version, it SHOULD try to avoid incompatible version negotiation so it can save a round trip โฑ๏ธ so the client SHOULD pick an Original Version that maximizes the combined probability that BOTH of these are true:
- the server knows how to parse first flights from the Original Version, and
- the Original Version is compatible with the client's preferred version.
without any extra info, that could mean picking the oldest version the client supports while still advertising the newer compatible versions in the client's first flight ๐
3. Version Information ๐ฆ
during the handshake, endpoints exchange Version Information, which is made of a Chosen Version and a list of Available Versions. any version of QUIC that supports this mechanism MUST provide a way to exchange Version Information in both directions during the handshake, and that data has to be authenticated ๐
in QUIC version 1, Version Information gets sent using a brand new version_information transport parameter (see Section 7.4 of [QUIC]). here's what Version Information looks like (using the notation from Section 1.3 of [QUIC]):
Version Information {
Chosen Version (32),
Available Versions (32) ...,
}
Figure 2: Version Information Format
here's what each field is all about:
Chosen Version: the version the sender picked to use for this connection. usually this matches the Version field in the long header carrying this data, BUT future versions or extensions can choose to set different values in the long header Version field ๐
the contents of Available Versions depend on whether the client or the server sent it.
Client-Sent Available Versions: when a client sends it, Available Versions lists ALL the versions this first flight is compatible with, ordered by descending preference. the version in the Chosen Version field MUST be included in this list, so the client can communicate how much it prefers the Chosen Version ๐ฐ this preference is only advisory though, so servers MAY choose to go with their own preference instead ๐คทโโ๏ธ
Server-Sent Available Versions: when a server sends it, Available Versions lists all the Fully Deployed Versions of this server deployment (see Section 5). the order of versions in this field doesn't mean anything. the version in the Chosen Version field isn't necessarily in this list, because the server operator might be in the middle of removing support for that version ๐ซ for the same reason, the Available Versions field MAY be empty.
clients and servers MAY both include versions that follow the pattern 0x?a?a?a?a in their Available Versions list ๐ฒ those versions are reserved for exercising version negotiation (see Section 15 of [QUIC]), and they will never be selected when choosing a version to use ๐
4. Version Downgrade Prevention โจ
okay so a version downgrade is a sneaky attack where a bad actor tricks the QUIC endpoints into landing on a different QUIC version than they would've picked if nobody messed with them ๐ and this whole mechanism exists to shut that down ๐ก๏ธ main character protection energy ๐
Clients MUST ignore any received Version Negotiation packets that contain the Original Version. A client that makes a connection attempt based on information it got from a Version Negotiation packet MUST ignore any Version Negotiation packets it receives in response to that connection attempt ๐
Both endpoints MUST parse their peer's Version Information during the handshake. If that goes wrong (for example, if it's too short or its length isn't divisible by four), the endpoint MUST close the connection. If the connection was using QUIC version 1, that closure MUST use a transport error of type TRANSPORT_PARAMETER_ERROR ๐ญ If an endpoint gets a Chosen Version equal to zero, or any Available Version equal to zero, it MUST treat it as a parsing failure. And if a server gets Version Information where the Chosen Version isn't included in Available Versions, it MUST treat that as a parsing failure too ๐ซ
Every QUIC version that supports version negotiation MUST define a method for closing the connection with a version negotiation error. For QUIC version 1, these errors are signaled with a transport error of type VERSION_NEGOTIATION_ERROR (see Section 10.2) ๐
When a server gets a client's first flight, it has to figure out which QUIC version is in use for the connection first, so it can parse that flight properly. This can mean looking at stuff that isn't part of the handshake transcript, like parts of the packet header ๐ Then, when the server processes the client's Version Information, it MUST validate that the client's Chosen Version matches the version in use for the connection. If the two differ, the server MUST close the connection with a version negotiation error ๐
For QUIC version 1 specifically, the server knows version 1 is in use by seeing that the Version field of the first Long Header packet it receives is set to 0x00000001. After that, if the server gets the client's Version Information over QUIC version 1 (which you can tell from the Version field of the Long Header packets that carried the transport parameters) and the client's Chosen Version isn't set to 0x00000001, the server MUST close the connection with a version negotiation error ๐ธ
Servers MAY complete the handshake even if the Version Information is missing. Clients MUST NOT complete the handshake if they're reacting to a Version Negotiation packet and the Version Information is missing, but they MAY do so otherwise ๐ซถ
If a client gets Version Information where the server's Chosen Version wasn't sent by the client as part of its Available Versions, the client MUST close the connection with a version negotiation error. If a client reacted to a Version Negotiation packet and the server's Version Information was missing, the client MUST also close the connection with a version negotiation error ๐ โโ๏ธ
If the client received and acted on a Version Negotiation packet, the client MUST validate the server's Available Versions field. That check works by confirming the client would have attempted the same version even knowing about the versions the server supports. In other words, the client would have picked the same version if it had received a Version Negotiation packet listing the versions in the server's Available Versions field, plus the Negotiated Version. If the client would have picked a different version, the client MUST close the connection with a version negotiation error. Especially, if the client reacted to a Version Negotiation packet and the server's Available Versions field is empty, the client MUST close the connection with a version negotiation error. These closures stop an attacker from using forged Version Negotiation packets to force a downgrade ๐ฅ
Okay, example time! ๐ง Let's say a client supports hypothetical QUIC versions 10, 12, and 14, and it likes higher versions better. The client starts a connection attempt with version 12. Let's check out two separate scenarios:
- In the first scenario, the server supports versions 10, 13, and 14, but only 13 and 14 are Fully Deployed (see Section 5). The server sends a Version Negotiation packet listing versions 10, 13, and 14. That kicks off an incompatible version negotiation, and the client starts a new connection with version 14. Now the server's Available Versions field has 13 and 14 in it. In this case, the client would also have picked 14 if it had gotten a Version Negotiation packet with versions 13 and 14, so the handshake works out with Negotiated Version 14 โจ
- In the second scenario, the server supports versions 10, 13, and 14, and all of them are Fully Deployed. But the attacker forges a Version Negotiation packet listing versions 10 and 13. That triggers an incompatible version negotiation, and the client starts a new connection with version 10. Now the server's Available Versions field has 10, 13, and 14. Here, the client would have picked 14 instead of 10 if it had gotten a Version Negotiation packet with versions 10, 13, and 14, so the client aborts the handshake with a version negotiation error ๐จ
This Available Versions check on its own isn't enough to prevent downgrades. Downgrade prevention also depends on the client ignoring Version Negotiation packets that contain the Original Version (see Section 2.1) ๐
After the version negotiation process in this document finishes, the version in use for the connection is whatever the server sent in the Chosen Version field of its Version Information. That stays true even if other versions showed up in the Version field of long headers at some point during the connection's lifetime ๐ฆ Also, since the client can learn the Negotiated Version from the QUIC long header version during compatible version negotiation (see Section 2.3), clients MUST validate that the server's Chosen Version is equal to the Negotiated Version. If they don't match, the client MUST close the connection with a version negotiation error. This keeps an attacker from messing with version negotiation by forging the long header Version field ๐ก๏ธโจ
5. Server Deployments of QUIC ๐ธ
This document mostly talks about a single QUIC server, but real QUIC deployments often have a whole fleet of server instances ๐ฐ So we're going to define some terms:
- Acceptable Versions: This is the set of versions supported by a given server instance. More specifically, these are the versions that a given server instance will use if a client sends a first flight using them.
- Offered Versions: This is the set of versions that a given server instance will send in a Version Negotiation packet if it gets a first flight from an unknown version. This set will usually match the Acceptable Versions set, except during short transitions while versions are being added or removed (see below).
- Fully Deployed Versions: This is the set of QUIC versions that is supported and negotiated by every single QUIC server instance in the deployment. If a deployment only has one server instance, this set equals the Offered Versions set, except during short transitions while versions are being added or removed (see below).
If a deployment has multiple server instances, software updates might not happen at the exact same time on all of them. So a client might get a Version Negotiation packet from an instance that's already been updated, and its follow-up connection attempt might land on a different instance that hasn't been updated yet ๐
Even with only one server instance, you can still end up with a stale Version Negotiation packet if the server does its software update while that packet is still in flight ๐
All of this could make the version downgrade prevention mechanism from Section 4 falsely think a downgrade attack is happening ๐ฉ To avoid that, server operators SHOULD perform a three-step process when they want to add or remove support for a version, as described below ๐
When adding support for a new version:
- The first step is to progressively add support for the new version to all server instances. This step updates the Acceptable Versions but not the Offered Versions nor the Fully Deployed Versions. Once every server instance has been updated, operators wait for at least one MSL so any in-flight Version Negotiation packets can arrive ๐ฐ๏ธ
- Then, the second step is to progressively add the new version to Offered Versions on all server instances. Once that's complete, operators wait for at least another MSL โณ
- Finally, the third step is to progressively add the new version to Fully Deployed Versions on all server instances ๐
When removing support for a version:
- The first step is to progressively remove the version from Fully Deployed Versions on all server instances. Once it's been removed on all server instances, operators wait for at least one MSL so any in-flight Version Negotiation packets can arrive ๐ฐ๏ธ
- Then, the second step is to progressively remove the version from Offered Versions on all server instances. Once that's complete, operators wait for at least another MSL โณ
- Finally, the third step is to progressively remove support for the version from all server instances. That step updates the Acceptable Versions ๐
Heads up, bestie ๐จ During the update window, connections are vulnerable to downgrade attacks for Acceptable Versions that aren't Fully Deployed. That's because a client can't tell a downgrade attack apart from legit exchanges with both updated and non-updated server instances ๐ญ
6. Application-Layer Protocol Considerations โจ
okay so when a client makes a QUIC connection, the whole point is to run an application-layer protocol ๐ That means that when it's deciding which versions are compatible, clients will only consider versions that support one of the intended application-layer protocols. ๐ If the client's first flight advertises multiple Application-Layer Protocol Negotiation (ALPN) [ALPN] tokens and multiple compatible versions, some application-layer protocols might not be able to run over some of the offered compatible versions. ๐ญ So it's the server's job to only select an ALPN token that can run over the compatible QUIC version it picks. ๐
A given ALPN token MUST NOT be used with a new QUIC version that is different from the version the ALPN token was originally defined for, unless all of the following requirements are met:
- The new QUIC version supports the transport features required by the application protocol.
- The new QUIC version supports ALPN.
- The version of QUIC for which the ALPN token was originally defined is compatible with the new QUIC version.
When incompatible version negotiation is in use, the second connection that is created in response to the received Version Negotiation packet MUST restart its application-layer protocol negotiation process without taking into account the Original Version. ๐ฆ
7. Considerations for Future Versions ๐ฎ
bestie, to make it easier to deploy future versions of QUIC, designers of future versions SHOULD try to design their new version so that commonly deployed versions are compatible with it. ๐ธ
QUIC version 1 defines multiple features that are not documented in the QUIC invariants. ๐ง Since QUIC version 1 is widely deployed at the time of writing, this section talks about considerations for future versions to help with compatibility with QUIC version 1. โจ
7.1. Interaction with Retry
QUIC version 1 has Retry packets, which the server can send to validate the client's IP address before parsing the client's first flight. ๐ A server that sends a Retry packet can do that before it parses the client's first flight. That means a server that sends a Retry packet might not have processed the client's Version Information before doing so. ๐
If a future document wants to define compatibility between two versions that both support Retry, that document MUST specify how version negotiation (both compatible and incompatible) interacts with Retry during a handshake that requires both. ๐ For example, this could be done by having the server first send a Retry packet in the Original Version, which validates the client's IP address before it tries compatible version negotiation. ๐ If both versions support authenticating Retry packets, the compatibility definition needs to explain how to authenticate the Retry in the Negotiated Version handshake, even though the Retry itself was sent using the client's Chosen Version. ๐ฅ
7.2. Interaction with TLS Resumption
QUIC version 1 uses TLS 1.3, which supports session resumption by sending session tickets in one connection that can be used in a later connection (see Section 2.2 of [TLS]). ๐ New versions that also use TLS 1.3 SHOULD mandate that their session tickets are tightly scoped to one version of QUIC. In other words, they require that clients not use them across multiple version and that servers validate this client requirement. ๐ซถ This helps mitigate cross-protocol attacks. ๐ก๏ธ
7.3. Interaction with 0-RTT
QUIC version 1 lets the client send data to the server during the handshake using 0-RTT packets. โญ If a future document wants to define compatibility between two versions that both support 0-RTT, that document MUST address the scenario where there are 0-RTT packets in the client's first flight. ๐ค For example, this could be done by defining which transformations are applied to 0-RTT packets. That document could also specify that compatible version negotiation causes 0-RTT data to be rejected by the server. ๐ฅบ
8. Special Handling for QUIC Version 1 ๐
QUIC version 1 was the only QUIC version published on the IETF Standards Track before this document, so it gets special treatment, and here's how it works: if a client is starting a QUIC version 1 connection in response to a received Version Negotiation packet, and the version_information transport parameter is missing from the server's transport parameters, then the client SHALL proceed as if the server's transport parameters contained a version_information transport parameter with a Chosen Version set to 0x00000001 and an Available Version list containing exactly one version set to 0x00000001. ๐ This lets version negotiation work with servers that only support QUIC version 1. โจ
Also, implementations that want to use version negotiation to negotiate versions other than QUIC version 1 MUST implement the version negotiation mechanism defined in this document. ๐
9. Security Considerations ๐จ
Okay, this part is seriously important, so pay attention, bestie ๐ญ The security of this version negotiation mechanism relies on the authenticity of the Version Information exchanged during the handshake. In QUIC version 1, transport parameters are authenticated, which is what keeps this mechanism secure. ๐ Negotiation between compatible versions will have the security of the weakest common version. ๐
The requirement that versions not be assumed compatible helps reduce the possibility of cross-protocol attacks, but more analysis is still needed here. ๐ That analysis is out of scope for this document. ๐
10. IANA Considerations ๐งพ
10.1. QUIC Transport Parameter
IANA has registered the following value in the "QUIC Transport Parameters" registry, which is maintained at <https://www.iana.org/assignments/quic>. ๐
Value: 0x11
Parameter Name: version_information
Status: permanent
Specification: RFC 9368
10.2. QUIC Transport Error Code
IANA has also registered the following value in the "QUIC Transport Error Codes" registry, which is maintained at <https://www.iana.org/assignments/quic>. ๐ท
Value: 0x11
Code: VERSION_NEGOTIATION_ERROR
Description: Error negotiating version
Status: permanent
Specification: RFC 9368
11. References ๐
11.1. Normative References
[ALPN] Friedl, S., Popov, A., Langley, A., and E. Stephan,
"Transport Layer Security (TLS) Application-Layer Protocol
Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301,
July 2014, <https://www.rfc-editor.org/info/rfc7301>.
[QUIC] Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", RFC 9000,
DOI 10.17487/RFC9000, May 2021,
<https://www.rfc-editor.org/info/rfc9000>.
[QUIC-INVARIANTS]
Thomson, M., "Version-Independent Properties of QUIC",
RFC 8999, DOI 10.17487/RFC8999, May 2021,
<https://www.rfc-editor.org/info/rfc8999>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[TLS] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>.
11.2. Informative References
[TCP] Eddy, W., Ed., "Transmission Control Protocol (TCP)",
STD 7, RFC 9293, DOI 10.17487/RFC9293, August 2022,
<https://www.rfc-editor.org/info/rfc9293>.
Acknowledgments ๐
The authors would like to thank Nick Banks, Mike Bishop, Martin Duke, Ryan Hamilton, Roberto Peon, Anthony Rossi, and Martin Thomson for their input and contributions. ๐ซถ๐
Authors' Addresses ๐๏ธ
David Schinazi
Google LLC
1600 Amphitheatre Parkway
Mountain View, CA 94043
United States of America
Email: dschinazi.ietf@gmail.com
Eric Rescorla
Mozilla
Email: ekr@rtfm.com
๐ฆ where this page comes from
- ietf: rfc9368 2023-05
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms