Multi-frame sphinx onion format



Summary:

In a message to Christian and Rusty, ZmnSCPxj presents a proposal for the Lightning Network's onion packet format. The proposal suggests using a TLV-set for the entire payload and using the old payload format as a single TLV-value with 20 bytes of size. This reduces overhead by two bytes compared to the old v0 format. ZmnSCPxj suggests further reducing overhead by making the realm 0 byte into a special type "0" with a fixed length of 1299 bytes. The next 1299 bytes are defined as the "V", having the format of 64 bytes of the current hop format, plus encrypted form data. This would remove the overhead of the realm byte by re-encoding it as the type in a TLV system. ZmnSCPxj also proposes another special type 255, which declares the next 32 bytes as HMAC and the rest of the onion packet as the data for the next hop. However, he notes that this is not a serious proposal.


Updated on: 2023-06-02T17:38:21.198103+00:00