---
{
  "title": "Key management",
  "summary": "Follow cryptographic keys from creation to retirement, including access, rotation, recovery, and the risks of deleting old keys.",
  "topic": "foundations",
  "level": "Intermediate",
  "updated": "2026-10-12",
  "units": [
    5
  ],
  "aliases": [],
  "sources": [
    {
      "title": "NIST: Cryptographic Standards and Guidelines",
      "url": "https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines"
    },
    {
      "title": "OWASP: Key Management",
      "url": "https://cheatsheetseries.owasp.org/cheatsheets/Key_Management_Cheat_Sheet.html"
    },
    {
      "title": "NIST: Key Management, SP 800-57 Part 1 Rev. 5",
      "url": "https://csrc.nist.gov/pubs/sp/800/57/pt1/r5/final"
    }
  ],
  "published": "2026-10-02",
  "editorialVersion": 2
}
---

## The key has a life beyond the algorithm

Key management governs the creation, protection, use, replacement, recovery, and retirement of cryptographic key material. An encryption algorithm can be appropriate while its keys are exposed, unavailable, or used by the wrong identities. The operational design determines who can actually decrypt data or authorize cryptographic operations.

Start by identifying a key's purpose and owner. A data-encryption key, a software-signing key, and a transport credential support different tasks. Their access rules, recovery requirements, and consequences of compromise need not be identical. [[symmetric-encryption]] and [[digital-signatures]] show two of those purposes.

## An archive that must survive staff changes

Imagine a fictional organization encrypts historical reports. One engineer creates the original key and stores it in a personal workspace. The reports remain confidential while the engineer is available, but departure or device loss can make the archive difficult to recover.

The organization redesigns the process around an accountable service owner, controlled key storage, approved decryption identities, and a tested recovery route. It records which key versions protect which reports. Recovery is now an organizational capability rather than an informal promise that one person knows where a file lives.

## Rotation does not automatically re-encrypt history

Suppose the service begins using a new key for newly written reports. Older reports may still require the earlier key or a mechanism that can unwrap their protected data keys. Deleting the old material simply because rotation completed can destroy access to valid historical records.

The team needs a documented migration and retirement plan. It should distinguish stopping new use, keeping authorized access for existing data, re-encrypting where appropriate, and finally destroying material when retention and recovery requirements permit. Those are different transitions.

## Control use as well as extraction

A managed key service or hardware-backed module can reduce some risks of direct key exposure. Nevertheless, an identity allowed to request decryption or signing may be able to misuse that capability without extracting the underlying key. Review operation permissions, administrative permissions, and audit evidence separately.

For the archive, a reporting service might require decryption for one dataset, while an administrator can change key policy. [[separation-of-duties]] can help distinguish those responsibilities. The design should also account for emergencies without making permanent broad access the default.

## Compromise changes the question

If key material may have been exposed, replacing it does not erase an attacker's earlier access. Encrypted copies and old signatures may still have consequences. The response depends on the key's purpose, the available evidence, and the systems relying on it.

For a learning exercise, draw an archive with current and historical reports. Mark each key version, the service identities that can use it, and the independent recovery dependencies. Remove one administrator and then simulate an unavailable key service. Explain which operations still work and why.

That exercise exposes hidden assumptions before an incident. The useful outcome is a lifecycle with clear ownership, limited use, recoverable data where required, and a justified retirement process, rather than a calendar reminder that says only “rotate keys.”
