draft-ietf-quic-load-balancers-02.txt   draft-ietf-quic-load-balancers-03.txt 
QUIC M. Duke QUIC M. Duke
Internet-Draft F5 Networks, Inc. Internet-Draft F5 Networks, Inc.
Intended status: Standards Track N. Banks Intended status: Standards Track N. Banks
Expires: September 10, 2020 Microsoft Expires: 11 January 2021 Microsoft
March 9, 2020 10 July 2020
QUIC-LB: Generating Routable QUIC Connection IDs QUIC-LB: Generating Routable QUIC Connection IDs
draft-ietf-quic-load-balancers-02 draft-ietf-quic-load-balancers-03
Abstract Abstract
QUIC connection IDs allow continuation of connections across address/ QUIC connection IDs allow continuation of connections across address/
port 4-tuple changes, and can store routing information for stateless port 4-tuple changes, and can store routing information for stateless
or low-state load balancers. They also can prevent linkability of or low-state load balancers. They also can prevent linkability of
connections across deliberate address migration through the use of connections across deliberate address migration through the use of
protected communications between client and server. This creates protected communications between client and server. This creates
issues for load-balancing intermediaries. This specification issues for load-balancing intermediaries. This specification
standardizes methods for encoding routing information given a small standardizes methods for encoding routing information given a small
skipping to change at page 1, line 40 skipping to change at page 1, line 40
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 10, 2020. This Internet-Draft will expire on 11 January 2021.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents (https://trustee.ietf.org/
(https://trustee.ietf.org/license-info) in effect on the date of license-info) in effect on the date of publication of this document.
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect Please review these documents carefully, as they describe your rights
to this document. Code Components extracted from this document must and restrictions with respect to this document. Code Components
include Simplified BSD License text as described in Section 4.e of extracted from this document must include Simplified BSD License text
the Trust Legal Provisions and are provided without warranty as as described in Section 4.e of the Trust Legal Provisions and are
described in the Simplified BSD License. provided without warranty as described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
2. Protocol Objectives . . . . . . . . . . . . . . . . . . . . . 5 2. Protocol Objectives . . . . . . . . . . . . . . . . . . . . . 5
2.1. Simplicity . . . . . . . . . . . . . . . . . . . . . . . 5 2.1. Simplicity . . . . . . . . . . . . . . . . . . . . . . . 5
2.2. Security . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2. Security . . . . . . . . . . . . . . . . . . . . . . . . 5
3. First CID octet . . . . . . . . . . . . . . . . . . . . . . . 5 3. First CID octet . . . . . . . . . . . . . . . . . . . . . . . 6
3.1. Config Rotation . . . . . . . . . . . . . . . . . . . . . 6 3.1. Config Rotation . . . . . . . . . . . . . . . . . . . . . 6
3.2. Configuration Failover . . . . . . . . . . . . . . . . . 6 3.2. Configuration Failover . . . . . . . . . . . . . . . . . 7
3.3. Length Self-Description . . . . . . . . . . . . . . . . . 7 3.3. Length Self-Description . . . . . . . . . . . . . . . . . 7
4. Routing Algorithms . . . . . . . . . . . . . . . . . . . . . 7 4. Routing Algorithms . . . . . . . . . . . . . . . . . . . . . 7
4.1. Plaintext CID Algorithm . . . . . . . . . . . . . . . . . 8 4.1. Plaintext CID Algorithm . . . . . . . . . . . . . . . . . 9
4.1.1. Configuration Agent Actions . . . . . . . . . . . . . 8 4.1.1. Configuration Agent Actions . . . . . . . . . . . . . 9
4.1.2. Load Balancer Actions . . . . . . . . . . . . . . . . 9 4.1.2. Load Balancer Actions . . . . . . . . . . . . . . . . 9
4.1.3. Server Actions . . . . . . . . . . . . . . . . . . . 9 4.1.3. Server Actions . . . . . . . . . . . . . . . . . . . 9
4.2. Obfuscated CID Algorithm . . . . . . . . . . . . . . . . 9 4.2. Obfuscated CID Algorithm . . . . . . . . . . . . . . . . 10
4.2.1. Configuration Agent Actions . . . . . . . . . . . . . 9 4.2.1. Configuration Agent Actions . . . . . . . . . . . . . 10
4.2.2. Load Balancer Actions . . . . . . . . . . . . . . . . 10 4.2.2. Load Balancer Actions . . . . . . . . . . . . . . . . 10
4.2.3. Server Actions . . . . . . . . . . . . . . . . . . . 10 4.2.3. Server Actions . . . . . . . . . . . . . . . . . . . 11
4.3. Stream Cipher CID Algorithm . . . . . . . . . . . . . . . 10 4.3. Stream Cipher CID Algorithm . . . . . . . . . . . . . . . 11
4.3.1. Configuration Agent Actions . . . . . . . . . . . . . 11 4.3.1. Configuration Agent Actions . . . . . . . . . . . . . 12
4.3.2. Load Balancer Actions . . . . . . . . . . . . . . . . 11 4.3.2. Load Balancer Actions . . . . . . . . . . . . . . . . 12
4.3.3. Server Actions . . . . . . . . . . . . . . . . . . . 12 4.3.3. Server Actions . . . . . . . . . . . . . . . . . . . 13
4.4. Block Cipher CID Algorithm . . . . . . . . . . . . . . . 12 4.4. Block Cipher CID Algorithm . . . . . . . . . . . . . . . 13
4.4.1. Configuration Agent Actions . . . . . . . . . . . . . 12 4.4.1. Configuration Agent Actions . . . . . . . . . . . . . 14
4.4.2. Load Balancer Actions . . . . . . . . . . . . . . . . 13 4.4.2. Load Balancer Actions . . . . . . . . . . . . . . . . 14
4.4.3. Server Actions . . . . . . . . . . . . . . . . . . . 13 4.4.3. Server Actions . . . . . . . . . . . . . . . . . . . 15
5. Retry Service . . . . . . . . . . . . . . . . . . . . . . . . 13 5. ICMP Processing . . . . . . . . . . . . . . . . . . . . . . . 15
5.1. Common Requirements . . . . . . . . . . . . . . . . . . . 14 6. Retry Service . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2. No-Shared-State Retry Service . . . . . . . . . . . . . . 14 6.1. Common Requirements . . . . . . . . . . . . . . . . . . . 16
5.2.1. Configuration Agent Actions . . . . . . . . . . . . . 14 6.2. No-Shared-State Retry Service . . . . . . . . . . . . . . 16
5.2.2. Service Requirements . . . . . . . . . . . . . . . . 15 6.2.1. Configuration Agent Actions . . . . . . . . . . . . . 17
5.2.3. Server Requirements . . . . . . . . . . . . . . . . . 16 6.2.2. Service Requirements . . . . . . . . . . . . . . . . 17
5.3. Shared-State Retry Service . . . . . . . . . . . . . . . 17 6.2.3. Server Requirements . . . . . . . . . . . . . . . . . 18
5.3.1. Configuration Agent Actions . . . . . . . . . . . . . 18 6.3. Shared-State Retry Service . . . . . . . . . . . . . . . 19
5.3.2. Service Requirements . . . . . . . . . . . . . . . . 18 6.3.1. Configuration Agent Actions . . . . . . . . . . . . . 21
5.3.3. Server Requirements . . . . . . . . . . . . . . . . . 18 6.3.2. Service Requirements . . . . . . . . . . . . . . . . 21
6. Configuration Requirements . . . . . . . . . . . . . . . . . 19 6.3.3. Server Requirements . . . . . . . . . . . . . . . . . 21
7. Additional Use Cases . . . . . . . . . . . . . . . . . . . . 20 7. Configuration Requirements . . . . . . . . . . . . . . . . . 22
7.1. Load balancer chains . . . . . . . . . . . . . . . . . . 20 8. Additional Use Cases . . . . . . . . . . . . . . . . . . . . 23
7.2. Moving connections between servers . . . . . . . . . . . 21 8.1. Load balancer chains . . . . . . . . . . . . . . . . . . 23
8. Security Considerations . . . . . . . . . . . . . . . . . . . 21 8.2. Moving connections between servers . . . . . . . . . . . 24
8.1. Attackers not between the load balancer and server . . . 21 9. Version Invariance of QUIC-LB . . . . . . . . . . . . . . . . 24
8.2. Attackers between the load balancer and server . . . . . 22 10. Security Considerations . . . . . . . . . . . . . . . . . . . 25
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 10.1. Attackers not between the load balancer and server . . . 25
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 22 10.2. Attackers between the load balancer and server . . . . . 26
10.1. Normative References . . . . . . . . . . . . . . . . . . 22 10.3. Limited configuration scope . . . . . . . . . . . . . . 26
10.2. Informative References . . . . . . . . . . . . . . . . . 22 10.4. Stateless Reset Oracle . . . . . . . . . . . . . . . . . 26
Appendix A. Load Balancer Test Vectors . . . . . . . . . . . . . 22 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26
A.1. Obfuscated Connection ID Algorithm . . . . . . . . . . . 23 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 27
A.2. Stream Cipher Connection ID Algorithm . . . . . . . . . . 24 12.1. Normative References . . . . . . . . . . . . . . . . . . 27
A.3. Block Cipher Connection ID Algorithm . . . . . . . . . . 25 12.2. Informative References . . . . . . . . . . . . . . . . . 27
Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . 26 Appendix A. Load Balancer Test Vectors . . . . . . . . . . . . . 27
Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 26 A.1. Obfuscated Connection ID Algorithm . . . . . . . . . . . 27
C.1. since-draft-ietf-quic-load-balancers-01 . . . . . . . . . 26 A.2. Stream Cipher Connection ID Algorithm . . . . . . . . . . 28
C.2. since-draft-ietf-quic-load-balancers-00 . . . . . . . . . 26 A.3. Block Cipher Connection ID Algorithm . . . . . . . . . . 29
C.3. Since draft-duke-quic-load-balancers-06 . . . . . . . . . 26 Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . 30
C.4. Since draft-duke-quic-load-balancers-05 . . . . . . . . . 26 Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 30
C.5. Since draft-duke-quic-load-balancers-04 . . . . . . . . . 26 C.1. since-draft-ietf-quic-load-balancers-02 . . . . . . . . . 30
C.6. Since draft-duke-quic-load-balancers-03 . . . . . . . . . 27 C.2. since-draft-ietf-quic-load-balancers-01 . . . . . . . . . 30
C.7. Since draft-duke-quic-load-balancers-02 . . . . . . . . . 27 C.3. since-draft-ietf-quic-load-balancers-00 . . . . . . . . . 30
C.8. Since draft-duke-quic-load-balancers-01 . . . . . . . . . 27 C.4. Since draft-duke-quic-load-balancers-06 . . . . . . . . . 30
C.9. Since draft-duke-quic-load-balancers-00 . . . . . . . . . 27 C.5. Since draft-duke-quic-load-balancers-05 . . . . . . . . . 31
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27 C.6. Since draft-duke-quic-load-balancers-04 . . . . . . . . . 31
C.7. Since draft-duke-quic-load-balancers-03 . . . . . . . . . 31
C.8. Since draft-duke-quic-load-balancers-02 . . . . . . . . . 31
C.9. Since draft-duke-quic-load-balancers-01 . . . . . . . . . 31
C.10. Since draft-duke-quic-load-balancers-00 . . . . . . . . . 32
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32
1. Introduction 1. Introduction
QUIC packets [QUIC-TRANSPORT] usually contain a connection ID to QUIC packets [QUIC-TRANSPORT] usually contain a connection ID to
allow endpoints to associate packets with different address/port allow endpoints to associate packets with different address/port
4-tuples to the same connection context. This feature makes 4-tuples to the same connection context. This feature makes
connections robust in the event of NAT rebinding. QUIC endpoints connections robust in the event of NAT rebinding. QUIC endpoints
usually designate the connection ID which peers use to address usually designate the connection ID which peers use to address
packets. Server-generated connection IDs create a potential need for packets. Server-generated connection IDs create a potential need for
out-of-band communication to support QUIC. out-of-band communication to support QUIC.
skipping to change at page 4, line 45 skipping to change at page 5, line 9
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
In this document, these words will appear with that interpretation In this document, these words will appear with that interpretation
only when in ALL CAPS. Lower case uses of these words are not to be only when in ALL CAPS. Lower case uses of these words are not to be
interpreted as carrying significance described in RFC 2119. interpreted as carrying significance described in RFC 2119.
In this document, "client" and "server" refer to the endpoints of a In this document, "client" and "server" refer to the endpoints of a
QUIC connection unless otherwise indicated. A "load balancer" is an QUIC connection unless otherwise indicated. A "load balancer" is an
intermediary for that connection that does not possess QUIC intermediary for that connection that does not possess QUIC
connection keys, but it may rewrite IP addresses or conduct other IP connection keys, but it may rewrite IP addresses or conduct other IP
or UDP processing. or UDP processing. A "configuration agent" is the entity that
determines the QUIC-LB configuration parameters for the network and
leverages some system to distribute that configuration.
Note that stateful load balancers that act as proxies, by terminating Note that stateful load balancers that act as proxies, by terminating
a QUIC connection with the client and then retrieving data from the a QUIC connection with the client and then retrieving data from the
server using QUIC or another protocol, are treated as a server with server using QUIC or another protocol, are treated as a server with
respect to this specification. respect to this specification.
For brevity, "Connection ID" will often be abbreviated as "CID".
2. Protocol Objectives 2. Protocol Objectives
2.1. Simplicity 2.1. Simplicity
QUIC is intended to provide unlinkability across connection QUIC is intended to provide unlinkability across connection
migration, but servers are not required to provide additional migration, but servers are not required to provide additional
connection IDs that effectively prevent linkability. If the connection IDs that effectively prevent linkability. If the
coordination scheme is too difficult to implement, servers behind coordination scheme is too difficult to implement, servers behind
load balancers using connection IDs for routing will use trivially load balancers using connection IDs for routing will use trivially
linkable connection IDs. Clients will therefore be forced choose linkable connection IDs. Clients will therefore be forced to choose
between terminating the connection during migration or remaining between terminating the connection during migration or remaining
linkable, subverting a design objective of QUIC. linkable, subverting a design objective of QUIC.
The solution should be both simple to implement and require little The solution should be both simple to implement and require little
additional infrastructure for cryptographic keys, etc. additional infrastructure for cryptographic keys, etc.
2.2. Security 2.2. Security
In the limit where there are very few connections to a pool of In the limit where there are very few connections to a pool of
servers, no scheme can prevent the linking of two connection IDs with servers, no scheme can prevent the linking of two connection IDs with
skipping to change at page 6, line 26 skipping to change at page 6, line 39
another to result in Fail Payloads. The four states encoded in these another to result in Fail Payloads. The four states encoded in these
two bits allow two mutually exclusive server pools to coexist, and two bits allow two mutually exclusive server pools to coexist, and
for each of them to transition to a new set of parameters. for each of them to transition to a new set of parameters.
When new configuration is distributed to servers, there will be a When new configuration is distributed to servers, there will be a
transition period when connection IDs reflecting old and new transition period when connection IDs reflecting old and new
configuration coexist in the network. The rotation bits allow load configuration coexist in the network. The rotation bits allow load
balancers to apply the correct routing algorithm and parameters to balancers to apply the correct routing algorithm and parameters to
incoming packets. incoming packets.
Servers MUST NOT generate new connection IDs using an old Configuration Agents SHOULD make an effort to deliver new
configuration when it has sent an Ack payload for a new configurations to load balancers before doing so to servers, so that
configuration. load balancers are ready to process CIDs using the new parameters
when they arrive.
Load balancers SHOULD NOT use a codepoint to represent a new A Configuration Agent SHOULD NOT use a codepoint to represent a new
configuration until it takes precautions to make sure that all configuration until it takes precautions to make sure that all
connections using IDs with an old configuration at that codepoint connections using CIDs with an old configuration at that codepoint
have closed or transitioned. They MAY drop connection IDs with the have closed or transitioned.
old configuration after a reasonable interval to accelerate this
process. Servers MUST NOT generate new connection IDs using an old
configuration after receiving a new one from the configuration agent.
Servers MUST send NEW_CONNECTION_ID frames that provide CIDS using
the new configuration, and retire CIDs using the old configuration
using the "Retire Prior To" field of that frame.
3.2. Configuration Failover 3.2. Configuration Failover
If a server has not received a valid QUIC-LB configuration, and If a server has not received a valid QUIC-LB configuration, and
believes that low-state, Connection-ID aware load balancers are in believes that low-state, Connection-ID aware load balancers are in
the path, it SHOULD generate connection IDs with the config rotation the path, it SHOULD generate connection IDs with the config rotation
bits set to '11' and SHOULD use the "disable_migration" transport bits set to '11' and SHOULD use the "disable_migration" transport
parameter in all new QUIC connections. It SHOULD NOT send parameter in all new QUIC connections. It SHOULD NOT send
NEW_CONNECTION_ID frames with new values. NEW_CONNECTION_ID frames with new values.
skipping to change at page 7, line 36 skipping to change at page 8, line 5
to generate routable connection IDs. to generate routable connection IDs.
The algorithms differ in the complexity of configuration at both load The algorithms differ in the complexity of configuration at both load
balancer and server. Increasing complexity improves obfuscation of balancer and server. Increasing complexity improves obfuscation of
the server mapping. the server mapping.
As clients sometimes generate the DCIDs in long headers, these might As clients sometimes generate the DCIDs in long headers, these might
not conform to the expectations of the routing algorithm. These are not conform to the expectations of the routing algorithm. These are
called "non-compliant DCIDs": called "non-compliant DCIDs":
o The DCID might not be long enough for the routing algorithm to * The DCID might not be long enough for the routing algorithm to
process. process.
o The extracted server mapping might not correspond to an active * The extracted server mapping might not correspond to an active
server. server.
o A field that should be all zeroes after decryption may not be so. * A field that should be all zeroes after decryption may not be so.
Load balancers MUST forward packets with long headers with non- Load balancers MUST forward packets with long headers with non-
compliant DCIDs to an active server using an algorithm of its own compliant DCIDs to an active server using an algorithm of its own
choosing. It need not coordinate this algorithm with the servers. choosing. It need not coordinate this algorithm with the servers.
The algorithm SHOULD be deterministic over short time scales so that The algorithm SHOULD be deterministic over short time scales so that
related packets go to the same server. For example, a non-compliant related packets go to the same server. The design of this algorithm
DCID might be converted to an integer and divided by the number of SHOULD consider the version-invariant properties of QUIC described in
servers, with the modulus used to forward the packet. The number of [QUIC-INVARIANTS] to maximize its robustness to future versions of
servers is usually consistent on the time scale of a QUIC connection QUIC. For example, a non-compliant DCID might be converted to an
handshake. integer and divided by the number of servers, with the modulus used
to forward the packet. The number of servers is usually consistent
on the time scale of a QUIC connection handshake. See also
Section 9.
As a partial exception to the above, load balancers MAY drop packets
with long headers and non-compliant DCIDs if and only if it knows
that the encoded QUIC version does not allow a non-compliant DCID in
a packet with that signature. For example, a load balancer can
safely drop a QUIC version 1 Handshake packet with a non-compliant
DCIDs. The prohibition against dropping packets with long headers
remains for unknown QUIC versions.
Load balancers SHOULD drop packets with non-compliant DCIDs in a Load balancers SHOULD drop packets with non-compliant DCIDs in a
short header. short header.
A QUIC-LB configuration MAY significantly over-provision the server
ID space (i.e., provide far more codepoints than there are servers)
to increase the probability that a randomly generated Destination
Connection ID is non- compliant.
Load balancers MUST forward packets with compliant DCIDs to a server Load balancers MUST forward packets with compliant DCIDs to a server
in accordance with the chosen routing algorithm. in accordance with the chosen routing algorithm.
The load balancer MUST NOT make the routing behavior dependent on any The load balancer MUST NOT make the routing behavior dependent on any
bits in the first octet of the QUIC packet header, except the first bits in the first octet of the QUIC packet header, except the first
bit, which indicates a long header. All other bits are QUIC version- bit, which indicates a long header. All other bits are QUIC version-
dependent and intermediaries would cannot build their design on dependent and intermediaries would cannot build their design on
version-specific templates. version-specific templates.
There are situations where a server pool might be operating two or There are situations where a server pool might be operating two or
skipping to change at page 8, line 39 skipping to change at page 9, line 27
format is depicted in the figure below. format is depicted in the figure below.
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| First octet | Server ID (X=8..152) | | First octet | Server ID (X=8..152) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Any (0..152-X) | | Any (0..152-X) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: Plaintext CID Format Figure 1: Plaintext CID Format
4.1.1. Configuration Agent Actions 4.1.1. Configuration Agent Actions
The configuration agent selects a number of bytes of the server The configuration agent selects a number of bytes of the server
connection ID (SCID) to encode individual server IDs, called the connection ID to encode individual server IDs, called the "routing
"routing bytes". The number of bytes MUST have enough entropy to bytes". The number of bytes MUST have enough entropy to have a
have a different code point for each server. different code point for each server.
It also assigns a server ID to each server. It also assigns a server ID to each server.
4.1.2. Load Balancer Actions 4.1.2. Load Balancer Actions
On each incoming packet, the load balancer extracts consecutive On each incoming packet, the load balancer extracts consecutive
octets, beginning with the second octet. These bytes represent the octets, beginning with the second octet. These bytes represent the
server ID. server ID.
4.1.3. Server Actions 4.1.3. Server Actions
skipping to change at page 9, line 39 skipping to change at page 10, line 23
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| First octet | Mixed routing and non-routing bits (64..152) | | First octet | Mixed routing and non-routing bits (64..152) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: Obfuscated CID Format Figure 2: Obfuscated CID Format
4.2.1. Configuration Agent Actions 4.2.1. Configuration Agent Actions
The configuration agent selects an arbitrary set of bits of the The configuration agent selects an arbitrary set of bits of the
server connection ID (SCID) that it will use to route to a given server connection ID that it will use to route to a given server,
server, called the "routing bits". The number of bits MUST have called the "routing bits". The number of bits MUST have enough
enough entropy to have a different code point for each server, and entropy to have a different code point for each server, and SHOULD
SHOULD have enough entropy so that there are many codepoints for each have enough entropy so that there are many codepoints for each
server. server.
The configuration agent MUST NOT select a routing mask with more than The configuration agent MUST NOT select a routing mask with more than
136 routing bits set to 1, which allows for the first octet and up to 136 routing bits set to 1, which allows for the first octet and up to
2 octets for server purposes in a maximum-length connection ID. 2 octets for server purposes in a maximum-length connection ID.
The configuration agent selects a divisor that MUST be larger than The configuration agent selects a divisor that MUST be larger than
the number of servers. It SHOULD be large enough to accommodate the number of servers. It SHOULD be large enough to accommodate
reasonable increases in the number of servers. The divisor MUST be reasonable increases in the number of servers. The divisor MUST be
an odd integer so certain addition operations do not always produce an odd integer so certain addition operations do not always produce
an even number. an even number.
The configuration agent also assigns each server a "modulus", an The configuration agent also assigns each server a "modulus", an
integer between 0 and the divisor minus 1. These MUST be unique for integer between 0 and the divisor minus 1. These MUST be unique for
each server, and SHOULD be distributed across the entire number space each server, and SHOULD be distributed across the entire number space
between zero and the divisor. between zero and the divisor.
4.2.2. Load Balancer Actions 4.2.2. Load Balancer Actions
Upon receipt of a QUIC packet, the load balancer extracts the Upon receipt of a QUIC packet, the load balancer extracts the
selected bits of the SCID and expresses them as an unsigned integer selected bits of the Server CID and expresses them as an unsigned
of that length. The load balancer then divides the result by the integer of that length. The load balancer then divides the result by
chosen divisor. The modulus of this operation maps to the modulus the chosen divisor. The modulus of this operation maps to the
for the destination server. modulus for the destination server.
Note that any SCID that contains a server's modulus, plus an Note that any Server CID that contains a server's modulus, plus an
arbitrary integer multiple of the divisor, in the routing bits is arbitrary integer multiple of the divisor, in the routing bits is
routable to that server regardless of the contents of the non-routing routable to that server regardless of the contents of the non-routing
bits. Outside observers that do not know the divisor or the routing bits. Outside observers that do not know the divisor or the routing
bits will therefore have difficulty identifying that two SCIDs route bits will therefore have difficulty identifying that two Server CIDs
to the same server. route to the same server.
Note also that not all Connection IDs are necessarily routable, as Note also that not all Connection IDs are necessarily routable, as
the computed modulus may not match one assigned to any server. These the computed modulus may not match one assigned to any server. These
DCIDs are non-compliant as described above. DCIDs are non-compliant as described above.
4.2.3. Server Actions 4.2.3. Server Actions
The server chooses a connection ID length. This MUST contain all of The server chooses a connection ID length. This MUST contain all of
the routing bits and MUST be at least 9 octets to provide adequate the routing bits and MUST be at least 9 octets to provide adequate
entropy. entropy.
skipping to change at page 11, line 10 skipping to change at page 11, line 42
4.3. Stream Cipher CID Algorithm 4.3. Stream Cipher CID Algorithm
The Stream Cipher CID algorithm provides true cryptographic The Stream Cipher CID algorithm provides true cryptographic
protection, rather than mere obfuscation, at the cost of additional protection, rather than mere obfuscation, at the cost of additional
per-packet processing at the load balancer to decrypt every incoming per-packet processing at the load balancer to decrypt every incoming
connection ID. The CID format is depicted below. connection ID. The CID format is depicted below.
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| First Octet | Nonce (X=64..144) | | First Octet | Nonce (X=64..128) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Encrypted Server ID (Y=8..152-X) | | Encrypted Server ID (Y=8..152-X) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| For server use (0..152-X-Y) | | For server use (0..152-X-Y) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 3: Stream Cipher CID Format Figure 3: Stream Cipher CID Format
4.3.1. Configuration Agent Actions 4.3.1. Configuration Agent Actions
The configuration agent assigns a server ID to every server in its The configuration agent assigns a server ID to every server in its
pool, and determines a server ID length (in octets) sufficiently pool, and determines a server ID length (in octets) sufficiently
large to encode all server IDs, including potential future servers. large to encode all server IDs, including potential future servers.
The configuration agent also selects a nonce length and an 16-octet The configuration agent also selects a nonce length and an 16-octet
AES-ECB key to use for connection ID decryption. The nonce length AES-ECB key to use for connection ID decryption. The nonce length
MUST be at least 8 octets and no more than 16 octets. The nonce MUST be at least 8 octets and no more than 16 octets. The nonce
length and server ID length MUST sum to 19 or fewer octets. length and server ID length MUST sum to 19 or fewer octets.
4.3.2. Load Balancer Actions 4.3.2. Load Balancer Actions
Upon receipt of a QUIC packet that is not of type Initial or 0-RTT, Upon receipt of a QUIC packet, the load balancer extracts as many of
the load balancer extracts as many of the earliest octets from the the earliest octets from the destination connection ID as necessary
destination connection ID as necessary to match the nonce length. to match the nonce length. The server ID immediately follows.
The server ID immediately follows.
The load balancer decrypts the server ID using 128-bit AES Electronic The load balancer decrypts the nonce and the server ID using the
Codebook (ECB) mode, much like QUIC header protection. The nonce following three pass algorithm:
octets are zero-padded to 16 octets. AES-ECB encrypts this nonce
using its key to generate a mask which it applies to the encrypted
server id.
server_id = encrypted_server_id ^ AES-ECB(key, padded-nonce) * Pass 1: The load balancer decrypts the server ID using 128-bit AES
Electronic Codebook (ECB) mode, much like QUIC header protection.
The encrypted nonce octets are zero-padded to 16 octets. AES-ECB
encrypts this encrypted nonce using its key to generate a mask
which it applies to the encrypted server id. This provides an
intermediate value of the server ID, referred to as server-id
intermediate.
server_id_intermediate = encrypted_server_id ^ AES-ECB(key, padded-
encrypted-nonce)
* Pass 2: The load balancer decrypts the nonce octets using 128-bit
AES ECB mode, using the server-id intermediate as "nonce" for this
pass. The server-id intermediate octets are zero-padded to 16
octets. AES-ECB encrypts this padded server-id intermediate using
its key to generate a mask which it applies to the encrypted
nonce. This provides the decrypted nonce value.
nonce = encrypted_nonce ^ AES-ECB(key, padded-server_id_intermediate)
* Pass 3: The load balancer decrypts the server ID using 128-bit AES
ECB mode. The nonce octets are zero-padded to 16 octets. AES-ECB
encrypts this nonce using its key to generate a mask which it
applies to the intermediate server id. This provides the
decrypted server ID.
server_id = server_id_intermediate ^ AES-ECB(key, padded-nonce)
For example, if the nonce length is 10 octets and the server ID For example, if the nonce length is 10 octets and the server ID
length is 2 octets, the connection ID can be as small as 13 octets. length is 2 octets, the connection ID can be as small as 13 octets.
The load balancer uses the the second through eleventh of the The load balancer uses the the second through eleventh octets of the
connection ID for the nonce, zero-pads it to 16 octets using the connection ID for the nonce, zero-pads it to 16 octets, uses xors the
first 6 octets of the token, and uses this to decrypt the server ID result with the twelfth and thirteenth octet. The result is padded
in the twelfth and thirteenth octet. with 14 octets of zeros and encrypted to obtain a mask that is xored
with the nonce octets. Finally, the nonce octets are padded with six
octets of zeros, encrypted, and the first two octets xored with the
server ID octets to obtain the actual server ID.
This three-pass algorithm is a simplified version of the FFX
algorithm, with the property that each encrypted nonce value depends
on all server ID bits, and each encrypted server ID bit depends on
all nonce bits and all server ID bits. This mitigates attacks
against stream ciphers in which attackers simply flip encrypted
server-ID bits.
The output of the decryption is the server ID that the load balancer The output of the decryption is the server ID that the load balancer
uses for routing. uses for routing.
4.3.3. Server Actions 4.3.3. Server Actions
When generating a routable connection ID, the server writes arbitrary When generating a routable connection ID, the server writes arbitrary
bits into its nonce octets, and its provided server ID into the bits into its nonce octets, and its provided server ID into the
server ID octets. Servers MAY opt to have a longer connection ID server ID octets. Servers MAY opt to have a longer connection ID
beyond the nonce and server ID. The nonce and additional bits MAY beyond the nonce and server ID. The additional bits MAY encode
encode additional information, but SHOULD appear essentially random additional information, but SHOULD appear essentially random to
to observers. observers.
The server decrypts the server ID using 128-bit AES Electronic If the decrypted nonce bits increase monotonically, that guarantees
Codebook (ECB) mode, much like QUIC header protection. The nonce that nonces are not reused between connection IDs from the same
octets are zero-padded to 16 octets using the as many of the first server.
octets of the token as necessary. AES-ECB encrypts this nonce using
its key to generate a mask which it applies to the server id.
encrypted_server_id = server_id ^ AES-ECB(key, padded-nonce) The server encrypts the server ID using exactly the algorithm as
described in Section 4.3.2, performing the three passes in reverse
order.
4.4. Block Cipher CID Algorithm 4.4. Block Cipher CID Algorithm
The Block Cipher CID Algorithm, by using a full 16 octets of The Block Cipher CID Algorithm, by using a full 16 octets of
plaintext and a 128-bit cipher, provides higher cryptographic plaintext and a 128-bit cipher, provides higher cryptographic
protection and detection of non-compliant connection IDs. However, protection and detection of non-compliant connection IDs. However,
it also requires connection IDs of at least 17 octets, increasing it also requires connection IDs of at least 17 octets, increasing
overhead of client-to-server packets. overhead of client-to-server packets.
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| First octet | Encrypted server ID (X=8..144) | | First octet | Encrypted server ID (X=8..128) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Encrypted Zero Padding (Y=0..144-X) | | Encrypted Zero Padding (Y=0..128-X) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Encrypted bits for server use (144-X-Y) | | Encrypted bits for server use (128-X-Y) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Unencrypted bits for server use (0..24) | | Unencrypted bits for server use (0..24) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: Block Cipher CID Format Figure 4: Block Cipher CID Format
4.4.1. Configuration Agent Actions 4.4.1. Configuration Agent Actions
The configuration agent assigns a server ID to every server in its The configuration agent assigns a server ID to every server in its
pool, and determines a server ID length (in octets) sufficiently pool, and determines a server ID length (in octets) sufficiently
skipping to change at page 13, line 41 skipping to change at page 15, line 19
provided server ID into the server ID octets, zeroes into the zero- provided server ID into the server ID octets, zeroes into the zero-
padding octets, and arbitrary bits into the remaining bits. These padding octets, and arbitrary bits into the remaining bits. These
arbitrary bits MAY encode additional information. Bits in the first, arbitrary bits MAY encode additional information. Bits in the first,
eighteenth, nineteenth, and twentieth octets SHOULD appear eighteenth, nineteenth, and twentieth octets SHOULD appear
essentially random to observers. The first octet is reserved as essentially random to observers. The first octet is reserved as
described in Section 3. described in Section 3.
The server then encrypts the second through seventeenth octets using The server then encrypts the second through seventeenth octets using
the 128-bit AES-ECB cipher. the 128-bit AES-ECB cipher.
5. Retry Service 5. ICMP Processing
For protocols where 4-tuple load balancing is sufficient, it is
straightforward to deliver ICMP packets from the network to the
correct server, by reading the IP and transport-layer headers to
obtain the 4-tuple. When routing is based on connection ID, further
measures are required, as most QUIC packets that trigger ICMP
responses will only contain a client-generated connection ID that
contains no routing information.
To solve this problem, load balancers MAY maintain a mapping of
Client IP and port to server ID based on recently observed packets.
Alternatively, servers MAY implement the technique described in
Section 14.4.1 of [QUIC-TRANSPORT] to increase the likelihood a
Source Connection ID is included in ICMP responses to Path Maximum
Transmission Unit (PMTU) probes. Load balancers MAY parse the echoed
packet to extract the Source Connection ID, if it contains a QUIC
long header, and extract the Server ID as if it were in a Destination
CID.
6. Retry Service
When a server is under load, QUICv1 allows it to defer storage of When a server is under load, QUICv1 allows it to defer storage of
connection state until the client proves it can receive packets at connection state until the client proves it can receive packets at
its advertised IP address. Through the use of a Retry packet, a its advertised IP address. Through the use of a Retry packet, a
token in subsequent client Initial packets, and the token in subsequent client Initial packets, and the
original_connection_id transport parameter, servers verify address original_destination_connection_id transport parameter, servers
ownership and clients verify that there is no "man in the middle" verify address ownership and clients verify that there is no "man in
generating Retry packets. the middle" generating Retry packets.
As a trusted Retry Service is literally a "man in the middle," the As a trusted Retry Service is literally a "man in the middle," the
service must communicate the original_connection_id back to the service must communicate the original_destination_connection_id back
server so that in can pass client verification. It also must either to the server so that it can pass client verification. It also must
verify the address itself (with the server trusting this either verify the address itself (with the server trusting this
verification) or make sure there is common context for the server to verification) or make sure there is common context for the server to
verify the address using a service-generated token. verify the address using a service-generated token.
The service must also communicate the source connection ID of the
Retry packet to the server so that it can include it in a transport
parameter for client verification.
There are two different mechanisms to allow offload of DoS mitigation There are two different mechanisms to allow offload of DoS mitigation
to a trusted network service. One requires no shared state; the to a trusted network service. One requires no shared state; the
server need only be configured to trust a retry service, though this server need only be configured to trust a retry service, though this
imposes other operational constraints. The other requires shared imposes other operational constraints. The other requires shared
key, but has no such constraints. key, but has no such constraints.
Retry services MUST forward all QUIC packets that are not of type Retry services MUST forward all QUIC packets that are not of type
Initial or 0-RTT. Other packets types might involve changed IP Initial or 0-RTT. Other packets types might involve changed IP
addresses or connection IDs, so it is not practical for Retry addresses or connection IDs, so it is not practical for Retry
Services to identify such packets as valid or invalid. Services to identify such packets as valid or invalid.
5.1. Common Requirements 6.1. Common Requirements
Regardless of mechanism, a retry service has an active mode, where it Regardless of mechanism, a retry service has an active mode, where it
is generating Retry packets, and an inactive mode, where it is not, is generating Retry packets, and an inactive mode, where it is not,
based on its assessment of server load and the likelihood an attack based on its assessment of server load and the likelihood an attack
is underway. The choice of mode MAY be made on a per-packet or per- is underway. The choice of mode MAY be made on a per-packet or per-
connection basis, through a stochastic process or based on client connection basis, through a stochastic process or based on client
address. address.
A retry service MUST forward all packets for a QUIC version it does A retry service MUST forward all packets for a QUIC version it does
not understand. Note that if servers support versions the retry not understand. Note that if servers support versions the retry
service does not, this may increase load on the servers. However, service does not, this may increase load on the servers. However,
dropping these packets would introduce chokepoints to block dropping these packets would introduce chokepoints to block
deployment of new QUIC versions. Note that future versions of QUIC deployment of new QUIC versions. Note that future versions of QUIC
might not have Retry packets, require different information in Retry, might not have Retry packets, require different information in Retry,
or use different packet type indicators. or use different packet type indicators.
5.2. No-Shared-State Retry Service 6.2. No-Shared-State Retry Service
The no-shared-state retry service requires no coordination, except The no-shared-state retry service requires no coordination, except
that the server must be configured to accept this service and know that the server must be configured to accept this service and know
which QUIC versions the retry service supports. The scheme uses the which QUIC versions the retry service supports. The scheme uses the
first bit of the token to distinguish between tokens from Retry first bit of the token to distinguish between tokens from Retry
packets (codepoint '0') and tokens from NEW_TOKEN frames (codepoint packets (codepoint '0') and tokens from NEW_TOKEN frames (codepoint
'1'). '1').
5.2.1. Configuration Agent Actions 6.2.1. Configuration Agent Actions
The configuration agent distributes a list of QUIC versions to be The configuration agent distributes a list of QUIC versions to be
served by the Retry Service. served by the Retry Service.
5.2.2. Service Requirements 6.2.2. Service Requirements
A no-shared-state retry service MUST be present on all paths from A no-shared-state retry service MUST be present on all paths from
potential clients to the server. These paths MUST fail to pass QUIC potential clients to the server. These paths MUST fail to pass QUIC
traffic should the service fail for any reason. That is, if the traffic should the service fail for any reason. That is, if the
service is not operational, the server MUST NOT be exposed to client service is not operational, the server MUST NOT be exposed to client
traffic. Otherwise, servers that have already disabled their Retry traffic. Otherwise, servers that have already disabled their Retry
capability would be vulnerable to attack. capability would be vulnerable to attack.
The path between service and server MUST be free of any potential The path between service and server MUST be free of any potential
attackers. Note that this and other requirements above severely attackers. Note that this and other requirements above severely
restrict the operational conditions in which a no-shared-state retry restrict the operational conditions in which a no-shared-state retry
service can safely operate. service can safely operate.
Retry tokens generated by the service MUST have the format below. Retry tokens generated by the service MUST have the format below.
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| ODCIL (7) | Original Destination Connection ID (0..160) | |0| ODCIL (7) | RSCIL (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Original Destination Connection ID (...) | | Original Destination Connection ID (0..160) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Retry Source Connection ID (0..160) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opaque Data (variable) | | Opaque Data (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 5: Format of non-shared-state retry service tokens Figure 5: Format of non-shared-state retry service tokens
The first bit of retry tokens generated by the service MUST be zero. The first bit of retry tokens generated by the service MUST be zero.
The token has the following additional fields: The token has the following additional fields:
ODCIL: The length of the original destination connection ID from the ODCIL: The length of the original destination connection ID from the
triggering Initial packet. This is in cleartext to be readable for triggering Initial packet. This is in cleartext to be readable for
the server, but authenticated later in the token. the server, but authenticated later in the token.
RSCIL: The retry source connection ID length.
Original Destination Connection ID: This also in cleartext and Original Destination Connection ID: This also in cleartext and
authenticated later. authenticated later.
Retry Source Connection ID: This also in cleartext and authenticated
later.
Opaque Data: This data MUST contain encrypted information that allows Opaque Data: This data MUST contain encrypted information that allows
the retry service to validate the client's IP address, in accordance the retry service to validate the client's IP address, in accordance
with the QUIC specification. It MUST also encode a secure hash of with the QUIC specification. It MUST also provide a
the original destination connection ID field to verify that this cryptographically secure means to validate the integrity of the
field has not been edited. entire token.
Upon receipt of an Initial packet with a token that begins with '0', Upon receipt of an Initial packet with a token that begins with '0',
the retry service MUST validate the token in accordance with the QUIC the retry service MUST validate the token in accordance with the QUIC
specification. It must also verify that the secure hash of the specification.
Connect ID is correct. If incorrect, the token is invalid.
In active mode, the service MUST issue Retry packets for all Client In active mode, the service MUST issue Retry packets for all Client
initial packets that contain no token, or a token that has the first initial packets that contain no token, or a token that has the first
bit set to '1'. It MUST NOT forward the packet to the server. The bit set to '1'. It MUST NOT forward the packet to the server. The
service MUST validate all tokens with the first bit set to '0'. If service MUST validate all tokens with the first bit set to '0'. If
successful, the service MUST forward the packet with the token successful, the service MUST forward the packet with the token
intact. If unsuccessful, it MUST drop the packet. intact. If unsuccessful, it MUST drop the packet. The Retry Service
MAY send an Initial Packet containing a CONNECTION_CLOSE frame with
the INVALID_TOKEN error code when dropping the packet.
Note that this scheme has a performance drawback. When the retry Note that this scheme has a performance drawback. When the retry
service is in active mode, clients with a token from a NEW_TOKEN service is in active mode, clients with a token from a NEW_TOKEN
frame will suffer a 1-RTT penalty even though it has proof of address frame will suffer a 1-RTT penalty even though it has proof of address
with its token. with its token.
In inactive mode, the service MUST forward all packets that have no In inactive mode, the service MUST forward all packets that have no
token or a token with the first bit set to '1'. It MUST validate all token or a token with the first bit set to '1'. It MUST validate all
tokens with the first bit set to '0'. If successful, the service tokens with the first bit set to '0'. If successful, the service
MUST forward the packet with the token intact. If unsuccessful, it MUST forward the packet with the token intact. If unsuccessful, it
MUST either drop the packet or forward it with the token removed. MUST either drop the packet or forward it with the token removed.
The latter requires decryption and re-encryption of the entire The latter requires decryption and re-encryption of the entire
Initial packet to avoid authentication failure. Forwarding the Initial packet to avoid authentication failure. Forwarding the
packet causes the server to respond without the packet causes the server to respond without the
original_connection_id transport parameter, which preserves the original_destination_connection_id transport parameter, which
normal QUIC signal to the client that there is an unauthorized man in preserves the normal QUIC signal to the client that there is an
the middle. unauthorized man in the middle.
5.2.3. Server Requirements 6.2.3. Server Requirements
A server behind a non-shared-state retry service MUST NOT send Retry A server behind a non-shared-state retry service MUST NOT send Retry
packets for a QUIC version the retry service understands. It MAY packets for a QUIC version the retry service understands. It MAY
send Retry for QUIC versions the Retry Service does not understand. send Retry for QUIC versions the Retry Service does not understand.
Tokens sent in NEW_TOKEN frames MUST have the first bit be set to Tokens sent in NEW_TOKEN frames MUST have the first bit be set to
'1'. '1'.
If a server receives an Initial Packet with the first bit set to '1', If a server receives an Initial Packet with the first bit set to '1',
it could be from a server-generated NEW_TOKEN frame and should be it could be from a server-generated NEW_TOKEN frame and should be
processed in accordance with the QUIC specification. If a server processed in accordance with the QUIC specification. If a server
receives an Initial Packet with the first bit to '0', it is a Retry receives an Initial Packet with the first bit to '0', it is a Retry
token and the server MUST NOT attempt to validate it. Instead, it token and the server MUST NOT attempt to validate it. Instead, it
MUST assume the address is validated and MUST extract the Original MUST assume the address is validated and MUST extract the Original
Destination Connection ID, assuming the format described in Destination Connection ID and Retry Source Connection ID, assuming
Section 5.2.2. the format described in Section 6.2.2.
5.3. Shared-State Retry Service 6.3. Shared-State Retry Service
A shared-state retry service uses a shared key, so that the server A shared-state retry service uses a shared key, so that the server
can decode the service's retry tokens. It does not require that all can decode the service's retry tokens. It does not require that all
traffic pass through the Retry service, so servers MAY send Retry traffic pass through the Retry service, so servers MAY send Retry
packets in response to Initial packets that don't include a valid packets in response to Initial packets that don't include a valid
token. token.
Both server and service must have access to Universal time, though Both server and service must have access to Universal time, though
tight synchronization is not necessary. tight synchronization is not necessary.
All tokens, generated by either the server or retry service, MUST use All tokens, generated by either the server or retry service, MUST use
the following format. This format is the cleartext version. On the the following format. This format is the cleartext version. On the
wire, these fields are encrypted using an AES-ECB cipher and the wire, these fields are encrypted using an AES-ECB cipher and the
token key. If the token is not a multiple of 16 octets, the last token key. If the token is not a multiple of 16 octets, the last
block is padded with zeroes. block is padded with zeroes.
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ODCIL | Original Destination Connection ID (0..160) | | ODCIL | RSCIL |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Original Destination Connection ID (0..160) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Retry Source Connection ID (0..160) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
+ + + +
| | | |
+ Client IP Address (128) + + Client IP Address (128) +
| | | |
+ + + +
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
+ + + +
| | | |
+ + + +
| date-time (160) | | date-time (160) |
+ + + +
skipping to change at page 18, line 8 skipping to change at page 20, line 46
| Opaque Data (optional) | | Opaque Data (optional) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 6: Cleartext format of shared-state retry tokens Figure 6: Cleartext format of shared-state retry tokens
The tokens have the following fields: The tokens have the following fields:
ODCIL: The original destination connection ID length. Tokens in ODCIL: The original destination connection ID length. Tokens in
NEW_TOKEN frames MUST set this field to zero. NEW_TOKEN frames MUST set this field to zero.
Original Destination Connection ID: This is copied from the field in RSCIL: The retry source connection ID length. Tokens in NEW_TOKEN
the client Initial packet. frames MUST set this field to zero.
Original Destination Connection ID: The server or Retry Service
copies this from the field in the client Initial packet.
Retry Source Connection ID: The server or Retry service copies this
from the Source Connection ID of the Retry packet.
Client IP Address: The source IP address from the triggering Initial Client IP Address: The source IP address from the triggering Initial
packet. The client IP address is 16 octets. If an IPv4 address, the packet. The client IP address is 16 octets. If an IPv4 address, the
last 12 octets are zeroes. last 12 octets are zeroes.
date-time: The date-time string is a total of 20 octets and encodes date-time: The date-time string is a total of 20 octets and encodes
the time the token was generated. The format of date-time is the time the token was generated. The format of date-time is
described in Section 5.6 of [RFC3339]. This ASCII field MUST use the described in Section 5.6 of [RFC3339]. This ASCII field MUST use the
"Z" character for time-offset. "Z" character for time-offset.
Opaque Data: The server may use this field to encode additional Opaque Data: The server may use this field to encode additional
information, such as congestion window, RTT, or MTU. Opaque data information, such as congestion window, RTT, or MTU. Opaque data
SHOULD also allow servers to distinguish between retry tokens (which SHOULD also allow servers to distinguish between retry tokens (which
trigger use of the original_connection_id transport parameter) and trigger use of the original_destination_connection_id transport
NEW_TOKEN frame tokens. parameter) and NEW_TOKEN frame tokens.
5.3.1. Configuration Agent Actions 6.3.1. Configuration Agent Actions
The configuration agent generates and distributes a "token key." The configuration agent generates and distributes a "token key."
5.3.2. Service Requirements 6.3.2. Service Requirements
When in active mode, the service MUST generate Retry tokens with the When in active mode, the service MUST generate Retry tokens with the
format described above when it receives a client Initial packet with format described above when it receives a client Initial packet with
no token. no token.
In active mode, the service SHOULD decrypt incoming tokens. The In active mode, the service SHOULD decrypt incoming tokens. The
service SHOULD drop packets with an IP address that does not match, service SHOULD drop packets with an IP address that does not match,
and SHOULD forward packets that do, regardless of the other fields. and SHOULD forward packets that do, regardless of the other fields.
In inactive mode, the service SHOULD forward all packets to the In inactive mode, the service SHOULD forward all packets to the
server so that the server can issue an up-to-date token to the server so that the server can issue an up-to-date token to the
client. client.
5.3.3. Server Requirements 6.3.3. Server Requirements
The server MUST validate all tokens that arrive in Initial packets, The server MUST validate all tokens that arrive in Initial packets,
as they may have bypassed the Retry service. It SHOULD use the date- as they may have bypassed the Retry service. It SHOULD use the date-
time field to apply its expiration limits for tokens. This need not time field to apply its expiration limits for tokens. This need not
be synchronized with the retry service. However, servers MAY allow be synchronized with the retry service. However, servers MAY allow
retry tokens marked as being a few seconds in the future, due to retry tokens marked as being a few seconds in the future, due to
possible clock synchronization issues. possible clock synchronization issues.
A server MUST NOT send a Retry packet in response to an Initial After decrypting the token, the server uses the corresponding fields
packet that contains a retry token. to populate the original_destination_connection_id transport
parameter, with a length equal to ODCIL, and the
retry_source_connection_id transport parameter, with length equal to
RSCIL.
6. Configuration Requirements As discussed in [QUIC-TRANSPORT], a server MUST NOT send a Retry
packet in response to an Initial packet that contains a retry token.
7. Configuration Requirements
QUIC-LB requires common configuration to synchronize understanding of QUIC-LB requires common configuration to synchronize understanding of
encodings and guarantee explicit consent of the server. encodings and guarantee explicit consent of the server.
The load balancer and server MUST agree on a routing algorithm and The load balancer and server MUST agree on a routing algorithm and
the relevant parameters for that algorithm. the relevant parameters for that algorithm.
For Plaintext CID Routing, this consists of the Server ID and the For Plaintext CID Routing, this consists of the Server ID and the
routing bytes. The Server ID is unique to each server, and the routing bytes. The Server ID is unique to each server, and the
routing bytes are global. routing bytes are global.
skipping to change at page 19, line 37 skipping to change at page 22, line 43
be distributed out of band for this algorithm to operate. be distributed out of band for this algorithm to operate.
For Block Cipher CID Routing, this consists of the Server ID, Server For Block Cipher CID Routing, this consists of the Server ID, Server
ID Length, Key, and Zero-Padding Length. The Server ID is unique to ID Length, Key, and Zero-Padding Length. The Server ID is unique to
each server, but the others MUST be global. each server, but the others MUST be global.
A full QUIC-LB configuration MUST also specify the information A full QUIC-LB configuration MUST also specify the information
content of the first CID octet and the presence and mode of any Retry content of the first CID octet and the presence and mode of any Retry
Service. Service.
The following pseudocode depicts the data items necessary to store a The following pseudocode describes the data items necessary to store
full QUIC-LB configuration at the server. It is meant to describe a full QUIC-LB configuration at the server. It is meant to describe
the conceptual range and not specify the presentation of such the conceptual range and not specify the presentation of such
configuration in an internet packet. The comments signify the range configuration in an internet packet. The comments signify the range
of acceptable values where applicable. of acceptable values where applicable.
uint2 config_rotation_bits; uint2 config_rotation_bits;
boolean first_octet_encodes_cid_length; boolean first_octet_encodes_cid_length;
enum { none, non_shared_state, shared_state } retry_service; enum { none, non_shared_state, shared_state } retry_service;
select (retry_service) { select (retry_service) {
case none: null; case none: null;
case non_shared_state: uint32 list_of_quic_versions[]; case non_shared_state: uint32 list_of_quic_versions[];
skipping to change at page 20, line 40 skipping to change at page 23, line 40
uint8 key[16]; uint8 key[16];
} stream_cipher_config; } stream_cipher_config;
case block_cipher: struct { case block_cipher: struct {
uint8 server_id_length; uint8 server_id_length;
uint8 zero_padding_length; /* 0..(16 - server_id_length) */ uint8 zero_padding_length; /* 0..(16 - server_id_length) */
uint8 server_id[server_id_length]; uint8 server_id[server_id_length];
uint8 key[16]; uint8 key[16];
} block_cipher_config; } block_cipher_config;
} routing_algorithm_config; } routing_algorithm_config;
7. Additional Use Cases 8. Additional Use Cases
This section discusses considerations for some deployment scenarios This section discusses considerations for some deployment scenarios
not implied by the specification above. not implied by the specification above.
7.1. Load balancer chains 8.1. Load balancer chains
Some network architectures may have multiple tiers of low-state load Some network architectures may have multiple tiers of low-state load
balancers, where a first tier of devices makes a routing decision to balancers, where a first tier of devices makes a routing decision to
the next tier, and so on until packets reach the server. Although the next tier, and so on until packets reach the server. Although
QUIC-LB is not explicitly designed for this use case, it is possible QUIC-LB is not explicitly designed for this use case, it is possible
to support it. to support it.
If each load balancer is assigned a range of server IDs that is a If each load balancer is assigned a range of server IDs that is a
subset of the range of IDs assigned to devices that are closer to the subset of the range of IDs assigned to devices that are closer to the
client, then the first devices to process an incoming packet can client, then the first devices to process an incoming packet can
extract the server ID and then map it to the correct forwrading extract the server ID and then map it to the correct forwrading
address. Note that this solution is extensible to arbitrarily large address. Note that this solution is extensible to arbitrarily large
numbers of load-balancing tiers, as the maximum server ID space is numbers of load-balancing tiers, as the maximum server ID space is
quite large. quite large.
7.2. Moving connections between servers 8.2. Moving connections between servers
Some deployments may transparently move a connection from one server Some deployments may transparently move a connection from one server
to another. The means of transferring connection state between to another. The means of transferring connection state between
servers is out of scope of this document. servers is out of scope of this document.
To support a handover, a server involved in the transition could To support a handover, a server involved in the transition could
issue CIDs that map to the new server via a NEW_CONNECTION_ID frame, issue CIDs that map to the new server via a NEW_CONNECTION_ID frame,
and retire CIDs associated with the new server using the "Retire and retire CIDs associated with the new server using the "Retire
Prior To" field in that frame. Prior To" field in that frame.
Alternately, if the old server is going offline, the load balancer Alternately, if the old server is going offline, the load balancer
could simply map its server ID to the new server's address. could simply map its server ID to the new server's address.
8. Security Considerations 9. Version Invariance of QUIC-LB
Retry Services are inherently dependent on the format (and existence)
of Retry Packets in each version of QUIC, and so Retry Service
configuration explicitly includes the supported QUIC versions.
The server ID encodings, and requirements for their handling, are
designed to be QUIC version independent (see [QUIC-INVARIANTS]). A
QUIC-LB load balancer will generally not require changes as servers
deploy new versions of QUIC. However, there are several unlikely
future design decisions that could impact the operation of QUIC-LB.
The maximum Connection ID length could be below the minimum necessary
for one or more encoding algorithms.
Section 4 provides guidance about how load balancers should handle
non-compliant DCIDs. This guidance, and the implementation of an
algorithm to handle these DCIDs, rests on some assumptions:
* Incoming short headers do not contain DCIDs that are client-
generated.
* The use of client-generated incoming DCIDs does not persist beyond
a few round trips in the connection.
* While the client is using DCIDs it generated, some exposed fields
(IP address, UDP port, client-generated destination Connection ID)
remain constant for all packets sent on the same connection.
While this document does not update the commitments in
[QUIC-INVARIANTS], the additional assumptions are minimal and
narrowly scoped, and provide a likely set of constants that load
balancers can use with minimal risk of version- dependence.
If these assumptions are invalid, this specification is likely to
lead to loss of packets that contain non-compliant DCIDs, and in
extreme cases connection failure.
10. Security Considerations
QUIC-LB is intended to prevent linkability. Attacks would therefore QUIC-LB is intended to prevent linkability. Attacks would therefore
attempt to subvert this purpose. attempt to subvert this purpose.
Note that the Plaintext CID algorithm makes no attempt to obscure the Note that the Plaintext CID algorithm makes no attempt to obscure the
server mapping, and therefore does not address these concerns. It server mapping, and therefore does not address these concerns. It
exists to allow consistent CID encoding for compatibility across a exists to allow consistent CID encoding for compatibility across a
network infrastructure. Servers that are running the Plaintext CID network infrastructure, which makes QUIC robust to NAT rebinding.
algorithm SHOULD only use it to generate new CIDs for the Server Servers that are running the Plaintext CID algorithm SHOULD only use
Initial Packet and SHOULD NOT send CIDs in QUIC NEW_CONNECTION_ID it to generate new CIDs for the Server Initial Packet and SHOULD NOT
frames. Doing so might falsely suggest to the client that said CIDs send CIDs in QUIC NEW_CONNECTION_ID frames, except that it sends one
were generated in a secure fashion. new Connection ID in the event of config rotation Section 3.1. Doing
so might falsely suggest to the client that said CIDs were generated
in a secure fashion.
A linkability attack would find some means of determining that two A linkability attack would find some means of determining that two
connection IDs route to the same server. As described above, there connection IDs route to the same server. As described above, there
is no scheme that strictly prevents linkability for all traffic is no scheme that strictly prevents linkability for all traffic
patterns, and therefore efforts to frustrate any analysis of server patterns, and therefore efforts to frustrate any analysis of server
ID encoding have diminishing returns. ID encoding have diminishing returns.
8.1. Attackers not between the load balancer and server 10.1. Attackers not between the load balancer and server
Any attacker might open a connection to the server infrastructure and Any attacker might open a connection to the server infrastructure and
aggressively retire connection IDs to obtain a large sample of IDs aggressively simulate migration to obtain a large sample of IDs that
that map to the same server. It could then apply analytical map to the same server. It could then apply analytical techniques to
techniques to try to obtain the server encoding. try to obtain the server encoding.
The Encrypted CID algorithm provides robust entropy to making any The Stream and Block Cipher CID algorithms provide robust entropy to
sort of linkage. The Obfuscated CID obscures the mapping and making any sort of linkage. The Obfuscated CID obscures the mapping
prevents trivial brute-force attacks to determine the routing and prevents trivial brute-force attacks to determine the routing
parameters, but does not provide robust protection against parameters, but does not provide robust protection against
sophisticated attacks. sophisticated attacks.
Were this analysis to obtain the server encoding, then on-path Were this analysis to obtain the server encoding, then on-path
observers might apply this analysis to correlating different client observers might apply this analysis to correlating different client
IP addresses. IP addresses.
8.2. Attackers between the load balancer and server 10.2. Attackers between the load balancer and server
Attackers in this privileged position are intrinsically able to map Attackers in this privileged position are intrinsically able to map
two connection IDs to the same server. The QUIC-LB algorithms do two connection IDs to the same server. The QUIC-LB algorithms do
prevent the linkage of two connection IDs to the same individual prevent the linkage of two connection IDs to the same individual
connection if servers make reasonable selections when generating new connection if servers make reasonable selections when generating new
IDs for that connection. IDs for that connection.
9. IANA Considerations 10.3. Limited configuration scope
A simple deployment of QUIC-LB in a cloud provider might use the same
global QUIC-LB configuration across all its load balancers that route
to customer servers. An attacker could then simply become a
customer, obtain the configuration, and then extract server IDs of
other customers' connections at will.
To avoid this, the configuration agent SHOULD issue QUIC-LB
configurations to mutually distrustful servers that have different
keys (for the block cipher or stream cipher algorithms) or routing
masks and divisors (for the obfuscated algorithm). The load
balancers can distinguish these configurations by external IP
address, or by assigning different values to the config rotation bits
(Section 3.1). Note that either of these techniques exposes
information to outside observers, as traffic destined for each server
set can be easily distinguished.
These techniques are not necessary for the plaintext algorithm, as it
does not attempt to conceal the server ID.
10.4. Stateless Reset Oracle
Section 21.9 of [QUIC-TRANSPORT] discusses the Stateless Reset Oracle
attack. For a server deployment to be vulnerable, an attacking
client must be able to cause two packets with the same Destination
CID to arrive at two different servers that share the same
cryptographic context for Stateless Reset tokens. As QUIC-LB
requires deterministic routing of DCIDs over the life of a
connection, it is a sufficient means of avoiding an Oracle without
additional measures.
11. IANA Considerations
There are no IANA requirements. There are no IANA requirements.
10. References 12. References
10.1. Normative References 12.1. Normative References
[QUIC-INVARIANTS]
Thomson, M., Ed., "Version-Independent Properties of
QUIC", Work in Progress, Internet-Draft, draft-ietf-quic-
invariants,
<https://tools.ietf.org/html/draft-ietf-quic-invariants>.
[QUIC-TRANSPORT] [QUIC-TRANSPORT]
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", draft-ietf-quic- Multiplexed and Secure Transport", Work in Progress,
transport (work in progress). Internet-Draft, draft-ietf-quic-transport,
<https://tools.ietf.org/html/draft-ietf-quic-transport>.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>. <https://www.rfc-editor.org/info/rfc3339>.
10.2. Informative References 12.2. Informative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
Appendix A. Load Balancer Test Vectors Appendix A. Load Balancer Test Vectors
Because any connection ID encoding in this specification includes Because any connection ID encoding in this specification includes
many bits for server use without affecting extraction of the many bits for server use without affecting extraction of the server
connection ID, there are many possible connection IDs for any given ID, there are many possible connection IDs for any given set of
set of parameters. However, every connection ID should result in a parameters. However, every connection ID should result in a unique
unique server ID. The following connection IDs can be used to verify server ID. The following connection IDs can be used to verify that a
that a load balancer implementation extracts the correct server ID. load balancer implementation extracts the correct server ID.
A.1. Obfuscated Connection ID Algorithm A.1. Obfuscated Connection ID Algorithm
The following section lists a set of OCID load balancer The following section lists a set of OCID load balancer
configuration, followed by five CIDs from which the load balancer can configuration, followed by five CIDs from which the load balancer can
extract the server ID. extract the server ID.
cr_bits 0x0 length_self_encoding: y bitmask ddc2f17788d77e3239b4ea cr_bits 0x0 length_self_encoding: y bitmask ddc2f17788d77e3239b4ea
divisor 345 divisor 345
cid 0b72715d4745ce26cca8c750 sid b
cid 0b72715d4745ce26cca8c750 sid b cid 0b63a1785b6c0b0857225e96 sid cid 0b63a1785b6c0b0857225e96 sid 3f
3f cid 0b66474fa11329e6bb947818 sid 147 cid 0b34bd7c0882deb0252e2a58 cid 0b66474fa11329e6bb947818 sid 147
sid ca cid 0b0506ee792163bf9330dc0a sid 14d cid 0b34bd7c0882deb0252e2a58 sid ca
cid 0b0506ee792163bf9330dc0a sid 14d
cr_bits 0x1 length_self_encoding: n bitmask cr_bits 0x1 length_self_encoding: n bitmask
4855d35f5b88ddada153af61b6707ee646 divisor 301 4855d35f5b88ddada153af61b6707ee646 divisor 301
cid 542dc4c09e2d548e508dc825bbbca991c131 sid 8 cid cid 542dc4c09e2d548e508dc825bbbca991c131 sid 8
47988071f9f03a25c322cc6fb1d57151d26f sid 93 cid cid 47988071f9f03a25c322cc6fb1d57151d26f sid 93
6a13e05071f74cdb7d0dc24d72687b21e1d1 sid c0 cid cid 6a13e05071f74cdb7d0dc24d72687b21e1d1 sid c0
4323c129650c7ee66f37266044ef52e74ffa sid 60 cid cid 4323c129650c7ee66f37266044ef52e74ffa sid 60
5e95f77e7e66891b57c224c5781c8c5dd8ba sid 8f cid 5e95f77e7e66891b57c224c5781c8c5dd8ba sid 8f
cr_bits 0x0 length_self_encoding: y bitmask 9f98bd3df66338c2d2c6 cr_bits 0x0 length_self_encoding: y bitmask 9f98bd3df66338c2d2c6
divisor 459 divisor 459
cid 0ad52216e7798c28340fd6 sid 125 cid 0a78f8ecbd087083639f94 sid 4b cid 0ad52216e7798c28340fd6 sid 125
cid 0ac7e70a5fe6b353b824aa sid 12 cid 0af9612ae5ccba3ef98b81 sid d1 cid 0a78f8ecbd087083639f94 sid 4b
cid 0ac7e70a5fe6b353b824aa sid 12
cid 0af9612ae5ccba3ef98b81 sid d1
cid 0a94ab209ea1d2e1e23751 sid 5d cid 0a94ab209ea1d2e1e23751 sid 5d
cr_bits 0x2 length_self_encoding: n bitmask dfba93c4f98f57103f5ae331 cr_bits 0x2 length_self_encoding: n bitmask dfba93c4f98f57103f5ae331
divisor 461 divisor 461
cid 8b70b8c69e40ef2f3f8937e817 sid d3 cid b1828830ea1789dab13a043795 cid 8b70b8c69e40ef2f3f8937e817 sid d3
sid 44 cid 90604a580baa3eb0a47812e490 sid 137 cid cid b1828830ea1789dab13a043795 sid 44
a5b4bc309337ff73e143ff6deb sid 9f cid fce75c0a984a79d3b4af40d155 sid cid 90604a580baa3eb0a47812e490 sid 137
127 cid a5b4bc309337ff73e143ff6deb sid 9f
cid fce75c0a984a79d3b4af40d155 sid 127
cr_bits 0x0 length_self_encoding: y bitmask 8320fefc5309f7aa670476 cr_bits 0x0 length_self_encoding: y bitmask 8320fefc5309f7aa670476
divisor 379 divisor 379
cid 0bb110af53dca7295e7d4b7e sid 101 cid 0b0d284cdff364a634a4b93b sid cid 0bb110af53dca7295e7d4b7e sid 101
e3 cid 0b82ff1555c4a95f9b198090 sid 14e cid 0b7a427d3e508ad71e98b797 cid 0b0d284cdff364a634a4b93b sid e3
sid 14e cid 0b71d1d4e3e3cd54d435b3fd sid eb cid 0b82ff1555c4a95f9b198090 sid 14e
cid 0b7a427d3e508ad71e98b797 sid 14e
cid 0b71d1d4e3e3cd54d435b3fd sid eb
A.2. Stream Cipher Connection ID Algorithm A.2. Stream Cipher Connection ID Algorithm
Like the previous section, the text below lists a set of load TBD
balancer configuration and 5 CIDs generated with that configuration.
cr_bits 0x0 length_self_encoding: y nonce_len 13 sid_len 1 key
16eff325e8bf8dfebdae003543fb845f
cid 0eb9eb1fc72eed820cf5658cdd7888 sid 9c cid
0e6f4de5beb5aa4170f44104318c5b sid c0 cid
0e78f0325a8e34a40661f51f235906 sid 1d cid
0ef37923f81c32632299bceabd1d92 sid fa cid
0ea30788c012daa94a83865a2c7f28 sid b3
cr_bits 0x1 length_self_encoding: n nonce_len 9 sid_len 2 key
906220f402ba3bd893ccc4dd9cfc04b0
cid 7b33366764888138f1465352 sid b839 cid 4329458bbe6cb9befc04bdeb
sid 3b27 cid 61e4e8235c4ebd5442d85bb0 sid bb5c cid
4fd790d1d0cf2b50796cad12 sid 4ecd cid 725325eceaca3528d8c0314b sid
54fd
cr_bits 0x0 length_self_encoding: y nonce_len 8 sid_len 3 key
0a9b8ccdee977a65e3519693fcd55c8c
cid 0bfced0b5727be40af49102e sid 08d342 cid 0b160042b34fe728a9f05376
sid 4d61e0 cid 0b933157fc8c352ee9490ae7 sid 34a912 cid
0b80d1d567aafedb737ed0eb sid 4f2a92 cid 0b3133feac7ae7125b1d0702 sid
1a5db3
cr_bits 0x0 length_self_encoding: n nonce_len 8 sid_len 4 key
66c5acdb45a40c91da8cfbbdc77c157e
cid 2da078bbf87c71264879c58a5a sid 20f1e37e cid
04577ce3800cf22ead7f9ba9a5 sid 29e462c4 cid
1a0f6592fcd9167d0aa201e228 sid a0b0fb8a cid
11e4df0eb7db00363b1721e4a4 sid 31f15006 cid
3d54b24c7bd39f081f00f44295 sid 551b8c28
cr_bits 0x0 length_self_encoding: y nonce_len 12 sid_len 5 key
ba4909a865c19d0234e090197d61bab9
cid 11325919a7205f4f5e222c2ac94ec3309c1e sid 10f115363a cid
11ca85a9e5d02563ebb119acfacb3007993d sid 4108093aaf cid
1196ef4f0936cb6062b5db441395ef9f3831 sid 383c14e754 cid
11ce3a6611da0e75f59dc8fe3cf4cfc6a61d sid d0da150dbf cid
116bd4cf085659d26b39dd5dd107ae87a694 sid b2945466df
A.3. Block Cipher Connection ID Algorithm A.3. Block Cipher Connection ID Algorithm
Like the previous section, the text below lists a set of load Like the previous section, the text below lists a set of load
balancer configuration and 5 CIDs generated with that configuration. balancer configuration and 5 CIDs generated with that configuration.
cr_bits 0x0 length_self_encoding: y sid_len 1 zp_len 11 key cr_bits 0x0 length_self_encoding: y sid_len 1 zp_len 11 key
8c24cb9b9c3289b4ee63c3f3d7f93a9a 8c24cb9b9c3289b4ee63c3f3d7f93a9a
cid: 1378e44f874642624fa69e7b4aec15a2a678b8b5 sid: 48 cid: cid: 1378e44f874642624fa69e7b4aec15a2a678b8b5 sid: 48
13772c82fe8ce6a00813f76a211b730eb4b20363 sid: 66 cid: cid: 13772c82fe8ce6a00813f76a211b730eb4b20363 sid: 66
135ccf507b1c209457f80df0217b9a1df439c4b2 sid: 30 cid: cid: 135ccf507b1c209457f80df0217b9a1df439c4b2 sid: 30
13898459900426c073c66b1001c867f9098a7aab sid: fe cid: cid: 13898459900426c073c66b1001c867f9098a7aab sid: fe
1397a18da00bf912f20049d9f0a007444f8b6699 sid: 30 cid: 1397a18da00bf912f20049d9f0a007444f8b6699 sid: 30
cr_bits 0x0 length_self_encoding: n sid_len 2 zp_len 10 key cr_bits 0x0 length_self_encoding: n sid_len 2 zp_len 10 key
cc7ec42794664a8428250c12a7fb16fa cc7ec42794664a8428250c12a7fb16fa
cid: 0cb28bfc1f65c3de14752bc0fc734ef824ce8f78 sid: 33fa cid: cid: 0cb28bfc1f65c3de14752bc0fc734ef824ce8f78 sid: 33fa
2345e9fc7a7be55b4ba1ff6ffa04f3f5f8c67009 sid: ee47 cid: cid: 2345e9fc7a7be55b4ba1ff6ffa04f3f5f8c67009 sid: ee47
0d32102be441600f608c95841fd40ce978aa7a02 sid: 0c8b cid: cid: 0d32102be441600f608c95841fd40ce978aa7a02 sid: 0c8b
2e6bfc53c91c275019cd809200fa8e23836565ab sid: feca cid: cid: 2e6bfc53c91c275019cd809200fa8e23836565ab sid: feca
29b87a902ed129c26f7e4e918a68703dc71a6e0a sid: 8941 cid: 29b87a902ed129c26f7e4e918a68703dc71a6e0a sid: 8941
cr_bits 0x1 length_self_encoding: y sid_len 3 zp_len 9 key cr_bits 0x1 length_self_encoding: y sid_len 3 zp_len 9 key
42e657946b96b7052ab8e6eeb863ee24 42e657946b96b7052ab8e6eeb863ee24
cid: 53c48f7884d73fd9016f63e50453bfd9bcfc637d sid: b46b68 cid: cid: 53c48f7884d73fd9016f63e50453bfd9bcfc637d sid: b46b68
53f45532f6a4f0e1757fa15c35f9a2ab0fcce621 sid: 2147b4 cid: cid: 53f45532f6a4f0e1757fa15c35f9a2ab0fcce621 sid: 2147b4
5361fd4bbcee881a637210f4fffc02134772cc76 sid: e4bf4b cid: cid: 5361fd4bbcee881a637210f4fffc02134772cc76 sid: e4bf4b
53881ffde14e613ef151e50ba875769d6392809b sid: c2afee cid: cid: 53881ffde14e613ef151e50ba875769d6392809b sid: c2afee
53ad0d60204d88343492334e6c4c4be88d4a3add sid: ae0331 cid: 53ad0d60204d88343492334e6c4c4be88d4a3add sid: ae0331
cr_bits 0x0 length_self_encoding: n sid_len 4 zp_len 8 key cr_bits 0x0 length_self_encoding: n sid_len 4 zp_len 8 key
ee2dc6a3359a94b0043ca0c82715ce71 ee2dc6a3359a94b0043ca0c82715ce71
cid: 058b9da37f436868cca3cef40c7f98001797c611 sid: eaf846c7 cid: cid: 058b9da37f436868cca3cef40c7f98001797c611 sid: eaf846c7
1259fc97439adaf87f61250afea059e5ddf66e44 sid: 4cc5e84a cid: cid: 1259fc97439adaf87f61250afea059e5ddf66e44 sid: 4cc5e84a
202f424376f234d5f014f41cebc38de2619c6c71 sid: f94ff800 cid: cid: 202f424376f234d5f014f41cebc38de2619c6c71 sid: f94ff800
146ac3e4bbb750d3bfb617ef4b0cb51a1cae5868 sid: c2071b1b cid: cid: 146ac3e4bbb750d3bfb617ef4b0cb51a1cae5868 sid: c2071b1b
36dfe886538af7eb16a196935b3705c9d741479f sid: 26359dbb cid: 36dfe886538af7eb16a196935b3705c9d741479f sid: 26359dbb
cr_bits 0x2 length_self_encoding: y sid_len 5 zp_len 7 key cr_bits 0x2 length_self_encoding: y sid_len 5 zp_len 7 key
700837da8834840afe7720186ec610c9 700837da8834840afe7720186ec610c9
cid: 931ef3cc07e2eaf08d4c1902cd564d907cc3377c sid: 759b1d419a
cid: 931ef3cc07e2eaf08d4c1902cd564d907cc3377c sid: 759b1d419a cid: cid: 9398c3d0203ab15f1dfeb5aa8f81e52888c32008 sid: 77cc0d3310
9398c3d0203ab15f1dfeb5aa8f81e52888c32008 sid: 77cc0d3310 cid: cid: 93f4ba09ab08a9ef997db4fa37a97dbf2b4c5481 sid: f7db9dce32
93f4ba09ab08a9ef997db4fa37a97dbf2b4c5481 sid: f7db9dce32 cid: cid: 93744f4bedf95e04dd6607592ecf775825403093 sid: e264d714d2
cid: 93256308e3d349f8839dec840b0a90c7e7a1fc20 sid: 618b07791f
93744f4bedf95e04dd6607592ecf775825403093 sid: e264d714d2 cid:
93256308e3d349f8839dec840b0a90c7e7a1fc20 sid: 618b07791f
Appendix B. Acknowledgments Appendix B. Acknowledgments
Appendix C. Change Log Appendix C. Change Log
*RFC Editor's Note:* Please remove this section prior to *RFC Editor's Note:* Please remove this section prior to
publication of a final version of this document. publication of a final version of this document.
C.1. since-draft-ietf-quic-load-balancers-01 C.1. since-draft-ietf-quic-load-balancers-02
o Test vectors for load balancer decoding * Replaced stream cipher algorithm with three-pass version
o Deleted remnants of in-band protocol * Updated Retry format to encode info for required TPs
o Light edit of Retry Services section * Added discussion of version invariance
o Discussed load balancer chains * Cleaned up text about config rotation
C.2. since-draft-ietf-quic-load-balancers-00 * Added Reset Oracle and limited configuration considerations
o Removed in-band protocol from the document * Allow dropped long-header packets for known QUIC versions
C.3. Since draft-duke-quic-load-balancers-06 C.2. since-draft-ietf-quic-load-balancers-01
o Switch to IETF WG draft. * Test vectors for load balancer decoding
C.4. Since draft-duke-quic-load-balancers-05 * Deleted remnants of in-band protocol
o Editorial changes * Light edit of Retry Services section
o Made load balancer behavior independent of QUIC version * Discussed load balancer chains
o Got rid of token in stream cipher encoding, because server might C.3. since-draft-ietf-quic-load-balancers-00
* Removed in-band protocol from the document
C.4. Since draft-duke-quic-load-balancers-06
* Switch to IETF WG draft.
C.5. Since draft-duke-quic-load-balancers-05
* Editorial changes
* Made load balancer behavior independent of QUIC version
* Got rid of token in stream cipher encoding, because server might
not have it not have it
o Defined "non-compliant DCID" and specified rules for handling * Defined "non-compliant DCID" and specified rules for handling
them. them.
o Added psuedocode for config schema * Added psuedocode for config schema
C.5. Since draft-duke-quic-load-balancers-04 C.6. Since draft-duke-quic-load-balancers-04
o Added standard for retry services * Added standard for retry services
C.6. Since draft-duke-quic-load-balancers-03 C.7. Since draft-duke-quic-load-balancers-03
o Renamed Plaintext CID algorithm as Obfuscated CID * Renamed Plaintext CID algorithm as Obfuscated CID
o Added new Plaintext CID algorithm * Added new Plaintext CID algorithm
o Updated to allow 20B CIDs * Updated to allow 20B CIDs
o Added self-encoding of CID length * Added self-encoding of CID length
C.7. Since draft-duke-quic-load-balancers-02 C.8. Since draft-duke-quic-load-balancers-02
o Added Config Rotation * Added Config Rotation
o Added failover mode * Added failover mode
o Tweaks to existing CID algorithms * Tweaks to existing CID algorithms
o Added Block Cipher CID algorithm * Added Block Cipher CID algorithm
o Reformatted QUIC-LB packets * Reformatted QUIC-LB packets
C.8. Since draft-duke-quic-load-balancers-01 C.9. Since draft-duke-quic-load-balancers-01
o Complete rewrite * Complete rewrite
o Supports multiple security levels * Supports multiple security levels
o Lightweight messages * Lightweight messages
C.9. Since draft-duke-quic-load-balancers-00 C.10. Since draft-duke-quic-load-balancers-00
o Converted to markdown * Converted to markdown
o Added variable length connection IDs * Added variable length connection IDs
Authors' Addresses Authors' Addresses
Martin Duke Martin Duke
F5 Networks, Inc. F5 Networks, Inc.
Email: martin.h.duke@gmail.com Email: martin.h.duke@gmail.com
Nick Banks Nick Banks
Microsoft Microsoft
 End of changes. 130 change blocks. 
319 lines changed or deleted 486 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/