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

Rob Sayre <sayrer@gmail.com> Mon, 21 October 2019 14:32 UTC

Return-Path: <sayrer@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 42B04120834 for <tls@ietfa.amsl.com>; Mon, 21 Oct 2019 07:32:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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_HELO_NONE=0.001, 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 7IQkrxNaxG0F for <tls@ietfa.amsl.com>; Mon, 21 Oct 2019 07:32:32 -0700 (PDT)
Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) (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 0F479120821 for <tls@ietf.org>; Mon, 21 Oct 2019 07:32:23 -0700 (PDT)
Received: by mail-io1-xd35.google.com with SMTP id c11so7070412iom.10 for <tls@ietf.org>; Mon, 21 Oct 2019 07:32:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Eoz5dEAAC8lmu7yUidwZiGi4ckgsAmcoqBg4MhGz/MA=; b=D0uR1wGCh4vKmQ5ZTuS/82eX9YQ2l+eG3dQcIiyrtJ8q+uXwqcNJAsybbSMX5OGFat zTdsjgkh7syRBk1ZzJbIB3ErGTrjl0/YifXm/EWFvjcwKKdFQnemsNkrjh4Xwb0LLLNo UKkVxK4Z4IJAZyo1L956TRxqqro4X3Sun9VMwRVaHKlw13i5Ud/CM9FvpqWsjTDqwTDx AwC11K0gNiqsyzCLOUDohoCZgf3j9+BSD4vq9FlKYSU5ZXf8+ZQ2jQDYNcEUrV6fFZ3L z2RjWSnVI9Sn49FS0sKipMZfcIgKRqAHWzxK9Vz9s8cyJu/+HrgiqX2fXpn5HAxttrZE GGHQ==
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=Eoz5dEAAC8lmu7yUidwZiGi4ckgsAmcoqBg4MhGz/MA=; b=hQU6novTMh7yD4jF97RjsTfw0tihSKDpsELwLHhm5cYoQJSxsCNoyjYLH5sxQVpyrx 7EIFmYLZDN1tqFv+WqlCcRqa4VW9JGJqE5kka1USu5nuoNOwwjrUgiiMQWpwEWhmKiyX MgtzKuQLUyu+Nrf3ndpsm9AU6ogQRBPxG7i0oVgWnF6ryQCD5KO2njMnjr19HIa/caOy AaqU0i3Jv5snm45vOYL8oFpRNxo/pxzZN0Si0JihLegFAisuForwtLW7ey7inTNnSyRW gHf308+6xwKV76QSK27/SjJhIJhzS7J9g8O02ON/UDa6g7GJFA7xgEiTNP74ZIcF5Bio wOxA==
X-Gm-Message-State: APjAAAV8IwlQX0zQWgTD1Wd2rFoso0M/LAUDuYwkY9tf7ggAswjsT9MF kyOOvFE3wMsnOXBF8tWhXsnvfR7tk7MgZM9taSqPtX6U
X-Google-Smtp-Source: APXvYqwE4RjWT1SPfygQZSygKK09uEt5Te+AJo0ggf4qQbLzA7TKV8osCk50msgqs6RgHmz3JzoDHP5L9zNBKw+dwYQ=
X-Received: by 2002:a02:9a15:: with SMTP id b21mr21348159jal.103.1571668342235; Mon, 21 Oct 2019 07:32:22 -0700 (PDT)
MIME-Version: 1.0
References: <CAChr6Sw3f7du3JYxfcWSZje1zjDzsRBQyDjob-AvzjWeZzKW7g@mail.gmail.com> <CABcZeBPbw_KOo_ieSqkksYPeLtb9DufBz628oFPYc_Ue4S9iww@mail.gmail.com>
In-Reply-To: <CABcZeBPbw_KOo_ieSqkksYPeLtb9DufBz628oFPYc_Ue4S9iww@mail.gmail.com>
From: Rob Sayre <sayrer@gmail.com>
Date: Mon, 21 Oct 2019 07:32:11 -0700
Message-ID: <CAChr6SwB+7Jt2TLJSQh3q=Roizdt2=9jCBa9nq8KRxRo=86uZQ@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Cc: "TLS@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000003e715705956c8df0"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/eeLiO_R_VOQJSPKV1kNpxJGAUmw>
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 14:32:36 -0000

On Mon, Oct 21, 2019 at 6:06 AM Eric Rescorla <ekr@rtfm.com>; wrote:

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

Ah. I have only worked on some handshake messages, and it was new to me. In
the future, I think it might be worth calling out this kind of field as a
distinct type. Maybe "dependent vector"? The TLS 1.3 RFC does say "The size
of the vector may be specified at documentation time or left unspecified
until runtime", but I thought the latter part of that sentence was
referring to variable-length vectors.



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

I don't understand why it would be spurious. In this case, the
deserializing implementation needs to inspect every byte anyway.



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

Fair enough. I would also suggest making sure that this section does not
span a page boundary. That made things worse for me.

thanks,
Rob