Function verifyStrict [src]

Verify the signature against a message and public key using cofactorless verification. This performs strict verification without cofactor multiplication, checking the exact equation: [s]B = R + [H(R,A,m)]A This is more restrictive than the standard verify() method and may reject specially crafted signatures that would be accepted by cofactored verification. But it will never reject valid signatures created using the sign() method. Return IdentityElement or NonCanonical if the public key or signature are not in the expected range, or SignatureVerificationError if the signature is invalid for the given message and key.

Prototype

pub fn verifyStrict(sig: Signature, msg: []const u8, public_key: PublicKey) VerifyError!void

Parameters

sig: Signaturemsg: []const u8public_key: PublicKey

Possible Errors

IdentityElement IdentityElementError
InvalidEncoding EncodingError
NonCanonical NonCanonicalError
SignatureVerificationFailed SignatureVerificationError
WeakPublicKey WeakPublicKeyError

Source

pub fn verifyStrict(sig: Signature, msg: []const u8, public_key: PublicKey) VerifyError!void { var st = try sig.verifier(public_key); st.update(msg); try st.verifyStrict(); }