Reason for having HMACs in Sphinx



Summary:

The discussion between Christian Decker and Rusty Russell revolves around the idea of using a shared secret to secure Lightning Network payments. Russell suggests that the shared secret does not need to be very large as the number of attempts to guess it is limited by network latency, bandwidth, and possibly artificial rate limiting. He proposes that using the last four bytes of the signature would suffice. Decker puts forward an idea to store the secret from the invoice in the HMAC field, which could complicate final hop checking on the recipient but would not require a lockstep upgrade. They both agree that the timing of this scheme is a concern. Russell points out that it will only be useful once it's compulsory, and upgrading the network to make it compulsory before Schnorr and decorrelation make it irrelevant is uncertain. However, he suggests that since it is simple, they should just do it. Russell also notes that they are heading towards a TLV mechanism for the onion "padding," which works well with this scheme.


Updated on: 2023-06-02T15:25:35.361749+00:00