QuickMaths for Onions: Linear Construction of Sphinx Shared-Secrets [combined summary]



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

Published on: 2018-02-04T09:02:47+00:00


Summary:

Conner Fromknecht, a developer, has made significant improvements to the lightning-onion repository by implementing a more efficient linear algorithm. Previously, all implementations of the project relied on a quadratic algorithm, which Conner replaced with his optimized approach. By reducing the number of scalar multiplications, Conner's algorithm achieved an impressive 8x speedup and utilized approximately 70% less memory.Recognizing the potential impact of these upgrades, Conner has submitted a pull request to update BOLT 4, which currently recommends the use of a quadratic time algorithm. The pull request includes the necessary changes to the recommendation and reference code, along with a detailed description of the modifications. To ensure the correctness of the updated implementation, Conner verified the output against the (updated) BOLT 4 test vector.For those interested in exploring Conner's work further, links to the relevant repositories and pull requests have been provided. This includes the lightning-onion repository where the improvements were made, the pull request containing the proposed updates to BOLT 4, and the BOLT 4 test vector used for verification. Additionally, Conner mentions the possibility of updating the example source in lightning-rfc, indicating a willingness to extend the impact of these optimizations beyond the lightning-onion repository.


Updated on: 2023-07-31T19:41:15.574496+00:00