Trait kem::Encapsulate

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

    // Required method
    fn encapsulate(
        &self,
        rng: &mut impl CryptoRngCore
    ) -> Result<(EK, SS), Self::Error>;
}
Expand description

A value that can be encapsulated to. Often, this will just be a public key. However, it can also be a bundle of public keys, or it can include a sender’s private key for authenticated encapsulation.

Required Associated Types§

source

type Error: Debug

Encapsulation error

Required Methods§

source

fn encapsulate( &self, rng: &mut impl CryptoRngCore ) -> Result<(EK, SS), Self::Error>

Encapsulates a fresh shared secret

Object Safety§

This trait is not object safe.

Implementors§