Function starknet_crypto::verify

source ·
pub fn verify(
    public_key: &FieldElement,
    message: &FieldElement,
    r: &FieldElement,
    s: &FieldElement
) -> Result<bool, VerifyError>
Expand description

Verifies if a signature is valid over a message hash given a public key. Returns an error instead of false if the public key is invalid.

§Arguments

  • public_key: The public key
  • message: The message hash
  • r: The r value of the signature
  • s: The s value of the signature