Skip to main content

slh_verify_internal

Function slh_verify_internal 

Source
pub fn slh_verify_internal<P: Params>(m: &[u8], sig: &[u8], pk: &[u8]) -> bool
Expand description

Internal SLH-DSA verification function.

Implements Algorithm 20 of FIPS 205. Reverses the signing pipeline:

  1. Parses R, SIG_FORS, and SIG_HT from the signature.
  2. Recomputes the message digest using H_msg(R, PK.seed, PK.root, M).
  3. Recovers the FORS public key from SIG_FORS and the digest indices.
  4. Verifies the hypertree signature SIG_HT over the recovered FORS public key.

Returns true if the hypertree root matches PK.root, false otherwise.