Skip to main content

expand_s

Function expand_s 

Source
pub fn expand_s<P: Params>(
    rho_prime: &[u8; 64],
) -> ([[i32; 256]; 7], [[i32; 256]; 8])
Expand description

Expand the secret vectors s1 and s2 from a seed.

Implements Algorithm 33 of FIPS 204 (ExpandS). Generates the secret vectors by calling rej_bounded_poly with incrementing nonces: nonces 0..l for s1, and l..(l+k) for s2.

  • rho_prime: 64-byte secret seed derived during key generation.

Returns (s1, s2) where s1 has MAX_L polynomials (valid 0..l) and s2 has MAX_K polynomials (valid 0..k), each with coefficients in [-eta, eta].