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 pure nothrow
ubyte[sig_bytes]
verify
(
in ubyte[] sig
,
in ref H msg
,
in H[] masks
)
if (
is_hash_n_n!hash_n_n &&
is_prg!(prg, seed_bytes)
&&
n % 8 == 0
)

Parameters

sig ubyte[]

Signature.

msg H

Signed message.

masks H[]

List of masks.

Return Value

Type: ubyte[sig_bytes]

The public key that would match this signature.

Meta