Decapsulate

Trait Decapsulate 

Source
pub trait Decapsulate<EK, SS> {
    type Encapsulator: Encapsulate<EK, SS>;
    type Error: Debug;

    // Required methods
    fn decapsulate(&self, encapsulated_key: &EK) -> Result<SS, Self::Error>;
    fn encapsulator(&self) -> Self::Encapsulator;
}
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 Encapsulator: Encapsulate<EK, SS>

Encapsulator which corresponds to this decapsulator.

Source

type Error: Debug

Decapsulation error

Required Methods§

Source

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

Decapsulates the given encapsulated key

Source

fn encapsulator(&self) -> Self::Encapsulator

Retrieve the encapsulator associated with this decapsulator.

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,