[TLS] Re: checking a bit of ECH behaviour
David Benjamin <davidben@chromium.org> Sat, 22 March 2025 23:21 UTC
Return-Path: <davidben@google.com>
X-Original-To: tls@mail2.ietf.org
Delivered-To: tls@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 4FBDD110964E for <tls@mail2.ietf.org>; Sat, 22 Mar 2025 16:21:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -9.498
X-Spam-Level:
X-Spam-Status: No, score=-9.498 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1UHCHxMY0ByE for <tls@mail2.ietf.org>; Sat, 22 Mar 2025 16:21:05 -0700 (PDT)
Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 6D01C1109640 for <tls@ietf.org>; Sat, 22 Mar 2025 16:21:05 -0700 (PDT)
Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5e5cd420781so5621195a12.2 for <tls@ietf.org>; Sat, 22 Mar 2025 16:21:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1742685664; x=1743290464; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3w6pOYEuoZpZaGX7KUfwVg+nZIKmR03/LtAuhbybxyY=; b=IDQQxgmw22GgHh2Qdk/rXuxBvMWMAte5KwfwhjCJbI5ndms28rRsEXD5XjgSLEfvHZ ICdQUdXqs8uUmGoszWulo4QR3m8xXSSVqB1W1LIT61i5mMMEUbw1AHNKZK1H8NcHA1bc NXuBcOCx1rAC64DD/N0zRb6BFHimlvSIW/74Y=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742685664; x=1743290464; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3w6pOYEuoZpZaGX7KUfwVg+nZIKmR03/LtAuhbybxyY=; b=GijBo1ONs3Y7Un95hoJ5Luqm+I5W+ru+5f0TBDV/jUt/I7A8LrS8542yJ2mg1fYL3l uRSh8DZ3AH6iiQtIMZCCNf/c4lnkJcrDnqo3fL3diaHqSeNPtAHViJEstx1AeiuKEoFw 7pTV+e32EtY6sYspxCC5bk0VfF0xAKAk2II+Lgw8fZihCiaVSEbMm+ZkXR8gL4kDEEBW yfney4kj9xvIvmHvlgBeStnm3+IGud29bGLUxaZ7ltv82H8gOlBCRs9khwGrb1iOga/W yTcmTsKAxDQ2y4FFMspv1encE1YkYcfXZ1YdXgsgOSjjWxl6INfmM1Qoml3sYKCJ+maK NgXQ==
X-Gm-Message-State: AOJu0Yxv2tX87veneOOCeOXYJ/gYwaYJnVixnh93gGcNSEzZkPAx9+XX JGU4dLdK2dAgtRIEmuXJaiphRf9y3qBukPsF3jduHeKDs3pt5HDizka4061kfirgcdLnpcCNUFm YwzIPPJIvYBksjyD0cOvv8Lkep2kNNheZqX0JS5+fvVlUMWvii3/L0w==
X-Gm-Gg: ASbGncuMDNtZmu1XxNckkYTdrp+2uEqhg1JclvQLxSPEp2FFFCWS1TNarkEPMsop2IS qz2RkNM0KxmBLBGZDaO/l7dFcKwYKkWMFIl+S6U2pGGtyHS6h8TJ6Nzd1oWY+aNBgloh8jno/Hb h0K+iMbFcHEPr6XTrmYe3PNqR6SdbHoU0=
X-Google-Smtp-Source: AGHT+IG2NUbf4xGmsh/lNGEWBE2KV4OcTzYe70vZJfT4bbh4wAn7RALaOr/bkN4DQLlxaCVo8bUWCaKbOP0tjQqWr5Q=
X-Received: by 2002:a05:6402:1ed2:b0:5e7:84eb:6e13 with SMTP id 4fb4d7f45d1cf-5ebcd441653mr6037334a12.14.1742685664037; Sat, 22 Mar 2025 16:21:04 -0700 (PDT)
MIME-Version: 1.0
References: <179d3e25-6ff2-4557-af5c-ad64aaab43b0@cs.tcd.ie>
In-Reply-To: <179d3e25-6ff2-4557-af5c-ad64aaab43b0@cs.tcd.ie>
From: David Benjamin <davidben@chromium.org>
Date: Sun, 23 Mar 2025 08:20:53 +0900
X-Gm-Features: AQ5f1Jqh0sddEriU_aUWg1yZNT6MpbL2vYOGIuaLRSbSc4FlOBYLa62DhGSdEAE
Message-ID: <CAF8qwaDGWdXAJj2k=wOjJ7eqz9++60W+PkWucDNdP653boBB9Q@mail.gmail.com>
To: Stephen Farrell <stephen.farrell@cs.tcd.ie>
Content-Type: multipart/alternative; boundary="000000000000f6d5e40630f69f23"
Message-ID-Hash: EBJ2OSETT2QC2ILTUWLYOFW6BKTWRTH7
X-Message-ID-Hash: EBJ2OSETT2QC2ILTUWLYOFW6BKTWRTH7
X-MailFrom: davidben@google.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tls.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "<tls@ietf.org>" <tls@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [TLS] Re: checking a bit of ECH behaviour
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Yzy3mllGVU-nxpUD_spbEXEWHoc>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Owner: <mailto:tls-owner@ietf.org>
List-Post: <mailto:tls@ietf.org>
List-Subscribe: <mailto:tls-join@ietf.org>
List-Unsubscribe: <mailto:tls-leave@ietf.org>
This case is a protocol error and should abort the handshake, not handle retry configs. I think that's the correct behavior. This is spelled out in the draft already: https://www.ietf.org/archive/id/draft-ietf-tls-esni-24.html#section-6.1.5-5 https://www.ietf.org/archive/id/draft-ietf-tls-esni-24.html#section-7.1.1-5 Changing the protocol as you suggest would mean to process this as a "oh just kidding, let's do an outer ClientHello handshake". This seems to give no benefit and only risk problems. I also don't think it would even work in the first place. The point of the retry flow is to repair config mismatches. This is not a config mismatch. The server has the ECH keys because it managed to decrypt CH1. Not only that, since CH2 decryption IIRC reuses the HPKE context, there's no config for the server to forget the next time around. If it does, as you note, the retry config isn't going to change anything that would lead to this issue getting repaired. Beyond that, this proposed change risks harm to the endpoints and the broader ECH ecosystem. In the general case, inner and outer ClientHellos may be different, so the allowed HRRs in response are different. Both sides would need to go back and recheck that the HRR was correct for the other ClientHello. If they don't, they can get into an inconsistent state and go haywire. It is also bad for the ecosystem because, even if it did work (see below), it can mask implementation bugs in the peer. To that end, the proposed protocol change wouldn't work in the first place. If the server has proceeded with the CHInner1, the transcript is built with that, not CHOuter1. If you change your mind, you have to go back and rebuild the transcript with CHOuter1 or you won't even derive matching handshake keys in the first place. This means: 1. The client must *require* the server indicate ECH acceptance in SH if it did so in HRR. 2. The server must treat decryption failure at CH2 as fatal and *not* fall back to an outer handshake. Both are already in the draft (see links above). I remember we discussed all this when we were working through how to make ECH + HRR work. Indeed this is *why* there is an ECH acceptance signal at HRR. Is there some new information to suggest changing the WG's decision here? David On Sat, Mar 22, 2025, 17:35 Stephen Farrell <stephen.farrell@cs.tcd.ie> wrote: > > Hiya, > > I'm processing maintainer comments as I try get ECH code upstreamed > and wanna check a thing. Let's say the following happens: > > 1. Client send CH including real ECH attempt > 2. Server responds with HRR including good ECH acceptance signal > 3. Client sends 2nd-CH with new group and another ECH attempt > 4. Server responds with SH without good ECH signal and retry-configs > > In the above the server is behaving oddly, managing to successfully > decrypt ECH in the 1st round but failing to do that in the 2nd. But > I guess that could happen even if it shouldn't. > > After 4, I think a client library should just make the retry-configs > available to the calling application as usual. Does anyone disagree? > > I also think the ECH draft doesn't explicitly say to do that. > > That might I guess mean the retry-configs might be the same as the > ECHConfig that the client used at step 1, so there's a potential > loop if it all keeps happening, but since using the retry-configs > (or not) is a client application decision, that's out of scope for > a TLS library. > > I don't think any change to the ECH draft is required to handle > this, but if someone wanted to add a sentence that'd be ok too. > > Thanks and apologies if I'm missing where this was handled in the > draft or discussed previously, > Cheers, > S. > > _______________________________________________ > TLS mailing list -- tls@ietf.org > To unsubscribe send an email to tls-leave@ietf.org >
- [TLS] checking a bit of ECH behaviour Stephen Farrell
- [TLS] Re: checking a bit of ECH behaviour David Benjamin
- [TLS] Re: checking a bit of ECH behaviour Stephen Farrell
- [TLS] Re: checking a bit of ECH behaviour Martin Thomson
- [TLS] Re: checking a bit of ECH behaviour David Benjamin
- [TLS] Re: checking a bit of ECH behaviour Martin Thomson