[][src]Function secp256k1_abc_sys::secp256k1_ecdsa_verify

pub unsafe extern "C" fn secp256k1_ecdsa_verify(
    ctx: *const secp256k1_context,
    sig: *const secp256k1_ecdsa_signature,
    msg32: *const c_uchar,
    pubkey: *const secp256k1_pubkey
) -> c_int

Verify an ECDSA signature.

Returns: 1: correct signature 0: incorrect or unparseable signature Args: ctx: a secp256k1 context object, initialized for verification. In: sig: the signature being verified (cannot be NULL) msg32: the 32-byte message hash being verified (cannot be NULL) pubkey: pointer to an initialized public key to verify with (cannot be NULL)

To avoid accepting malleable signatures, only ECDSA signatures in lower-S form are accepted.

If you need to accept ECDSA signatures from sources that do not obey this rule, apply secp256k1_ecdsa_signature_normalize to the signature prior to validation, but be aware that doing so results in malleable signatures.

For details, see the comments for that function.