Re: [TLS] draft-ietf-tls-esni feedback

Eric Rescorla <ekr@rtfm.com> Mon, 21 October 2019 13:06 UTC

Return-Path: <ekr@rtfm.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 E52F91200C4 for <tls@ietfa.amsl.com>; Mon, 21 Oct 2019 06:06:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.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 vV1nGtzDGQ-m for <tls@ietfa.amsl.com>; Mon, 21 Oct 2019 06:06:40 -0700 (PDT)
Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (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 CCCB7120099 for <tls@ietf.org>; Mon, 21 Oct 2019 06:06:39 -0700 (PDT)
Received: by mail-lj1-x22a.google.com with SMTP id y3so13248961ljj.6 for <tls@ietf.org>; Mon, 21 Oct 2019 06:06:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lizBzmZooz2GyL5rCjZVTkxXBRam4n0Fi1G5W/WgVBQ=; b=tbJvJwfAmbHLG1gtXcYXAaBPV0Cw7dd/e/Jl2f7e7sPz5AASeRslzwBSX9rJ/pzJ1y hE2KUxnNB3HnRorn3tQndi9nWq16+o+YWNhCUO7DnTgAvcwoX2XrX4Zu6xnXAnUwj3gt s3MT22bKS9STl8MaBu9vEqSMTmG9n5NkFgbP/DVf/Z6elwUXo7zNU6num+kaO290d8bc Sa+BR7zaBscpGr2dE+C3CChztK3wEQFFbjU06axmKJWS4gSEqbwQ2Hn1wGAy2UU41gDk FbBbjg5QR3VpiNHEzNx3uEseBG92R4oSRIDCB/ZsCQyTfNh5h7hQKd+kAKPdJwpx1Dst KoNQ==
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=lizBzmZooz2GyL5rCjZVTkxXBRam4n0Fi1G5W/WgVBQ=; b=YkHC8nbyfnfA5yoSG4XDYteYMD+0wisYhwKyUtFMa0NbWow5EOJRWyhl6RVvWwCjmo eOduas/YELxco2rN7sAMT5/dI34LY6ucnUAUs/Q/84g0EiRKT7IFmm/dg0YW5jK6bdPA nTIgAYETc1Wpo197rS0ztWJ+gG5kNrGW0r1QHkPAc5Wzz+8RPkZfdhVe+PliFJovHtd2 XUobFjXF5Dacf7BtgmP8jK08EaF4tW1X9dJcA9tmkeyurXCaXbx1R17ps4z468XaBQnN vHZYXy3QzoPcMSohN8RGIcJN+VcYUVuWvs9uPLn33KvGk83XOO1N+JLtRcHTRAbfp000 MUSA==
X-Gm-Message-State: APjAAAUYGzqoDHpMmjgJP/VYTLAPm73E7SomiJbHfrOGNAfZ3qFI6Ire PXUG/aBpB10Pu9FvX3J1Y6q/xtvUPHrYSS96fCqh7Q==
X-Google-Smtp-Source: APXvYqx9fTvLhNkwFg/cUkO9ubADPxGyZwYxgDCQAmjB/c1PvydeRB1dDRH6ROjSeLZp2EnYEf4stPjhh5116USkgsA=
X-Received: by 2002:a2e:3a14:: with SMTP id h20mr14485547lja.29.1571663197950; Mon, 21 Oct 2019 06:06:37 -0700 (PDT)
MIME-Version: 1.0
References: <CAChr6Sw3f7du3JYxfcWSZje1zjDzsRBQyDjob-AvzjWeZzKW7g@mail.gmail.com>
In-Reply-To: <CAChr6Sw3f7du3JYxfcWSZje1zjDzsRBQyDjob-AvzjWeZzKW7g@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 21 Oct 2019 06:06:01 -0700
Message-ID: <CABcZeBPbw_KOo_ieSqkksYPeLtb9DufBz628oFPYc_Ue4S9iww@mail.gmail.com>
To: Rob Sayre <sayrer@gmail.com>
Cc: "TLS@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000009efb9905956b5aee"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/oCNXt-n-QoB6xZ0xDTfBpR0TTxA>
Subject: Re: [TLS] draft-ietf-tls-esni feedback
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: Mon, 21 Oct 2019 13:06:42 -0000

On Sun, Oct 20, 2019 at 2:41 PM Rob Sayre <sayrer@gmail.com>; wrote:

> Hi,
>
> I was implementing https://tools.ietf.org/html/draft-ietf-tls-esni-02
> (since I believe that version is what Firefox and Cloudflare currently
> ship), and I had a difficult time parsing this part of the draft:
>
> struct {
>   ServerNameList sni;
>   opaque zeros[ESNIKeys.padded_length - length(sni)];
> } PaddedServerNameList;
>
> struct {
>   uint8 nonce[16];
>   PaddedServerNameList realSNI;
> } ClientESNIInner;
>
> I hadn't seen the fixed-but-variable length construction that the "zeros"
> field uses before (although I haven't written much TLS code).
>

It is used in other places. See, for instance:
https://tools.ietf.org/rfcmarkup?doc=8446#section-5.2


Judging by the mailing list archives, the design of the field is
> intentional. It's not clear to me why "zeros" wasn't specified as
> variable-length with a prose restriction, though.
>

Because then you have a spurious length field.


This part of the spec is also just generally difficult to follow, in my
> opinion. I had no trouble following the ESNIKeys section. Perhaps the
> problem is in the interaction of prose order, serialization order, and
> procedural code order.
>

Well, this structure is likely to change a fair bit, so probably not worth
trying to update the text right at this moment.

-Ekr

>
> thanks,
> Rob
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>