`ursa` crashes on seed lenght shorter than 32 bytes for `secp256k1`
Erigara opened this issue · comments
Shanin Roman commented
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
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);
}