Skip to main content

ht_sign

Function ht_sign 

Source
pub fn ht_sign<P: Params>(
    m: &[u8],
    sk_seed: &[u8],
    pk_seed: &[u8],
    idx_tree: u64,
    idx_leaf: u32,
) -> Vec<u8> 
Expand description

Sign a message using the hypertree.

Implements Algorithm 12 of FIPS 205. Signs the n-byte message m (typically a FORS public key) at the position identified by idx_tree and idx_leaf.

The signing process starts at layer 0, signs m with the XMSS tree at (layer=0, tree=idx_tree) using leaf idx_leaf, then propagates the resulting root up through layers 1 to d - 1, each time signing the previous layer’s root.

Returns SIG_HT, the concatenation of d XMSS signatures, totaling d * (len + h') * n bytes.