Expand description
WOTS+ one-time signature scheme based on hash chains. WOTS+ one-time signature scheme (FIPS 205, Algorithms 1, 4-8).
WOTS+ (Winternitz One-Time Signature Plus) is the foundational one-time signature
scheme used at the leaves of every XMSS tree in SLH-DSA. It signs a single n-byte
message by:
- Splitting the message into base-
wdigits and computing a checksum. - For each digit
d_i, evaluating a hash chainF^(d_i)(sk_i)wheresk_iis derived from the secret seed via PRF. - Verification completes each chain to step
w - 1and compresses all endpoints into a singlen-byte public key usingT_l.
WOTS+ is purely hash-based: its one-time security relies solely on the second-preimage
resistance of the hash function F.
Functions§
- base_2b
- Extract base-2^b digits from a byte string.
- chain
- Apply the WOTS+ chain function
stimes starting from stepi. - to_byte
- Convert an integer to a big-endian byte vector of length
n. - to_
byte_ stack - Stack-allocated to_byte for small sizes (up to 8 bytes).
- wots_
pk_ from_ sig - Compute a WOTS+ public key candidate from a signature.
- wots_
pk_ gen - Generate a WOTS+ public key.
- wots_
sign - Sign an
n-byte message using WOTS+. - wots_
sign_ into - Streaming variant of
wots_sign— writes theLEN * N-byte signature into the start ofout(which must be at least that size) instead of returning a freshly-allocatedVec<u8>.