RE: Increasing QUIC connection ID size

Praveen Balasubramanian <> Fri, 12 January 2018 17:46 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 03CB012D82E for <>; Fri, 12 Jan 2018 09:46:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id d9-neHC3s1zq for <>; Fri, 12 Jan 2018 09:46:17 -0800 (PST)
Received: from ( [IPv6:2a01:111:f400:fe49::703]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 30639129C6E for <>; Fri, 12 Jan 2018 09:46:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Sm79O4MESRt1jkhqKfStOAM3sH+DQu+i/dfk9cfd8jw=; b=VKIZbPtsyLUPBkxR/5olhn6PfPbjFKA5ymRxqijlNNKE1rzQupXhZeoHl99plvboJtW2RondhiPSjf91Ip27Ajr1HcmlrNnFz+7GcUJVi9s5+YetopiCIj1evVGCUTpMdoNvB3Lzp2TNHFX4Pg2dx/KypjJb/idmlknaGSZ1wI4=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.428.12; Fri, 12 Jan 2018 17:46:12 +0000
Received: from ([]) by ([]) with mapi id 15.20.0428.002; Fri, 12 Jan 2018 17:46:12 +0000
From: Praveen Balasubramanian <>
To: =?utf-8?B?TWlra2VsIEZhaG7DuGUgSsO4cmdlbnNlbg==?= <>, "Lubashev, Igor" <>, Ian Swett <>
CC: "" <>, huitema <>
Subject: RE: Increasing QUIC connection ID size
Thread-Topic: Increasing QUIC connection ID size
Date: Fri, 12 Jan 2018 17:46:12 +0000
Message-ID: <>
References: <> <> <> <> <> <> <> <> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
x-originating-ip: [2001:4898:80e8:a::712]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; CY4PR21MB0469; 7:mp7Ckc/P3GdenzmqoUCDpDUgg94qxoeLP65wu+ap+GfMGBbdRqzQNasOUAkqMA8m9cEEhk0vpPwia789vYX1aMRgPLscyjq7GoDHOL6gkYKaUH3YeClx5PF9naeV4ZwYnwSv5a27eU2chBUO6AtA0l/rPn4bE0VZMQHwRTyFp1dmwTPhNKcOl31bYOcbe+THW15T8bsjo1wGQYBvtHnXaPQuEjZpNmrcytECUhx5BQ19OWiWOQm+7zDv/2hwb4Eq
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: e9a94cc2-4819-48f7-be47-08d559e45f28
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020085)(4652020)(4534115)(4602075)(4627211)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:CY4PR21MB0469;
x-ms-traffictypediagnostic: CY4PR21MB0469:
authentication-results: spf=none (sender IP is );
x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr
x-microsoft-antispam-prvs: <>
x-exchange-antispam-report-test: UriScan:(28532068793085)(158342451672863)(192374486261705)(211936372134217)(153496737603132)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040470)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231023)(944501146)(6055026)(61426038)(61427038)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:CY4PR21MB0469; BCL:0; PCL:0; RULEID:(100000803126)(100110400120); SRVR:CY4PR21MB0469;
x-forefront-prvs: 0550778858
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(396003)(39860400002)(39380400002)(366004)(376002)(53754006)(13464003)(199004)(189003)(24454002)(7696005)(6506007)(6116002)(102836004)(53546011)(790700001)(76176011)(25786009)(6246003)(59450400001)(19609705001)(4326008)(54896002)(53946003)(55016002)(236005)(53936002)(2900100001)(478600001)(9686003)(6306002)(99286004)(110136005)(54906003)(22452003)(316002)(93886005)(86362001)(33656002)(561944003)(39060400002)(14454004)(10290500003)(86612001)(5660300001)(8990500004)(2950100002)(97736004)(10090500001)(74316002)(229853002)(2906002)(7736002)(8676002)(6436002)(8936002)(81166006)(77096006)(81156014)(3280700002)(3660700001)(68736007)(106356001)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0469;; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None ( does not designate permitted sender hosts)
x-microsoft-antispam-message-info: nA0/5H7CNmW+Hh87KhINiN0+oaQ56/PyezZbk7MdatZqjAqSuN4e6Oq4MCL9sw0Qk5FjsgUxIg4WUB5QYBrO4A==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_CY4PR21MB01331A05F3F44C335FF78156B6170CY4PR21MB0133namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: e9a94cc2-4819-48f7-be47-08d559e45f28
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jan 2018 17:46:12.5813 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0469
Archived-At: <>
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 12 Jan 2018 17:46:22 -0000

IMO we need to settle on a size for CID and make it an invariant in v1. Let’s also not introduce more encoding into one of the very few fields that is plaintext. We should aim for easy and fast adoption of QUIC by middleware. Requiring infrastructure components like load balancer or DDoS protection to decrypt is going to mean an order of magnitude reduction in performance and will be hard for deployment and shared keys are certainly not an option for IaaS scenario.

Particularly in relation to load balancer we have the following cases:

  1.  Connection remains on the same 4-tuple for its lifetime. Here today’s unmodified load balancers just work since they hash on 2- or 4-tuple (UDP/IP).
  2.  NAT rebinding. For this load balancer needs to hash based on CID and not 4-tuple. So there needs to be QUIC (version specific) awareness. Not a deal breaker and seems doable. But it does imply that server will always have to force inclusion of CID from client.
  3.  Connection migration. This is complicated because it seems to require the server to pick a new connection ID such that load balancer will pick the same server again. This coupling will be problematic in IaaS scenario where the load balancer may be owned by the cloud provider and the backend server terminating QUIC owned by a tenant. For this reason it seems to me that to support connection migration we need a standard load balancing scheme defined in a “deployment issues” section in the RFC. Am I missing something?

My preference for CID is still 64-bit since we have gone out of our way to save space in the headers using VLE but 128-bit is not a deal breaker. We should also leave the encoding of the CID to the server rather than specify any particular scheme but specifying what load balancers should do seems important for supporting connection migration.


From: QUIC [] On Behalf Of Mikkel Fahnøe Jørgensen
Sent: Friday, January 12, 2018 8:58 AM
To: Lubashev, Igor <>om>; Ian Swett <>
Cc:; huitema <>
Subject: RE: Increasing QUIC connection ID size

It could also be fixed 62 bit connection identifier and 2 msg of the first CID byte stores the additional length. The requirement is then that the first 62 bits must have “enough entropy” and the remaining bits are application or deployment specific. This will force routers to support 128-bits, but it will allow them to require it if so desired.

A router need not be concerned with the variable length aspect if the QUIC invariant ensures that a packet length is at least long enough to read 128 bits from CID start. It can just assume the length it expects and then validate as needed with auth tag or length, or just assume it is safe under the conditions.

In all cases the QUIC endpoint MUST include the CID in the additional data authentication to ensure routing data has not been tampered.

One could also take this a step further and shorten the first 64 bits, but that is probably a rats nest: 16, 32, 64, 128 bits.

Kind Regards,
Mikkel Fahnøe Jørgensen

On 12 January 2018 at 16.51.19, Lubashev, Igor (<>) wrote:
The point here is that if 128-bit is an option from V1, then all clients will support it, and the server can choose to always use 128-bit connection IDs.  The load balancer then can be sure that valid connection IDs (in packets featuring server connection ID) can only be 128-bit.  If V1 does not have 128-bit support, then the server must develop a less secure version of the connection ID to fit into 64 bits, and the load balancer must treat 64-bit connection IDs as acceptable.  Then, there is nothing to prevent an attacker from using 64-bit connection IDs, if that’s more convenient for them.

From: Ian Swett [<>]
Sent: Friday, January 12, 2018 9:35 AM
To: Lubashev, Igor <<>>
Subject: Re: Increasing QUIC connection ID size

I think we'll want support for both no matter how we do this.

On Fri, Jan 12, 2018 at 9:13 AM, Lubashev, Igor <<>> wrote:
If the 128-bit option is not in V1, then it will be required for the 128-bit option to be signaled in the packet's invariant section (like a bit in the 1st byte). Otherwise, the very load balancers this is designed for will not know whether the connection ID has 64- or 128-bit format. (It would need to support both, since there would be clients stuck at V1.)

In fact, the security promises of having a 128-bit connection ID option (allows for making routing info harder to forge) are greatly diminished, when a load balancer has to support 64-bit connection IDs "forever".

-----Original Message-----
From: Ian Swett [<>]
Received: Friday, 12 Jan 2018, 8:59AM
To: Christian Huitema [<>]
Subject: Re: Increasing QUIC connection ID size
I would like to leave QUIC open for longer connection IDs in future versions, so I'd like to specify the invariants in such a way that longer connection Ids wouldn't violate them(ie: Victor's suggestion of “middleboxes always get first 64 bits and they have useful entropy to distinguish connections”.) but I'm reluctant to include 128 bit connection IDs in v1 at this point.

I would also echo Christian's sentiment that the incremental overhead starts becoming fairly large.

On Thu, Jan 11, 2018 at 9:47 PM, Christian Huitema <<>> wrote:
We have a prototype implementation in Picoquic in which the connection ID can be split so some bits are random and some bits are used for routing to a specific server -- thanks Igor for that. It makes for nice experiments, but it is a denial of service waiting to happen. For example, attackers could set the bits in such a way as to target a specific server in a pool, or they could learn which connections are on the same server and use that later for some kind of same server attack. It would be better if that information was not in clear text. In fact, the picoquic implementation use a callback to ask for the new value -- presumably from the router. That callback could return anything, including an encrypted value.

On the other hand, it is not clear to me that we need full encryption. For example, assume that the server that needs a connection ID can ask it from the router. The router could pick one at random, make sure that it is properly documented in the routing tables and that there is no collision, and then pass it back to the server. No encryption needed, but of course lots of state.

If the router does not want to keep the state, it can indeed create a connection ID by encrypting a <nonce, server-ID> tuple. But it does not follow that the encryption needs to be 128 bits. For example, it could use a 64 bit algorithm like Blowfish.

So I am not sure that we actually need to change the length. And I am a bit concerned by the incremental overhead if the connection ID suddenly becomes very large.

On 1/11/2018 2:25 PM, Mikkel Fahnøe Jørgensen wrote:
Actually, on encryption of connection ID, this is not so simple.

We must assume there is only a single key for many connections because the router is not part of a key exchange. This unique value or counter used for encrypting a single block cannot be the same for two different connections ID’s, but it can be public. This means that it must be stored in the packet header. And, as it turns out, random connection ID chosen by a trusted source, can be used for such a unique value. But then it must be used to encrypt and/or authenticate something else carrying the actual routing information. So now you start to really need some extra payload.

Alternatively the routing information is entirely random such as content hashed routing. Then you only need to authenticate the routing data. You can do that with a HMAC, and CMAC could probably also work. The additional benefit is that you can probably get away with 64-bits for all routing information possibly including the auth tag. Say 48 bits of routing data and 16 bits of auth tag.

Kind Regards,
Mikkel Fahnøe Jørgensen

On 12 January 2018 at 00.57.21, Lubashev, Igor (<>) wrote:
I am interested in exploring this proposal, since it allows for more flexible schemes of encoding routing metadata and a checksum.  I would also like to be explicit about the connection ID size in a packet header, though, since it greatly simplifies the implementation.

  *   Igor
From: Victor Vasiliev [<>]
Sent: Thursday, January 11, 2018 6:16 PM
Subject: Increasing QUIC connection ID size

Hi everyone,

In the current version of QUIC, the connection ID size is fixed to be a 64-bit opaque blob, and that is set as an invariant in the protocol.

I’ve looked into possibility of using a connection ID to encode the specific server details into it (to provide stability of the connection in case of load balancing changes, especially BGP flaps for anycast IPs), and have chatted about this with other people I knew were interested in this.  It seems like 64 bits might be too small for this purpose, and we might want to leave an opportunity to extend the connection ID size.

The basic idea is that you want to be able to:

  1.  Store some routing metadata in the connection ID.
  2.  Have some entropy that allows distinguish users with identical routing metadata.
  3.  Have a checksum to ensure the validity of routing information
  4.  Encrypt the information above to prevent disclosing the route information and allow generating uncorrelatable connection IDs.
There are two underlying issues here.  The first problem is that all of this does not fit well into 64 bits, and you have to seriously compromise on the strength of the checksum (which is bad especially if you want it to be a MAC rather than a checksum).  The second problem is that encrypting 64-bit values fast is actually fairly hard since the block ciphers easily available in hardware have 128-bit block size, and the performance requirements on load balancers are tighter than on servers.

In other words, having a 128-bit connection ID provides for an easy secure way to generate unlinkable connection IDs on migration.

So, the problem we’re trying to solve is that the connection ID is too small.  There are two questions I believe the working group should answer at this point:

  1.  Do we want to address this problem at this point in standardization process?
  2.  If we don’t address this problem right now, how do we structure the standard in a way that we can extend the connection ID in the future?
There are multiple ways to solve the problem of making connection ID larger.  One is to just add extra bit to the “omit connection ID” field to allow 128-bit connection IDs.  Another approach is to allow connection ID size to be explicitly specified by the server, and then assume that the load balancer knows that size and no one else on the path needs to read it.

There’s also a question of how much of connection IDs do middleboxes (excluding load balancers and other boxes owned by the same entity as either client or server) need to know.  We could go for both “middleboxes should be always able to read the entire ID” and “middleboxes should not read connection IDs at all options”, but I think there’s also a room for more flexible formulations like “middleboxes always get first 64 bits and they have useful entropy to distinguish connections”.

  -- Victor.