Function winternitz::verify

source ·
pub fn verify(pubkey: &[u8], msg: &[u8], sig: &[u8]) -> Result<bool, &'static str>
Expand description

Verify a signature sig of message msg from public key pubkey.

Arguments

  • pubkey is a public key of length PARAMETER_N
  • msg is the message to be verified. It may be of any length.
  • sig is the signature. It must be of length PARAMETER_P * PARAMETER_N.

Returns

This function returns Ok(true) if the signature is valid, Ok(false) if it is not, or an Err if pubkey or sig are of incorrect length.