Skip to main content

xmss_node

Function xmss_node 

Source
pub fn xmss_node<P: Params>(
    sk_seed: &[u8],
    pk_seed: &[u8],
    i: u32,
    z: u32,
    adrs: &mut Adrs,
) -> Vec<u8> 
Expand description

Compute the root of an XMSS Merkle subtree.

Implements Algorithm 9 of FIPS 205. Computes the root node of a subtree of height z whose leftmost leaf is at index i within the current XMSS tree. When z equals h' and i equals 0, this returns the full XMSS tree root.

For z = 0, returns the WOTS+ public key at leaf i. For z > 0, builds the tree iteratively: first generating all 2^z leaf public keys, then hashing pairs of sibling nodes up to the root using H.