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

RFC: Onion messages (previously "directed messages") #755

Closed
wants to merge 4 commits into from

Conversation

rustyrussell
Copy link
Collaborator

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.

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 <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
@rustyrussell rustyrussell force-pushed the directed-messages branch 3 times, most recently from f7912d8 to b3aa00e Compare April 18, 2020 08:39
Add draft feature bit for onion_messages.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Make reference to the yet-to-be-merged blinded path spec part explicit.
Fix up tabs in indent, too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell
Copy link
Collaborator Author

Succeeded by #759

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

Successfully merging this pull request may close these issues.

1 participant