Repository navigation
RFC: Onion messages (previously "directed messages") - #755
Closed
rustyrussell wants to merge 4 commits into
Closed
rustyrussell wants to merge 4 commits into
rustyrussell wants to merge 4 commits into
Conversation
rustyrussell
added a commit
to rustyrussell/lightning
that referenced
this pull request
Mar 6, 2020
The Sphinx paper calls this "payload", but we've already used that
liberally in "per-hop payload":
The payload of the message is kept separate from the mix header
used to perform the routing. It is decrypted at each stage of
mixing using a block cipher with a large block size (the size of
the entire message), such as LIONESS [1]. In case the adversary
modifies the payload in transit, any information contained in it
becomes irrecoverable. Sender-anonymous messages contain the final
address of the message, as well as the message itself as part of
the payload, and so any modification destroys this information.
Since we don't want to add a block cypher, we use chacha20poly1305
with the shared secret as the key instead.
This is described in a BOLT proposal:
lightning/bolts#755
Signed-off-by: Rusty Russell <[email protected]>
These use onion encoding for simple one-way messaging: there are no error returns. Any reply is done with an enclosed blinded path. Note that this defines the message system, not the contents of messages (e.g. invoice requests from offers). Signed-off-by: Rusty Russell <[email protected]>
It simplifies things a little if we make field numbers match the proposed blinded HTLC fields (esp. next_short_channel_id). Signed-off-by: Rusty Russell <[email protected]>
rustyrussell
force-pushed
the
directed-messages
branch
3 times, most recently
from
April 18, 2020 08:39
f7912d8 to
b3aa00e
Compare
Add draft feature bit for onion_messages. Signed-off-by: Rusty Russell <[email protected]>
Make reference to the yet-to-be-merged blinded path spec part explicit. Fix up tabs in indent, too. Signed-off-by: Rusty Russell <[email protected]>
rustyrussell
force-pushed
the
directed-messages
branch
from
May 8, 2020 02:05
b3aa00e to
263ff57
Compare
Collaborator
Author
|
Succeeded by #759 |
This file contains hidden or 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
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.
These are simplified messages, in particular they contain a compact onion for replies.
This could be further enhanced for hornet, if we wanted to go that way. I've implemented and tested this, including rendevous routing for messages and using the reply.