Skip to main content
Asserts that an Ethereum signature is valid for a given message hash and Ethereum address. Also verifies that the r and s components of the signature are in the range [1, N), where N is the size of the curve.

Signature

Arguments

  • msg_hash - The 32-byte hash of the message that was signed
  • signature - The Ethereum signature containing r, s components and y_parity
  • eth_address - The expected Ethereum address of the signer

Panics

Panics if:
  • The signature components are out of range (not in [1, N) where N is the curve order)
  • The recovered address doesn’t match the provided address

Examples