Re: [TLS] ech/esni - theoretically some inner CH's wouldn't fit...

David Benjamin <davidben@chromium.org> Sat, 20 February 2021 23:06 UTC

Return-Path: <davidben@google.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 3C0D63A1022 for <tls@ietfa.amsl.com>; Sat, 20 Feb 2021 15:06:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.818
X-Spam-Level:
X-Spam-Status: No, score=-9.818 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.57, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 Y0PZBvPf2Pzr for <tls@ietfa.amsl.com>; Sat, 20 Feb 2021 15:06:35 -0800 (PST)
Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (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 D651C3A101C for <tls@ietf.org>; Sat, 20 Feb 2021 15:06:35 -0800 (PST)
Received: by mail-pf1-x42c.google.com with SMTP id t29so4259621pfg.11 for <tls@ietf.org>; Sat, 20 Feb 2021 15:06:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GzJBH6wKgiT47OYG/le/g8tWatkju8guP1M7YJmPN3Q=; b=LtIN7ABxjZ5C8AF9CVk7cT1m5G3vF2wR4SNPeumoYARvDPf5TabefcE5zZX1An6BJa PwtuaewMmUkIGh1lLFXpmjMyi5BjFJhRK2VatY73fxIWW+m1uCGvwxMtCG7mYLAvSpXU TJdiil/OIi7LlNCKQfpvxxn1BpQVnzY8T/v1U=
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=GzJBH6wKgiT47OYG/le/g8tWatkju8guP1M7YJmPN3Q=; b=Su6ccwjk8mmTskmUxVBNgG8yA7fsqKUQ09/0FQyVdYt2kEmW9yiKrilb25T8s8Dm9S NljhA1f7nLhVuPLfKtF2CzLc05LPSOFdFh7z1GLi9hZoBP5+baHblCMd3sO2DMpu6VEa Swz7X9uSGEreUk3JL/lom8asCVaVe5OhnsRtfG3mZXPfX2H/EVmKnY2b0D7peQiyuIEg KZ5FP7KptanQBJtFF5aXI3d1rXCI5HnL/uifOmGhValmHJzGbFcFxv9q4Y4XeE/rm/bJ zD5ZFnTVW+i2WUNlwLyWl/qEYV8AH1Nz/NRI7Gpn/tV6OEGXjO0ERUiGUK9Osei3taIE M4ng==
X-Gm-Message-State: AOAM532Y3MTqgExNBRIKqOb+jLfC35blmr/92PsjZz9gYhMVPg2S6QU9 Zt3O/igG1QzNGaVkCCXvlqm5Vq0W+DXRcbdON0NwiWhFsA==
X-Google-Smtp-Source: ABdhPJwrC9QCjFCtiA3v/B+RBMItBXHnF0TR45LBFonaJPeZOTTdUW2r61KaciUNqRy7dH+T6bWbkeqP9DZV+dhPsbM=
X-Received: by 2002:aa7:9ec5:0:b029:1e7:a1c:8f8a with SMTP id r5-20020aa79ec50000b02901e70a1c8f8amr16044095pfq.41.1613862394849; Sat, 20 Feb 2021 15:06:34 -0800 (PST)
MIME-Version: 1.0
References: <6ab8def6-a01a-cb7a-eaac-63c96966d9be@cs.tcd.ie>
In-Reply-To: <6ab8def6-a01a-cb7a-eaac-63c96966d9be@cs.tcd.ie>
From: David Benjamin <davidben@chromium.org>
Date: Sat, 20 Feb 2021 18:06:18 -0500
Message-ID: <CAF8qwaBPojxrNb4XC3OeMnTrEOONRgnnVxjcmYDEWSQQ_bG7wg@mail.gmail.com>
To: Stephen Farrell <stephen.farrell@cs.tcd.ie>
Cc: "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000c3630505bbcc9e1b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/-MdE6uutJzifDKOxVPLsZHdsl40>
Subject: Re: [TLS] ech/esni - theoretically some inner CH's wouldn't fit...
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: Sat, 20 Feb 2021 23:06:37 -0000

Moving to a three-byte length wouldn't do anything: extension bodies
themselves have two-byte lengths, so any longer lengths within an extension
is just a waste.

(To that end, because every field in a ClientHello has a two-byte length,
the longest possible syntactically valid ClientHello at all is 2 + 32 +
32 + 1 + 32 + 2 + 2^16-2 + 1 + 2^8-1 + 2 + 2^16 - 1 bytes, which is doesn't
fit in two-byte length, but nearly does. And, in practice, implementations
may impose length limits on incoming messages beyond that to avoid DoS
risks.)

On Sat, Feb 20, 2021 at 3:19 PM Stephen Farrell <stephen.farrell@cs.tcd.ie>
wrote:

>
> Hiya,
>
> The CH in TLS has a 3 octet length. The payload in ECH has a
> 2-octet length. Hopefully that'll never matter but it's an
> inconsistency I don't recall coming up before. (Apologies if
> I've forgotten, or if I've missed something in 8446 that
> forbids bigger CH's.)
>
> I'm fine with just leaving it as-is, or with noting in the
> text that you will suffer this problem (and many others;-) if
> you want to use a CH that's that long, or with moving to a 3
> octet length for the payload.
>
> Cheers,
> S.
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>