Crypto agility in protocol design: version and algorithm negotiation

Protocols carry algorithm identifiers and negotiate them, and unprotected negotiation invites downgrade attacks. This page covers what RFC 7696 and related standards specify and how to start.

On this page

What crypto agility means for protocol designers

Crypto agility is the capability to replace and adapt cryptographic algorithms while preserving security and ongoing operations, a definition given in NIST CSWP 39upd1, *Considerations for Achieving Crypto Agility: Strategies and Practices*. For protocol designers, the IETF's guidance is in RFC 7696, which defines algorithm agility as the state in which a protocol can easily migrate from one algorithm suite to another. RFC 7696 also asks protocols that use cryptography to identify the algorithm or suite in use, to specify strong mandatory-to-implement algorithms, and to keep that mandatory set small. Its guidance covers algorithm identifiers, suite selection and the mandatory-to-implement set, which are the parts of a protocol that decide how easily it can change later.

This work falls to protocol designers who decide what a protocol carries, implementers who write the code that reads and acts on those fields, and engineers who maintain protocols in production after the original design has moved on. Each group owns part of the problem. A designer who leaves no identifier for the algorithm in use forces every later change into a new protocol version. An implementer who hard-codes one algorithm in the handshake code makes a later change a rewrite. An operator who runs the protocol has to check which peers still offer which algorithms before a change can be made safely. The sources describe these as design and implementation choices, so each one should be reviewed when a protocol is designed, extended or upgraded.

Before you rely on a protocol's agility, confirm which algorithm identifiers it carries, which algorithms are mandatory to implement, and whether the algorithm selection is protected from tampering. RFC 7696 says that if algorithm selection or negotiation is not integrity protected, the protocol is subject to a downgrade attack. Check the specification and the implementation for the version you run, because the sources here describe how specific protocols handle negotiation and do not make claims about your deployment. Ask your vendors or maintainers which versions they support, and confirm that the negotiated outcome cannot be forced to a weaker option.

Which requirements the sources set for algorithm identifiers and negotiation

This table lists each requirement the sources set for identifying and negotiating algorithms, with the document that sets it and what it means for protocol designers. Read each row as a rule a protocol must meet, and check the cited section for the exact wording before you implement it. The main takeaway is that negotiation must be integrity protected, and that older algorithm identifiers are being removed from the defaults.

RequirementDocumentWhat it asks for
Algorithm or suite identifierRFC 7696Protocols that use cryptography must include a mechanism to identify the algorithm or suite in use.
Mandatory-to-implement setRFC 7696Protocols must specify strong mandatory-to-implement algorithms with stable public specifications, and the IETF should keep that set small.
Integrity protection of negotiationRFC 7696Algorithm selection should be integrity protected, because without it the protocol is open to a downgrade attack.
Signature and group negotiation in TLS 1.3RFC 8446Algorithm choices are carried in the signature_algorithms extension (section 4.2.3) and the supported_groups extension (section 4.2.7).
Downgrade sentinel in TLS 1.3RFC 8446A TLS 1.3 server negotiating TLS 1.2 or lower sets fixed bytes in the ServerHello Random, and a TLS 1.3 client must abort if it sees them in a lower-version handshake.
First-match selection in SSHRFC 4253Each side lists algorithms in preference order, the client's list is scanned for the first entry the server also supports, and the connection fails if none match.
Local algorithm names in SSHRFC 4253Local algorithm names use the name@domain syntax, and IANA-assigned names are referenced through RFC 4250.
Deprecation of TLS 1.0 and 1.1RFC 8996Negotiating TLS 1.0 is not permitted, and a party receiving TLS 1.0 or 1.1 in a hello must send a protocol_version alert and close the connection.
Retirement of MD5 and SHA-1 in TLS 1.2 signaturesRFC 9155MD5 and SHA-1 must not be used for digital signatures in TLS 1.2 or DTLS 1.2, and clients must omit them from signature_algorithms.
Crypto agility framingNIST CSWP 39upd1Crypto agility is the capability to replace and adapt algorithms in protocols and systems while preserving security and ongoing operations.

How algorithm identifiers appear in TLS and SSH messages

