DataSig -- Data signatures over Lightning [combined summary]



Individual post summaries: Click here to read the original discussion on the lightning-dev mailing list

Published on: 2022-06-17T10:18:34+00:00


Summary:

In a recent post on the Lightning-dev mailing list, George Tsagkarelis introduced two proposed specs for transmitting data over the Lightning Network: DataSig and DataStruct. The purpose of these specs is to enable the transmission of data over HTLC custom records in a secure and efficient manner.The DataSig spec focuses on authenticating data with regards to its source and destination. It describes a structure representing a signature over arbitrary data. This structure is placed inside a custom TLV record and allows the receiving end to validate that the data were authored by the source node and meant to be received by the receiving node. The steps involved in generating and verifying a DataSig are detailed in Tsagkarelis' post.On the other hand, the DataStruct spec deals with the fragmentation of data for transmission. It defines a structure that describes fragmented data, allowing for transmission over separate HTLCs and assisting reassembly on the receiving end. The fragmentation structure also enables out-of-order reception of fragments. The sender is responsible for splitting the data into fragments and creating a DataStruct instance for each fragment. The receiving node can then execute certain steps to assemble the data.Tsagkarelis argues that pairing payments with other transmission methods is unnecessary because messaging nodes directly is more secure, private, and simple than using out-of-band hybrid solutions. However, he clarifies that DataStruct does not encourage content streaming over LN, and larger downloads should be done through an out-of-band solution.It is important to note that there are no specific TLV keys defined for the DataStruct spec regarding data fragment transmission. The sender must properly coordinate simultaneous transmissions to a destination node by using different `fragset_id` values for each fragment set. There is also room for optimization, such as signing larger chunks of data instead of each transmitted fragment.John Carvalho raises concerns about putting the whole internet & web inside of Lightning and argues that using LN for broad communication use cases ends up crippling both the use case and LN. However, the article provides a link to a working proof of concept that utilizes DataSig and DataStruct over single path payments.Overall, the proposed DataSig and DataStruct specs aim to provide a secure and efficient method for transmitting data over the Lightning Network. Developers and users will ultimately decide which solution best fits their needs.


Updated on: 2023-08-01T00:33:17.436307+00:00