README.adoc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. = Cryptography
  2. [.readme-notice]
  3. NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils/cryptography
  4. A collection of contracts and libraries that implement various signature validation schemes and cryptographic primitives. These utilities enable secure authentication, multisignature operations, and advanced cryptographic operations in smart contracts.
  5. * {ECDSA}, {MessageHashUtils}: Libraries for interacting with ECDSA signatures.
  6. * {P256}: Library for verifying and recovering public keys from secp256r1 signatures.
  7. * {RSA}: Library with RSA PKCS#1 v1.5 signature verification utilities.
  8. * {SignatureChecker}: A library helper to support regular ECDSA from EOAs as well as ERC-1271 signatures for smart contracts.
  9. * {Hashes}: Commonly used hash functions.
  10. * {MerkleProof}: Functions for verifying https://en.wikipedia.org/wiki/Merkle_tree[Merkle Tree] proofs.
  11. * {EIP712}: Contract with functions to allow processing signed typed structure data according to https://eips.ethereum.org/EIPS/eip-712[EIP-712].
  12. * {ERC7739Utils}: Utilities library that implements a defensive rehashing mechanism to prevent replayability of smart contract signatures based on ERC-7739.
  13. * {AbstractSigner}: Abstract contract for internal signature validation in smart contracts.
  14. * {ERC7739}: An abstract contract to validate signatures following the rehashing scheme from {ERC7739Utils}.
  15. * {SignerECDSA}, {SignerP256}, {SignerRSA}: Implementations of an {AbstractSigner} with specific signature validation algorithms.
  16. * {SignerERC7702}: Implementation of {AbstractSigner} that validates signatures using the contract's own address as the signer, useful for delegated accounts following EIP-7702.
  17. * {SignerERC7913}, {MultiSignerERC7913}, {MultiSignerERC7913Weighted}: Implementations of {AbstractSigner} that validate signatures based on ERC-7913. Including a simple and weighted multisignature scheme.
  18. * {ERC7913P256Verifier}, {ERC7913RSAVerifier}: Ready to use ERC-7913 signature verifiers for P256 and RSA keys.
  19. == Utils
  20. {{ECDSA}}
  21. {{MessageHashUtils}}
  22. {{P256}}
  23. {{RSA}}
  24. {{SignatureChecker}}
  25. {{Hashes}}
  26. {{MerkleProof}}
  27. {{EIP712}}
  28. {{ERC7739Utils}}
  29. == Abstract Signers
  30. {{AbstractSigner}}
  31. {{ERC7739}}
  32. {{SignerECDSA}}
  33. {{SignerP256}}
  34. {{SignerRSA}}
  35. {{SignerERC7702}}
  36. {{SignerERC7913}}
  37. {{MultiSignerERC7913}}
  38. {{MultiSignerERC7913Weighted}}
  39. == Verifiers
  40. {{ERC7913P256Verifier}}
  41. {{ERC7913RSAVerifier}}