You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a framework for EOAs to authenticate with non-ECDSA signature schemes (Ed25519, P-256, post-quantum), including the ability to migrate an existing ECDSA EOA to an alternative key type. Inspired by EIP-8164 (Native Key Delegation for EOAs) but adapted to ev-rs's account-driven architecture.
Motivation
Post-quantum readiness: secp256k1 ECDSA is vulnerable to quantum attacks. A key migration path is needed before it becomes urgent.
Key rotation: Users should be able to migrate to a new key without changing their account identity.
Why ev-rs is well-positioned
Unlike Ethereum (where EOAs are permanently bound to secp256k1), ev-rs already separates the relevant concerns:
Concern
Current state
What it enables
SignatureVerifierRegistry
Pluggable per tx type byte
Register new verifiers without touching existing code
Domain-tagged identity
keccak256(domain_tag || payload)
New key types get new domains, coexist cleanly
authenticate() on accounts
Account code defines auth logic
Key type/migration logic lives in the account, not the protocol
Registry-based identity resolution
Address → AccountId via storage
Same AccountId can be reachable from multiple address derivations
EIP-8164 needs a new tx type and special bytecode prefix to work around Ethereum's constraints. ev-rs can do this at the account code level with a new tx envelope variant and verifier registration.
verify_signatures_parallel() already handles heterogeneous verifiers via the registry
Design decisions to make
Single envelope vs per-scheme envelopes: One new tx type 0x04 with a key-type discriminator, or separate type bytes per scheme? Single envelope is more extensible; separate types allow tighter RLP schemas.
Account identity on migration: When an ECDSA EOA migrates to Ed25519, does the AccountId change? It shouldn't — the account ID should be stable. The new key's address becomes an alias in the registry pointing to the same AccountId.
Interaction with EIP-7702 delegation: EIP-7702 lets EOAs delegate to contract code. Key delegation is orthogonal (changes how you sign, not what your account does). But if ev-rs supports both, need to define ordering: key delegation first, then code delegation? Or combined?
ZK proving cost: Ed25519 verification in a zkVM is significantly cheaper than ECDSA. If Epic: ZK Proving of the State Transition Function #4 (ZK proving) is a priority, this influences which schemes to prioritize.
Non-goals
Custom/arbitrary signature schemes at the protocol level (accounts can implement anything in authenticate() already)
Changing the Ethereum-compatible RPC surface — JSON-RPC still accepts ECDSA-signed txs as before
Multi-sig or threshold schemes at the protocol level (this is account code territory)
Summary
Add a framework for EOAs to authenticate with non-ECDSA signature schemes (Ed25519, P-256, post-quantum), including the ability to migrate an existing ECDSA EOA to an alternative key type. Inspired by EIP-8164 (Native Key Delegation for EOAs) but adapted to ev-rs's account-driven architecture.
Motivation
Why ev-rs is well-positioned
Unlike Ethereum (where EOAs are permanently bound to secp256k1), ev-rs already separates the relevant concerns:
SignatureVerifierRegistrykeccak256(domain_tag || payload)authenticate()on accountsEIP-8164 needs a new tx type and special bytecode prefix to work around Ethereum's constraints. ev-rs can do this at the account code level with a new tx envelope variant and verifier registration.
Scope
1. Signature scheme trait and registry extensions
KeyTypeenum:Secp256k1,Ed25519,Secp256r1(P-256), extensibleed25519-dalekcrate dependency for Ed25519 verificationSignatureVerifier<TxEnvelope>for Ed255190x04) or a single "multi-sig-type" envelope that carries key type + signature2. Transaction envelope extension
TxEnvelopevariant (or generic typed envelope) that carries: key type identifier, public key, signature, and standard tx fieldsTxEnvelope::decode_from()to handle the new type byteTypedTransaction::sender()derives address from the embedded pubkey3. Identity derivation for new key types
DOMAIN_EOA_ED25519_V1 = b"eoa:ed25519:v1",DOMAIN_EOA_P256_V1 = b"eoa:p256:v1"derive_ed25519_eoa_account_id(pubkey)and equivalent for P-256eoa_registry.rs) to handle new key type registrationsAccountIdis NOT derivable from different key types (domain separation guarantees this)4. Account-level key delegation (migration)
This is the EIP-8164 equivalent: an existing ECDSA EOA permanently delegates to a new key.
authenticate()verifies against the stored active key, not hardcoded ECDSA5. Bootstrap and sender resolution
SenderBootstrapinstf_traitsneeds to handle non-ECDSA account initresolve_sender_account()must work for new key type address derivations6. Gas/fee considerations
verify_signatures_parallel()already handles heterogeneous verifiers via the registryDesign decisions to make
Single envelope vs per-scheme envelopes: One new tx type
0x04with a key-type discriminator, or separate type bytes per scheme? Single envelope is more extensible; separate types allow tighter RLP schemas.Account identity on migration: When an ECDSA EOA migrates to Ed25519, does the
AccountIdchange? It shouldn't — the account ID should be stable. The new key's address becomes an alias in the registry pointing to the same AccountId.Interaction with EIP-7702 delegation: EIP-7702 lets EOAs delegate to contract code. Key delegation is orthogonal (changes how you sign, not what your account does). But if ev-rs supports both, need to define ordering: key delegation first, then code delegation? Or combined?
ZK proving cost: Ed25519 verification in a zkVM is significantly cheaper than ECDSA. If Epic: ZK Proving of the State Transition Function #4 (ZK proving) is a priority, this influences which schemes to prioritize.
Non-goals
authenticate()already)Relationship to other issues
References
ed25519-dalekcrate for Rust Ed25519 implementation