Both TLS and SSH carry algorithm choices as identifiers that the two sides exchange during the handshake. Each card covers one part of that exchange, from the lists a peer sends to the failure that follows when no match is found, so protocol designers and operators can see where a downgrade or a failed negotiation would come from.

Algorithm name-lists in SSH_MSG_KEXINIT

In SSH, each side sends an SSH_MSG_KEXINIT packet containing comma-separated name-lists for key exchange, host key, encryption, MAC and compression algorithms, in preference order (RFC 4253). The lists are how an SSH peer advertises what it can do before any key exchange has happened. When you review an SSH configuration, check which entries appear first in each list, because the order decides what a client or server will pick when more than one option is shared.

RFC 4253 text

Selection by first match

RFC 4253 selects the key exchange algorithm by scanning the client's list in order and choosing the first entry the server also supports. The client's preference therefore governs the outcome, not the server's. Operators who reorder algorithms on a server should confirm which side's list drives the choice for each name-list, and test that the algorithm actually negotiated is the one they intended.

RFC 4253 text

TLS extensions that carry choices

In TLS 1.3, algorithm choices travel in extensions. The signature_algorithms extension (section 4.2.3) lists the signature schemes a peer accepts, and the supported_groups extension (section 4.2.7) lists the key exchange groups it accepts (RFC 8446). Both are sent by one side and matched by the other, so a configuration change to either list changes what can be negotiated. Confirm the lists your servers and clients send, not only the defaults in a library.

RFC 8446 text

Disconnect when nothing matches

If no algorithm can be agreed, RFC 4253 requires the connection to fail, and both sides MUST disconnect. Operators planning a change to an algorithm list should expect that a peer with no overlapping entries will see a failed connection rather than a fallback. Test new lists against the clients you actually serve before removing an algorithm from a server, since an unmatched list breaks the connection outright.

RFC 4253 text

Private-use names with name@domain

Local algorithm names that are not registered with IANA follow the PRIVATE USE syntax name@domain, and RFC 4253 applies the same policy to local algorithm names as to local service names, referring to RFC 4250 for IANA-assigned names. A private name only has meaning to the parties that agree on it, so it should not be treated as interoperable with other implementations. Record any private names in your inventory and check that the peers on the other end recognize them.

RFC 4253 text

How a client and server negotiate a suite and where a downgrade can occur

The diagram starts with the client sending its ordered list of supported algorithms and suites in the ClientHello or SSH_MSG_KEXINIT, and the server choosing the first mutually supported entry. The key hand-off is the server's selection, which RFC 7696 says SHOULD be integrity protected. If the offered list and the selection are not covered by an integrity check, an attacker who can alter messages in transit can strip the stronger options and force a weaker choice, which is the downgrade RFC 7696 warns about. Check that both sides verify a transcript covering the full negotiation before the keys are used, and that legacy versions are refused outright, as RFC 8996 requires for TLS 1.0 and 1.1.

Client offers ordered suites, server selects one, and the transcript check guards against downgrade.

Why unprotected negotiation enables downgrade attacks

Algorithm selection and negotiation should be integrity protected, because an unprotected negotiation lets an attacker push both sides toward a weaker choice. RFC 7696 states that cryptographic algorithm selection or negotiation SHOULD be integrity protected, and that if it is not, the protocol will be subject to a downgrade attack. For protocol designers, the practical question is whether the messages that carry algorithm identifiers are covered by the same integrity protection as the rest of the handshake. If an attacker can alter the offered list of algorithms or versions in transit and neither side can detect it, the protocol has no way to tell a legitimate weak offer from a forged one. Designers should confirm, for each algorithm identifier their protocol carries, which message authenticates it and when that authentication is checked relative to the choice it governs.

TLS 1.3 shows one way to detect a downgrade when the negotiated version is below what the server supports. RFC 8446 section 4.1.3 requires a TLS 1.3 server that negotiates TLS 1.2 to set the last 8 bytes of its ServerHello Random to a fixed sentinel value, and to use a different sentinel when negotiating TLS 1.1 or below. A TLS 1.3 client that receives a ServerHello indicating TLS 1.2 or below must check those bytes and, if they match either sentinel, abort the handshake with an illegal_parameter alert. This gives a client a way to notice that a middlebox has forced an older version. It does not protect every negotiated choice, so teams relying on it should confirm that their TLS stack implements the check and that their own protocol extensions have an equivalent integrity mechanism.

