Skip to main content

pq_encapsulate

Function pq_encapsulate 

Source
pub fn pq_encapsulate(
    ek: &PqEncapsKey,
) -> Result<(PqCiphertext, Zeroizing<[u8; 32]>), CryptoError>
Expand description

Encapsulate a shared secret toward ek, producing (ciphertext, shared_secret).

Explicitly validates FIPS 203 Section 7.2 ByteDecode_12 (all 12-bit coefficients < 3329) across the first 768 bytes before invoking key encapsulation.