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

BOLT-4: Decrypt onion using b_i or k_i #1159

Open
dple opened this issue Apr 29, 2024 · 2 comments
Open

BOLT-4: Decrypt onion using b_i or k_i #1159

dple opened this issue Apr 29, 2024 · 2 comments

Comments

@dple
Copy link

dple commented Apr 29, 2024

Lines 519-523 said that using b_i or k_i to DECRYPT the onion, but there is no guide showing how to ENCRYPT the onion using B_i or N_i

@t-bast
Copy link
Collaborator

t-bast commented Apr 30, 2024

This is done exactly like non-blinded onions, as described here: https://github.com/lightning/bolts/blob/master/04-onion-routing.md#packet-construction

The only trick is that you use the blinded keys and node IDs instead of the plaintext one, but everything else works the same.

@dple
Copy link
Author

dple commented Apr 30, 2024

@t-bast : not sure if I fully understand that section, but it seems you are using the XOR technique to obfuscate the hop_payloads for non-blinded onions, and as my understanding you want to use B_i or N_i to encrypt the blinded onion, is it correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants