Skip to main content

xmss_pk_from_sig

Function xmss_pk_from_sig 

Source
pub fn xmss_pk_from_sig<P: Params>(
    idx: u32,
    sig_xmss: &[u8],
    m: &[u8],
    pk_seed: &[u8],
    adrs: &mut Adrs,
) -> Vec<u8> 
Expand description

Compute an XMSS public key (tree root) from an XMSS signature.

Implements Algorithm 11 of FIPS 205. Recovers the WOTS+ public key from the WOTS+ signature component, then walks up the authentication path to recompute the Merkle tree root. If the signature is valid, the returned root matches the original XMSS public key.

The sig_xmss input must be (len + h') * n bytes, and idx is the leaf index that was used during signing.