Trait KeyGen

Source
pub trait KeyGen: MlDsaParams {
    type KeyPair: Keypair;

    // Required methods
    fn key_gen<R: RngCore + CryptoRng + ?Sized>(rng: &mut R) -> Self::KeyPair;
    fn key_gen_internal(xi: &B32) -> Self::KeyPair;
}
Expand description

A parameter set that knows how to generate key pairs

Required Associated Types§

Source

type KeyPair: Keypair

The type that is returned by key generation

Required Methods§

Source

fn key_gen<R: RngCore + CryptoRng + ?Sized>(rng: &mut R) -> Self::KeyPair

Available on crate feature rand_core only.

Generate a signing key pair from the specified RNG

Source

fn key_gen_internal(xi: &B32) -> Self::KeyPair

Deterministically generate a signing key pair from the specified seed

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<P> KeyGen for P
where P: MlDsaParams,