Skip to content

tls: Add ECH - #730

Open
MarcoPolo wants to merge 1 commit into
masterfrom
marco/ech
Open

tls: Add ECH#730
MarcoPolo wants to merge 1 commit into
masterfrom
marco/ech

Conversation

@MarcoPolo

@MarcoPolo MarcoPolo commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

This document specifies minor changes to the libp2p TLS Handshake to enable support for RFC 9849: TLS Encrypted Client Hello. The primary benefit is to make identifying libp2p connections harder to passive network observers by hiding the “libp2p” ALPN in the encrypted ClientHelloInner.

Related and prereq PRs:

Comment thread tls/ECH.md
Comment on lines +36 to +41
In RFC 9849, clients can only use the server provided `retry_configs` if the
outer handshake authenticates successfully with the given
ECHConfig.contents.public_name. This means that if servers wish to support the
`retry_configs` fallback they MUST use a valid domain name and hold the
corresponding Server Certificate. This is the retry mechanism in RFC 9849;
there is nothing libp2p specific about this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In RFC 9849, clients can only use the server provided `retry_configs` if the
outer handshake authenticates successfully with the given
ECHConfig.contents.public_name. This means that if servers wish to support the
`retry_configs` fallback they MUST use a valid domain name and hold the
corresponding Server Certificate. This is the retry mechanism in RFC 9849;
there is nothing libp2p specific about this.
Servers MUST use a valid domain name and hold the corresponding Server Certificate to support the `retry_configs` fallback. This is the retry mechanism in RFC 9849; there is nothing libp2p specific about this.

Comment thread tls/ECH.md
Comment on lines +43 to +44
If the server does not have a valid public_name and certificate, the client can
only fail the connection.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If the server does not have a valid public_name and certificate, the client can
only fail the connection.
The client MUST fail the connection If the server does not have a valid public_name and certificate pair.

Comment thread tls/ECH.md
Comment on lines +53 to +54
Servers SHOULD rotate their keys once a month, and keep the prior ECH Config
keys around for 1 week to assist stale clients.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the reasoning behind the time windows here? (i.e. once a month, 1 week)

Comment thread tls/ECH.md

## Client ECH Config Caching

Clients SHOULD cache the ECHConfigList for no more than 48 hours. Note that a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasoning on the 48h?

Comment thread tls/ECH.md

## Server Key Rotation

Servers SHOULD rotate their keys once a month, and keep the prior ECH Config

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Servers SHOULD rotate their keys once a month, and keep the prior ECH Config
Servers SHOULD rotate their ECH key pairs once a month, and keep the prior ECH Config

Comment thread tls/ECH.md
## Overview

This document specifies minor changes to the [libp2p TLS Handshake](./tls.md) to
enable support for [RFC 9849]: TLS Encrypted Client Hello. The primary benefit

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enable support for [RFC 9849]: TLS Encrypted Client Hello. The primary benefit
enable support for [RFC 9849]: TLS Encrypted ClientHello. The primary benefit

Comment thread tls/ECH.md

#### Authenticated Rejection

In RFC 9849, clients can only use the server provided `retry_configs` if the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In RFC 9849, clients can only use the server provided `retry_configs` if the
In RFC 9849, clients can only use the server-provided `retry_configs` if the

Comment thread tls/ECH.md
The `/ech` component SHOULD appear after the `/tls` or `/quic-v1` component.
Servers use this multiaddr to advertise ECH support and their ECHConfigList.

## Caller Provided ECHConfigList

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Caller Provided ECHConfigList
## Caller-Provided ECHConfigList

Comment thread tls/ECH.md

## Overview

This document specifies minor changes to the [libp2p TLS Handshake](./tls.md) to

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For TCP, how would this work? because with TCP the flow is:

1 - TCP connection
2 - Multistream negotiation in plaintext sending /multistream/1.0.0 and /tls/1.0.0
3 - Then the TLS handshake happen

meaning that an observer should be able to recognize libp2p being used. Would using /tls/ech mean that we gotta start TLS handshake directly, and skip the multistream select negotiation? if so, probably worth mentioning in the spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants