1 unstable release
Uses new Rust 2024
| 0.1.0 | Jul 3, 2025 |
|---|
#1865 in Cryptography
1,111 downloads per month
15KB
165 lines
det-keygen
This crate implements an experimental port of the Python reference implementation of C2SP's ECDSA Deterministic Key Generation.
This specification enables the derivation of ECDSA private keys from arbitrary seeds (using FIPS 186-5 methods only) which should contain at least 192 bits of entropy.
Examples
// Generate a P-256 private key based on a 160-bit seed
use det_keygen::{Keygen, P256};
let seed = b"When in doubt, don't";
let keygen = Keygen::<P256>::new(seed);
let key = keygen.generate();
ECDSA Deterministic Key Generation
This is an experimental port of the Python reference implementation of C2SP's ECDSA Deterministic Key Generation. This specification enables the derivation of ECDSA private keys from arbitrary seeds (using FIPS 186-5 methods only) which should contain at least 192 bits of entropy.
Currently this crate does only support P256, not P-224, P-384, or P-521 (which are also covered by the specification).
Usage:
let keygen = Keygen::<P256>::new(&seed);
let key = keygen.generate();
Dependencies
~6–17MB
~269K SLoC