WOTS.verify

From given signature, message and mask computes the public key. The signature is valid if and only if the return value is equal to the real public key.

Note: The caller is responsible for checking for equality of the return value and the public key.

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

Parameters

sig
Type: ubyte[]

Signature.

msg
Type: H

Signed message.

masks
Type: H[]

List of masks.

Return Value

Type: ubyte[sig_bytes]

The public key that would match this signature.

Meta