[TLS] Re: Implicit ECH Config for TLS 1.3 – addressing public_name fingerprinting
Christopher Patton <cpatton@cloudflare.com> Wed, 05 March 2025 23:55 UTC
Return-Path: <cpatton@cloudflare.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 3F2B87F6D52 for <tls@mail2.ietf.org>; Wed, 5 Mar 2025 15:55:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.088
X-Spam-Level:
X-Spam-Status: No, score=-2.088 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_KAM_HTML_FONT_INVALID=0.01] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudflare.com
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 DsrnLmLXzeUV for <tls@mail2.ietf.org>; Wed, 5 Mar 2025 15:55:06 -0800 (PST)
Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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 A38ED7F6D42 for <TLS@ietf.org>; Wed, 5 Mar 2025 15:55:06 -0800 (PST)
Received: by mail-qt1-x831.google.com with SMTP id d75a77b69052e-474bc1aaf5fso755761cf.0 for <TLS@ietf.org>; Wed, 05 Mar 2025 15:55:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google09082023; t=1741218906; x=1741823706; 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=8FID4mGfE9lVzUzHizxzbXU9Tf/4IQwYexvEgh/TEPk=; b=aha2Z5/bF5/lgcaK9Het59kJSJ0USxzD/WcsDXI8ok+Coig5stR6hlUNBWp9duCEVF cAF4Aa6qR5V+vj0Bv0gOff7RWzlQU71vTP/NazAyP1JgVlb2ds1dQR7WfxgDHnXws7Sc kYi7flnLhA+ObOBH4Efikx0z60tNHMflzITpLbXcq73akPzxnjmBXWkObjlO5N2REODE U5ro9XiJ9blnsp5e0eUXSPat/b3cO1+z9XDWDzw1OKqHKdWpQuYFiW0+N92HtScEpk1H Wzl4ris2EZDCBLQo8RHwmNlkZX0CSrE8M/dW4bbNlzWMHEPD4Uac1nmeooJLtyj07G7b Mogw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741218906; x=1741823706; 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=8FID4mGfE9lVzUzHizxzbXU9Tf/4IQwYexvEgh/TEPk=; b=AMit7/KoukavzyFPTwOUGkB2+huRTi1LKyGT1oZnfB44reeduUjA3EDa9yf47GEADq +nP44PIZQ+FcJ4mEUGQdoa/1WG3rmJapYb6R+KS2Yb1PcFaIEsZO38qJYVnmerBgWF0c k5qUur6M/N4+idzgoUlmhGdkZ6L0djd8ciWxE+Cqm8fnk6EL6/KqIE/4zano9l/GHwgn WBfTh9kXQYkb2/Aj4blFC+dd1sNb2OcOkm+9XXc7ZvUHH2a2hKCUCzlO/49C78wGgjuQ NShn4ogQSk8qgWKYwspj8xM/0Rw/M5D7ZbCav/yswP7ecFi0CsbBN3GEzGQHNotkeBjM En9w==
X-Gm-Message-State: AOJu0YzLZqsZGDGm0OrtzhHRmYT2Z/BFKRT7Avfjq/Qc4u2aGpc2as+P HrbbyAtXCSy25cAJXP9R/5AyihBJGa+2BcZrW6jACzfGh9d9Xswifbfmz5C+qppirrgDD0Dtyun adKROlAnREGrqsYFkW3xZSZWTRxCG943zvZuTMvON+lUTni8Hpck=
X-Gm-Gg: ASbGncvD9d1LsNGZvMRLWTibjMDRfmhRafIFVBNCBhZvU4BRcmBFc223sS4Nwcm92Xj V0lXxg3lGD5tkjYfNU5bOFrkt1sPDQLc0aCqhVvQF1DKVmwyTwNzwpObyaWZrYcB7sQCv+lmeDQ RxBLTBKU+ykox/ZXFQlNsw2Mgl7q0=
X-Google-Smtp-Source: AGHT+IHCFh7fQP68agFT6hdwXqgOMO01vSuDEOVyjQnnxvkaowCE6/+Uu0LlDn1PUz6OZ2hJdN4AbippctQDqo3wQp4=
X-Received: by 2002:a05:622a:508:b0:472:d9e:a504 with SMTP id d75a77b69052e-4750b45e004mr63768921cf.26.1741218906051; Wed, 05 Mar 2025 15:55:06 -0800 (PST)
MIME-Version: 1.0
References: <CAOjisRzBNG2KdAZXssnR9Ura9HuAUKxOH+VLCAE5B9MfYyeT2A@mail.gmail.com> <CAOjisRx9vuroH8-q1tgTPWNnTWQ6i+0Vb=VBTv77j7-hEbHHSw@mail.gmail.com>
In-Reply-To: <CAOjisRx9vuroH8-q1tgTPWNnTWQ6i+0Vb=VBTv77j7-hEbHHSw@mail.gmail.com>
From: Christopher Patton <cpatton@cloudflare.com>
Date: Wed, 05 Mar 2025 15:54:55 -0800
X-Gm-Features: AQ5f1Jorqja8ZOpppGr66IxbINOregxakQiCLnAhdvn6zMecTodeancJpgIHQ4M
Message-ID: <CAG2Zi23kVghBzq3eyNXXqs+wk+LuRky8k2ZaJv5iRD6Pp5tpYQ@mail.gmail.com>
To: Nick Sullivan <nicholas.sullivan@gmail.com>
Content-Type: multipart/alternative; boundary="0000000000005f34ca062fa11ebd"
Message-ID-Hash: FXUMEQOM7EWVZWD4JWLQGFM6XOCHYATW
X-Message-ID-Hash: FXUMEQOM7EWVZWD4JWLQGFM6XOCHYATW
X-MailFrom: cpatton@cloudflare.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: Implicit ECH Config for TLS 1.3 – addressing public_name fingerprinting
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/GKhJnlkpvZhJDf4Tu9igdGCDP_Q>
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>
Hi Nick, I'd go for option 1. The server is opting into this mechanism, so it seems reasonable to force it to ignore the outer SNI if ECH accepts. I agree with Stephen that we shouldn't hold up publication for this change (Option 2), however I think the extension mechanism of ECH is appropriate for this. Chris P. On Thu, Feb 27, 2025 at 5:10 PM Nick Sullivan <nicholas.sullivan@gmail.com> wrote: > Hello TLS, > > After offline conversations about how sever-side trial decryption is > implemented, I think this implicit ECH draft can be simplified. > Furthermore, it may be possible to make a small change to draft -23 to get > most of the benefits of this draft in the main ECH document. > > Section 7.1 of draft-23 of the ECH draft describes the process for > selecting candidate ECHConfigs for an incoming ClientHello. It describes > how the config_id should be used by the servers to narrow down the list of > keys to trial decrypt against. It does not recommend or prohibit using the > outer SNI in this selection process. For a server that only supports > ECH-capable domains with a single set of configurations sharing the same > public_name, the process described in 7.1 is fine. > > However, in practice, some servers simultaneously support ECH for some > domains and GREASE ECH (aka non-ECH) connections for other domains. Doing > so will entice such servers to use the outer SNI as a first-pass filter for > selecting which connections get trial decryption and which are immediately > treated as GREASE. This logic is problematic with draft-23. > > For example, if the outer SNI of an incoming ClientHello does not contain > a public_name associated with a known ECH configuration, the server can > choose to handshake with the ClientHelloOuter without even attempting to > decrypt the ECH extension as a performance enhancement. This method limits > needed flexibility on the client. Specifically, there is no MUST that says > the outer SNI must match the public_name of the ECH configuration, and > implementing this method breaks the ability for clients to violate the > SHOULD in Section 6.1 point 5, which says the outer SNI should match the > public_name. If a client connects to a client-facing server with a "dummy" > outer SNI that doesn't match, servers implementing this shortcut will > attempt to handshake with the ClientHelloOuter using a certificate that > covers that dummy outer SNI, something the client is not prepared for. If > implemented, this pre-selection logic based on outer SNI will break > interoperability with clients that follow Section 6.1, list element 5: > > It SHOULD place the value of ECHConfig.contents.public_name in the > "server_name" extension. Clients that do not follow this step, or place a > different value in the "server_name" extension, risk breaking the retry > mechanism described in Section 6.1.6 > <https://www.ietf.org/archive/id/draft-ietf-tls-esni-23.html#rejected-ech> or > failing to interoperate with servers that require this step to be done; see Section > 7.1 > <https://www.ietf.org/archive/id/draft-ietf-tls-esni-23.html#client-facing-server> > . > > > Note 1 on this text: Placing a different value in the outer SNI does not > have to break the retry mechanism in 6.1.6. The "retry_config" is > authenticated via the public_name (which is known to the client) *not* the > name in the outer SNI. So servers who reject ECH can send retry_configs > with a certificate covering the public_name. *But not if they implement > this shortcut logic*. > > Unless explicitly prohibited, this server logic is likely to be very > common because it can save the client-facing server from having to do an > extra public key operation when trial-decrypting ECH GREASE connections > when the dummy GREASE config_id matches a supported config_id. This > deployment reality makes this SHOULD effectively a MUST in practice. At the > least, it will effectively prohibit clients from selecting dummy outer SNI > names that overlap with the set of supported non-ECH domains by the server > (a list the client has no realistic way of knowing). > > I see two solutions to this problem. > > Option 1: > Prohibit client-facing servers from using the outer SNI until they fully > confirm that the ECH extension is invalid or GREASE. > > This has a lot of benefits: > - It removes some potential legal or policy uncertainties for servers that > implement this shortcut. I understand that shared proxy servers with > multiple customers do not want to have to explain why they used one > customer's hostname in the logic for decryption of a connection to a > different customer. This is exactly what will happen with this shortcut > logic if a client sends a dummy SNI that matches a different customer. The > server uses that other customer's private key and certificate in the > connection. This change makes the outer SNI purely vestigial and guarantees > that it will not be misused for ECH connections. > - It makes it less likely that clients disregarding the SHOULD for 6.1 > point 5 will face unexpected failures, allowing this SHOULD to be relaxed > to a MAY. It could also facilitate removing the "Once the server has chosen > the correct ECHConfig, it MAY verify that the value in the ClientHelloOuter > "server_name" extension matches the value of > ECHConfig.contents.public_name, and abort with an "illegal_parameter" alert > if these do not match." stipulation in 7.1 > - It reduces the timing side-channel that this selection introduces to > outside observers, i.e., if the server handshake takes less than 3 public > key ops to run, the observer can assume the connection was GREASE and not > legitimate ECH. This is not a silver bullet, using the config_id to > shortcut the logic for ECH GREASE connections still provides a side-channel > in some cases. > > Option 2: > Tighten up the language in -23 by restoring the SHOULD to a MUST in > Section 6.1 and document the necessary logic to support outer SNIs that > don't match the public_name in a separate document like Implicit ECH. > > Notes: > - The implicit ECH draft should probably be amended to require config_id > to not be flexible, since it's not leaking much and is useful for key > selection during rotation > - Servers that plan on using a public_name that is not uniquely carved off > for use in ECH (no implicit ECH) can't use this shortcut logic. If, for > example, Google wanted to use "google.com" as the public_name for ECH for > its suite of sites like YouTube etc., then they would still have to do > trial decryption anyway. > > Nick > > > Nick > > On Wed, Feb 26, 2025 at 3:14 PM Nick Sullivan <nicholas.sullivan@gmail.com> > wrote: > >> Hi everyone, >> >> I’ve put together a draft, “Implicit ECH Configuration for TLS 1.3” ( >> https://www.ietf.org/archive/id/draft-sullivan-tls-implicit-ech-00.html) >> as a potential starting point for improving ECH’s “do not stick out” >> compliance. Global deployments of ECH have become biased because a single >> public_name dominates most ECH connections, making it a prime target for >> fingerprinting (see https://github.com/net4people/bbs/issues/417) As >> discussed on the TLS WG mailing list (see >> https://mailarchive.ietf.org/arch/msg/tls/4rq4sZzpI9rjYgDLJ2IO-vG9DRw/) >> the outer SNI remains the primary identifier that enables on-path >> adversaries to identify ECH traffic. >> >> To mitigate these linkability risks, various past proposals were >> considered. One idea was to randomize or override the outer SNI rather than >> always using the provided public_name. For example, Stephen Farrell >> suggested allowing clients to use an arbitrary or blank outer SNI (for >> certain use cases like censorship circumvention). This would, in theory, >> make the outer handshake less predictable, increasing traffic diversity >> across ECH connections. However, others in the WG (e.g. Chris Wood) >> cautioned that relaxing this requirement essentially reintroduces domain >> fronting, a side-effect the group was wary of. >> >> The consensus was that fallback reliability and simplicity favored >> sticking with the public_name in SNI. See Github discussions: >> https://github.com/tlswg/draft-ietf-tls-esni/issues/396 >> <https://github.com/tlswg/draft-ietf-tls-esni/issues/396#:~:text=For%20at%20least%20command%20line,benefit%20from%20that%20option%20too> >> . >> >> Relatedly, early drafts used an 8-byte config_id, but as documented in >> discussions around 2020-2021, it was shortened to one byte to reduce its >> uniqueness and tracking potential—a change that was well received by >> privacy advocates yet noted by implementers as complicating the deployment >> complexity for multi-key scenarios, though not enough to hinder deployment. >> >> Implicit ECH Configuration, introduced in >> draft-sullivan-tls-implicit-ech-00, builds on this prior work to propose a >> mode of ECH that minimizes explicit signaling of the server’s identity. >> This draft introduces an optional “implicit” mode via a new extension in >> ECHConfigContents. When this extension is present, clients MAY choose any >> valid outer SNI and a randomized config_id instead of relying on a >> potentially globally dominant public_name. Client-facing servers, in turn, >> MUST perform uniform trial decryption to ensure that every handshake is >> processed identically, regardless of whether a valid or a phony config_id >> or outer SNI is provided. >> >> This approach enables clients to adopt custom strategies for maintaining >> broad reachability, ensuring that a single public_name does not become a >> reliable way for external observers to distinguish ECH from ECH GREASE at >> scale. It is also useful for improving privacy when client-facing servers >> support only one or a small number of domains, as it enables clients to >> choose the outer SNI such that it is not merely a direct stand-in for the >> inner name. >> >> Importantly, I don’t believe this approach reintroduces domain fronting. >> It’s not possible to use implicit configuration ECH to connect to one site >> on a server and then trick that server into serving HTTP responses for a >> second, different site when the TLS certificate used to establish the >> connection is not authoritative for that second site – the essential thing >> that distinguishes domain fronting from other techniques. Implicit mode >> effectively relegates the outer SNI to a mostly symbolic role for these >> connections, used solely for ensuring network reachability—similar to how >> certain legacy TLS 1.2 messages were retained in TLS 1.3 to address network >> ossification issues. >> >> This change may have fit into the main ECH draft if it had been proposed >> earlier. However, ECH has already been submitted to IESG for publication, >> so I put this together as a standalone extension. I welcome your feedback >> on this proposal as we work to reduce fingerprinting risks without >> sacrificing deployability. >> >> >> Nick >> > _______________________________________________ > TLS mailing list -- tls@ietf.org > To unsubscribe send an email to tls-leave@ietf.org >
- [TLS] Implicit ECH Config for TLS 1.3 – addressin… Nick Sullivan
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Raghu Saxena
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Yaroslav Rosomakho
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Yaroslav Rosomakho
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Nick Sullivan
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Loganaden Velvindron
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Eric Rescorla
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Nick Sullivan
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Nick Sullivan
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Stephen Farrell
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Christopher Patton
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Martin Thomson
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Stephen Farrell
- [TLS] Re: Implicit ECH Config for TLS 1.3 – addre… Kazuho Oku