Skip to main content

FromSeed

Trait FromSeed 

Source
pub trait FromSeed: Kem {
    type SeedSize: ArraySize;

    // Required method
    fn from_seed(
        seed: &Seed<Self>,
    ) -> (DecapsulationKey<Self>, EncapsulationKey<Self>);
}
Expand description

Initialize a KEM from a Seed.

Many KEMs support a fully deterministic and infallible initialization from a short seed value.

This trait is blanket impl’d for any Kem whose DecapsulationKey impls the KeyInit trait.

Required Associated Types§

Source

type SeedSize: ArraySize

Size of the seed value in bytes.

Required Methods§

Source

fn from_seed( seed: &Seed<Self>, ) -> (DecapsulationKey<Self>, EncapsulationKey<Self>)

Using the provided seed value, create a KEM keypair.

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§