Skip to main content

keygen_internal

Function keygen_internal 

Source
pub fn keygen_internal<P: Params>(
    d: &[u8; 32],
    z: &[u8; 32],
) -> (Vec<u8>, Vec<u8>)
Expand description

Deterministic ML-KEM key generation (Algorithm 16).

Generates an encapsulation/decapsulation key pair from explicit seeds. The decapsulation key is structured as dk_pke || ek || H(ek) || z.

§Arguments

  • d - 32-byte seed passed to kpke::keygen for K-PKE key generation.
  • z - 32-byte implicit rejection value embedded in the decapsulation key.

§Returns

A tuple (ek, dk) of byte vectors.