What does it mean to test crypto agility?
Crypto agility is the capability to replace and adapt cryptographic algorithms while preserving security and ongoing operations. That is how NIST CSWP 39upd1 defines the term, and it applies to protocols, applications, software, hardware, firmware and infrastructure alike. Before a planned algorithm change reaches production, an engineer has to show two things: that the new algorithm works end to end, and that the system can be rolled back to the previous state if it does not. Testing an algorithm swap means proving both of those behaviors, not just that the code compiles or that a handshake succeeds once in a lab.
This page is written for QA leads, engineers and architects who own that proof. It covers only the testing: what to exercise, what result to expect, and what evidence to keep. It does not cover the design patterns that keep algorithm choices out of application code, the cryptographic inventories that show where algorithms are used, or the policy that decides who approves a change. Those topics are handled in their own sections, and this page assumes the swap is already designed.
Because the failure modes are often silent, the test plan should name expected results explicitly. For negotiated protocols, RFC 7696 says algorithm negotiation SHOULD be integrity protected, and otherwise the protocol is open to a downgrade attack, which gives a concrete test target: confirm that a removed or weakened algorithm is refused rather than quietly accepted. For SSH, RFC 4253 defines the expected result when client and server share no algorithm in a name-list category: the connection fails and both sides MUST disconnect. A swap test should confirm that exact behavior when an algorithm is removed on one side. For rollback, the test must show that the previous configuration can be restored and that old but valid artifacts are not accepted as new ones; RFC 9019 describes that case for firmware manifests.
Keep the results as evidence. Record which versions, builds and configurations were tested, the expected and observed alerts or disconnects, and the rollback steps that were run. Ask your vendors and open-source maintainers which versions they have tested together, and confirm interoperability for the exact versions you run rather than assuming that two algorithm names mean the same behavior on both sides.
Which test targets do the sources describe?
This table lists each test target the sources describe, the document it comes from and the result a test should observe when the target is exercised. Use it to build test cases for algorithm negotiation, deprecated version rejection, and firmware rollback. Confirm the exact behavior against the versions and implementations you run, since the sources define the expected result and not how your product handles it.
| Test target | Source document | Expected observable result |
|---|---|---|
| Negotiated algorithm integrity against downgrade | RFC 7696 | Algorithm negotiation is integrity protected, so a tampered suite list is not accepted without detection |
| TLS 1.3 downgrade sentinel | RFC 8446, section 4.1.3 | A TLS 1.3 client that sees the TLS 1.2 or TLS 1.1 or lower sentinel in ServerHello Random aborts with illegal_parameter |
| TLS 1.0 and 1.1 rejection | RFC 8996 | A party receiving TLS 1.0 or 1.1 version values sends protocol_version and closes the connection |
| MD5 and SHA-1 signature rejection | RFC 9155 | A TLS 1.2 endpoint receiving MD5 or SHA-1 signature hashes aborts with illegal_parameter |
| SSH disconnect when no common algorithm exists | RFC 4253 | When client and server share no algorithm in a category, the connection fails and both sides disconnect |
| Non post quantum key agreement warning | OpenSSH 10.1 release notes | The client warns when a connection negotiates a key agreement algorithm that is not post quantum |
| ML-KEM alert behavior | RFC 10024 | A server aborts with illegal_parameter on a failed encapsulation key check, and ML-KEM decapsulation failures produce internal_error |
| Firmware rollback | RFC 9019 | A device presented with an old but valid manifest and firmware does not install it |
How do the test targets show up in real systems?
Each test target is an observable result on a running system: a handshake that aborts, a connection that fails, a warning a client shows, an alert an endpoint sends, a build that lists its algorithms, or an update that refuses an old image. Testers can check these results directly, so each card names the source that defines the expected behavior.
Downgrade sentinel abort in TLS
A TLS 1.3 client that receives the downgrade sentinel in the last 8 bytes of ServerHello Random must abort the handshake with an illegal_parameter alert. The sentinel is 44 4F 57 4E 47 52 44 01 for TLS 1.2 and 44 4F 57 4E 47 52 44 00 for TLS 1.1 or below. A test should force a downgraded server response and confirm that the client aborts rather than completing the handshake. Check that the abort happens, not only that the connection succeeds.
RFC 8446 textSSH failure with no shared algorithm
When client and server share no algorithm in a name-list category, RFC 4253 says the SSH connection fails and both sides MUST disconnect. This defines the expected result when an algorithm is removed from one side. A swap test should remove the algorithm on one end and confirm that the connection fails in both directions, with no silent fallback to a weaker option. Confirm that both sides disconnect.
RFC 4253 textClient warning for non-PQ key exchange
OpenSSH 10.1 added a client warning when a connection negotiates a key agreement algorithm that is not post-quantum. This warning is visible output a test can capture. A test should configure a server that offers only classical key exchange and confirm that the client prints the warning, and then offer a post-quantum option and confirm that the warning does not appear. The warning shows what was negotiated, so check the negotiated algorithm itself, not only the presence of the message.
OpenSSH release notesRequired alerts for failed ML-KEM operations
The IETF draft for ECDHE with ML-KEM in TLS sets the alerts an endpoint must send when a key exchange step fails. A server must abort with illegal_parameter if the encapsulation key check fails. A client must abort with illegal_parameter on a wrong ciphertext length. Other decapsulation failures must produce an internal_error alert. Tests should inject each malformed input and check the exact alert code. This draft is not final, so confirm the current version before relying on it.
RFC 10024Algorithm list in provider builds
The oqs-provider README advises checking enabled algorithms with openssl list commands because liboqs and OpenSSL builds can differ. A test can run those commands on each build and compare the output against the algorithms the configuration expects. The README also says OpenSSL 3.5 and later include native ML-KEM, ML-DSA and SLH-DSA, and that oqs-provider disables any algorithm the default provider already implements. Compare the list on every build, not only on the reference build.
oqs-provider READMERollback refusal for old valid images
RFC 9019 says a device that receives an old but valid manifest and firmware must not be tricked into installing it. An update test should load an earlier signed image, which is valid but older than the installed version, and confirm that the device refuses it. Include a case where the old image was signed with a previously trusted algorithm, since algorithm changes often make old images look valid. The refusal is the result to verify.
RFC 9019 textWhat do the protocol standards already require a test to check?
Algorithm agility is the property that a protocol can move from one algorithm suite to another without a redesign. RFC 7696, the IETF's BCP on cryptographic algorithm agility, defines it that way and recommends that algorithm negotiation be integrity protected, because an unprotected negotiation leaves the protocol open to downgrade attacks. For a QA lead, that gives a concrete first test target: when an algorithm is changed or removed, the test should confirm that an attacker who strips or alters the negotiation cannot force the weaker choice. The standard does not spell out the test itself, so the team has to design it from the negotiation rules in the protocol specification.
The protocol specifications already define what a failed negotiation looks like, and a test should assert that result rather than invent one. In TLS 1.3, a client that sees the downgrade sentinel in the ServerHello Random (defined in RFC 8446, section 4.1.3) must abort with an illegal_parameter alert. RFC 9155 requires a TLS 1.2 endpoint to abort with illegal_parameter when it receives MD5 or SHA-1 signature hashes in ServerKeyExchange or CertificateVerify. RFC 8996 requires a protocol_version alert and a close when TLS 1.0 or 1.1 version values are received. For SSH, RFC 4253 says that if client and server share no algorithm in a name-list category, both sides MUST disconnect. For ML-KEM key agreement in TLS, the draft defines illegal_parameter for a failed encapsulation key check or wrong ciphertext length, and internal_error for other decapsulation failures. Each of these gives a pass or fail condition for a removal or swap test.
The sources listed on this page do not define a general test suite for algorithm swaps. They give the expected results for specific protocol conditions, but they do not say how to exercise a whole system through a swap and roll back. Teams should confirm each expected alert or disconnect against the exact protocol version and library they run, because implementations can differ in alert choice and behavior. The most direct check is a negative test that removes an algorithm on one side and verifies the connection fails with the specified result, followed by a positive test that confirms the agreed suite still works. Anything beyond that, such as rollback and performance measurement, has to be designed by the team against its own environment.
What do QA leads, engineers and architects each test?
QA leads focus on negative and downgrade cases: what happens when a peer offers a weaker algorithm, when an algorithm is missing, or when the handshake is tampered with. RFC 7696 says algorithm negotiation SHOULD be integrity protected, and otherwise the protocol is open to downgrade attacks, which gives a clear test target for any negotiated change. Tests should confirm that the expected alert is sent, not just that the connection fails.
- Downgrade sentinel: In TLS 1.3, a client that sees the downgrade sentinel in the last 8 bytes of ServerHello Random must abort with an illegal_parameter alert, as RFC 8446 section 4.1.3 requires.
- Deprecated versions: Confirm that TLS 1.0 and 1.1 values produce a protocol_version alert and a close, per RFC 8996.
- Weak signature hashes: Confirm that MD5 or SHA-1 signature hashes in a TLS 1.2 handshake trigger an illegal_parameter abort, per RFC 9155.
- No shared algorithm: For SSH, confirm that a removed algorithm with no overlap causes both sides to disconnect, as RFC 4253 defines.
- Alert codes: Record the exact alert returned for each case in the test report so failures can be matched to the spec.
Check that every negative case in the plan maps to a named alert or disconnect in a cited RFC.
Engineers test interoperability: whether the builds and providers on each side actually support the same algorithms, and whether a swap works end to end. The oqs-provider README advises checking enabled algorithms with openssl list commands because liboqs and OpenSSL builds can differ. Its documentation also says the provider is meant for research and prototyping and does not recommend production use, so builds should be verified rather than assumed.
- Enabled algorithm lists: Run the openssl list commands on every build in the test matrix and save the output as evidence.
- Build pairing: Test the liboqs and OpenSSL versions together, since the oqs-provider README notes that the two can differ in what they support.
- Native versus provider: The oqs-provider README says OpenSSL 3.5 and later include native ML-KEM, ML-DSA and SLH-DSA, and that the provider disables algorithms the default provider already implements. Confirm which path each build uses.
- Observable client behavior: OpenSSH 10.1 added a client warning when a connection uses a non post-quantum key agreement algorithm. Include this message in automated checks.
- Code point match: Compare the code points and OIDs in ALGORITHMS.md with what each peer negotiates.
Confirm the exact versions in use with the vendor documentation before relying on any result.
Architects test rollback paths and confirm that crypto agility is considered for each implementation environment. NIST's Crypto Agility project page says it must be considered for each specific environment, and NIST CSWP 39upd1 defines it as the capability to replace and adapt algorithms while preserving security and ongoing operations. The rollback test answers whether the system can return to the previous algorithm set without breaking operations.
- Rollback path: Test reverting to the previous algorithm configuration in each environment, not only the swap forward.
- Environment scope: Test each deployment model separately, such as single node, high availability, Kubernetes and air-gapped, because the constraints differ.
- Old but valid material: RFC 9019 says a device presented with an old but valid manifest and firmware must not be tricked into installing it, which is a rollback case for update testing.
- Long-lived systems: The NCCoE SP 1800-38A page notes that earlier efforts to replace installed cryptography took many years, which is the reason it gives for planning early.
- Dependencies: Map which components must change together, so a rollback does not leave one side on an unsupported algorithm.
Check the architecture against the current NIST guidance for each environment, and record the decision in the design record.
Governance readers need to see how test results feed the decision to approve a change. Test evidence should be tied to a specific change request so that approvers can see what was verified, in which environment, and against which version. NIST IR 8547 was published as a Final on 27 October 2026 and supports Executive Order 14412 and OMB Memorandum M-26-15, which gives the policy context for planning the transition.
- Evidence package: Each change request includes the negative test results, interoperability lists and rollback results for the environments affected.
- Gate criteria: Define in policy what must pass before approval, such as no unexpected alerts and a tested rollback.
- Recorded exceptions: Any failed or untested case is logged with a named owner and a risk decision.
- Retest on change: Require retesting when a library, provider or protocol version changes.
- Traceability: Link each test result to the algorithm inventory entry it covers.
Confirm the approval criteria with your legal and compliance owners, since the sources here describe the technical checks rather than your obligations.
How does a test move from a planned swap to a verified rollback?
The flow starts when a planned algorithm change is recorded and the inventory of enabled algorithms is checked against it. The change then passes an interoperability test, a downgrade and alert check, and a performance check, with a rollback test after that. Any failed check returns the change to planning, and each result is recorded as evidence. Each hand-off should be confirmed against the versions and builds your environment runs, because the sources note that liboqs and OpenSSL builds can differ.
The verification path from a planned algorithm swap to recorded rollback evidence.
How should a team start testing an algorithm swap?
The sequence below moves from confirming what each build actually contains to proving that a swap can be negotiated, interoperated, measured and reversed, with a written record at each stage. Each step closes with an artifact the team can hand to reviewers. The sources listed here describe these checks in general terms, so the exact commands and expected values should be confirmed against the versions your systems run.
Confirm the implementation environment
Start by recording exactly which library, provider, protocol stack and build each system uses, including the version and any patches. The OQS oqs-provider documentation notes that liboqs and OpenSSL builds can differ, so the team should not assume two environments behave the same. Confirm the environment with the vendor's documentation or your own build output. The artifact is an environment manifest listing each component and version for every test target, which later steps reference.
List enabled algorithms in each build
For each build in the manifest, list the algorithms that are actually enabled rather than the ones the documentation says are available. The oqs-provider README advises checking enabled algorithms with OpenSSL list commands, since availability depends on the build. Compare the lists across builds to find gaps before any negotiation test runs. The artifact is an algorithm inventory per build, with differences between builds marked and explained.
Write downgrade and alert negative tests
Write tests that try to force a weaker or unsupported algorithm and check that the peer refuses. RFC 7696 says negotiation should be integrity protected, which gives a direct test target. For TLS 1.2 and 1.3, RFC 8446 defines the downgrade sentinel and requires an illegal_parameter abort, and RFC 9155 requires an abort when MD5 or SHA-1 appears in signature hashes. For SSH, RFC 4253 says both sides must disconnect when no algorithm is shared. The artifact is a set of negative test cases, each citing the RFC clause it checks and the alert or disconnect it expects.
Run interoperability tests across versions
Test each pairing of software versions that will coexist during the swap, including older clients talking to newer servers. Check that the handshake completes where both sides share an algorithm and fails with the expected alert where they do not. The oqs-provider documentation says it is intended for research and prototyping and does not recommend production use, so results from it should not be read as production assurance. The artifact is an interoperability matrix recording each version pair, the algorithm negotiated and the outcome.
Measure handshake and performance behavior
Measure handshake time, message sizes and resource use for the old and new algorithm suites under realistic load in your own environment. Record the figures against the same hardware and configuration so the comparison is fair. Do not quote figures from this page or from vendor material as expected values for your system; use only the measurements your team takes. The artifact is a benchmark record for each suite, with the hardware, configuration and load profile stated next to each number.
Test rollback to the prior suite
Confirm that the system can return to the prior algorithm suite without a rebuild or data loss, and that the rollback does not reopen a weaker option. RFC 9019 describes a rollback case for updates, where an old but valid firmware image must not be installed, which is a useful pattern for checking that an older suite is not silently reinstated. Test the rollback path in each environment from the manifest. The artifact is a rollback test report that states the starting state, the steps taken and the final negotiated suite.
Record results and plan the next cycle
Collect the outputs of the earlier steps into one record that shows what passed, what failed and what was not tested. Include the manifest, inventory, test cases with their RFC references, the interoperability matrix, benchmarks and rollback report. NIST's NCCoE SP 1800-38A page notes that earlier efforts to replace installed cryptographic technologies took many years, which is a reason to start this planning early and keep the record current for later cycles. The artifact is a dated test report with an open-issues list that the next swap can start from.
What should a team ask vendors to demonstrate?
The sources point to a short set of checks a team can put to any vendor before trusting an algorithm swap. Each question below is a prompt for evidence, not a claim that any particular product meets it.
Documented algorithm identifiers and code points
Ask the vendor to show where each algorithm is identified in the protocol or data format, including the code points and object identifiers it uses. RFC 8446 defines TLS SignatureScheme values, and the oqs-provider README points to ALGORITHMS.md for its interoperability code points and OIDs. Check that the identifiers in the vendor's documentation match what your peers expect, and that they are published, not inferred from behavior. Confirm the values for the exact versions you run.
oqs-provider docsEnabled algorithms in each build
Ask which algorithms are enabled in each shipped build, not only which ones the product supports in principle. The oqs-provider README advises checking enabled algorithms with openssl list commands because liboqs and OpenSSL builds can differ. Request the output of the vendor's equivalent listing for the build you intend to deploy, and ask how the list changes between builds.
Alert behavior for failed checks
Ask what the system does when a negotiation or key check fails. RFC 8446 requires a TLS 1.3 client that sees the downgrade sentinel to abort with an illegal_parameter alert, and RFC 4253 requires SSH peers with no shared algorithm to disconnect. The draft for ECDHE with ML-KEM defines separate alerts for different decapsulation failures. Ask the vendor to show each failure case and the alert it produces, so your tests can assert on them.
RFC 8446 textSupported version boundaries
Ask where the vendor's support for each protocol version starts and ends. RFC 8996 deprecates TLS 1.0 and 1.1, and RFC 9155 forbids MD5 and SHA-1 signatures in TLS 1.2. The oqs-provider README states that versions before OpenSSL 3.5 are no longer tested. Request the vendor's written boundaries and check that a version outside them is rejected in your environment, not only documented as unsupported.
RFC 8996 textRollback behavior of firmware and updates
Ask how the vendor's update mechanism handles a rollback to an older image. RFC 9019 says a device presented with an old but valid manifest and firmware must not be tricked into installing it. Ask the vendor to describe how it prevents that, and what happens to cryptographic configuration when a rollback is blocked or allowed. Plan a test that attempts the rollback in a controlled environment and records the outcome.
RFC 9019 textWhat do these tests not prove?
A passing test shows that a defined behavior occurred in a tested build, with the tested versions, configuration and algorithms. It does not show that a product is compliant, certified or quantum-proof. Certification comes from an accredited body, and a passing run in a lab says nothing about a different build, a different OpenSSL version or a different deployment. A test report should name the exact component version, provider and configuration it covered, so that a reader can see what was and was not exercised. Before any result is quoted to an auditor, customer or security review, confirm that the tested artifact is the one in production.
The oqs-provider project is a useful example of a test target with explicit limits. Its README says the provider is meant for research and prototyping and does not recommend production use. The README also says that versions before OpenSSL 3.5 are no longer tested, and that OpenSSL 3.5 and later include native ML-KEM, ML-DSA and SLH-DSA, with oqs-provider disabling any algorithm the default provider already implements. A team that uses oqs-provider in a test harness should record that its results cover prototype behavior, and should confirm which OpenSSL and liboqs versions it runs and whether the algorithms it exercises are the native ones or the provider's own.
The sources listed on this page do not describe how a crypto agility test suite should be structured, including how to order interoperability, performance and rollback tests or how to split them across environments. Teams should decide that structure themselves and check it against the standards and vendor documentation for each protocol they run, such as the RFCs and release notes cited above. Any structure they choose should be written down so that the same checks can be rerun after each algorithm change.
What do teams ask about testing crypto agility?
What is crypto agility testing?
Crypto agility testing checks that a system can replace its cryptographic algorithms and still work, and that it can return to the previous state when needed. NIST's CSWP 39upd1 defines crypto agility as the capabilities needed to replace and adapt cryptographic algorithms in protocols, applications, software, hardware, firmware and infrastructures "while preserving security and ongoing operations." A test therefore has two parts: the swap itself must succeed, and the system must keep operating securely during and after it. NIST CSWP 39upd1 describes the broader strategies. RFC 7696 frames the goal as a protocol being able to "easily migrate from one algorithm suite to another," which gives you a concrete pass condition to test against.
Does a small team need crypto agility testing?
Any team that negotiates or configures algorithms needs some form of this testing, though the depth scales with how many systems depend on those algorithms. A small team with one service and a short list of cipher suites can cover the essentials with a handful of interoperability checks and a rollback test. A larger estate with many protocols, devices and vendors needs a repeatable test suite. NIST's NCCoE notes in SP 1800-38 that earlier efforts to replace installed cryptographic technologies took many years, which is why planning early matters regardless of size. Ask your own team which algorithms are in use, and start with those.
What does a downgrade test check?
A downgrade test checks that an attacker cannot force two parties to agree on a weaker algorithm than they both support. RFC 7696 states that if algorithm negotiation is not integrity protected, the protocol is subject to a downgrade attack, so this is the core security property to verify. In TLS 1.3, RFC 8446 section 4.1.3 defines a downgrade sentinel in the last 8 bytes of the ServerHello Random, and a TLS 1.3 client that sees the TLS 1.2 or TLS 1.1 sentinel must abort with an illegal_parameter alert. A test can tamper with the negotiation and confirm the connection fails instead of quietly accepting the weaker option. Confirm the exact behavior for the versions you run against the RFCs and your library documentation.
How is rollback tested?
A rollback test confirms that a system can return to a previously working algorithm or configuration without losing service or accepting an older, invalid state. Three checks cover most cases:
- Reverting the configuration to the prior algorithm set and confirming connections still establish.
- Confirming that protocol versions and algorithms deprecated by policy are refused, as RFC 8996 requires for TLS 1.0 and 1.1.
- For firmware or software updates, confirming that an old but valid manifest and image are not installed, the case RFC 9019 describes.
Record the expected alert or error for each case, since RFC 4253 says that when client and server share no algorithm in a category, both sides must disconnect. Your rollback test should expect that outcome when a rolled-back algorithm is removed on one side.
What should I ask a vendor about crypto agility testing?
Ask what algorithms their product negotiates, whether those negotiations are integrity protected, and which alerts or errors the product returns on failure. Request their test evidence for downgrade protection and rollback, and ask which protocol versions they refuse by default. For open-source components, ask which build and test workflow they use. The oqs-provider project, for example, documents build and test scripts and advises checking enabled algorithms with openssl list commands, because liboqs and OpenSSL builds can differ. Ask the vendor to confirm the same for their builds. Ask for the version and configuration each claim applies to, since behavior differs between releases.
Should we test crypto agility in-house or get outside help?
Test in-house where your team already runs interoperability and regression tests and has the protocol knowledge to read the RFCs and alert codes. Consider outside help when the environment is large or heterogeneous, when devices or firmware cannot be easily reconfigured, or when you need an independent view for compliance evidence. DeployOpen offers security testing of applications, APIs, cloud and infrastructure, and can design a test plan and run it against your environment under a written, fixed scope. DeployOpen does not issue audit reports or certifications; independent auditors and certification bodies do that work. Decide based on your team's capacity and the risk of the systems in scope.
How do we know an algorithm swap actually worked?
A swap works when the new algorithm establishes connections, the expected observable result appears, and no weaker option remains accepted. Define the checks before the change. For example, OpenSSH 10.1, released 6 October 2025, added a client warning when a connection negotiates a non post quantum key agreement algorithm, so a test can confirm that warning appears or does not appear as your policy requires. For TLS, RFC 9155 requires a TLS 1.2 endpoint to abort when it receives MD5 or SHA-1 signature hashes in ServerKeyExchange or CertificateVerify, which gives a clear pass or fail check. Record results for each protocol, version and client, since a swap can work for one client and fail for another.
How DeployOpen works on this
DeployOpen tests algorithm changes in the environment where they will run, against your protocols, products and rollback path. We set up repeatable checks that show a system negotiates the new algorithm, refuses the weaker one, and recovers when a swap is reversed. Each result is written down so your team can rerun it.
How we scope
- Engagements are fixed-scope, with the systems, algorithms and test cases agreed in writing before work starts.
- We list which protocols and components negotiate algorithms in your environment, such as TLS and SSH endpoints.
- We agree the expected result for each case, including how a peer should react when an algorithm is removed.
- We confirm the versions and builds under test, since compatibility depends on what you actually run.
How we build
- We build test harnesses that attempt downgrades and check that negotiation fails safely, as RFC 7696 recommends integrity protection for it.
- We check handshake behavior against the alerts named in the relevant RFCs, such as illegal_parameter or protocol_version.
- We test interoperability between the old and new algorithm sets, and record which peers fail and why.
How we hand over
- You receive the test cases, scripts and configuration used, so your engineers can rerun them after future changes.
- Each test records the observed result, the expected result and the version tested, in a written report.
- We document the rollback procedure and show that it has been exercised, not only described.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after the initial handover.
- Retesting is scheduled when libraries, protocol versions or peer software change, since results can shift between builds.
- We help your team interpret new findings, such as client warnings about non post-quantum key agreement, and update the test suite.

