Skip to content

quic.md: add initial draft of QUIC transport - #276

Open
fjl wants to merge 4 commits into
ethereum:masterfrom
fjl:quic
Open

fjl wants to merge 4 commits into
ethereum:masterfrom
fjl:quic

Conversation

@fjl

@fjl fjl commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread quic.md Outdated
sides must create a binding signature over the negotiated key material of the QUIC
connection.

To get the key material, use a 'key exporter' with the `ENR key binding v1` label and a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To be clear, this refers to RFC 5705, correct?

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.

Yes

Comment thread quic.md

The certificate hashes are computed as the SHA256 hash of the DER encoding of the
certificate. This feature exists primarily for compatibility with WebTransport, but
non-browser implementations should also verify the presented certificate upon connection

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
non-browser implementations should also verify the presented certificate upon connection
non-browser implementations MUST verify the presented certificate upon connection

@MarcoPolo

Copy link
Copy Markdown

what's the ALPN?

@healthykim

Copy link
Copy Markdown
Contributor

what's the ALPN?

h3 😎

@sukunrt

sukunrt commented Sep 3, 2026

Copy link
Copy Markdown

Will we run http3 request / response etc on this? Or is it so that we can upgrade to webtransport?

Comment thread quic.md Outdated
Comment on lines +40 to +41
The first message on stream zero sent by the server is the `id-proof`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Will the server verify the dialers public key?

Comment thread quic.md Outdated
To get the key material, use a 'key exporter' with the `ENR key binding v1` label and a
length of `32`.

The first message on stream zero sent by the server is the `id-proof`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

StreamIDs depend on which side initiates them. https://www.rfc-editor.org/rfc/rfc9000.html#section-2.1

Should we mention the specific id we expect and the stream type?

@healthykim

Copy link
Copy Markdown
Contributor

Will we run http3 request / response etc on this? Or is it so that we can upgrade to webtransport?

Not for request/response here. We will use it only for the Extended CONNECT that upgrades to a WebTransport session, everything after that is raw devp2p framing over the stream, as far as I think :)

@raulk raulk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What's the benefit of sending the ENR key binding over the first stream, instead of during the handshake as a PKIX extension, like libp2p does today?

This adds complexity to the connection state machine, which may require special casing and careful design for connection resumption scenarios, e.g. does a token remain valid after an ENR changes? On resumption, do we still exchange bindings? If yes, this adds 1-RTT before data can be exchanged. If no, the resumed connection would have downgraded security (the node backing that QUIC endpoint could've been replaced by another ENR identity, and we wouldn't notice).

I like the omission of a PKIX extension because it's makes it harder to identify an Ethereum node "at face value". But in practice, the argument doesn't stand because: (a) ENR records are public, and (b) at this connection stage there is no evidence or information that would lead a node to withhold its ENR, so it seems non-optional to send it.

@healthykim

healthykim commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What's the benefit of sending the ENR key binding over the first stream, instead of during the handshake as a PKIX extension, like libp2p does today?

This adds complexity to the connection state machine, which may require special casing and careful design for connection resumption scenarios, e.g. does a token remain valid after an ENR changes? On resumption, do we still exchange bindings? If yes, this adds 1-RTT before data can be exchanged. If no, the resumed connection would have downgraded security (the node backing that QUIC endpoint could've been replaced by another ENR identity, and we wouldn't notice).

I like the omission of a PKIX extension because it's makes it harder to identify an Ethereum node "at face value". But in practice, the argument doesn't stand because: (a) ENR records are public, and (b) at this connection stage there is no evidence or information that would lead a node to withhold its ENR, so it seems non-optional to send it.

Yeah, I agree that the resumption case is not specified well enough. If we were considering only node-to-node connections, using a PKIX extension would make much more sense.

The main focus of this draft is browser connectivity though (which is not clear enough in the current document yet, I'm working on making that more explicit). The authentication mechanism needs to be compatible with WebTransport, which means that identity verification should be possible using the WebTransport APIs. That is the main reason for keeping the identity binding outside the TLS certificate (I guess, felix could have more reasons).

I think we also don't expect long-lived session resumption as a primary requirement for browser connections. However how to unify the node-to-node and browser connection is still not very clear to me. Just for now I think the priority of this draft is to make the browser connection possible.

@raulk

raulk commented Sep 7, 2026

Copy link
Copy Markdown

Ah I see, that context changes things. I'd be interested in learning more about the browser-side assumptions. More concretely: are you designing for the consumer to be a website directly, or will there be a browser extension mediating? (wallet style). If we expect the latter, I'd highlight that both Chrome and Firefox offer public APIs to inspect the X.509 extensions in a certificate: https://developer.chrome.com/docs/extensions/reference/api/webRequest?utm_source=chatgpt.com#type-SecurityInfo.

@healthykim

Copy link
Copy Markdown
Contributor

Ah I see, that context changes things. I'd be interested in learning more about the browser-side assumptions. More concretely: are you designing for the consumer to be a website directly, or will there be a browser extension mediating? (wallet style). If we expect the latter, I'd highlight that both Chrome and Firefox offer public APIs to inspect the X.509 extensions in a certificate: https://developer.chrome.com/docs/extensions/reference/api/webRequest?utm_source=chatgpt.com#type-SecurityInfo.

Hmm... I've been thinking about this more, but doesn't this prove essentially the same thing as qh?

What we want from the identity proof is to know whether the server we're connected to right now actually holds the same node key we expected from the ENR. Both qh and a PKIX extension only prove that the node key authorized the certificate before, and they don't prove that the peer holds that node key in this particular session. I am not sure how libp2p is dealing with this, would like to check later.

On top of this qh is required anyway for certificate pinning in WebTransport. AFAIK the browser can only trust a self-signed certificate if the certificate hash is provided in serverCertificateHashes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants