Skip to main content

keygen_internal

Function keygen_internal 

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

Deterministic key generation from a 32-byte seed.

Implements Algorithm 6 of FIPS 204 (ML-DSA.KeyGen_internal).

Given a 32-byte seed xi, derives the public matrix A (via ExpandA), secret vectors s1 and s2 (via ExpandS), and computes the public key pk = (rho, t1) and secret key sk = (rho, K, tr, s1, s2, t0).

  • xi: 32-byte random seed.

Returns (pk, sk) as byte vectors.