Key Management
Practices and tools to secure, rotate, and recover keys.
Key management is the complete process for generating, storing, using, backing up, rotating, revoking, recovering, and retiring cryptographic keys. In Web3, these keys may control wallets, smart contract administration, validators, APIs, code signing, encryption, or infrastructure. Strong cryptography cannot protect a system when its keys are exposed or unavailable.
The process begins with secure generation. Keys need sufficient entropy from a trusted cryptographic random source. Valuable wallet keys may be created inside a hardware wallet or institutional hardware security module. Developers should use reviewed libraries and managed services rather than inventing cryptographic code or copying production secrets between environments.
Storage should match key value and use frequency. Cold or hardware-backed systems suit treasury and administrator keys, while tightly scoped online keys may support automated services. Encryption at rest helps but only shifts protection to another key. Access controls, logs, rate limits, allowlists, and multiple approvals reduce the impact of one stolen credential.
Backups and recovery prevent permanent lockout. Copies should be accurate, offline where appropriate, physically protected, and separated from everyday devices. Multisig and distributed signing can avoid one recovery secret, but add coordination and succession needs. A backup is credible only after a controlled restoration test confirms the expected public addresses and permissions.
Rotation limits long-term exposure and handles personnel or system changes. On-chain migration can require moving assets, transferring contract roles, updating delegates, and revoking approvals. Old keys must remain protected until every dependency is verified, then be disabled or destroyed according to policy. Emergency rotation needs rehearsed steps and independent review.
Organizations should inventory keys without exposing their secrets, assign accountable owners, separate duties, and monitor every privileged action. Incident plans should define how to pause systems, replace authority, communicate, and preserve evidence. Key management matters because loss and compromise can produce identical business outcomes: assets and systems become unavailable to their rightful owners. Good practice balances confidentiality, integrity, availability, and operational simplicity.
Key reviews should also trace transitive access. A deployment key, cloud administrator, recovery guardian, or CI secret may indirectly control the same production assets. Removing a visible wallet signer does not reduce risk if an overlooked automation key can restore its permissions or upgrade the contract.
Frequently asked questions
- Use reputable hardware wallets, operating-system cryptography, or reviewed key-management systems with a trustworthy random-number source. Generate valuable wallet keys in a controlled environment and verify device authenticity. Avoid brain wallets, reused secrets, online generators, and unaudited custom scripts. Document the key's purpose and recovery method without recording the private material in an exposed inventory.
- Key rotation replaces an existing key with a new one and updates every dependent permission, address, certificate, service, or signer. It may be scheduled or triggered by suspected compromise, staff departure, or algorithm changes. Blockchain accounts cannot always rotate keys in place, so migration needs testing, staged authority transfer, monitoring, and secure retirement of the old key.
- A team policy should cover approved generation, inventory, ownership, storage, backups, access, signing, environment separation, rotation, revocation, recovery, succession, incident response, auditing, and deletion. Define multiple approvers and value limits for sensitive actions. Test recovery and staff departure procedures. The policy should name responsible roles while preventing one person from controlling an entire critical workflow.
