|This document is better viewed at https://docs.openzeppelin.com/contracts/api/cryptography|
This collection of libraries provides simple and safe ways to use different cryptographic primitives.
Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
These functions can be used to verify that a message was signed by the holder of the private keys of a given address.
Returns the address that signed a hashed message (
signature. This address can then be used for verification purposes.
ecrecover EVM opcode allows for malleable (non-unique) signatures:
this function rejects them by requiring the
s value to be in the lower
half order, and the
v value to be either 27 or 28.
These functions deal with verification of Merkle trees (hash trees),
Returns true if a
leaf can be proved to be a part of a Merkle tree
root. For this, a
proof must be provided, containing
sibling hashes on the branch from the leaf to the root of the tree. Each
pair of leaves and each pair of pre-images are assumed to be sorted.