How OpenSSH moved to a hybrid post-quantum key agreement

OpenSSH shows how a widely deployed protocol changes its key agreement without breaking existing connections. The cards below cover the two releases that made the change, the negotiation mechanism that allows it, and the checks to run against the version you operate.

OpenSSH 10.0 makes hybrid key agreement the default

OpenSSH 10.0, released 9 April 2025, uses a hybrid post-quantum algorithm by default for key agreement. A hybrid combines a classical key exchange with a post-quantum one, so the session key remains protected if either component holds. For protocol designers, the notable point is that the default changed in a shipped release rather than through a new protocol version. Operators should confirm in the OpenSSH release notes which algorithm names apply to their version, since the default set and naming can differ across releases. Clients and servers that negotiate with older peers will fall back to a mutually supported algorithm, so inventory which peers still lack the new names before assuming every session uses the hybrid.

OpenSSH release notes

OpenSSH 10.1 warns on non post-quantum exchange

OpenSSH 10.1, released 6 October 2025, added a client warning when a non post-quantum key agreement algorithm is negotiated. The warning makes the fallback visible to users and administrators without blocking the connection, so existing workflows keep working while exposure becomes auditable. Security teams can use these warnings as a signal to find servers, scripts and automation that still negotiate classical-only exchange. Treat the warning as an inventory input: collect the hostnames that trigger it, then decide whether each one is upgraded, isolated or accepted with a documented risk owner. Check the 10.1 entry in the release notes for the exact conditions under which the warning appears.

OpenSSH release notes

Name-list negotiation makes the change possible

SSH negotiates algorithms through the SSH_MSG_KEXINIT packet, where each side sends comma-separated name-lists in preference order for key exchange, host keys, ciphers, MACs and compression. The client's list is scanned for the first entry the server also supports, so adding a new key exchange name lets updated peers agree on it while older peers continue with classical algorithms. If no algorithm can be agreed, both sides must disconnect. Local algorithm names follow the PRIVATE USE syntax name@domain, and IANA-assigned names are covered by RFC 4250. Protocol designers should note that this ordering-based negotiation is what keeps the migration incremental, and that the negotiated result depends on which names both sides advertise.

RFC 4253 text

Confirm versions and defaults before rollout

Names, defaults and warning behavior are release-specific, so do not rely on a summary when planning a change. Read the OpenSSH release notes for the exact version in use, then verify the negotiated algorithm on representative client and server pairs with verbose connection output. Record which peers offer which key exchange names, and test a downgrade path explicitly, because a negotiation that is not integrity protected is exposed to downgrade attacks, as RFC 7696 notes. Keep the configuration of each host under version control so that changes to the algorithm order can be reviewed and rolled back. Where a host cannot be upgraded, document the exception with its owner and review date.

OpenSSH release notes

What protocol designers, implementers and governance owners each need to do

Protocol designers decide the structure that makes algorithm change possible at all. RFC 7696 says that IETF protocols using cryptography must support one or more algorithms or suites and must include a mechanism that identifies the algorithm or suite in use. The same document says the protocol must specify strong mandatory-to-implement algorithms, keep that set small, and publish a stable specification for each one. Negotiation should also be integrity protected, because RFC 7696 warns that an unprotected negotiation exposes the protocol to downgrade attacks.

  • Mandatory-to-implement set: Name one or more strong algorithms or suites that every conforming implementation must support, and keep the set small.
  • Stable public specifications: Require that each mandatory algorithm has a stable public specification that implementers can reference.
  • Algorithm identifiers: Carry an identifier for the algorithm or suite in use, as TLS 1.3 does with the signature_algorithms and supported_groups extensions in RFC 8446.
  • Integrity-protected negotiation: Protect the selection so an attacker cannot strip stronger options from the exchange. RFC 8446 section 4.1.3 shows one approach, a downgrade sentinel placed in the ServerHello Random.
  • Local names: Where private algorithm names are needed, follow the local naming policy that RFC 4253 describes, which uses the name@domain form.

Check that each draft states its mandatory-to-implement set, names where each algorithm is specified, and explains how the negotiation is protected.

