LedgerHQ / app-bitcoin-new

Modern Bitcoin Application based on PSBT and Descriptors
Apache License 2.0
93 stars 69 forks source link

Improve `secp256k1_point_unsafe` using precomputed tables #280

Open bigspider opened 2 weeks ago

bigspider commented 2 weeks ago

276 introduced a faster version of secp256k1_point that is not secured against side channels, for use where that's not a concern (public data). However, there is still a vast room for improvement, as the current code use a generic elliptic curve scalar multiplication method, while secp256k1_point multiplies a fixed point (the generator) by a scalar.

Precomputed tables of multiples could still improve performance by a large margin, at the cost of an increase in binary size.