Open Erigara opened 2 years ago
Ursa crashes if seed length is less than 32 bytes for secp256k1, but other algorithms work fine with this seed.
The problem seems to be that in other cases the input seed is hashed before being passed to the rng generator.
use ursa::{ keys::KeyGenOption, signatures::{ secp256k1::EcdsaSecp256k1Sha256, SignatureScheme, }, }; fn main() { let options = KeyGenOption::UseSeed(vec![1, 2, 3]); let key_pair = EcdsaSecp256k1Sha256::new().keypair(Some(options)); println!("{:?}", key_pair); }
Ursa crashes if seed length is less than 32 bytes for secp256k1, but other algorithms work fine with this seed.
The problem seems to be that in other cases the input seed is hashed before being passed to the rng generator.
Minimal example that reproduce issue