How to start reviewing a protocol's algorithm negotiation

This sequence tells you which protocols in your environment negotiate algorithms, whether that negotiation is safe to change, and whether a suite swap can be proven to work before you depend on it. Each step produces a record you can hand to the next step and to whoever signs off on the protocol's configuration.

  1. Inventory protocols and algorithm lists in use

    List every protocol your systems use that carries an algorithm identifier or negotiates one, including TLS, SSH and any internal protocol your teams own. For each, record the version in use, the endpoints that speak it, and the algorithm or suite lists each side sends, such as the TLS signature_algorithms and supported_groups extensions or the SSH KEXINIT name-lists. Engineers who own the services should own this inventory, and the output is a table with one row per protocol and endpoint pair. You know the step is done when every negotiated algorithm your systems can offer appears in the table with its source.

  2. Check each protocol against RFC 7696

    Compare each protocol in the inventory with the requirements in RFC 7696, the IETF guidance on cryptographic algorithm agility. Confirm that the protocol has a mechanism to identify the algorithm or suite in use, that it specifies a small set of mandatory-to-implement algorithms with stable public specifications, and that the mandatory set is still acceptable for your environment. Where the protocol is an IETF standard, check its own specification; where it is internal, record the gaps against the RFC's guidance. The output is a gap list per protocol that names any missing identifier mechanism or mandatory-to-implement definition. The step is done when each protocol has either a pass or a named gap.

  3. Confirm integrity protection of the negotiation

    For each protocol, verify whether the algorithm selection or negotiation is integrity protected, meaning an attacker cannot alter the offered lists without detection. RFC 7696 states that a protocol without this protection is subject to downgrade attacks. Look at how the handshake binds the lists it sends: TLS 1.3 covers the handshake transcript, while other protocols may depend on version-specific design. Record, for each protocol, whether the negotiation is protected, by what mechanism, and which versions are covered. Involve the engineers who configure the endpoints, since protection can differ by version and implementation. The output is a protection record per protocol, and the step is done when no negotiation is left unclassified.

  4. Remove deprecated versions and hashes

    Find the versions and hash algorithms that the IETF has deprecated and remove them from negotiation. RFC 8996 deprecates TLS 1.0 and TLS 1.1 and says they must not be negotiated, which means both servers and clients should reject them. RFC 9155 says MD5 and SHA-1 must not be used for digital signatures in TLS 1.2 and DTLS 1.2, and that endpoints receiving them should abort the handshake. Check each endpoint's configuration against these rules and list any legacy systems that still need these versions, since RFC 8996 notes that disabling them may break interoperability with legacy systems. The output is a change list per endpoint, plus a separate list of systems that cannot be changed yet and need a documented exception. The step is done when every endpoint is either configured to the rules or recorded as an exception.

  5. Plan and run a suite swap test

    Design a test that changes the negotiated algorithm suite on one endpoint pair, checks that the handshake completes, and confirms the expected algorithm is in use. Include a rollback test that returns the pair to the previous suite, and an interoperability check against each client or server version in the inventory. Where a newer suite is being introduced, such as a hybrid post-quantum key agreement, confirm that the implementation you run supports it and record the version you tested. Run the test in a non-production environment first, and note any endpoint that refuses the new suite or falls back to a weaker one. The output is a test plan and a result log per endpoint pair, and the step is done when both the swap and the rollback have passed for each pair in scope.

What to require from vendors about algorithm identifiers and negotiation

Vendor claims about algorithm identifiers and negotiation are easy to make and hard to verify from a sales sheet. The cards below cover what RFC 7696 and the TLS and SSH specifications say a conforming product should do, and what to ask for in writing before relying on it. Ask every vendor to state the exact version and edition they support.

Identifier for the suite in use

RFC 7696 says a protocol that uses cryptographic algorithms MUST include a mechanism to identify the algorithm or suite in use. Ask the vendor where that identifier appears in its protocols, such as the TLS cipher suite or signature scheme fields or the SSH algorithm name-lists, and whether administrators and logs can see it. If the identifier is not visible to operators, you cannot verify what a session actually used.

RFC 7696 text

Stated mandatory-to-implement set

