Function verify_signature
pub fn verify_signature(
public_key_x: [u8; 32],
public_key_y: [u8; 32],
signature: [u8; 64],
message_hash: [u8; 32],
) -> bool
pub fn verify_signature(
public_key_x: [u8; 32],
public_key_y: [u8; 32],
signature: [u8; 64],
message_hash: [u8; 32],
) -> bool
Verifies a ECDSA signature over the secp256k1 curve.
(r, s), whererandsare fixed-sized big endian scalar values. As thesecp256k1has a 256-bit modulus, we have a 64 byte signature whilerandswill both be 32 bytes. We expectsto be normalized. This means given the curve's order,sshould be less than or equal toorder / 2. This is done to prevent malleability. For more context regarding malleability you can reference BIP 0062.