← Cryptography learning pathCryptography · Module 9 of 10
Key management
Protect, rotate and control cryptographic keys.
📖 Key ideas
- Keys must be generated securely with strong randomness.
- Store keys in KMS, HSMs or secret managers, not in code.
- Rotate keys regularly and on suspected compromise.
- Limit who and what can use keys.
- Back up keys securely; losing a key can lose data.
💡 Real-life example: Key management is a bank locker policy: who holds keys, how they're stored, and when locks are changed.
KMSKey Management Service
HSMHardware Security Module
Key rotationReplacing keys periodically
Envelope encryptionData key encrypted by a master key