Trait ml_kem::EncapsulateDeterministic

source ·
pub trait EncapsulateDeterministic<EK, SS> {
    type Error: Debug;

    // Required method
    fn encapsulate_deterministic(
        &self,
        m: &B32
    ) -> Result<(EK, SS), Self::Error>;
}
Available on crate feature deterministic only.
Expand description

A value that can be encapsulated to. Note that this interface is not safe: In order for the KEM to be secure, the m input must be randomly generated.

Required Associated Types§

source

type Error: Debug

Encapsulation error

Required Methods§

source

fn encapsulate_deterministic(&self, m: &B32) -> Result<(EK, SS), Self::Error>

Encapsulates a fresh shared secret.

§Errors

Will vary depending on the underlying implementation.

Implementors§

source§

impl<P> EncapsulateDeterministic<Array<u8, <P as PkeParams>::CiphertextSize>, Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for EncapsulationKey<P>
where P: KemParams,

§

type Error = ()