TLDR: feature request for SigningKey::from_seed(B32) in ml-dsa.
Keys are currently generated using MlDsa65::key_gen(&mut rng) -> KeyPair<MlDsa65>, and then the signing key may be stored via SigningKey::encode(&self) which produces a 4032 byte vector.
I can see that key_gen generates a 32 byte seed vector internally, and then constructs the signing key from this seed. To make storing the signing keys more efficient, would it be possible to include a SigningKey::<MlDsa65>::from_seed(B32) method to allow a user to construct a signing key from a 32-byte vector directly, so that a signing user only needs to store the seed?
I didn't want to start using key_gen_internal as there's a TODO intending for it to be marked as a private method. The proposed method would also not construct the verifying key from the seed, and avoid this work until SigningKey::verifying_key(&self) is called.
Cheers!
TLDR: feature request for
SigningKey::from_seed(B32)in ml-dsa.Keys are currently generated using
MlDsa65::key_gen(&mut rng) -> KeyPair<MlDsa65>, and then the signing key may be stored viaSigningKey::encode(&self)which produces a 4032 byte vector.I can see that
key_gengenerates a 32 byte seed vector internally, and then constructs the signing key from this seed. To make storing the signing keys more efficient, would it be possible to include aSigningKey::<MlDsa65>::from_seed(B32)method to allow a user to construct a signing key from a 32-byte vector directly, so that a signing user only needs to store the seed?I didn't want to start using
key_gen_internalas there's a TODO intending for it to be marked as a private method. The proposed method would also not construct the verifying key from the seed, and avoid this work untilSigningKey::verifying_key(&self)is called.Cheers!