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
Path build and onioned messages #2216
Merged
Merged
Conversation
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
tewinget
force-pushed
the
path-messages
branch
from
October 27, 2023 17:10
a3b6e20
to
4ea979e
Compare
dr7ana
reviewed
Oct 30, 2023
tewinget
force-pushed
the
path-messages
branch
from
November 3, 2023 15:30
4ea979e
to
52cf33b
Compare
there are a few TODOs which merit further discussion
- control messages can be sent along a path - the path owner onion-encrypts the "inner" message for each hop in the path - relays on the path will onion the payload in both directions, such that the terminal relay will get the plaintext "inner" message and the client will get the plaintext "response" to that. - control messages have (mostly, see below) been changed to be invokable either over a path or directly to a relay, as appropriate. TODO: - exit messages need looked at, so they have not yet been changed for this - path transfer messages (traffic from client to client over 2 paths with a shared "pivot") are not yet implemented
It seems RC refactor will obviate the need for a "get individual RC" method, so this comments out some usage of that to sidestep build errors, rather than correcting them in a way that will just be wasted.
tewinget
force-pushed
the
path-messages
branch
from
November 6, 2023 21:02
52cf33b
to
b7c52a8
Compare
dr7ana
reviewed
Nov 7, 2023
tewinget
force-pushed
the
path-messages
branch
from
November 8, 2023 18:14
f807cb0
to
689b529
Compare
change path control message inner message response to take just a string, which will be a bt-encoded response with an early key for status. If there is a timeout we pass a bt dict that only has that as the status, else the response we de-onioned should have either an OK status or some other error. change messages to use new status key correctly call Path::EnterState on path build response
Lots of code was using 32-byte nonces for xchacha20 symmetric encryption, but this just means 8 extra bytes per packet wasted as chacha is only using the first 24 bytes of that nonce anyway. Changing this resulted in a lot of dead/dying code breaking, so this commit also removes a lot of that (and comments a couple places with TODO instead) Also nounce -> nonce where it came up.
It's unnecessary abstraction that barely simplifies anything, and is now only used in one single place anyway, which is easily replaced with a (unabstracted) lambda.
tewinget
force-pushed
the
path-messages
branch
from
November 8, 2023 20:20
fa6ec78
to
1ca852d
Compare
This was referenced Nov 14, 2023
Merged
dr7ana
reviewed
Nov 16, 2023
also move messages' statuses into their own namespace
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP
depends #2213