-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
quic: private network support #1432
Comments
We're in the unfortunate situation where the Go team effectively froze
This is something we could do outside of quic-go. Effectively, we'd encrypt every QUIC packet that's being sent out. We'd either have to define a header that specifies the nonce of the packet, or use part of the QUIC packet payload as a nonce (for example the last 16 bytes of the packet, and leave those unencrypted). Aside from the obvious downside of double encryption, this would run against our efforts to make our traffic resemble commonly used internet protocols though. |
I'm leaning towards just encrypting each packet with a format: |
Having some form of private network (symmetric key) support in QUIC is needed before we can switch over to it by default. What's the status here? Can we mix in a symmetric key or are we going to have to introduce a packet-based pnet implementation? |
There's not been any progress in Go's standard library TLS implementation, which we'd need to mix in symmetric keys. Is there a third option here? Can we do the encryption on a stream level? |
Not really. We'd leak the peer IDs at that point. We can probably find some kind of dead-simple symmetric-key encrypted packet transport. I'll ask on #libp2p to see if someone knows of a good one. |
This might be a crazy idea. What about only encrypting the certificate (or the libp2p extension in the certificate)? |
That would definitely hide the peers. However:
Thoughts @Kubuxu? You implemented the original version. |
Another option would be to only encrypt Handshake packets. Let me explain:
All packet types are identifiable from the wire image, i.e. no knowledge of the keys is necessary. Every packet type starts with a header, which, depending on the packet type, includes information like connection ID(s), QUIC version etc. If we encrypt the payload (i.e. everything that comes after the QUIC header) of Handshake packets, we get the following properties:
However, an active attacker would notice that something's going on when trying to dial such a peer, since it would receive undecryptable Handshake packets. That might allow him to conclude that the node might be using a private network. This applies to most of the other solutions as well though. I'm not sure if I prefer this solution. Encrypting the libp2p extension still seems a bit cleaner to me than modifying already encrypted packets, if we can live with exposing the fact that a node is (probably) running in private network mode. |
@Stebalien, @Kubuxu How can we move forward with this issue? Looks like we have a few different options, each with its pros and cons, and we need to make a decide which one we'll go with. |
Copying from Slack. @raulk raised the following point:
|
Hey, I missed this. I will review in next few days. |
@Kubuxu Nothing new here. I just moved the issue to go-libp2p because we've moved go-libp2p-quic-transport into go-libp2p. No idea why GitHub is sending out notifications for that :( |
Currently, the QUIC transport is incompatible with private networks as it doesn't use the pre-shared key in any way.
We have a couple of options:
The text was updated successfully, but these errors were encountered: