Re: Increasing QUIC connection ID size

Mikkel Fahnøe Jørgensen <> Fri, 12 January 2018 01:09 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 1C365126C26 for <>; Thu, 11 Jan 2018 17:09:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.698
X-Spam-Status: No, score=-2.698 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Pf_zkQzx0M5b for <>; Thu, 11 Jan 2018 17:09:04 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 010FB1200F1 for <>; Thu, 11 Jan 2018 17:09:04 -0800 (PST)
Received: by with SMTP id t63so4092620iod.0 for <>; Thu, 11 Jan 2018 17:09:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to; bh=zsXxSC3VoSK4Y1VpkpwSXs6oKM7EzhG9BBiCfKaWGQw=; b=iwFqbPFY4Vw8m5x928kGd9e9oZpMqeOVJHuMjZr4z+2Wi0ma7hhaESE9o7zYkuALkq kGC+HEcJs4zmQM/Mvbz6e/9Te1ImmT7kBY4M9dBMCFRQ1RnCdnf+8bCmGqNNcBenp0SK fYVNa/hqd3WTKDcQpgH/w3qEwp1eeF1sgfLHuONeVYCJQcfjD5X5LrxQvsbS7Q4APIPR ozNX4EHuf/ekeb7lqaVWH+2sYmqsaBet60ikSt30q0v4hbeotl2ZLLKJ2k7d8NEiWnjD Is3GVqvhyWyHFTuTznQSrMWoYGXXsdRa9xNGBAvnrcsqBOAsl+7gixM/p2LvpRls4PjY aLwQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to; bh=zsXxSC3VoSK4Y1VpkpwSXs6oKM7EzhG9BBiCfKaWGQw=; b=lS3699fe2+Wo1STYiGzYakwPzg70DBgweaih//B2rSR0V7Wq08KBKVMRB51RFd9QKN 6VNO/t4mdKyn+RSTuUJs5MNCln9xEiYfFUKK6p4YmiU7Q+8tUaOcOsWlksAsqFBvygEM FCRoDxL73M1IvUuLO2JKprovgfHs3suJsdW0iOWY0wwY/gkuCqg4FVMnNd07hhAx+JwQ WKvXERDNGeYc8HqdrQ8RAEJT3rGX556iR8MA6FLNEXp3pd371lSAQrMuaTyhdfmn/Jm3 13K1VON0BDYJ1wLFT9pGyd9XGXmQ+I1BEAaSNFvAdBdqRl1lCrDmOJtZR7rG2E3VXnyI 3QHg==
X-Gm-Message-State: AKwxytePblRi/fOft6Ur+u0Crbl+PXSRuR8AdMF9O9eN/DxUDdTioJLc vUzz9PWZ1jQ/etk2KzU3wLevSx2oxj8O1eD1x/m/Piwb
X-Google-Smtp-Source: ACJfBouxoUk6vqX4ZNUcbJIBHjVuUOxj/jzUEfk7UXrvvFLzvJzp+X+XsQMNMNQv5gAmZnRI+A4qEDLXg8iF1JcTFY0=
X-Received: by with SMTP id r25mr3141711ioe.16.1515719343182; Thu, 11 Jan 2018 17:09:03 -0800 (PST)
Received: from 1058052472880 named unknown by with HTTPREST; Thu, 11 Jan 2018 17:09:02 -0800
From: =?UTF-8?Q?Mikkel_Fahn=C3=B8e_J=C3=B8rgensen?= <>
In-Reply-To: <>
References: <> <> <> <> <>
X-Mailer: Airmail (420)
MIME-Version: 1.0
Date: Thu, 11 Jan 2018 17:09:02 -0800
Message-ID: <>
Subject: Re: Increasing QUIC connection ID size
To: IETF QUIC WG <>, Roberto Peon <>, "Lubashev, Igor" <>, Victor Vasiliev <>
Content-Type: multipart/alternative; boundary="001a11427bca079eec056289e9bb"
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 01:09:07 -0000

This was also my intention. That the server and router share the key. But
also that multiple connection ID’s are encrypted with the same key and a
unique identifier.

Igor says the key can be matched to the connection. This is true, each
connection can have a unique derived key. But it is largely the same as
using a single key with different IV since we are only encrypting a single
block. Details may very on how insecure the solution is if the unique value
is not unique. But the challenge remains that there needs to be a unique
identifier and packet number and 4-tuple is not it.

Kind Regards,
Mikkel Fahnøe Jørgensen

On 12 January 2018 at 02.05.18, Roberto Peon ( wrote:

Correct/agreed. The L4 ‘router’ must be able to decrypt/interpret the data
in order to act upon it. This requires sharing of some key material.


*From: *QUIC <> on behalf of "Lubashev, Igor" <>
*Date: *Thursday, January 11, 2018 at 4:55 PM
*To: *Mikkel Fahnøe Jørgensen <>om>, Victor Vasiliev <>gt;, IETF QUIC WG <>
*Subject: *RE: Increasing QUIC connection ID size

I think the idea is that the key used to encrypt connection ID is known to
both the server and the router.  That key would need to be rotated
periodically, and the router would need to understand which key was used
for this particular connection, but that can be solved.

*From:* Mikkel Fahnøe Jørgensen []
*Sent:* Thursday, January 11, 2018 7:25 PM
*To:* Lubashev, Igor <>om>; Victor Vasiliev <>gt;; IETF QUIC WG <>
*Subject:* RE: Increasing QUIC connection ID size

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
   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.