Trait ml_kem::kem::Decapsulate

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

    // Required method
    fn decapsulate(&self, encapsulated_key: &EK) -> Result<SS, Self::Error>;
}
Expand description

A value that can be used to decapsulate an encapsulated key. Often, this will just be a secret key. But, as with Encapsulate, it can be a bundle of secret keys, or it can include a sender’s private key for authenticated encapsulation.

Required Associated Types§

source

type Error: Debug

Decapsulation error

Required Methods§

source

fn decapsulate(&self, encapsulated_key: &EK) -> Result<SS, Self::Error>

Decapsulates the given encapsulated key

Implementors§

source§

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

§

type Error = ()