Module kem

Source
Expand description

§Key Encapsulation Mechanism

A KEM interface.

Enums§

Algorithm
KEM Algorithms
Ct
A KEM ciphertext
Error
PrivateKey
A KEM private key.
PublicKey
A KEM public key.
Ss
A KEM shared secret

Functions§

decapsulate
Decapsulate the shared secret in ct using the private key sk.
encapsulate
Encapsulate a shared secret to the provided pk and return the (Key, Enc) tuple.
key_gen
Generate a key pair for the Algorithm using the provided rng.
secret_to_public
Compute the public key for a private key of the given Algorithm. Applicable only to X25519 and secp256r1.