Skip to content

ml-dsa: feature request for a SigningKey::from_seed(B32) method #1045

Description

@hoxxep

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions