Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

Background

ERC-7913 defines how Ethereum applications can verify signatures from signers that have no Ethereum address, such as P-256 keys, RSA keys, and email-based attestations. A deployed verifier contract can serve many keys of the same kind.

This article explains the proposal linked below.

I also cover other EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.

Overview

An externally owned account (EOA) can sign a message with its private key. ERC-1271 gives smart accounts, including multisigs, a way to verify signatures. In both cases, an Ethereum address identifies the signer.

For more on ERC-1271, see the article below.

[ERC-1271] How contracts verify signatures

ERC-7913 extends both signer representation and signature verification to keys that do not inherently have Ethereum addresses. This lets Ethereum applications work with a broader set of signers.

  • Keys on curves other than Ethereum's usual curve, such as secp256r1.
  • Hardware devices, such as phones or dedicated security chips.
  • Credentials associated with Web2 identities, such as email addresses.

Smart accounts with social recovery are one example where it matters whether a signer without an Ethereum address can act as a recovery guardian.

Motivation

Background

Ethereum accounts have traditionally used the secp256k1 curve for signing. Account abstraction has increased demand for support for other verification mechanisms.

  • secp256r1 is commonly supported by smartphones and hardware devices.
  • RSA keys are widely used by enterprises and financial institutions.
  • Zero-knowledge verification can bridge Web2 credentials, such as email attestations or JSON Web Tokens (JWTs), into Ethereum applications.

These methods do not inherently assign each key its own Ethereum address.

Limitations of the existing model

The existing model identifies the signer by an EOA or contract address. To represent each key using a different algorithm, an application could deploy a dedicated ERC-1271-compatible contract for each key.

  • Per-key deployments add cost and operational overhead.
  • Separate addresses can confuse users, who might mistakenly send funds to a contract meant only to represent a signer.
  • The approach blurs the separation account abstraction makes possible between the account that holds assets and the key that controls it.

Proposed approach

ERC-7913 allows a small set of shared verifier contracts to handle signatures for different kinds of keys through one interface.

  • A pair of values, (verifier, key), identifies a signer.
  • The key needs no separate Ethereum address or contract deployment.
  • A deployed verifier can support new keys that use its signature format.

A smart account could appoint an email-backed identity as a recovery guardian, reserve certain operations for a hardware device, or use credentials from an external service such as a JWT- or OAuth-based system. The signer is represented as a byte string, so the application can support these identities without assigning them addresses.

Compatibility with the existing model

The definition is backwards-compatible with EOAs and ERC-1271 contracts.

Signer type Verifier Key
EOA The signer's address Empty bytes
ERC-1271 contract The contract address Empty bytes
Key without an Ethereum address, such as RSA The verifier contract address The key bytes

The same signer representation supports both existing Ethereum account types and new key formats.

Specification

Terminology

The proposal distinguishes between the key and the verifier.

Key

A key is a byte string of arbitrary length. It can represent a P-256 public key, an RSA public key, or other information needed to verify the signature. The key need not correspond to an Ethereum address. A key passed to the ERC-7913 verifier must be nonempty. An empty key in the encoded signer is reserved for address-based verification.

Verifier

A verifier is a smart contract that verifies signatures for a particular type of key. Unlike the key, it has an Ethereum address. One contract might verify RSA, another secp256r1, and another signed email attestations. They expose a common entry point to their callers.

Signature verification interface

A verifier contract implements the following interface.

js
interface IERC7913SignatureVerifier {
  /**
   * @dev Verifies `signature` as a valid signature of `hash` by `key`.
   *
   * MUST return the bytes4 magic value 0x024ad318 (IERC7913SignatureVerifier.verify.selector) if the signature is valid.
   * SHOULD return 0xffffffff or revert if the signature is not valid.
   * SHOULD return 0xffffffff or revert if the key is empty
   */
  function verify(bytes calldata key, bytes32 hash, bytes calldata signature) external view returns (bytes4);
}
Item Meaning
key Byte string identifying the signer
hash bytes32 hash of the data being signed
signature Signature data to verify
Return value A bytes4 magic value indicating the result

