Re: [TLS] A flags extension

Yoav Nir <ynir.ietf@gmail.com> Tue, 26 March 2019 20:18 UTC

Return-Path: <ynir.ietf@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 96317120AFC for <tls@ietfa.amsl.com>; Tue, 26 Mar 2019 13:18:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.989
X-Spam-Level:
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: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 S1s0a6JHj9xp for <tls@ietfa.amsl.com>; Tue, 26 Mar 2019 13:18:11 -0700 (PDT)
Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 670A7120AF6 for <tls@ietf.org>; Tue, 26 Mar 2019 13:18:10 -0700 (PDT)
Received: by mail-wm1-x332.google.com with SMTP id q16so14012827wmj.3 for <tls@ietf.org>; Tue, 26 Mar 2019 13:18:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; 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; d=1e100.net; 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 smtp.gmail.com with ESMTPSA id b204sm33577831wmh.29.2019.03.26.13.18.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 13:18:07 -0700 (PDT)
From: Yoav Nir <ynir.ietf@gmail.com>
Message-Id: <2562A77E-B67F-4841-9FE5-270BC8E142D0@gmail.com>
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: <1708317.SzMvUCQ6tO@pintsize.usersys.redhat.com>
Cc: tls@ietf.org
To: Hubert Kario <hkario@redhat.com>
References: <A7EC005E-3463-406B-930F-925B4D2338E4@gmail.com> <1570216.1kCOWNXRrC@pintsize.usersys.redhat.com> <C39ECEA3-3BE1-4A31-AC04-E4A295851675@gmail.com> <1708317.SzMvUCQ6tO@pintsize.usersys.redhat.com>
X-Mailer: Apple Mail (2.3445.102.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/oFf6U_W27zNJmQaQdRtYgyb61Ds>
Subject: Re: [TLS] A flags extension
X-BeenThere: tls@ietf.org
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." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Mar 2019 20:18:14 -0000


> On 26 Mar 2019, at 18:49, Hubert Kario <hkario@redhat.com> wrote:
> 
> On Tuesday, 26 March 2019 16:38:11 CET Yoav Nir wrote:
>>> On 26 Mar 2019, at 14:45, Hubert Kario <hkario@redhat.com> 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.

Yoav