Concepts
Key management and HSMs
Protecting keys across their lifecycle
How it works
Key management covers the whole lifecycle: generation, distribution, storage, use, rotation, backup, revocation and destruction. A hardware security module (HSM) is tamper-resistant hardware that generates and stores keys and performs operations without exposing the key material; cloud key management services offer the same idea as a managed service. NIST SP 800-57 defines cryptoperiods (how long a key should be used) and related practices.
Strengths
- HSMs keep private keys non-exportable, so stealing a server does not steal the key.
- FIPS 140-3 validation gives independent assurance of a module's security.
- Split knowledge and dual control prevent one person from misusing critical keys.
Weaknesses and known attacks
- Strong algorithms fail if keys are hard-coded, logged, or stored next to the data they protect.
- Lost keys mean lost data; escrow and backup must themselves be protected.
- A TPM protects keys for one device; it is not a substitute for an enterprise HSM.
Use it for
- CA private keys, payment keys, database and disk master keys, code signing keys
Don't use it for
- Keys in source code or unprotected configuration files
Exam tip
Most real crypto failures are key management failures. Know HSM vs TPM, key escrow, split knowledge, dual control, rotation and secure destruction (crypto-shredding).