Return values

  • For a valid signature, the verifier must return the following value.

    text
    0x024ad318

    This is IERC7913SignatureVerifier.verify.selector, the standard success response.

  • For an invalid signature or an empty key, the verifier should either return 0xffffffff or revert the call.

The caller accepts verification only if it receives the expected success value.

Stateless design

The verifier should be stateless. Verification should rely on the inputs rather than mutable contract state. This helps make the result deterministic, can reduce gas spent reading storage, and limits the scope for bugs caused by changing state. You can think of the verifier as performing a pure check on the signature.

Additional notes

The main benefit of ERC-7913 is that a shared verifier can provide the same signature checks without requiring a separate ERC-1271 identity contract for every key. A per-key deployment costs gas and adds work to operate. Shared verification code avoids deploying a new contract when an application adds a key in a format it already supports.

ERC-1271 already covers contract signers that need no external key data, such as a multisig that implements its own verification policy. The ERC-7913 verifier should therefore reject an empty key. For a 20-byte signer consisting only of an address, the caller instead uses ERC-1271 or EOA verification with ecrecover.

The verifier takes a bytes32 hash to stay consistent with ecrecover and ERC-1271. A caller usually derives that hash using EIP-191 or EIP-712.

For more on EIP-191, see the article below.

[EIP-191] How to use signed data safely

For more on EIP-712, see the article below.

[EIP-712] Hashing and signing typed structured data

A signature scheme with different hashing rules can treat the bytes32 input as its message and apply its own hashing rules to it. Callers retain a uniform input type while the verifier can apply the scheme's rules.

Compatibility

ERC-7913 allows its verifiers to coexist with EOAs and ERC-1271 contracts. It encodes a signer as the verifier address followed by the key bytes. The minimum length is 20 bytes, the length of an Ethereum address.

Signer encoding

Field Format Meaning
signer bytes The first 20 bytes are the verifier address. The remainder is the key, which may be empty.
verifier address (20 bytes) A verifier contract, an EOA, or an ERC-1271 contract
key bytes Key or identity data. Empty for an EOA or ERC-1271 signer.
Examples
  • EOA or ERC-1271 contract: signer = <verifier=0xAbCd...20bytes> || <key=empty> (20 bytes total).
  • Key without an Ethereum address, such as RSA or P-256: signer = <verifier=0xVerif...20bytes> || <key=public key bytes or other data> (20 bytes plus the key length).

Verification algorithm

Given a signer, a message hash hash of type bytes32, and a signature, the caller can verify them as shown below. Code comments are retained from the Japanese original.

py
if signer.length < 20:
    fail  // 署名者が20バイト未満は不正

(verifier, key) = (signer[0:20], signer[20:])  // 先頭20バイトがverifier、残りがkey

if key is empty:
    // verifierは“アイデンティティ”(EOAまたはERC-1271コントラクト)として扱う
    if verifierアドレスにコードがある:
        // コントラクト → ERC-1271の isValidSignature(hash, signature)
        // 期待されるmagic value(0x1626ba7e)が返れば成功、そうでなければ失敗
        return isValidSignature(verifier, hash, signature)
    else:
        // EOA → ecrecover(hash, signature) == verifier なら成功
        return (ecrecover(hash, signature) == verifier)
else:
    // keyが非空 → ERC-7913 Verifierに委譲
    // IERC7913SignatureVerifier(verifier).verify(key, hash, signature)
    // 0x024ad318 が返れば成功、それ以外は失敗
    return (IERC7913SignatureVerifier(verifier).verify(key, hash, signature) == 0x024ad318)

Reference implementation

js
import {SignatureChecker} from '@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol';

