EncapsKey

Type Alias EncapsKey 

Source
pub type EncapsKey = EncapsKey<EK_LEN>;
Expand description

Correctly sized encapsulation key specific to the target security parameter set.

Aliased Type§

#[repr(align(8))]
pub struct EncapsKey(/* private fields */);

Trait Implementations§

Source§

impl Encaps for EncapsKey

Source§

type CipherText = CipherText<CT_LEN>

The ciphertext type transmitted from the encapsulating party to the decapsulating party
Source§

type SharedSecretKey = SharedSecretKey

The shared secret key type generated during encapsulation
Source§

fn try_encaps_with_rng( &self, rng: &mut impl CryptoRngCore, ) -> Result<(Self::SharedSecretKey, Self::CipherText), &'static str>

Generates a shared secret and ciphertext from an encapsulation key specific to this security parameter set.
This function utilizes a provided random number generator and is intended to operate in constant time. Read more
Source§

fn try_encaps( &self, ) -> Result<(Self::SharedSecretKey, Self::CipherText), &'static str>

Generates a shared secret and ciphertext from an encapsulation key specific to this security parameter set.
This function utilizes the OS default random number generator and is intended to operate in constant time outside of rho which crosses the trust boundary in the clear. Read more
Source§

fn encaps_from_seed( &self, seed: &[u8; 32], ) -> (Self::SharedSecretKey, Self::CipherText)

Generates a shared secret and ciphertext from an encapsulation key specific to this security parameter set.
This function utilizes a provided seed (rather than a random number generator) and is intended to operate in constant time. Read more
Source§

impl SerDes for EncapsKey

Source§

type ByteArray = [u8; 800]

The fixed-size byte array type used for serialization
Source§

fn into_bytes(self) -> Self::ByteArray

Produces a byte array of fixed-size specific to the struct being serialized. Read more
Source§

fn try_from_bytes(ek: Self::ByteArray) -> Result<Self, &'static str>

Consumes a byte array of fixed-size specific to the struct being deserialized; performs validation Read more