Re: [TLS] A flags extension

Yoav Nir <> Tue, 26 March 2019 20:18 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 96317120AFC for <>; Tue, 26 Mar 2019 13:18:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.989
X-Spam-Status: No, score=-1.989 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_NONE=-0.0001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01] 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 S1s0a6JHj9xp for <>; Tue, 26 Mar 2019 13:18:11 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4864:20::332]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 670A7120AF6 for <>; Tue, 26 Mar 2019 13:18:10 -0700 (PDT)
Received: by with SMTP id q16so14012827wmj.3 for <>; Tue, 26 Mar 2019 13:18:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=KIiKoK8WLKV3A4fNsOTcDDawlZeYzbtK9+/G/xc2Q3Y=; b=QBZC3264MKhcQiYmNwAFxhqS/1QM1CK4AmMyNB/dtWMlHXCOwHxSwOTkSXAQAG62eK moH4LeViGhF4JxRgUscDIfTi4eI7zBwnUKcBq8gfIKW+gHDRoRbHuNcCVT2yWB46ez/N c2YLo5sDTrQbK3wOk4zr5efq2GTDYHbmwQ8W5UGKuYOxQQCfB1cLrdCz7QRyx3IcHALD yT4raIwk3z+k/3frpz1Q+cbTbG6MnhsPx57w1UsJjRsnhqHQASta+Lpq8rw7eVzyR4ah w+APgeLCNUUBjSnhndtBd7vXQVXyxRn8pRtoTQh0DkFl/Hxx9LsKTHrHaFmv0RViGe/l eiyw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=KIiKoK8WLKV3A4fNsOTcDDawlZeYzbtK9+/G/xc2Q3Y=; b=tZfPw8uVJgqtuLM/ovr8vikZJjpReXDPoGdZ94jRy43CDfRG5fHzKYnHge5XpQP4Dt fPNa51WHd/ZckLIhfeNeABet5NFF6Qng2GQikbQGLrY214oteO+kvQYX2gBOyD8hUwoz wl/zIgyTtyAOBBxBdqjC64bmjMIWWKqWxdfLKISs2GNWiRi+SMC+e1dbbA4gbI3PCYBF KqIn6jGzr2BuFBGNTuo3R7HHKED8YkVEaGQBD3KHetGSP61uR6WWOEk8T7vijIadKyq9 mLQeQQXYst+omTst7rjHljKIAyDoy4RLxJlZVo25483u3RJnx3RUhjILkX3OQDJOaVh8 Jlyg==
X-Gm-Message-State: APjAAAVDfXbBpvxYL/pcIrFoMcYKsdkcEVkyHEWphYNI4WDlYTid5IKh 4+DIvqU5LZr6/pPtLuZcFxU=
X-Google-Smtp-Source: APXvYqzC2fLqDFlOrsKooY0HOYOb6AFyZR98TA9wy9P52yEzck0V96btNffEsa5LRb3NawNBxP0jjA==
X-Received: by 2002:a1c:c4cd:: with SMTP id u196mr9898277wmf.70.1553631488964; Tue, 26 Mar 2019 13:18:08 -0700 (PDT)
Received: from ?IPv6:2001:67c:370:128:79c3:f458:29bf:f151? ([2001:67c:370:128:79c3:f458:29bf:f151]) by with ESMTPSA id b204sm33577831wmh.29.2019. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 13:18:07 -0700 (PDT)
From: Yoav Nir <>
Message-Id: <>
Content-Type: multipart/alternative; boundary="Apple-Mail=_4E62D852-5446-4102-BC2B-C672969A7F7A"
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Date: Tue, 26 Mar 2019 21:18:06 +0100
In-Reply-To: <>
To: Hubert Kario <>
References: <> <> <> <>
X-Mailer: Apple Mail (2.3445.102.3)
Archived-At: <>
Subject: Re: [TLS] A flags extension
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 26 Mar 2019 20:18:14 -0000

> On 26 Mar 2019, at 18:49, Hubert Kario <> wrote:
> On Tuesday, 26 March 2019 16:38:11 CET Yoav Nir wrote:
>>> On 26 Mar 2019, at 14:45, Hubert Kario <> wrote:
>>> On Monday, 25 March 2019 22:09:35 CET Yoav Nir wrote:
>>>> Hi.  Today at the TLS meeting, there was a discussion at the mic about
>>>> 1-bit extensions that only serve to indicate support for an optional
>>>> feature. EKR commented that such extensions take 4 bytes each and that
>>>> maybe we need to replace them with a flags extension.
>>>> So I threw together a quick -00 draft with an extension that does just
>>>> that
>>>> [1].
>>>> Comments are welcome.
>>> I don't think that "penny-pinching" the 4 bytes necessary to send a flag
>>> is
>>> worth the interoperability problems, and increased complexing of parsing
>>> Client Hello. Especially if we go the route of actual bit flags.
>> Right. Which is why I went with a 1-byte encoding rather than a bitstring.
>>> I think the likelihood of bugs in that code over the possible bytes saved
>>> makes it a net negative.
>> I don’t think so. My encoding is not all that complex.
>>> yes, TLS is quite chatty protocol, it could encode values much more
>>> tightly, but I think we all remember the bugs related to ASN.1 parsing
>>> from inside of PKCS#1 v1.5 signatures
>> Complexity is on a spectrum.  DER encoding is pretty far on this spectrum. 
>> A list of 1-octet identifiers is on the other end. A bitstring is more
>> complex than the identifier list, but not anywhere near DER.
> 1-octet identifiers may not be considered extensible enough
> (yes, you can add another extension, but the first extension to use it will be 
> paying an additional price of 2 bytes on top of the extension overhead; same 
> if you just need to use only one flag, then you are paying the same price for 
> every connection)
> 2-octet identifiers asymptotically approach 2-octet saved per flag, which is 
> about 50% saved per flag, I don't see it as much
> to approach it from another way: while I think we will, sometime in the 
> future, reach a situation when we have few hundred flag extensions *defined* , 
> I do not see a future in which we will need to *use* more than few dozen flag 
> extensions in any real world client. So we are talking about a possible saving 
> of around 100 bytes in ClientHello (36 extensions * 3 bytes saved) in this 
> proposal

A few dozen?  I was thinking under 10 in a typical client.

> won't this be completely erased by any post-quantum key share?

I think implementing (or not) draft-ietf-tls-certificate-compression would have a much more significant effect than anything we save here.