/// @dev Extention of openzeppelin's SignatureChecker library
library SignatureCheckerExtended {
  function isValidSignatureNow(bytes calldata signer, bytes32 hash, bytes memory signature) internal view returns (bool) {
      if (signer.length < 20 ) {
        return false;
      } else if (signer.length == 20) {
        return SignatureChecker.isValidSignatureNow(address(bytes20(signer)), hash, signature);
      } else {
        try IERC7913SignatureVerifier(address(bytes20(signer[0:20]))).verify(signer[20:], hash, signature) returns (bytes4 magic) {
          return magic == IERC7913SignatureVerifier.verify.selector;
        } catch {
          return false;
        }
      }
  }
}

Security considerations

Preserving long-term reliability

For a signer to remain useful over time, the verifier should be trustless. Its result should be independently reproducible without relying on a privileged administrator's decisions. The specification makes the following recommendations.

Concern Recommended design Reason
Verifier design Use a non-upgradeable contract. The logic should remain unchanged even if the signer is used years later.
Long-term validity Keep the verifier's behavior and dependencies stable. A later change to the verification criteria can invalidate previously accepted signatures.

Upgradeable verifiers are discouraged because an administrator could change their code after deployment.

Keep the verifier stateless

The verifier should avoid data that can change after deployment. Its verification logic should be fixed. In Solidity, a pure function illustrates this property.

  • It does not read or write contract storage.
  • It does not depend on execution context such as block.timestamp or msg.sender.
  • It returns the same result for the same inputs.

Those properties make verification consistent across callers and over time.

Choose stable verification parameters

Verification parameters should come from the key or constants fixed in the contract.

Parameter source Meaning
Key A public key, identifier, or other data supplied as an input
Immutable code Constants or logic fixed at deployment
Mutable external state Should not be used, including block numbers, oracle prices, or upgrade configuration

Solidity's immutable and pure declarations help express which inputs can change. The example below is an illustrative placeholder for the shape of a verifier. Its check does not authenticate a signature, so it is not suitable as a production verifier.

js
contract ExampleVerifier is IERC7913SignatureVerifier {
    address public immutable trustedKey;
    
    constructor(address _trustedKey) {
        trustedKey = _trustedKey;
    }

    function verify(bytes calldata key, bytes32 hash, bytes calldata signature)
        external
        pure
        returns (bytes4)
    {
        // 状態を読まず、入力パラメータのみに基づいて検証する
        if (_isValidSignature(key, hash, signature)) {
            return 0x024ad318;
        }
        return 0xffffffff;
    }

    function _isValidSignature(bytes calldata key, bytes32 hash, bytes calldata signature)
        private
        pure
        returns (bool)
    {
        // シンプルな検証ロジック
        // 状態や外部要素に依存しない
        return keccak256(key) == hash; // 仮のロジック例
    }
}

Keeping verification independent of mutable settings helps preserve trustless operation.

Alignment with ERC-7562

A stateless verifier aligns with ERC-7562's validation scope rules. These rules restrict behavior during validation in account-abstraction flows, and avoiding mutable dependencies helps a verifier fit those constraints.

For more on ERC-7562, see the article below.

[ERC-7562] Transaction validation scope rules for account abstraction

Stateless verification therefore supports more than gas efficiency. It also helps keep signature validation compatible with the broader account-abstraction ecosystem over time.

Citation

Hadrien Croubois (@Amxx), Ernesto García (@ernestognw), Francisco Giordano (@frangio), Aryeh Greenberg (@arr00), “ERC-7913: Signature Verifiers [DRAFT],” Ethereum Improvement Proposals, no. 7913, March 2025. Available at https://eips.ethereum.org/EIPS/eip-7913.

Conclusion

ERC-7913 allows keys without their own Ethereum addresses, including RSA, P-256, and email-based signers, to use a shared verification interface. Applications can support these keys alongside existing EOA and ERC-1271 signers.

If you have questions, feel free to reach out by direct message.

Twitter @cardene777

I also publish elsewhere.

https://chaldene.net/