Skip to content

TIP-1008: Root Key Disabling#2155

Closed
gakonst wants to merge 3 commits intomainfrom
gakonst/tip-1008-disable-root-key
Closed

TIP-1008: Root Key Disabling#2155
gakonst wants to merge 3 commits intomainfrom
gakonst/tip-1008-disable-root-key

Conversation

@gakonst
Copy link
Copy Markdown
Contributor

@gakonst gakonst commented Jan 18, 2026

Summary

This TIP proposes adding a disableRootKey() function to the AccountKeychain precompile, allowing accounts to permanently disable their root key after authorizing alternative signing keys.

Motivation

The root key (original EOA private key) currently has permanent, irrevocable control over an account. Disabling it enables:

1. Multisig Security

For DAOs/treasuries, the root key is a single point of failure. Disabling it ensures control is distributed exclusively among configured signers.

2. Post-Quantum Cryptography Migration

When PQ signature schemes are added, accounts can authorize a PQ access key and disable their vulnerable ECDSA root key—migrating to quantum-resistant crypto without changing their address.

3. Ephemeral Key Pattern (Porto-style)

Accounts created with ephemeral keys (generate → sign auth → discard) can explicitly disable the root key on-chain, providing cryptographic assurance the ephemeral key can never be reused.

4. HSM Migration

Enterprise users can migrate control entirely to HSM-backed keys, meeting compliance requirements.

Specification Highlights

  • disableRootKey() - Permanently disables root key (requires active access key to exist)
  • isRootKeyDisabled() - View function to check status
  • Protocol-level enforcement rejects root key transactions after disabling
  • Irreversible by design

Test Cases

16 comprehensive test cases covering happy paths, edge cases, and invariants.


Requested by @gakonst

Adds a new TIP proposing a disableRootKey() function for the AccountKeychain
precompile. This enables:

- Multisig accounts where root key is no longer a single point of failure
- Post-quantum cryptography migration by disabling ECDSA root key after
  authorizing a PQ-resistant access key
- Ephemeral key pattern (Porto-style) with cryptographic assurance that
  the ephemeral key cannot be reused
- HSM migration for enterprise compliance requirements

The proposal includes:
- disableRootKey() function callable only by root key
- isRootKeyDisabled() view function
- Protocol-level enforcement rejecting root key transactions post-disable
- Safety check requiring at least one active access key before disabling
- Comprehensive invariants and test cases
@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
tempo-docs Ready Ready Preview, Comment Jan 18, 2026 9:31pm

Request Review

Implementation of TIP-1008 which adds the ability to permanently disable
an account's root key.

Changes:
- Add disableRootKey(activeKeyId) function to IAccountKeychain interface
- Add isRootKeyDisabled(account) view function
- Add RootKeyDisabled event
- Add new errors: NoActiveAccessKeys, RootKeyAlreadyDisabled, RootKeyIsDisabled
- Add root_key_disabled storage mapping to AccountKeychain precompile
- Implement disable_root_key() with safety checks:
  - Only callable by root key (not access keys)
  - Requires specifying an active access key to prevent lockout
  - Irreversible once called
- Add check_root_key_disabled() internal method for handler
- Update handler to reject root key transactions when disabled:
  - Primitive signatures are rejected
  - KeyAuthorization is rejected
- Add RootKeyDisabled error to TempoInvalidTransaction
- Update Solidity interface documentation
- Add comprehensive unit tests

This enables:
- Multisig security (remove root key as single point of failure)
- Post-quantum migration (disable ECDSA after authorizing PQ key)
- Ephemeral key pattern (Porto-style account creation)
- HSM migration for enterprise compliance

Amp-Thread-ID: https://ampcode.com/threads/T-019bd2f1-7eb8-73fc-acc5-73e1083deaef
Co-authored-by: Amp <amp@ampcode.com>
- Add disableRootKey() and isRootKeyDisabled() to AccountKeychain.sol
- Add rootKeyDisabled mapping to storage layout
- Run cargo fmt on Rust files
- Run forge fmt on Solidity files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants