lightning-dev

Combined summary - [BOLT Draft] Onion Routing Spec

Combined summary - [BOLT Draft] Onion Routing Spec

Olaoluwa Osuntokun, a contributor to the Lightning Network, has decided to temporarily set aside the shared secret backlog due to concerns about committing routing information to the payment hash.

Rusty Russell, another contributor, had assumed that the packet format would not be modified to include the payment hash in either the header or e2e payload. They both agree that the payment hash should be authenticated as part of packet processing at each hop to prevent replay attempts by adversaries.Christian Lundkvist acknowledged the oversight and promised to add the payment hash to the spec and implementations. Christian Decker mentioned during a discussion on updating the Lightning Network specification that they have dropped the end-to-end payload but kept the shared secret backlog. They discussed the possibility of committing the routing information to the payment hash, but it was deemed awkward due to the increase in per-hop payload size. They proposed that the payment hash be concatenated to the material being authenticated similar to "associated data" in AEAD cipher modes.Olaoluwa Osuntokun explained in an email discussion that using EC-Schnorr instead of EC-DSA for on-chain keys in Bitcoin would allow the same pub/priv keys to be used for signing/verifying multi-sign for channel authentication proofs. He suggested separating onion privkey rotation for limiting the shared secret backlog, even without forward secrecy. The conversation also highlighted the importance of protecting different secrets and using independent keying material.Another discussion focused on issues regarding channel identification and proof sizes. It was noted that using blocknum+txnum to identify a channel does not account for transactions that open multiple channels concurrently. An extra byte or two would need to be added to encode the output index of the channel within the transaction. The compactness of identifying channels based solely on blockheight+offsets was acknowledged, but there were concerns about re-org safety. Rusty Russell suggested using schnorr multi-signature to address non-canonical graphs resulting in differing network views.The email conversation between Christian Decker and Rusty Russell discussed the onion routing protocol and key rotation policies. They considered two potential key rotations: rotating the key used in Bitcoin transactions and rotating the public key used for the DH shared-secret generation in the onion routing protocol. The discussion included the costs and feasibility of key rotation, as well as suggestions for using a "comms" key instead of the node's ID. Various rotation schemes, both active and passive, were proposed to address security and communication overhead concerns.Christian Decker and Laolu Osuntokun discussed the outstanding issues related to the onion routing protocol. They decided to defer some issues, such as key-rotation policies and payload formatting, to later versions. The specification of the rendezvous handshake was also deferred. For now, they agreed on fixed payload sizes and the possibility of using a generic encoding to make the protocol more flexible.The Lightning Network developers have been discussing various aspects of the onion routing protocol and its implementation. One of the main concerns is the key-rotation policy, with Rusty Russell suggesting using a "comms" key for each node instead of its ID to address the issue. He also discusses the potential costs of key rotation in terms of data storage.Another important topic of discussion is the use of HMAC and payload distribution among the hops. The developers agree that the entire packet, including payloads, should be covered by HMAC, but this can create a rendezvous problem. The suggestion is made to keep payload sizes fixed and potentially use a generic encoding like JSON or msgpack.In terms of security, the developers propose solutions to prevent potential attacks. One suggestion is to include a shared secret value in the per-hop payload for the final hop, ensuring that the payload matches this value to prevent compromise. They also discuss the need for pre-negotiated amounts between senders and recipients to avoid errors and theft by prior hops.The developers also address the issue of ambiguity when multiple channels on different chains use the same identifiers. To prevent guesswork, they suggest adding a realm byte to specify the target chain. This byte could be stored in the per-hop payload or added to the header.Other topics discussed include the complexity of the routing protocol, the format of the "onion blob" header, and the use of Schnorr keys within the Bitcoin network for space savings. The developers aim to find clean and simple solutions to these issues while ensuring the security and efficiency of the Lightning Network.The email thread discusses various options and proposals for designing a high throughput onion routing network. One option involves including payloads in the header HMAC computation, while another option focuses on anonymous rendezvous meetings. The group also discusses the use of timestamps, key rotation, and enabling intermediate nodes to reply to packets. They explore the challenges and trade-offs associated with each proposal, aiming to increase the robustness of onion routing within the network.The conversation delves into the use of HD onion key derivation in the Lightning Network and potential vulnerabilities. They propose using a new root key authenticated via a

Discussion History

0
Christian DeckerOriginal Post
July 25, 2016 16:23 UTC
1
July 27, 2016 18:13 UTC
2
August 2, 2016 04:25 UTC
3
August 4, 2016 17:05 UTC
4
August 4, 2016 18:24 UTC
5
August 4, 2016 18:47 UTC
6
August 5, 2016 00:52 UTC
7
August 5, 2016 04:00 UTC
8
August 8, 2016 12:27 UTC
9
August 12, 2016 17:59 UTC
10
August 12, 2016 18:00 UTC
11
August 13, 2016 10:04 UTC
12
August 15, 2016 12:06 UTC
13
August 15, 2016 12:18 UTC
14
August 16, 2016 04:54 UTC
15
August 16, 2016 04:54 UTC
16
August 16, 2016 08:10 UTC
17
August 17, 2016 10:23 UTC
18
August 18, 2016 09:06 UTC
19
August 19, 2016 00:56 UTC
20
August 19, 2016 18:36 UTC
21
August 20, 2016 20:32 UTC
22
August 21, 2016 20:45 UTC
23
August 22, 2016 19:47 UTC
24
September 2, 2016 12:08 UTC
25
September 5, 2016 02:25 UTC
26
September 5, 2016 19:24 UTC
27
September 6, 2016 11:27 UTC
28
September 7, 2016 01:27 UTC
29
September 9, 2016 23:52 UTC
30
September 27, 2016 01:47 UTC
31
October 3, 2016 17:21 UTC
32
October 3, 2016 21:34 UTC
33
October 20, 2016 13:40 UTC
34
October 20, 2016 22:26 UTC
35
October 21, 2016 08:30 UTC
36
October 24, 2016 03:59 UTC