PQC Status
Guide

Crypto agility: definition, and how to build it into systems

Crypto agility is the ability to change cryptographic algorithms without rewriting applications, and it is built from configuration, negotiation, inventory and automation.

· 8 min

Crypto agility is the ability of a system to change its cryptographic algorithms, parameters and keys without rewriting application code and without waiting for a new product release. It is not a feature you buy: it is a set of engineering properties, mainly configuration instead of hardcoded choices, protocol level negotiation, a current inventory, clean abstraction boundaries, and automated key and certificate lifecycles. Regulators now describe the same capability in their own words, for example the DORA technical standards require an encryption policy with provisions for changing cryptographic technology as cryptanalysis develops.

What crypto agility means

A useful working definition: a system is cryptographically agile when a competent operator can swap an algorithm, a key size or a protocol version in a controlled change window, using configuration and automation that already exist, and can prove afterwards what is now in use. The test is operational, not theoretical. If changing a key exchange group means editing source code, rebuilding a container image, renegotiating with a vendor or discovering undocumented dependencies, the system is not agile, whatever its documentation claims.

Three distinctions are worth holding on to:

Configuration over code, negotiation over hardcoding

The first property is that algorithm selection lives in configuration that an operator owns, in one place per host or per service, and is reviewed like any other control. Centralized cryptographic policy beats per application flags, because per application flags are what get forgotten.

TLS: named groups and an ordered preference list

In TLS 1.3 the key exchange is a named group, negotiated per connection. The Internet Assigned Numbers Authority (IANA) registry lists the hybrid groups X25519MLKEM768 (codepoint 0x11EC), SecP256r1MLKEM768 (0x11EB) and SecP384r1MLKEM1024 (0x11ED), alongside the pure ML-KEM groups (IANA TLS parameters). ML-KEM is the key encapsulation mechanism (KEM) standardized by NIST in FIPS 203 on 13 August 2024. RFC 10024 (August 2026) specifies post-quantum traditional hybrid key agreement for TLS 1.3.

An agile configuration states an ordered preference and keeps a classical fallback, so that a client which does not support the hybrid group still connects. OpenSSL 3.5 or later is required for the ML-KEM groups:

# /etc/ssl/openssl.cnf (OpenSSL 3.5 or later)
openssl_conf = default_conf

[default_conf]
ssl_conf = ssl_sect

[ssl_sect]
system_default = system_default_sect

[system_default_sect]
Groups = X25519MLKEM768:X25519:P-256
MinProtocol = TLSv1.2

Verify from the outside before and after any change, with a read only test:

# read-only test: does the server accept the hybrid group?
openssl s_client -groups X25519MLKEM768 -connect example.com:443 < /dev/null 2>/dev/null | grep -i 'Negotiated TLS1.3 group'

At the web server layer the same preference is one directive, for example ssl_ecdh_curve X25519MLKEM768:X25519; in nginx built against a suitable OpenSSL. Our guide to enabling ML-KEM on nginx, Apache, HAProxy and Caddy gives the per product syntax and the version minimums. Test in staging first, and keep the fallback group.

SSH: the same pattern, already shipped

OpenSSH is a good model of agility in practice. Version 9.0 (8 April 2022) made a hybrid key exchange the default. Version 9.9 (19 September 2024) added mlkem768x25519-sha256. Version 10.0 (9 April 2025) made it the default key agreement, and 10.1 (6 October 2025) warns when a connection negotiates a non post-quantum key agreement, through WarnWeakCrypto, enabled by default (OpenSSH release notes). Operators who had expressed preferences in configuration inherited the change; those who had pinned one algorithm in scripts did not.

# list what this client supports, then set an ordered preference
ssh -Q kex

# /etc/ssh/sshd_config (OpenSSH 9.9 or later), classical fallback last
KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512@openssh.com,curve25519-sha256

Inventory, abstraction and automation

An inventory you can query, not a spreadsheet you rewrite

You cannot change what you cannot list. An inventory earns its place when it answers a question in minutes: which services still negotiate a classical only key exchange, which certificates use which signature algorithm, which libraries provide the primitives, and who owns each. Record at least the asset, the protocol and version, the algorithms and key sizes, the purpose, the owner, the library or module version, and the renewal mechanism. A cryptographic bill of materials (CBOM) is one machine readable way to hold this; see what a CBOM is. Treat the CBOM as our suggested practice rather than a legal requirement.

Abstraction layers that hide the algorithm

Application code should ask for a capability, not a name. Four patterns carry most of the benefit:

Keys and certificates that rotate without a human

