Cryptographic Agility
Definition
Cryptographic agility is the ability to swap an algorithm, a parameter set, or a key without rewriting every caller. The identifier travels with the data: in a TLS group list, a JWT header, a certificate, or a key management record. Systems that hardcode RSA or a single elliptic curve discover the cost during a migration, when the one service nobody owns is still verifying the old algorithm and cannot be rebuilt in time.
Key Takeaways
- Store an algorithm name and a key identifier beside the ciphertext or signature. Do not assume one algorithm forever.
- A negotiated protocol such as TLS 1.3 is already agile. A pinned group list that names only X25519 throws that away.
- Appliances and firmware need spare CPU, memory, and certificate space, because you may not get a second chance to change the hardware.
- Agility includes the fallback. A quiet retry from a post-quantum group back to a classical one hides the failure you meant to measure.
How It Works
- Each protected object records how it was protected, not only the bytes.
- Libraries expose a list of acceptable algorithms. Callers pass the list down instead of baking one name into application code.
- Operators can prefer a new algorithm, watch the negotiated result, and remove the old one after the long tail is gone.
- Key management keeps both generations of keys during the overlap so old documents still verify and new ones use the replacement.
Where It Is Used
- TLS clients send an ordered list of key exchange groups. Servers pick one. That list is the agility point for post-quantum hybrids.
- JWT headers carry
alg. Allowlisting the algorithms you accept is what stops a downgrade, and it is also what you edit when you add a new signature scheme. - SHA-1 lasted for years in the long tail of certificates and signatures because verifiers had the algorithm compiled in.