-
Notifications
You must be signed in to change notification settings - Fork 492
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
Clarify onion spec: part 1 (the uncontroversial bits) #1181
Merged
rustyrussell
merged 5 commits into
lightning:master
from
rustyrussell:clarify-onions-part-1
Jul 17, 2024
Merged
Clarify onion spec: part 1 (the uncontroversial bits) #1181
rustyrussell
merged 5 commits into
lightning:master
from
rustyrussell:clarify-onions-part-1
Jul 17, 2024
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
This was from the legacy onion, and is no longer present. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
There's currently a *description* of how to decrypt an onion, and some requirements in forwarding. But it also applies to onion messages, so: 1. Turn the description into actual enumerated requirements. 2. Ensure the description covers both payload and messaging onions. 3. Include both methods to apply the blinding tweak. 4. Leave the actual handling of the extracted payload (payment vs messaging onion) to those specific sections (e.g. reporting failure) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…tlc/onion message requirements. This ties it together, saying what to use as associated data, blinding, and what to do on failure. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Sure, it's used to derive a secret for blinding, but it's also used to derive the key for encrypted_recipient_data. It's not used as a blinding factor *directly*. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
That part is indeed uncontroversial and much needed, thanks for doing this! There are a few nits here and there, that I fixed in t-bast@1a9849c if you'd like to cherry-pick. Otherwise, here is the detailed patch. I took this opportunity to bring the LateX rendering fixes from #1158 and #1169 which weren't making progress.
|
22 tasks
Roasbeef
reviewed
Jul 12, 2024
ProofOfKeags
approved these changes
Jul 16, 2024
This commit doesn't change the logic at all, it simply: - removes `realm` from onion test vector - cleans-up markdown formatting and indents - fixes typos and missing parenthesis - consistently uses `_` instead of `-` for field names - fixes math formatting (including changes from lightning#1169 and lightning#1158)
This was referenced Jul 17, 2024
Merged
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.
@t-bast suggested splitting this off from #1179. It's basically cleanups and formalization, plus renaming blinding to path_key to unconfuse me.
This cleanup is a side-effect of this comment on my post about reworking our code, indicating I'm not the only one who finds it confusing:
https://iris.to/note1yjs79epjx9t54ynhnu9akar4uuz5rem2vluunnksdaq2gnhmjnksvnjkag
3 July
Great summary, but I wish I would've seen this before finishing my initial rough implementation for
#electrum last week :) Getting a full picture of the spec requires quite a lot of trawling through PRs and scattered snippets of pseudocode.
The concatenation of route to introduction point and the blinded path took some time to grasp, but the test vectors in the PR are a nice validation target to work towards.