AbstractSigner.sol 987 B

1234567891011121314151617181920212223
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/AbstractSigner.sol)
  3. pragma solidity ^0.8.20;
  4. /**
  5. * @dev Abstract contract for signature validation.
  6. *
  7. * Developers must implement {_rawSignatureValidation} and use it as the lowest-level signature validation mechanism.
  8. *
  9. * @custom:stateless
  10. */
  11. abstract contract AbstractSigner {
  12. /**
  13. * @dev Signature validation algorithm.
  14. *
  15. * WARNING: Implementing a signature validation algorithm is a security-sensitive operation as it involves
  16. * cryptographic verification. It is important to review and test thoroughly before deployment. Consider
  17. * using one of the signature verification libraries (xref:api:utils/cryptography#ECDSA[ECDSA],
  18. * xref:api:utils/cryptography#P256[P256] or xref:api:utils/cryptography#RSA[RSA]).
  19. */
  20. function _rawSignatureValidation(bytes32 hash, bytes calldata signature) internal view virtual returns (bool);
  21. }