WOTS.sign

Create a one-time signature for msg.

template WOTS(uint n, alias hash_n_n, alias prg, uint log_w)
package @safe @nogc
ubyte[sig_bytes]
sign
pure nothrow
(
in ref H msg
,
in ref ubyte[seed_bytes] sk
,
in H[] masks
)
in { assert (masks.length == w, "Number of masks must be w (16 for sphincs256)."); }
if (
is_hash_n_n!hash_n_n &&
is_prg!(prg, seed_bytes)
&&
n % 8 == 0
)

Parameters

msg
Type: H

The message to sign.

sk
Type: ubyte[seed_bytes]

The secret seed.

masks
Type: H[]

List of masks.

Return Value

Type: ubyte[sig_bytes]

Returns the signature.

Meta