RFC 7696 says protocols that employ cryptography MUST specify one or more strong mandatory-to-implement algorithms or suites, and that the set SHOULD be kept small. Ask the vendor to list which algorithms it treats as mandatory, and confirm each has a stable public specification. A vendor that cannot name its mandatory set, or points only to proprietary documentation, gives you no baseline to test against.

RFC 7696 text

Integrity protection of negotiation

RFC 7696 says algorithm selection or negotiation SHOULD be integrity protected, and that without it the protocol is subject to a downgrade attack. Ask whether the vendor's negotiation is covered by the handshake transcript and how it detects a modified offer. Also ask how it handles the TLS 1.3 downgrade sentinel in the ServerHello Random, which RFC 8446 requires clients to check.

RFC 8446 text

Disabling of TLS 1.0 and 1.1

RFC 8996 says negotiation of TLS 1.0 from any version of TLS MUST NOT be permitted, and that a party receiving TLS 1.0 or 1.1 in a hello message must send a protocol_version alert and close the connection. The same RFC notes that disabling these versions may break interoperability with legacy systems. Ask the vendor to confirm both are disabled by default, which systems it cannot disable, and what it will need from you to retire them.

RFC 8996 text

Registered hybrid codepoints

RFC 10024 registers hybrid TLS 1.3 key agreement codepoints, including X25519MLKEM768 and SecP256r1MLKEM768. If a vendor claims hybrid post-quantum key agreement, ask which of these registered codepoints it implements and at what version. Ask it to show a negotiated session, not only a configuration setting, so you can confirm the hybrid group was actually selected.

RFC 10024 text

What negotiation design does not solve on its own

Negotiation gives a protocol the means to change algorithms, but it does not decide which algorithms a deployment should use, how fast they change, or whether the old ones can be retired. RFC 7696 leaves the choice of the mandatory-to-implement set to each protocol, and it asks that the set be kept small and that its algorithms have stable public specifications. That is a decision for the protocol's designers and the people who operate it. Before relying on a negotiated suite, the team responsible for the protocol should confirm which algorithms it must support, which it may keep for legacy peers, and which it should disable. A protocol that can negotiate a new algorithm still needs an owner who decides when the old one is switched off.

Standards also say that agility must be considered for each implementation environment. NIST's Crypto Agility project page states this, and CSWP 39upd1 presents its material as a basis for environment-specific mechanisms rather than a fixed procedure. The sources do not give a timeline or a universal set of steps, so the reader should check each system against its own constraints: the peers it talks to, the libraries it links, the hardware it runs on, and the change windows its operators allow. The TLS 1.0 and 1.1 deprecation in RFC 8996 shows how much of this is outside the protocol. That RFC notes that disabling those versions may break interoperability with legacy systems, which is a question about the peers a deployment has, not about the protocol text.

Time is the other limit. The NCCoE's preliminary draft for SP 1800-38A states that earlier efforts to update or replace installed cryptographic technologies have taken many years. A negotiation mechanism shortens the step from deciding to switch to switching, but it does not shorten the time needed to find every endpoint, upgrade it, and retire the peers that cannot upgrade. Plan the inventory, the upgrades and the retirement of old suites as separate work, and treat negotiation as one tool inside that plan. For the specifics of your own environment, start with NIST CSWP 39upd1 and the protocol RFCs your systems implement.

Questions readers ask about algorithm negotiation in protocols

What does crypto agility mean for a protocol?

Crypto agility is the capability to replace and adapt cryptographic algorithms while preserving security and ongoing operations. For a protocol, RFC 7696 describes algorithm agility as being achieved when a protocol can easily migrate from one algorithm suite to another. To get there, the protocol must support one or more algorithms or suites and include a mechanism to identify the algorithm or suite in use. NIST's CSWP 39upd1 describes the same capability across protocols, applications, software, hardware and infrastructure, and notes it must be assessed for each specific implementation environment.

Why must algorithm negotiation be integrity protected?

If the choice of algorithm can be altered by an attacker, the protocol can be pushed into a weaker option than both parties support. RFC 7696 says cryptographic algorithm selection or negotiation should be integrity protected, and that if it is not, the protocol will be subject to a downgrade attack. Protecting the negotiation means the parties can detect that the list of offered algorithms was changed in transit before they rely on the result.

