Skip to content
atlas

Key management

Also known as: cryptographic key management

Looking after cryptographic keys over their whole life - making, storing, handing out, changing and finally destroying them.

Draft - this entry has not been reviewed yet.

Formal

The rules, roles and tools that govern each stage of a key's life - creation from a good random source, protected storage, controlled sharing and use, planned replacement, cancelling a leaked key and destroying retired ones - including who may do each step.

In plain English

Like a building manager's key cabinet - keys are cut, numbered, signed out, changed when a tenant moves and melted down when a lock is replaced.

In practice

The IT security manager at a pension fund keeps its signing keys in sealed hardware that never lets them out, replaces them every year on a set date, and has a written plan for what to do if one is exposed.

Why it matters

Strong encryption fails the moment a key is stolen, lost or kept in use for too long, and most real failures come from careless handling of keys rather than from weak maths.

How to put it into practice

The usual steps, in order. Adapt them to your organisation.

  1. Build an inventory of all keys and certificates - encryption keys, signing keys, TLS and SSH keys, API keys and HSM or KMS keys - with owner, purpose, algorithm, location and expiry date.
  2. Write a key management policy that sets the approved algorithms and key lengths, a cryptoperiod for each key type, who may create, use and destroy keys, and how often each key is rotated.
  3. Move keys into a hardware security module or cloud KMS, generate them there from a strong random source, and remove keys from source code, configuration files and container images.
  4. Use envelope encryption, where data keys are wrapped by a master key that never leaves the KMS or HSM, and give applications permission only to use a key, not to export or delete it.
  5. Require dual control or split knowledge for the most valuable keys, such as root CA and master keys, and document every key ceremony with witnesses and logs.
  6. Turn on automatic rotation where the platform supports it, and back up decryption keys for archived data in a separate, protected place, while signing keys are not escrowed.
  7. Write and test a procedure for a leaked key - revoke it, issue a new one, re-encrypt or re-sign what is needed and tell those affected - at least once a year.
  8. Log all key use and administration, alert on unusual use and on keys close to expiry, and destroy retired keys in a documented way once no data depends on them.

Common pitfalls

  • Keeping keys on the same server or in the same repository as the data or code they protect.
  • Having no list of keys and certificates, so nobody notices when one expires or leaks until a service stops working.
  • Destroying or rotating away a key while backups or archives still depend on it, which makes that data unreadable for good.

Good guides

Technical deep dive

The reference framework is NIST SP 800-57 Part 1 Rev. 5 (May 2020). It models a key as moving through states such as pre-activation, active, suspended, deactivated, compromised and destroyed, and ties each transition to an authorised action. Central to it is the cryptoperiod: the time span during which a key may be used, split for symmetric keys into an originator-usage period (when it may protect new data) and a recipient-usage period (when it may still decrypt or verify old data). Cryptoperiods are chosen from the algorithm's strength, the volume of data protected, the exposure of the key and the cost of re-keying, not from a fixed calendar rule.

Architecturally, almost every large system uses a key hierarchy with envelope encryption. Data is encrypted with data-encryption keys (DEKs), which are stored alongside the data only in wrapped form, encrypted under a key-encryption key (KEK) that never leaves a hardware security module or cloud KMS. Rotating the KEK then means re-wrapping small DEKs rather than re-encrypting terabytes, and destroying a KEK renders all data under it unrecoverable, which is the basis of crypto-shredding for deletion. HSMs are validated under FIPS 140-3 (security levels 1 to 4, levels 3 and 4 adding physical tamper response and identity-based authentication), and applications reach them through PKCS#11, KMIP (OASIS) or a cloud provider API. Cloud variants range from provider-managed keys through customer-managed keys to BYOK and hold-your-own-key models, differing in who can technically use the key, which matters for GDPR transfer assessments and sovereignty requirements.

Controls for high-value keys include split knowledge and dual control (no single person can reconstruct or use the key, often implemented as M-of-N key shares, for example with Shamir secret sharing), documented key ceremonies with witnesses and video for CA root keys, separation of the key custodian role from system administration, and tamper-evident audit logs of every use. Backup and escrow must be designed explicitly: a signing key should generally not be escrowed, since copies weaken non-repudiation, whereas a decryption key for archived data must be recoverable or the data is lost.

Audits usually map these practices to ISO/IEC 27001:2022 Annex A control 8.24 (use of cryptography), which expects rules for the whole key life cycle, and to PCI DSS requirement 3 for cardholder data. Frequent real-world failures are keys hard-coded in source code or container images, keys stored on the same host or volume as the data they protect, no inventory of which keys and certificates exist (so nobody notices when one expires or leaks), and no tested procedure for emergency rotation. The post-quantum migration has made a cryptographic inventory a key-management task in its own right. Key management is broader than secrets management: the latter stores and distributes credentials to workloads, while key management governs generation, strength, lifetime and destruction.

What to learn first

Everything this builds on, foundations first.

  1. Cryptographic key
  2. →Encryption
  3. →Key management

Relationships

Mitigates
Data breach

Sources & further reading

Where this data comes from

This entry was drafted by an AI from the sources above and has not yet been checked by a person. Treat it as a starting point, and check anything important against the sources.

See the review queueSuggest a correction on GitHubThis term as JSON

Check yourself

Loading…

Atlas is in beta.