Cryptographic key rotation is the practice of retiring a cryptographic key and replacing it with a new one, either on a fixed schedule, after a set amount of use, or at once when the old key may have been exposed. Banks, card processors, payment gateways, cloud providers and crypto custodians rotate the keys that encrypt stored data, protect network connections, sign messages and secure PINs. The aim is to limit how much information any single key protects and how long an attacker could use it if it were stolen.
Rotation is one stage in the key management lifecycle, which also covers generating, distributing, storing, backing up, revoking and destroying keys. Standards set the expectations: the US National Institute of Standards and Technology (NIST) gives guidance on how long keys should be used in its Special Publication 800-57, and the PCI DSS requires firms that store card data to change keys at the end of a defined cryptoperiod and whenever a key's integrity is in doubt.
Cryptographic key rotation in plain terms
Imagine an office building that changes its door codes every few months, and immediately whenever an employee leaves on bad terms. Nobody has proof the old code leaked, but over time codes get shared, written on sticky notes and overheard. Changing them on a routine means a leaked code only works for a short while.
Key rotation applies the same habit to the secret numbers that lock digital information. A company swaps its old key for a new one at regular intervals. Anything new is locked with the new key, and older material is either relocked with the new key or kept readable only for as long as it is needed. If someone ever steals a key, it opens only a slice of the data rather than everything the company has ever stored.
Why keys are rotated
- Limiting exposure. The less data encrypted under one key, the less is lost if that key is compromised, and the less material an attacker has for cryptanalysis.
- Containing undetected compromise. A key can leak without anyone noticing, through a data breach, a misconfigured server or an insider. Regular rotation caps how long such a leak stays useful.
- Staff and supplier changes. Keys that people have handled, or that a former vendor had access to, are replaced when those people or contracts change.
- Compliance. Card scheme rules, PCI standards, banking supervisors and security audits expect documented cryptoperiods and evidence that keys were changed.
- Algorithm ageing. Rotation is also the moment to move to stronger algorithms or longer keys, for example as firms prepare for post-quantum algorithms such as those NIST published as FIPS 203, 204 and 205 in 2024.
How rotation works
Most systems use a key hierarchy. Data is encrypted with data encryption keys, and those keys are themselves encrypted ("wrapped") with a key encryption key, often held inside a hardware security module or a cloud key management service. This design, known as envelope encryption, makes rotation practical: replacing the top-level key means re-wrapping the small data keys rather than re-encrypting terabytes of stored records.
A typical rotation follows a sequence:
- A new key version is generated inside a secure device and given an identifier.
- Systems begin using the new version for all new encryption or signing.
- The old version is kept for decryption or signature checking only, while stored data is re-encrypted if policy requires it.
- Once nothing depends on it, the old key is revoked and securely destroyed, and the event is logged.
Payments have specialised schemes. Card terminals often use Derived Unique Key Per Transaction (DUKPT), defined in the ANSI X9.24 standard, under which every transaction uses a fresh key derived from a base key, so the PIN in one transaction cannot be used to unlock another. Zone keys shared between acquirers, processors and networks are changed under dual control, with no single person seeing a full key.
Rotation for different kinds of keys
Symmetric keys that encrypt databases and files are rotated by re-wrapping or re-encryption. Asymmetric key pairs, made of a public key and a private key, are rotated by issuing new certificates. The certificates used for Transport Layer Security (TLS) are becoming shorter-lived: the CA/Browser Forum agreed in 2025 to cut the maximum validity of public TLS certificates in stages to 47 days by March 2029, which makes automated rotation close to mandatory. API credentials, including the keys that fintech apps use with an application programming interface, are rotated by issuing a second key, moving traffic to it and then revoking the first.
Blockchain keys are the awkward case. A wallet address is derived from its key, so "rotating" a crypto custody key means moving the assets to a new address controlled by a new key, which costs network fees and needs careful planning. Custodians that use multi-party computation (MPC) wallets can often refresh the key shares without changing the address.
Risks and practical problems
Rotation itself can cause outages. If a service is switched to a new key before every component can read it, payments fail or data appears corrupted. Old keys are sometimes deleted while backups or archives still depend on them, leaving records unreadable, which is why rotation plans are tied to the firm's data retention schedule. Manual rotation is also error-prone, so regulators and auditors increasingly expect automation, clear inventories of every key and its owner, and tested procedures for emergency rotation after a suspected compromise. Poor key management is a recurring finding in assessments of cybersecurity risk at financial institutions.