Re: [TLS] A flags extension

Yoav Nir <ynir.ietf@gmail.com> Tue, 26 March 2019 15:38 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 66CFD12037B for <tls@ietfa.amsl.com>; Tue, 26 Mar 2019 08:38:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] 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 nV-eDGMi28Er for <tls@ietfa.amsl.com>; Tue, 26 Mar 2019 08:38:21 -0700 (PDT)
Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 6B082120333 for <tls@ietf.org>; Tue, 26 Mar 2019 08:38:21 -0700 (PDT)
Received: by mail-wm1-x343.google.com with SMTP id q16so13135378wmj.3 for <tls@ietf.org>; Tue, 26 Mar 2019 08:38:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=BfrXL36yBzyJYGjlLVmK4SwBcRl5cbleFaMRqcn6SUU=; b=VhSqWKT0vpG4Sql5NJ87ScM7vGBGqtAeXzBDH67LbvYlHh6Add4kKRQR8BQxBmevpL deOqe93sDgL6EtoCD4rjKitPHs1w0cPtm+y2lF4JewyWy039caalLgNL/lLTM4XWgotK J9Srv1f/IV2kqY2893xc/NN/SkCeSnkU144HZpZr6yDK65yUxKQZ/LNodvvEXRszQhDG cI6iJD3xyEGt/PJQR+p05HcBFAkHmn+Ddf6V6YkYpu0kb/FBeWuk12mjvhtQGbAXQOJb fY/qiY7FXEv+8n/DrYAz0Zjc3Ie3ptz/YZaqu3ApYdaOht4DsW4mbjgyIq2mJ/wLSZT1 e7QA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=BfrXL36yBzyJYGjlLVmK4SwBcRl5cbleFaMRqcn6SUU=; b=HJ31Oz8EogKvmoGsnbmjSqOv5Lq7yJxsDfroLm26ZscsjwIPettQav3Ed3xrjqlJat YA/UQg1aXutCdGmhNTOiFQ60t736MYaWqPmJm36DFCP+hxNK8jtLXYLTN4isUY2bIBvW Bi4BYiqrdYKskVHLd8KzI4DUU1sbQ4xIqo3gFYNv2GGPfGyuwCi/m7GBNJTS6+qPszih MR3VsOerltAQMdmn6JO8xslOtWSC8btCxwU0TiCb57F8KizeeWjD567s4Jst70JwjJ6w WSn/OKjpqLWhoVDSRfEMxuimsvD+OMqgn2hrE3aT69NbtRiRDSQ3zD/A9Ip7Yjss9vrq Dt5g==
X-Gm-Message-State: APjAAAWH0D/ipzDO0BZNqE5oueymK9SColVG954Ac8MsCFF9tvKKuoCG ffX1NaOnZppH4oDkcaW6ejw=
X-Google-Smtp-Source: APXvYqx6eKsMNauR/Nzk8rKPKu8lp5w4twPkyijai6z3DD/b8Zepuqv7tl6+bwEKSVf6RHeRBWs1Zg==
X-Received: by 2002:a1c:cfcb:: with SMTP id f194mr9775902wmg.51.1553614700035; Tue, 26 Mar 2019 08:38:20 -0700 (PDT)
Received: from ?IPv6:2001:67c:370:128:9980:b4e6:152:a4aa? ([2001:67c:370:128:9980:b4e6:152:a4aa]) by smtp.gmail.com with ESMTPSA id r6sm1831722wrt.38.2019.03.26.08.38.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 08:38:15 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
From: Yoav Nir <ynir.ietf@gmail.com>
In-Reply-To: <1570216.1kCOWNXRrC@pintsize.usersys.redhat.com>
Date: Tue, 26 Mar 2019 16:38:11 +0100
Cc: tls@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <C39ECEA3-3BE1-4A31-AC04-E4A295851675@gmail.com>
References: <A7EC005E-3463-406B-930F-925B4D2338E4@gmail.com> <1570216.1kCOWNXRrC@pintsize.usersys.redhat.com>
To: Hubert Kario <hkario@redhat.com>
X-Mailer: Apple Mail (2.3445.102.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/FFkdLH3QH0qnlnfF3WyeS7oHO-Q>
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 15:38:23 -0000


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

I don’t think we should project the failings of DER parsing to the parsing of much simpler structures.

Yoav