Skip to content
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

Exchange muxer info in security handshake #426

Closed
MarcoPolo opened this issue Jul 15, 2022 · 4 comments · Fixed by #446
Closed

Exchange muxer info in security handshake #426

MarcoPolo opened this issue Jul 15, 2022 · 4 comments · Fixed by #446
Assignees

Comments

@MarcoPolo
Copy link
Contributor

We can save one round trip by passing in supported muxers in the security handshake. This isn't multi stream select v2 or protocol select (but can use similar ideas).

This can be a small incremental upgrade that reduces our round trip setup cost by one.

We can define a code for each muxer and exchange a list of which codes are supported in the handshake, and the responder can respond with their preferred muxer in the handshake response.

cc @marten-seemann since this came from a discussion we had. Please feel free to fill in any details I missed.

@marten-seemann
Copy link
Contributor

TLS can use ALPN, in Noise we can use early data, similar to what we do in the WebTransport handshake.

One thing to keep in mind is that this data is sent in the clear. Not a problem for Noise, but it is for TLS, if you're trying to hide your traffic among web traffic. To be clear, we don't do this today, we're currently using "libp2p". One way out of this might be using ECH, but it's unclear if there'll be a Go implementation in crypto/tls.

@mxinden
Copy link
Member

mxinden commented Jul 18, 2022

This isn't multi stream select v2 or protocol select (but can use similar ideas).

This could just be a Protocol Select message, no? In other words, from Protocol Select perspective, this would just be an early data mechanism (see #349 "Early data optimization"), right?

@marten-seemann
Copy link
Contributor

I don't think we have to specify the format of this message for all security protocols. The encoding will likely be specific for the security protocol. What we can do is spec the mechanism.

For example, for TLS we're limited to strings (at least in Go, see NextProtos of the tls.Config: https://pkg.go.dev/crypto/tls#Config), although RFC 7301 allows byte strings. For Noise, we have more flexibility in defining the format of the message.

@BigLep
Copy link
Contributor

BigLep commented Sep 13, 2022

Spec change: #446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants