Rust FFI bindings for StarkWare's crypto-cpp library
_Note that currently target
x86_64-pc-windows-msvc
is not supported. If you're building on Windows, you need to use the GNU build of Rust._
starknet-crypto
insteadDue to a few known issues with this library:
the underlying crypto-cpp
library hasn't been updated for quite a while; and
the library does not build on Windows with MSVC; and
the underlying library is relatively slow in terms of performance;
you're advised to use starknet-crypto instead, which is pure-Rust implementation of the same low-level cryptography functions, with better performance and portability.
Still want to use starkware-crypto-rs
? To use the crate from crates.io, add the following to your Cargo.toml
file:
[dependencies]
starkware-crypto-sys = "0.1"
To run benchmark:
$ cargo bench
On the author's machine with Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz running Ubuntu 20.04.2 LTS:
ecdsa_get_public_key time: [4.1132 ms 4.1567 ms 4.2157 ms]
ecdsa_sign time: [185.54 ms 186.31 ms 187.20 ms]
ecdsa_verify time: [1.5582 ms 1.5708 ms 1.5853 ms]
pedersen_hash time: [293.27 us 294.74 us 296.33 us]
Licensed under either of
at your option.