Skip to main content

decaps_internal

Function decaps_internal 

Source
pub fn decaps_internal(dk: &DecapsulationKey, ct: &Ciphertext) -> SharedSecret
Expand description

ML-KEM.Decaps_internal(dk, c) (FIPS 203, Algorithm 18).

§Preconditions

dk MUST be an initialized, validated DecapsulationKey produced by DecapsulationKey::from_bytes, [Kem::keygen], keygen_into, or keygen_internal — never an uninitialized DecapsulationKey::zeroed placeholder or a previously zeroized key. Unlike [Kem::decaps] and decaps_into, this raw KAT entry point is infallible and relies on the caller to uphold this precondition (checked via debug_assert! in debug builds).