forked from n0-computer/iroh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(iroh-net): simplify relay handshake (n0-computer#2164)
The relay handshake is quite expensive currently - TLS 1.3 + HTTP 1 UPGRADE - Server sends FrameType::ServerKey - Client sends FrameType::ClientInfo - Server sends FrameType::ServerInfo This simplifies the protocol to - TLS 1.3 + HTTP 1 UPGRADE - Client sends FrameType::ClientInfo information changes - using a signature, instead of a shared secret to ensure the client identity. - server key is not sent (use certificate pinning if fixed relays are important) - remove unused configuration in the info frames - change magic from `derp` to `relay` - increase protocol version to `3` - drop `serverinfo` in favor of fixed config on the client - enable tcp nodelay - switch to AES for encryption in favor over chacha - the server simply aborts when the client version doesn't match (matching what we do in other protocols) Benchmarks: https://gist.github.com/dignifiedquire/30131dbe8b87fb799a971068899656ef BREAKING: This breaks the relay handshake, and so requires updated relay nodes to work with. --------- Co-authored-by: Floris Bruynooghe <flub@n0.computer> Co-authored-by: Kasey <kasey@n0.computer>
- Loading branch information
1 parent
d6f336c
commit 70db5fb
Showing
8 changed files
with
295 additions
and
507 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.