Skip to content
ecdsa.com

ERC-1271 (contract signature validation)

The Ethereum standard by which smart-contract accounts validate signatures: a verifier calls isValidSignature(bytes32 hash, bytes signature) and treats the return value 0x1626ba7e as valid.
Also written asERC-1271EIP-1271isValidSignatureERC-6492

Smart accounts (Safe, ERC-4337 wallets, EIP-7702 delegated accounts) cannot produce a plain ECDSA signature for their own address, so the contract decides: a Safe checks enough owner signatures, a passkey wallet checks a P-256 signature, a session-key wallet checks its policy. The magic value is the function selector, bytes4(keccak256("isValidSignature(bytes32,bytes)")).

Verifiers should try ERC-1271 when the address has code, and ERC-6492 when it does not yet: ERC-6492 wraps the signature with the factory call needed to deploy the account and ends with the 32-byte magic suffix 0x6492…6492. Libraries such as viem's verifyMessage and OpenZeppelin's SignatureChecker handle all three cases. Results can change over time, since owners and policies of the contract can change.

Standards and references

All terms