Crypto agility is the ability to change how a system protects confidentiality, integrity, and authenticity while preserving correct operation. It covers more than selecting a different encryption algorithm: applications may need to replace key types, signature formats, certificate chains, cryptographic libraries, or transport protocols. An agile architecture makes these dependencies visible and provides tested procedures for changing them.
Start with a cryptographic inventory. Record where encryption, signatures, key agreement, and certificate validation occur, including managed services, application libraries, external integrations, backups, and embedded clients. Identify algorithms, parameters, key owners, data retention periods, and dependencies that cannot be upgraded independently. Long-lived sensitive data deserves particular attention because an attacker can capture encrypted traffic today and attempt to decrypt it later when stronger capabilities become available.
In cloud applications, use maintained cryptographic libraries and managed key services behind well-defined interfaces rather than embedding algorithm assumptions throughout business logic. Store versioned, validated metadata identifying the ciphertext format, algorithm suite, and key reference. Protect security-relevant metadata against tampering, and enforce an explicit allowlist of acceptable algorithms. Configurability alone is not agility if an attacker can select a weak algorithm or trigger an insecure fallback.
Envelope encryption illustrates both the benefits and limits of this approach. A data-encryption key encrypts the payload, and a key-encryption key protects that data key. Where supported, rewrapping data keys can change the wrapping protection without re-encrypting every payload. Changing the payload cipher, however, generally requires decrypting and re-encrypting the data. Routine key rotation usually changes key material within the same algorithm; it does not automatically migrate ciphertext formats or replace an algorithm.
Post-quantum migration is an important application of crypto agility. A sufficiently capable quantum computer would threaten widely used RSA and elliptic-curve public-key mechanisms. ML-KEM, standardized in FIPS 203, is a key-encapsulation mechanism used to establish a shared secret from which encryption keys can be derived; it is not a bulk-data encryption algorithm. ML-DSA, standardized in FIPS 204, provides digital signatures, not encryption or key establishment. These mechanisms address different requirements and are not interchangeable. Symmetric encryption requires a separate assessment; post-quantum migration does not mean replacing every use of AES.
For example, a document-signing service can introduce ML-DSA signatures only after its verifiers understand the new public keys, signature encoding, and validation policy. AWS KMS supports ML-DSA signing keys, but creating such a key does not upgrade existing signatures or downstream verifiers. Similarly, using ML-KEM within a supported hybrid TLS exchange protects transport key establishment; it does not change the algorithm used to encrypt stored application data. Managed-service support must be evaluated separately for API transport, key operations, certificates, and service-integrated encryption.
Plan migrations as staged compatibility changes. Deploy readers or verifiers that accept the approved old and new formats, switch producers to the new format, migrate retained artifacts where necessary, and then disable the old mechanism. Define rollback boundaries without reopening prohibited algorithms, and retain old decryption keys only as long as recovery and retention requirements demand. Test larger keys and signatures, handshake sizes, latency, throughput, quotas, and client compatibility. Hybrid mechanisms can support a transition, but use standardized or provider-supported constructions rather than combining algorithms ad hoc. Agility introduces operational complexity, so evidence from canary deployments, compatibility tests, and cryptographic-use telemetry is essential.