What does RFC 7696 require of protocol designers?

RFC 7696, the IETF's BCP 201 on algorithm agility, sets several requirements. Protocols that use cryptography must support one or more algorithms or suites and include a mechanism to identify the one in use. Protocols that employ cryptography must specify one or more strong mandatory-to-implement algorithms or suites, and the IETF should keep that set small. Those algorithms must have a stable public specification. Algorithm selection or negotiation should be integrity protected. Engineers designing a protocol should read the RFC directly for the exact wording before relying on this summary.

How does TLS 1.3 detect a downgrade to TLS 1.2?

RFC 8446 defines a downgrade sentinel in the ServerHello random. A TLS 1.3 server that negotiates TLS 1.2 must set the last 8 bytes of its ServerHello Random to 44 4F 57 4E 47 52 44 01, and to 44 4F 57 4E 47 52 44 00 when negotiating TLS 1.1 or below. A TLS 1.3 client that receives a ServerHello indicating TLS 1.2 or below checks those bytes, and if they match either value it aborts the handshake with an illegal_parameter alert. This lets a client that supports TLS 1.3 detect that an attacker forced an older version. Algorithm choices themselves are carried in the signature_algorithms extension (section 4.2.3) and the supported_groups extension (section 4.2.7).

What should I ask a vendor about algorithm negotiation?

Ask which protocol versions and algorithm suites the product offers, and whether the negotiation is integrity protected in each version it supports. Ask whether the product can disable legacy versions and algorithms, and how it handles protocols that cannot be disabled without breaking interoperability with legacy systems. RFC 8996 notes that disabling TLS 1.0 and 1.1 may break interoperability, so ask what the vendor expects to break. For post-quantum key agreement, ask which named hybrid groups are supported and which are enabled by default. OpenSSH 10.0 uses a hybrid post-quantum key agreement by default, and OpenSSH 10.1 added a client warning when a non post-quantum key agreement is negotiated, so ask how the product reports this. Ask for the version and configuration you will run, since support differs by release.

Should we design algorithm negotiation in-house or get outside help?

The sources do not say which option suits a given organization, and the answer depends on how much of the protocol stack you own. If you implement a protocol yourself, the design work is the requirements above: an identifier for each algorithm, a small set of mandatory algorithms with stable specifications, integrity-protected negotiation, and a documented path for removing weak options. If you mainly configure existing products such as TLS endpoints or SSH servers, the work is mostly version and suite selection, which you can confirm against each product's documentation. DeployOpen can help with planning and implementation inside your own infrastructure, with the scope and deliverables agreed in writing before work starts. Ask any provider which protocol versions and suites their work covers, and how they will test negotiation and rollback.

How DeployOpen helps teams review protocol algorithm negotiation

DeployOpen reviews how a protocol identifies, negotiates and changes its algorithms, and how that negotiation is protected against downgrade. The work starts from the protocol or product your team runs, so the findings apply to the versions and configurations you deploy.

How we scope

  • Confirm which protocols, versions and extensions your systems negotiate, and which ones your team configures directly.
  • Agree in writing whether the review covers handshake negotiation, algorithm identifiers, or both, before work starts.
  • Set the mandatory-to-implement algorithm list you expect each protocol to carry, so findings can be checked against it.

How we build

  • Trace where each algorithm identifier is carried, such as the TLS signature_algorithms and supported_groups extensions or SSH name-lists.
  • Test whether negotiation is integrity protected, and whether a downgrade to a weaker suite or legacy version is possible.
  • Check configurations against the deprecation rules in RFC 8996 and RFC 9155, and against the hybrid key agreement groups your versions support.

How we hand over

  • Deliver a written findings report that names each negotiation path, the version it applies to, and the observed behavior.
  • Provide the configuration changes and the test evidence needed to reproduce each finding and confirm the fix.
  • Retest the fixed negotiation paths and record the results, so your team can rerun the same checks after future upgrades.

How we support

  • Ongoing support and continuous testing are available as a retainer, for teams that upgrade protocol stacks regularly.
  • Support covers re-running negotiation tests after vendor updates, since algorithm defaults can change between releases.
  • Ask any quote to state how retesting after each upgrade is scoped and what it costs, so the recurring effort is visible.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.