-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Switch to rust-secp256k1 from libsecp256k1 #8089
Comments
It seems that |
We don't use the crate anywhere natively in WASM. We always call into native for this. |
If you're considering alternatives to https://github.com/RustCrypto/elliptic-curves/tree/master/k256 It's an optimized pure Rust library with performance closer to the bitcoin-core C library: Also even better performance on WASM. The https://iqlusion.blog/k256-crate-pure-rust-projective-secp256k1-library |
I see @bkchr's PR solving this (at least partially) but it was closed and the branch was deleted. Was this because it needs an audit or another high-overhead reason, or was it just stale and incomplete? |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
It seems libsecp256k1 doesn't implement RFC6979 which causes some issues for signature verification by ethereum libraries |
Except when compiling, with substrate/primitives/core/Cargo.toml Line 143 in 25eb7ac
|
I've done some benchmarking using the latest releases of all the libraries that we are considering for secp256k1 ecdsa signature. The results (here) are still aligned with the ones provided by So currently @tarcieri are there any plans to reduce this gap? I wonder if I see there is a (now closed) issue meant to address this here. |
There are a few low hanging fruit optimizations left to pursue, like using wNAF form for verification, or precomputing basepoint tables. We have made some recent progress towards the latter. |
@Srikarrao1 I don't get your question? |
I want to acheive functionality of ECDSA crate by integrating functions such as Signer, Verifier and Signature traits in substrate based primitives, appreciate your response! |
Still don't get it. |
It seems that currently we use
libsecp256k1
insp_core::ecdsa
implementation. As I've been told, the main reason for that was becauserust-secp256k1
wouldn't compile for WASM/no_std.It seems it's not the case any more and
rust-secp256k1
is more performant, has been audited and is more commonly used, hence I see no reasons for not switching to this.The text was updated successfully, but these errors were encountered: