From 6b6c5fcc35c0a0b73f0a9172a0853836f5f67c47 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 29 Mar 2020 16:19:22 +1030 Subject: [PATCH] fixup! WIP: BOLT 7: Onion message support. Make reference to the yet-to-be-merged blinded path spec part explicit. Fix up tabs in indent, too. Signed-off-by: Rusty Russell --- 04-onion-routing.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/04-onion-routing.md b/04-onion-routing.md index 81ff253aa..e5c2eacd8 100644 --- a/04-onion-routing.md +++ b/04-onion-routing.md @@ -415,14 +415,16 @@ The writer: or `enctlv` indicating the next node. - For the the final node's `onionmsg_payload`: - if the final node is permitted to reply: - - MUST set `reply_path` `blinding` to the initial blinding factor for the `next_node_id` + - MUST set `reply_path` `blinding` to the initial blinding factor for the `next_node_id` - For the first `reply_path` `path`: - - MUST set `node_id` to the first node in the reply path. - - For the remaining `reply_path` `path`: - - MUST set `node_id` to the blinded node id to encrypt the onion hop for. + - MUST set `node_id` to the first node in the reply path. + - For the remaining `reply_path` `path`: + - MUST set `node_id` to the blinded node id to encrypt the onion hop for. - Within `reply_path` `path`: - - MUST set `enctlv` to the ChaCha20 encryption of a valid `encmsg_tlvs` containing exactly - one of either `next_node_id` or `next_short_channel_id`. + - MUST encrypt `enctlv` as detailed in (FIXME: reference to t-bast's blinded path section: + `ChaChaPoly-1305` encryption using an all-zero nonce). + - MUST set `enctlv` to a valid `encmsg_tlvs` containing exactly one of either + `next_node_id` or `next_short_channel_id`. - otherwise: - MUST not set `reply_path`.