EIP.tools

EIP.tools

⚠️ DraftStandards Track: ERC

ERC-8801: Post-Quantum Account

A smart account that authenticates a user operation with a self describing post quantum signature verified by a precompile

Authors
Created2026-12-05
Discussion Linkhttps://ethereum-magicians.org/t/erc-8801-post-quantum-account/30621
Requires

Markdown

https://raw.githubusercontent.com/ethereum/ERCs/re...
Pull Request#2308PR open

EIP-GPT summary

Contents
AbstractMotivationSpecificationScheme registryCredentialSignatureInterfaceValidationDelegated accountsRationaleWhy a scheme byteWhy the account verifies against a precompileWhy both familiesWhy a read interfaceBackwards CompatibilityReference ImplementationSecurity ConsiderationsCopyright

Abstract

This ERC defines a smart account that authenticates a user operation with a post quantum signature. The account holds a self describing credential of a scheme identifier and a post quantum public key, it reads a signature of a scheme identifier and a post quantum signature from the user operation, and it verifies that signature over the user operation hash by calling the verification precompile for the named scheme. The encoding is crypto agile, so one account standard covers the module lattice and the hash based families and any scheme a later precompile adds, and a wallet reads the credential through a single interface to learn which scheme an account uses.

Motivation

Account abstraction lets an account define its own authentication, and ERC-4337 leaves the meaning of the signature field to the account. The signatures that accounts use today are elliptic curve signatures that a quantum computer breaks. The verification primitives for the post quantum replacements are arriving as precompiles, EIP-8355 for the module lattice scheme ML-DSA and a companion precompile for the hash based scheme SLH-DSA, but a precompile is a raw verifier and not an account.

Without a standard, every wallet that wants a post quantum account invents its own key encoding, its own signature layout and its own choice of scheme, and none of them interoperate. A wallet cannot read a third account to learn whether it is post quantum or which scheme it holds, a registry cannot index it, and a signer cannot be reused across tools. This ERC fixes the account layer so that a post quantum account from one wallet is a post quantum account everywhere, and so that the scheme an account uses is a value a contract can read rather than a private convention.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

Scheme registry

A scheme is named by a single byte. The byte selects the verification precompile, the fixed public key size and the fixed signature size. This document registers the following schemes, and a later EIP that adds a verification precompile MAY register a further byte.

Scheme byteSchemePrecompilePublic keySignature
0x01ML-DSA-44EIP-835513122420
0x02ML-DSA-65EIP-835519523309
0x03ML-DSA-87EIP-835525924627
0x11SLH-DSA-SHA2-128sthe SLH-DSA precompile327856
0x12SLH-DSA-SHA2-192sthe SLH-DSA precompile4816224
0x13SLH-DSA-SHA2-256sthe SLH-DSA precompile6429792

Credential

The account holds a credential, which is the byte string scheme ++ publicKey. The scheme is a registered scheme byte and the public key is exactly the fixed public key size for that scheme. The credential is set when the account is created and MAY be replaced only through the account owner authorising the replacement with the current credential.

Signature

The signature field of the user operation is the byte string scheme ++ signature. The scheme MUST equal the scheme of the account credential. The signature is exactly the fixed signature size for that scheme. An account MUST reject a signature whose scheme does not match the credential or whose length is not the fixed size.

Interface

A conforming account implements ERC-4337 IAccount and the following interface, so that a wallet or a registry reads the scheme and the public key of any account.

interface IPostQuantumAccount {
    /// @notice The scheme byte and the post quantum public key this account verifies against.
    function postQuantumCredential() external view returns (bytes1 scheme, bytes memory publicKey);
}

Validation

In validateUserOp the account MUST verify the signature over userOpHash as follows.

  1. Read scheme and publicKey from the credential.
  2. Read sigScheme as the first byte and signature as the remaining bytes of the user operation signature field. If sigScheme is not equal to scheme, or the length of signature is not the fixed signature size for scheme, the account MUST treat the signature as invalid.
  3. Call the precompile registered for scheme with the input publicKey ++ signature ++ userOpHash, where userOpHash is the 32 byte hash.
  4. The signature is valid when the precompile returns the 32 byte word one, and invalid otherwise.

On a valid signature the account returns the validationData value zero. On an invalid signature the account returns the validationData value one, which is SIG_VALIDATION_FAILED, and it MUST NOT revert on an invalid signature. An account MAY pack validUntil and validAfter into validationData as ERC-4337 defines.

Delegated accounts

An externally owned account MAY become a post quantum account by delegating its code to a conforming implementation through EIP-7702. The credential of a delegated account is stored by the implementation and the validation above is unchanged.

Rationale

Why a scheme byte

A single scheme byte in front of the key and in front of the signature makes the credential and the signature self describing, so a contract dispatches on a named scheme rather than on the length of a field. This is the crypto agility the migration needs. When a scheme is retired or a new precompile is added, the registry gains or loses a byte and no account format changes. The same self describing shape carried the post quantum signature builtins approved for Cardano, and it is the only way one account standard covers more than one scheme.

Why the account verifies against a precompile

An account cannot verify a post quantum signature in the Ethereum Virtual Machine at an affordable cost, so the verification is a precompile. The account holds the key, lays out the signature and chooses the scheme, and the precompile does the arithmetic. Keeping the account thin over a precompile means the account code is the same whatever the scheme, and the only cost that changes with the scheme is the gas of the precompile call.

Why both families

Registering both the module lattice schemes and the hash based schemes in one standard gives an account a choice between two unrelated hard problems, so an account can hold a hash based credential as a conservative anchor and a lattice credential where signature size matters. A standard that named only one family would force a second standard when the other family is needed.

Why a read interface

A wallet that receives a transfer to an account, a registry that indexes accounts and a tool that imports a signer all need to know whether an account is post quantum and which scheme it uses. A single view function that returns the scheme and the public key makes that a read rather than a guess, and it is the hook a wallet uses to show a user that an account is quantum secure.

Backwards Compatibility

The account is an ERC-4337 account and uses the signature field that ERC-4337 already leaves to the account, so it needs no change to the entry point or to the protocol. An account that does not implement the read interface is simply not a post quantum account under this ERC. The scheme registry depends on the verification precompiles, so a scheme is usable only on a chain where its precompile is present, and an account MUST be deployed with a scheme whose precompile the chain provides.

Reference Implementation

A reference account contract implements IAccount and IPostQuantumAccount, stores the credential, decodes the scheme and the signature, calls the precompile for the scheme and returns the ERC-4337 validation value. The reference contract and the test vectors for each registered scheme are published with this proposal, and the vectors are cross checked against independent implementations of ML-DSA and SLH-DSA.

Security Considerations

The authentication of the account is only as strong as the signature scheme named by its credential, and every registered scheme is a NIST standardised post quantum signature, so an account is secure against a quantum adversary when its credential names a registered scheme and the chain verifies that scheme correctly.

The account MUST verify the signature over the exact userOpHash that ERC-4337 binds to the chain id and the entry point, so that a signature cannot be replayed on another chain or through another entry point. A post quantum signature is large, so a bundler and a paymaster MUST account for the calldata and the precompile gas of a verification, and the account MUST return the failure value rather than revert on a bad signature so that gas estimation completes.

A credential replacement is a change of the key that controls the account, so an implementation that allows replacement MUST require the replacement to be authorised by a valid signature under the current credential, and MUST NOT allow a replacement that is not so authorised.

Copyright and related rights waived via CC0.

EIP.tools

EIP.tools

Search, read, and map Ethereum improvement proposals, ERCs, RIPs, and CAIPs from one focused interface.

Farcaster
by @apoorveth