[TLS] Re: Implicit ECH Config for TLS 1.3 – addressing public_name fingerprinting

Martin Thomson <mt@lowentropy.net> Thu, 06 March 2025 14:47 UTC

Return-Path: <mt@lowentropy.net>
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 35339844714 for <tls@mail2.ietf.org>; Thu, 6 Mar 2025 06:47:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.799
X-Spam-Level:
X-Spam-Status: No, score=-2.799 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b="KHMIHvYF"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="hyC+HWU8"
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 lKIyiW5sgpf0 for <tls@mail2.ietf.org>; Thu, 6 Mar 2025 06:47:29 -0800 (PST)
Received: from fhigh-b4-smtp.messagingengine.com (fhigh-b4-smtp.messagingengine.com [202.12.124.155]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 03D288446F2 for <TLS@ietf.org>; Thu, 6 Mar 2025 06:47:29 -0800 (PST)
Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id A224F25401F2; Thu, 6 Mar 2025 09:47:28 -0500 (EST)
Received: from phl-imap-01 ([10.202.2.91]) by phl-compute-02.internal (MEProxy); Thu, 06 Mar 2025 09:47:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1741272448; x=1741358848; bh=mLt/wunh9M9KexWph1mJTPiZcBUDrprj 2WP4a2idrrQ=; b=KHMIHvYFaG31IRsagf4frSI/7igLjXwF6J0Q/Pg6cKVXMVYb qfTqKjtbUlWdrbUZ4jbN/px/+8h0JzOY1nwiaJFA4ydxfR4a+tZX2seEMrJk/coh ed00oqQPeXoFEnFMBIZvpg5EG05yXiKd40CGrC2NGLkdEngcIgg4q7gZ+Qov9Abk n9o5uNVNMKWgN/BuSKmRAztu85bhtpmkulAa3+UnvEKtwHG2zEPq7IjI9APIHEZ9 kVNNu7qwA7j1gSI8ab3Clt3FyzwokBfTL/m/Nt1bODNCe+IRfzGE/O0zhvztvy5V veCHpDbulBIxrnDgJSUFVqpEsusL3cRrSNeXwg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1741272448; x= 1741358848; bh=mLt/wunh9M9KexWph1mJTPiZcBUDrprj2WP4a2idrrQ=; b=h yC+HWU8t6jyQQGCwtLV/fDNwf69uDeg23kZl7kGwoT0oQUeNBrnJ424E2YrsZg57 H24kk/S7TZORxP8h8AFylODiWGRXi9m/fCvZrmj2zAxAl5OYCwDjVzdl9uIOAvnb i1s/2au1HQlJ2bOSQikE/fm6+iGon7iv4AiHybdwn1OYeWf7c6QjMpGl5E7liMXS SjlrGPjIw8N+Ijxp+r2nCZ3GuPxsCI/qelaWm9fm6ZfSog80Te0Nqnor0NhnCOMn jcsQ/cZi/ce/Bs7p7uSN32NxRv5THSKQXVStz/ig1caC6hTro09Q4cLprMKSsSbd DCiGXcDQII/AtfgiUZxBA==
X-ME-Sender: <xms:gLXJZ0N0LBpTfrY0pXboNXrqeHeehEE1XYvNUkMIO6ei2O6O4Km4mA> <xme:gLXJZ6_OG6Uuyo6U9p9Mom1nGfrvrN8pda6-AD_QRwQUCPRAPvCJWZa5j-JpCDQfl U9_GaEodaWfsVIqbgI>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdektdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtqhertder tdejnecuhfhrohhmpedfofgrrhhtihhnucfvhhhomhhsohhnfdcuoehmtheslhhofigvnh htrhhophihrdhnvghtqeenucggtffrrghtthgvrhhnpedujeejfefgkeefhfekheeghfdt hfehveejteelgeeuheeffeejgfegfeetteelveenucffohhmrghinhepihgvthhfrdhorh hgpdhgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehmtheslhhofigvnhhtrhhophihrdhnvghtpdhnsggprhgtphhtth hopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegtphgrthhtohhnpeegtdgt lhhouhgufhhlrghrvgdrtghomhesughmrghrtgdrihgvthhfrdhorhhgpdhrtghpthhtoh epnhhitghhohhlrghsrdhsuhhllhhivhgrnhesghhmrghilhdrtghomhdprhgtphhtthho pehtlhhssehivghtfhdrohhrgh
X-ME-Proxy: <xmx:gLXJZ7SSPItH_XdPOZ74_rGZahbagShJQJWG3BiZhSBt1x-lrW4KpA> <xmx:gLXJZ8uaa0_BF_huZx9uyBsvSzNYft2-R6G8YUATrDXUQh3bL47XeA> <xmx:gLXJZ8cOS3dldvAXhnOg0xecu6Po4h7gK1ytkvHzsTjvMSQEQg0MkA> <xmx:gLXJZw2xluxfbDrCfJ1ysFyaIMim_QZDegH_d3xA2GdN4zSL57Y5YQ> <xmx:gLXJZ9qNaHd0VrE_PZyUYkcNeoYurrVTLhYTgGrs3JBlJ5QhQNQFoaaR>
Feedback-ID: ic129442d:Fastmail
Received: by mailuser.phl.internal (Postfix, from userid 501) id 438FF3360079; Thu, 6 Mar 2025 09:47:28 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
MIME-Version: 1.0
Date: Thu, 06 Mar 2025 15:47:07 +0100
From: Martin Thomson <mt@lowentropy.net>
To: Christopher Patton <cpatton=40cloudflare.com@dmarc.ietf.org>, Nick Sullivan <nicholas.sullivan@gmail.com>
Message-Id: <e6544817-e0d5-4404-a74b-3df360c544fb@app.fastmail.com>
In-Reply-To: <CAG2Zi23kVghBzq3eyNXXqs+wk+LuRky8k2ZaJv5iRD6Pp5tpYQ@mail.gmail.com>
References: <CAOjisRzBNG2KdAZXssnR9Ura9HuAUKxOH+VLCAE5B9MfYyeT2A@mail.gmail.com> <CAOjisRx9vuroH8-q1tgTPWNnTWQ6i+0Vb=VBTv77j7-hEbHHSw@mail.gmail.com> <CAG2Zi23kVghBzq3eyNXXqs+wk+LuRky8k2ZaJv5iRD6Pp5tpYQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: 645PCDVVWN65TCJESTY4ZFURCAJOR2A2
X-Message-ID-Hash: 645PCDVVWN65TCJESTY4ZFURCAJOR2A2
X-MailFrom: mt@lowentropy.net
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/SYEzhnWeuy0cvFswPSNByyinFUg>
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>

I'm not sure that we need to change the draft now in light of this.  Extensions have the wonderful ability to change behavior in ways that are predictable and consistent.  Given that we have the ability to extend in places that will be seen before handshaking -- i.e., the ECH config -- there is no limit to what an extension can do.

On the broader topic, Marwan and I have a draft that looks at a different angle on this problem.  That has a bunch of complicated stuff in there, but those pieces aren't necessarily core to the idea.  I'm also aware of ongoing conversations about this that might lead to iterative improvements on these ideas.  It would be really nice if we could have some time to talk through some of the rationale behind these different ideas and see if we can tease out the real constraints. 

Here's the draft that Marwan and I put together: https://datatracker.ietf.org/doc/draft-thomson-tls-ech-pnmasq/

I have a presentation on that draft that might help highlight some of the core ideas, which I admit are not 100% clear in the draft.  If time is available on the agenda in Bangkok, I'd like to give that talk.

On Thu, Mar 6, 2025, at 00:54, Christopher Patton wrote:
> 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 mailing list -- tls@ietf.org
> To unsubscribe send an email to tls-leave@ietf.org