---
eip: 8164
label: EIP-8164
title: Native Key Delegation for EOAs
status: Draft
type: Standards Track
category: Core
created: 2026-02-17
requires: 2, 2718, 2929, 3541, 3607, 4844, 7702
official: https://eips.ethereum.org/EIPS/eip-8164
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8164.md
canonical: https://eips.huatuo.xyz/eip-8164/
lang: en
tldr: "Lets an EOA permanently swap its ECDSA key for a post-quantum ML-DSA-44 key stored in the account's code field, verified natively by the protocol, with no smart contract wallet needed."
tags: [accounts, post-quantum, signatures, eoa, core]
---

# EIP-8164: Native Key Delegation for EOAs

> Allows EOAs to permanently replace ECDSA with alternative signature schemes via an extended delegation designator.

**TL;DR:** Lets an EOA permanently swap its ECDSA key for a post-quantum ML-DSA-44 key stored in the account's code field, verified natively by the protocol, with no smart contract wallet needed.

## What problem does it solve?

Every Ethereum EOA is controlled by an ECDSA key on the secp256k1 curve. A large enough quantum computer could recover that key from any public key exposed onchain (which happens as soon as an account sends a transaction). [EIP-7702](/eip-7702/) let EOAs delegate to contract code, but authentication still bottoms out in ECDSA, and the ECDSA key can always override a delegation.

Smart contract wallets can verify other signature schemes, but they pay EVM execution for every validation. ERC-8164 instead puts an alternative key **directly into the protocol**: an account can permanently switch to ML-DSA-44 (NIST FIPS 204, a post-quantum scheme), after which its ECDSA key is ignored forever.

## How it works

- **New designator.** EIP-7702 uses code `0xef0100 || address` for delegation. This EIP adds `0xef0101 || pubkey`: 3 bytes of prefix plus a 1,312-byte ML-DSA-44 public key (1,315 bytes total). Prefixes `0xef0102`–`0xef01ff` are reserved for future schemes.
- **One new transaction type, `0x06`,** with an EIP-1559-style body plus `native_key_authorization_list`, `sender` and `signature`:
  - *ECDSA mode* (`sender` empty): a normal 65-byte ECDSA signature. Used to submit authorizations that migrate accounts. Anyone can submit, so migrations can be sponsored.
  - *ML-DSA-44 mode* (`sender` = 20-byte address): a 2,420-byte ML-DSA-44 signature checked against the key in `sender`'s code. Because ML-DSA has no public key recovery, the sender is stated explicitly.
- **Authorization tuples.** `[chain_id, pubkey, nonce, y_parity, r, s]` is signed by the old ECDSA key to install a key (migration). `[chain_id, new_pubkey, nonce, authority, signature]` is signed by the current ML-DSA key to rotate it.
- **ECDSA rejection.** Once an account has `0xef0101` code, any ECDSA-signed transaction or EIP-7702 authorization recovering to it is invalid. There is no way back.
- **Keyless creation.** Like Nick's method ([ERC-2470](/eip-2470/)), you can choose an `r` value whose discrete log nobody knows and recover an "authority" address from it. That address has no ECDSA private key at all, so the account is provably controlled only by the ML-DSA key.

Native-key accounts behave as plain EOAs: calls to them run no code, and `EXTCODESIZE` returns 1315. Signature verification adds 50,000 intrinsic gas; each authorization costs 12,500 gas (plus 25,000 if the account was empty), matching EIP-7702.

## Sample code

The two signing payloads, as pseudocode:

```python
NATIVE_KEY_TX_TYPE = 0x06
NATIVE_KEY_MAGIC   = 0x07

# Migration authorization, signed with the account's existing ECDSA key
auth_hash = keccak256(bytes([NATIVE_KEY_MAGIC]) + rlp([chain_id, mldsa_pubkey, nonce]))
y_parity, r, s = ecdsa_sign(old_key, auth_hash)
ecdsa_auth = [chain_id, mldsa_pubkey, nonce, y_parity, r, s]

# Later: a transaction sent by the converted account
tx_hash = keccak256(bytes([NATIVE_KEY_TX_TYPE]) + rlp([
    chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas,
    gas_limit, to, value, data, access_list,
    [],            # native_key_authorization_list (usually empty)
    my_address,    # sender: 20 bytes -> ML-DSA-44 mode
]))
signature = ml_dsa_44_sign(mldsa_secret_key, tx_hash)   # 2,420 bytes
```

## Things to know

- **Status: Draft.** Not scheduled for any upgrade; test cases are still pending.
- **Irreversible.** Losing the ML-DSA key means losing the account. Because native-key accounts cannot run code, contract-based social recovery is not available either.
- Native-key accounts cannot use EIP-7702 code delegation (batching, sponsorship logic) or send blob transactions. The authors leave combined designators to future EIPs.
- An authorization with `chain_id = 0` can be replayed by anyone on any EVM chain. Use the specific chain ID unless multi-chain setup is intended.
- Clients must implement ML-DSA-44 verification with identical strictness; divergence would split the chain.
- For a broader account-abstraction approach that also supports alternative signatures, see the frame transaction proposal [EIP-8141](/eip-8141/).


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8164
