In this track: Cryptography with intuition
advanced · 4 MIN READ

ERC-1271 contract signatures

A contract account can validate signatures under its own policy.

LET’S PICTURE IT

An organization can accept approvals through rules that differ from one person’s stamp.

SEE IT FOR YOURSELF
From a public address to a verified signatureStep 1 / 4
From a public address to a verified signaturePublic address0x0000…0001Share to receiveAnother personCan read the addressCannot sign for youPublic identifier ≠ secret authorizationLocal signerPrivate key stays hereSign the chosen requestSigned requestMessage + signatureSecret key not includedThe moving packet represents a signature, not a keySignatureCheck the exact messageCheck the signing contextVerificationAuthorization checkedIntent still mattersValidity and safety are different questionsWallet interfaceReads public dataRequests authorizationNetwork stateBalances and recordsIndependent verificationNo wallet is connected in this local illustration

An address is public receiving information. It is not the private key that authorizes actions.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Ask the account’s policy

ERC-1271 defines isValidSignature for contract-based validation. Its decision can depend on contract logic and current state rather than one directly recoverable EOA key.

Check the specified result

The standard success result is the bytes4 magic value 0x1626ba7e. A non-reverting call alone is not a sufficient acceptance rule.

Expect validity to change

An account can change owners or approval policy. A signature accepted at one state may not remain valid forever, so caching a past answer requires careful protocol analysis.

Handle failure safely

The validation call can revert or return unexpected data. Treat those outcomes according to the integration’s defined policy and do not silently accept them.

Inspect the distinction

isValidSignature(bytes32 digest, bytes signature)
standard accepted result: 0x1626ba7e
other data or failure: not standard acceptance

These are local teaching values, not a signature request or a live-chain lookup.

TURN UNDERSTANDING INTO PRACTICEOpen the Keccak-256 →
QUICK CHECK · NO PRESSURE

Is any non-reverting ERC-1271 response automatically valid?

Your progress stays in this browser.
Keep exploring the original referenceEthereum Improvement Proposals ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.