Rotation you perform once a year by hand is not a control, it is a rehearsal you will fail. Automated issuance and renewal, short certificate lifetimes, and an alert on an unrenewed certificate are what make an algorithm change routine: when the signature algorithm changes, the pipeline simply issues different certificates. Rotation drills belong in the change calendar. Stateful hash-based signatures (LMS and XMSS, standardized in NIST SP 800-208) are an exception that proves the rule: their state handling makes naive duplication of a signing key unsafe, so they need deliberate key management rather than generic automation.

Where regulation asks for agility, and what evidence fits

Several texts require the capability without using the phrase. The table separates what each text literally says from how we suggest evidencing it. This is information, not legal advice: confirm your own obligations with your counsel or supervisor.

SourceWhat the text requiresEvidence that fits (our interpretation)
DORA, Commission Delegated Regulation (EU) 2024/1774, Art. 6An encryption and cryptographic controls policy including provisions for updating or changing cryptographic technology based on developments in cryptanalysisA policy clause naming the trigger, the decision owner and the change procedure, plus the last dated review
DORA RTS Art. 7Key management across the whole lifecycle, and a register of certificates for ICT assets supporting critical or important functionsA certificate register with issuer, algorithm, expiry and owner, and renewal automation logs
PCI DSS v4.0.1 requirement 12.3.3 (mandatory since 31 March 2025)Cipher suites and protocols in use documented and reviewed at least every 12 months, with monitoring of continued viability and a documented strategy for anticipated cryptographic changesA per service cipher suite inventory, the dated annual review, and the migration plan it refers to
NIS2, Directive (EU) 2022/2555, Art. 21(2)(h)Policies and procedures regarding the use of cryptography and, where appropriate, encryptionThe same policy, mapped to national transposition
US federal: OMB M-26-15 (24 June 2026)An automated, continuously updated cryptographic inventory for agenciesTooling output on a schedule, not a manually maintained file

Read the exact wording in Regulation (EU) 2024/1774, and see our pages on DORA and PCI DSS v4.0.1 for the dated milestones. Keep the hedges straight: the EU Coordinated Implementation Roadmap v1.1 is coordinated guidance for Member States rather than a regulation binding companies, BSI TR-02102-1 is a technical guideline, ANSSI states that its post-quantum recommendations are not yet regulatory obligations outside its regulated scope, and NIST IR 8547 remains an initial public draft.

Pitfalls that quietly defeat agility

Measure what your systems negotiate today

Agility starts with an honest baseline, and the externally visible part of it is quick to obtain: scan your domain with PQC Status to see which TLS versions, cipher suites, key exchange groups and certificate algorithms your server actually negotiates. A scan describes the externally visible TLS configuration only: it is not a certification and not a compliance attestation, as our methodology page explains. The concrete next step is to take that result, record each service in your cryptographic inventory with an owner, then move algorithm selection for one service into central configuration and rehearse changing it in staging.

Frequently asked questions

What is the difference between crypto agility and post-quantum migration?

Post-quantum migration is a specific change: replacing quantum-vulnerable key exchange and signatures with standardized post-quantum algorithms such as ML-KEM and ML-DSA. Crypto agility is the capability to make that kind of change repeatedly, through configuration and automation rather than code changes. A system can complete a post-quantum migration and still be inflexible. Building agility during the migration is what makes the next change cheaper.

Does DORA require crypto agility?

The DORA technical standards, Commission Delegated Regulation (EU) 2024/1774, require in Article 6 an encryption and cryptographic controls policy that includes provisions for updating or changing cryptographic technology based on developments in cryptanalysis. Article 7 adds key management across the lifecycle and a register of certificates for ICT assets supporting critical or important functions. The text does not use the phrase crypto agility and does not name post-quantum algorithms. How you evidence the capability, for example with a cryptographic inventory, is an implementation choice, and this is information rather than legal advice.

How can we test crypto agility without breaking production?

Start with read-only checks: list what your clients and servers support, then test one negotiation from outside, for example with an OpenSSL client requesting a single group. Make configuration changes in staging first, always keeping a classical fallback after the hybrid preference so that older clients still connect. Then rehearse a rotation on a non-critical service and measure how long it takes and what broke.

Should we replace all RSA and ECDSA certificates immediately?

Key exchange comes first, because recorded traffic is protected only by the key exchange, which is the harvest now, decrypt later problem. Certificates and signatures can migrate later, once the ecosystem of clients, certificate authorities and hardware supports it. NIST IR 8547, an initial public draft, proposes deprecating quantum-vulnerable algorithms at 112-bit security after 2030 and disallowing quantum-vulnerable public-key algorithms after 2035, but it remains a draft. The practical work now is inventory, automated renewal and removing fixed size assumptions.