Skip to main content

slh_keygen_internal

Function slh_keygen_internal 

Source
pub fn slh_keygen_internal<P: Params>(
    sk_seed: &[u8],
    sk_prf: &[u8],
    pk_seed: &[u8],
) -> (Vec<u8>, Vec<u8>)
Expand description

Generate an SLH-DSA key pair from explicit seed material (deterministic).

Implements Algorithm 18 of FIPS 205. Computes the top-level XMSS tree root from the provided seeds, then assembles the secret and public keys.

  • sk_seed: the master secret seed (n bytes), used to derive all WOTS+ and FORS secrets
  • sk_prf: the PRF key (n bytes), used to generate per-signature randomizers
  • pk_seed: the public seed (n bytes), included in every hash call for domain separation

Returns (sk, pk) where:

  • sk = SK.seed || SK.prf || PK.seed || PK.root (4n bytes)
  • pk = PK.seed || PK.root (2n bytes)