-
Notifications
You must be signed in to change notification settings - Fork 320
tls: Add ECH #730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
tls: Add ECH #730
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,74 @@ | ||||||||
| # ECH | ||||||||
|
|
||||||||
| | Lifecycle Stage | Maturity | Status | Latest Revision | | ||||||||
| | --------------- | ------------- | ------ | --------------- | | ||||||||
| | 1A | Working Draft | Active | r0, 2026-07-01 | | ||||||||
|
|
||||||||
| Authors: [@marcopolo] | ||||||||
|
|
||||||||
| Interest Group: [@sukunrt], `todo` | ||||||||
|
|
||||||||
| [@marcopolo]: https://github.com/marcopolo | ||||||||
| [@sukunrt]: https://github.com/sukunrt | ||||||||
|
|
||||||||
| ## 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 | ||||||||
| is to make identifying libp2p connections harder to passive network observers by | ||||||||
| hiding the "libp2p" ALPN in the encrypted ClientHelloInner. | ||||||||
|
|
||||||||
| ## Changes to the libp2p TLS Handshake | ||||||||
|
|
||||||||
| ### Outer Handshake | ||||||||
|
|
||||||||
| The outer handshake MUST NOT be a libp2p TLS handshake. | ||||||||
|
|
||||||||
| #### ALPN | ||||||||
|
|
||||||||
| Unless an ALPN is explicitly specified by the application for the connection, | ||||||||
| client implementations SHOULD set it to `http/1.1` for TCP connections and `h3` | ||||||||
| for QUIC connections. The ALPN MUST NOT include `libp2p` or the muxer protocol | ||||||||
| IDs used by [inlined muxer negotiation]. | ||||||||
|
|
||||||||
| #### Authenticated Rejection | ||||||||
|
|
||||||||
| 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. | ||||||||
|
|
||||||||
| If the server does not have a valid public_name and certificate, the client can | ||||||||
| only fail the connection. | ||||||||
|
Comment on lines
+43
to
+44
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
|
||||||||
| ### Inner Handshake | ||||||||
|
|
||||||||
| The encrypted ClientHelloInner performs the standard libp2p TLS Handshake. The | ||||||||
| ALPN MUST conform to the libp2p TLS Handshake. | ||||||||
|
|
||||||||
| ## Server Key Rotation | ||||||||
|
|
||||||||
| Servers SHOULD rotate their keys once a month, and keep the prior ECH Config | ||||||||
| keys around for 1 week to assist stale clients. | ||||||||
|
Comment on lines
+53
to
+54
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) |
||||||||
|
|
||||||||
| ## Client ECH Config Caching | ||||||||
|
|
||||||||
| Clients SHOULD cache the ECHConfigList for no more than 48 hours. Note that a | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reasoning on the 48h? |
||||||||
| server can provide an updated ECHConfigList upon connection via an identify | ||||||||
| message. | ||||||||
|
|
||||||||
| ## `/ech` in the multiaddr | ||||||||
|
|
||||||||
| 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 | ||||||||
|
|
||||||||
| Implementations SHOULD allow users to supply an ECHConfigList when dialing. | ||||||||
|
|
||||||||
| <!-- References --> | ||||||||
|
|
||||||||
| [RFC 9849]: https://www.rfc-editor.org/info/rfc9849/ | ||||||||
| [inlined muxer negotiation]: ../connections/inlined-muxer-negotiation.md | ||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.