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

Dial / Session Key Generation order of operations #15

Open
jmwample opened this issue Mar 23, 2024 · 0 comments
Open

Dial / Session Key Generation order of operations #15

jmwample opened this issue Mar 23, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jmwample
Copy link
Owner

Right now in the obfs4 implementation the client opens their TCP connection BEFORE generating their session keys. This means that if we have to re-roll the session keys (which we do with 50% probability because of elligator2) then there is a network observable delay between TCP dial and the first byte on the wire.

This should be the other way around.

One way to do this is to delay the await for the connection future until we are in ClientSession::complete_handshake since we don't actually use the stream object before then. This will require some minor refactoring in the client code, so I am putting it off for now.

@jmwample jmwample added bug Something isn't working good first issue Good for newcomers labels Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant