Re: Connection ID lengths 1, 2 and 3

Ian Swett <ianswett@google.com> Sun, 15 July 2018 14:45 UTC

Return-Path: <ianswett@google.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 28C85130E09 for <quic@ietfa.amsl.com>; Sun, 15 Jul 2018 07:45:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.51
X-Spam-Level:
X-Spam-Status: No, score=-17.51 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5uKDstKEzorC for <quic@ietfa.amsl.com>; Sun, 15 Jul 2018 07:44:59 -0700 (PDT)
Received: from mail-yb0-x22f.google.com (mail-yb0-x22f.google.com [IPv6:2607:f8b0:4002:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9AF18130DE4 for <quic@ietf.org>; Sun, 15 Jul 2018 07:44:59 -0700 (PDT)
Received: by mail-yb0-x22f.google.com with SMTP id h127-v6so14509448ybg.12 for <quic@ietf.org>; Sun, 15 Jul 2018 07:44:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2HE4UM4FgRzLemanDkYRy8O9CB4zPz0ASN/ifXJ2+as=; b=UmVwrFbMNKQHxwA7S4cdhB4E/iY0YuxqWpB061jrgOu1dKZw/VA7CE84+k2d8P7SmX kbomHkgeplssTNW4dFtZt0XEge+EovEAKD5S3Qv/IPZzEMIEtXMEmQ45rC4TeJEJpYtC Ef+0X/pTdxBNC0Xs7Gg/6F1mesbu/mN23UOI6Lb6oA0zB70gnd5kW6ObvWHfjOv7oerH 7y6nKf6o1ZRJ4sPweuERzjwMXq09WWJZ8WAdD9zJlUYSMZxYNXPECneM868Jf9nvynHG B2kvV55KKJYuY4YP3k3OEaXlqHgKuf8irvv6w9ABg/wl3S4PWB5dQjXtD4Ds26mZgnfa AtAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2HE4UM4FgRzLemanDkYRy8O9CB4zPz0ASN/ifXJ2+as=; b=j/W+sQ7TvUW98pNJsY0LYuM11zyIdNEf97X/ms8h5AggMr0Bshk2M7Y6Nxpgc+DtTa 8I35+RVDFOJ6NO+HJL461llfrkx3qa0BhOmkDH2PfBwxo4GSuSobnr88O3lAZ18j5Zbb Nj/I6bQRffPzeySBTIm+D7kSQ1NNvw4TiFeQOcUVsHXuM39Bjg0MGfHoBG9GJmUi+WCQ IxuujAx5wNP3X9GzeaSYXeQjfLVJFLgem6Gm/6dWJYfJzvW4DPV/j/Xrq2aRC/GiSzdJ ddXlvwFpt+gZbzbIcyoh7Xb5NY3AHwO0om70U7HZ0fEAfSPvycoWfS9dAz++LYwZK2Tt j4ew==
X-Gm-Message-State: AOUpUlEh5YhT2Lhluy2KU3Vyr9yAfN4nBwV1mWeOLjNbXR5NSnjW7zZ2 oUXI5erukigjKeIuKw8pHZttFRnwI+U5SEfenCK+vA6l
X-Google-Smtp-Source: AAOMgpd2CGrfiYUXlZz5g8ZnsImoic7tZ3k1eB7o9f+l+Zp+Pz2pCohm25/WEqTY8rsxAgmVl6PvS5sEvmPrflxDjlk=
X-Received: by 2002:a25:57d7:: with SMTP id l206-v6mr7084632ybb.206.1531665898612; Sun, 15 Jul 2018 07:44:58 -0700 (PDT)
MIME-Version: 1.0
References: <1F436ED13A22A246A59CA374CBC543998B86DF5E@ORSMSX111.amr.corp.intel.com>
In-Reply-To: <1F436ED13A22A246A59CA374CBC543998B86DF5E@ORSMSX111.amr.corp.intel.com>
From: Ian Swett <ianswett@google.com>
Date: Sun, 15 Jul 2018 10:44:46 -0400
Message-ID: <CAKcm_gPmp=5pcM-UFWWU4UvNuuCOwbcj7s1=Qb4GW3cGhF3Bbw@mail.gmail.com>
Subject: Re: Connection ID lengths 1, 2 and 3
To: "Deval, Manasi" <manasi.deval@intel.com>
Cc: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>, IETF QUIC WG <quic@ietf.org>, Marten Seemann <martenseemann@gmail.com>
Content-Type: multipart/alternative; boundary="000000000000cdea7d05710ac1ae"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/GtMQxqxE4xpWhM64991OxxPy0HU>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 15 Jul 2018 14:45:02 -0000

If one uses existing fast crypto primitives to encode connection ID, then
16 bytes is a natural size, and there was interest in having an extra byte
for metadata(key rotation/length signaling/etc).

Unfortunately, that leaves us with a gap somewhere, and a gap at the
beginning seemed the most natural at the time.

On Sun, Jul 15, 2018 at 10:35 AM Deval, Manasi <manasi.deval@intel.com>
wrote:

> Another issue I noticed with the size of connection id was with regards to
> parsing the header field. The current steps are:
>
> ·        Parse DCid length,
>
> ·        Add 3,
>
> ·        Parse DCid length
>
> ·        Add 3,
>
> ·        Read DCID
>
> ·        Read SCID.
>
>
>
> I really appreciate the fixed size length fields so we can know both
> destination and source Cid lengths in parallel. Implementing this in
> hardware has the following challenges though:
>
> a.      There are 12 unique length types for each of the CiDs. This means
> either more stages of serial processing, which would be slower. Or it means
> more logic for parallel processing.
>
> b.      In addition to this, the arithmetic logic to add 3 is a little
> more specialized than a logical operation, e.g.shift left.
>
>
>
> Therefore, I would like to understand the basis for having 12 different
> lengths and if there is a chance to simplify this logic, we can have a 3
> bit length and shift left 1, so we have lengths of 0,2,4… 14. Would the
> loss of longer CiD values from 15 to 18 be an issue?
>
>
>
> Thanks,
>
> Manasi
>
>
>
> *From:* QUIC [mailto:quic-bounces@ietf.org] *On Behalf Of *Mikkel Fahnøe
> Jørgensen
> *Sent:* Tuesday, July 03, 2018 6:06 AM
> *To:* QUIC WG <quic@ietf.org>; Marten Seemann <martenseemann@gmail.com>
> *Subject:* Re: Connection ID lengths 1, 2 and 3
>
>
>
> That is correct. Especially in low-power sensor mesh networks.
>
>
>
>
>
> On 3 July 2018 at 14.45.30, Marten Seemann (martenseemann@gmail.com)
> wrote:
>
> First of all, I realise that I'm bringing this up late in the process, and
> maybe too late, since this would require a change to the invariants.
>
>
>
> The connection IDs can be either 0 bytes or anything between 4 and 18
> bytes (inclusive). Lengths of 1, 2 and 3 bytes are not possible.
>
> For p2p applications, and for server deployments that are not doing
> connection ID based load balancing, it would be interesting to use shorter
> connection IDs. One might imagine that a peer encodes the length of the
> connection ID into the first few bits, and then starts using 1 byte
> connection IDs first, and successively moves to longer lengths only when
> handling more connections. A p2p host handling several thousand
> simultaneous connections (which will be enough for many p2p protocols)
> would never have to use anything longer than 2 byte connection IDs.
>
>
>
> In the connection ID length field in the Long Header, we only have to 4
> bit to encode a range of 19 values (we want 0 byte connection IDs, and we
> want to support 18 byte connection IDs), so *some* values have to be left
> out. However, leaving out 1, 2 and 3 seems a bit unfortunate, as there will
> be more use cases for these values than e.g. for 13, 14 and 15 bytes.
>
>