Lattice-based cryptography vs hash-based cryptography: two families

Lattice-based and hash-based cryptography are two post-quantum families built on different mathematical assumptions, standardized in different documents and used in different places. This page sets out what the sources say about each, where they appear and how to tell which applies to your systems.

On this page

Lattice-based and hash-based cryptography: what each is and the distinction that matters

A vendor document, a standard or a tender will often name both lattice-based and hash-based cryptography in the same breath, and the reader needs to know what each rests on before comparing them. Lattice-based schemes, such as ML-KEM (FIPS 203) and ML-DSA (FIPS 204), rest on the hardness of lattice problems. Hash-based schemes, such as LMS, XMSS and SLH-DSA (FIPS 205), rest only on the properties of cryptographic hash functions. The distinction that matters most is that the hash-based signature schemes divide into two kinds: LMS and XMSS are stateful, meaning the secret key changes over time and reusing a key state can make forging a signature feasible, while SLH-DSA is stateless but produces much larger signatures. Which of these two problems applies depends on the scheme in front of you, not on the family name alone.

Security leads, PKI teams and procurement reviewers are the people who meet this question most often. It comes up in certificate profiles, where RFC 9881 defines X.509 identifiers for ML-DSA, RFC 9909 for SLH-DSA, and RFC 9802 for the stateful HSS, XMSS and XMSS^MT schemes. It comes up in protocol configurations, where hybrid TLS groups such as X25519MLKEM768 pair a lattice-based key encapsulation with a traditional one, and in tender questions asking which signature scheme a product supports and whether it is stateful. In each case, the reader should check the scheme and version named in the document against the standard before concluding anything about key handling or signature size.

Attributes of the two families side by side

This table sets the attributes that the cited sources give for lattice-based signatures (ML-DSA) and hash-based signatures (LMS, XMSS, SLH-DSA) against each other. Each row names the document it comes from, so the sizes shown can be checked against the source directly. The main takeaway is that hash-based signatures rely only on hash function properties, while their stateful variants also carry a key-state requirement that lattice schemes do not.

AttributeLattice-based (ML-DSA)Hash-based (LMS, XMSS, SLH-DSA)
Defining document and dateFIPS 204, final standard published 13 August 2024RFC 8391 (May 2018), RFC 8554 (April 2019), NIST SP 800-208 (29 October 2020), FIPS 205 for SLH-DSA
StatusFinal NIST standard, primary standard for digital signaturesLMS and XMSS published in SP 800-208; SLH-DSA is FIPS 205, a backup standard to ML-DSA
PurposeGenerating and verifying digital signatures, detecting changes, authenticating the signatory and providing non-repudiation (FIPS 204)Digital signatures; RFC 8391 and RFC 8554 describe them as signature schemes built on hash functions
Underlying basis, as each source describes itHardness of lattice problems over module lattices, using Fiat-Shamir with aborts (CRYSTALS-Dilithium project page)Properties of cryptographic hash functions only (RFC 8391); LMS requires second-preimage resistance and is provably secure in the random oracle model (RFC 8554)
Stateful or statelessStateless, as the cited sources describe ML-DSALMS and XMSS are stateful, so the secret key state must be updated and never reused (RFC 8391, RFC 8554); SLH-DSA is stateless (FIPS 205)
ML-DSA signature and public key sizes (bytes)ML-DSA-44: public key 1312, signature 2420; ML-DSA-65: public key 1952, signature 3309; ML-DSA-87: public key 2592, signature 4627 (RFC 9881)Not applicable to the lattice column; hash-based sizes are in the next row
SLH-DSA signature and public key sizes (bytes)Not applicable to the lattice column128s signature 7856, 128f signature 17088; public keys 32 (128 sets), 48 (192 sets), 64 (256 sets) (RFC 9909)
X.509 encodingAlgorithm identifiers for certificates and CRLs defined in RFC 9881SLH-DSA in RFC 9909; stateful HSS, XMSS and XMSS^MT in RFC 9802

What lattice-based and hash-based schemes are for

The lattice family includes two standards that are in general use. ML-KEM, defined in FIPS 203, is a key encapsulation mechanism for general encryption and is the scheme most practitioners meet in key exchange. ML-DSA, defined in FIPS 204, is a digital signature scheme based on hardness of lattice problems over module lattices. The CRYSTALS-Dilithium project page says its construction uses Lyubashevsky's Fiat-Shamir with Aborts technique. FIPS 204 was published as a final standard on 13 August 2024, and its abstract says signatures detect unauthorized changes, authenticate the signatory and provide non-repudiation.

  • ML-KEM (FIPS 203): the primary NIST standard for general encryption, formerly known as CRYSTALS-Kyber. It appears as a key share in TLS 1.3 hybrid groups.
  • ML-DSA (FIPS 204): the primary NIST standard for protecting digital signatures, formerly CRYSTALS-Dilithium.
  • Module lattices: the source's description of ML-DSA says it rests on the hardness of lattice problems over module lattices.
  • Certificate encoding: RFC 9881 defines X.509 algorithm identifiers for ML-DSA in certificates and CRLs.
  • Hybrid deployments: OpenSSL 3.5.0 and Go 1.24 both support ML-KEM, and OpenSSH 10.0 uses a hybrid ML-KEM key agreement by default.

Check which exact version of each library and certificate profile your environment runs, since support and default settings differ by release.

Which differences change what systems and configurations need

The two families differ in how their keys and signatures behave, how large they are, and where they are deployed today. Each difference below changes something concrete in a system, from key storage to protocol defaults, so teams should check them against their own certificate, signing and key exchange setups.

Stateful signing and key reuse

LMS and XMSS are stateful: the secret key changes after each signature, so the signing system must store and update that state correctly. RFC 8391 states that reusing a key state can make forging a signature on a new message feasible. Teams deploying these schemes need to confirm that signing software, backups and failover systems never restore an older key state, and that the API used can update the state as RFC 8554 requires.

RFC 8391

Signature and key sizes

Sizes differ widely between the schemes. For ML-DSA-65, RFC 9881 gives a 1952-byte public key and a 3309-byte signature. For SLH-DSA-128s, RFC 9909 gives a 7856-byte signature with a 32-byte public key. Certificate chains, handshake messages and storage limits in existing systems should be checked against the sizes of the specific parameter set chosen, not a family average.

ML-DSA-65 signature
3309 bytes
RFC 9881

Where each family is deployed

Lattice schemes are the default in current TLS and SSH key exchange. The IETF draft for hybrid TLS groups defines X25519MLKEM768, and OpenSSH 10.0 uses mlkem768x25519-sha256 by default. Hash-based schemes appear mainly in signatures and certificates, for example through the X.509 encodings in RFC 9802 and RFC 9909. Teams should check which family their key exchange and which their signing or certificate layer depends on.

Stateless SLH-DSA as an option

SLH-DSA, specified in FIPS 205, is a stateless hash-based scheme. It avoids the key state management that LMS and XMSS require, at the cost of much larger signatures. Teams that cannot guarantee correct state handling may prefer to evaluate SLH-DSA, while checking signature sizes against their certificate and bandwidth limits.

NIST FIPS 204

No large-integer mathematics

RFC 8554 notes that the LMS scheme avoids large-integer mathematics, and that it is built only on cryptographic hash functions. This matters for implementers who want fewer arithmetic code paths to review. Teams should still confirm that the hash functions and the state handling in their chosen implementation meet the requirements RFC 8554 sets out, including second-preimage resistance.

RFC 8554

Where lattice-based and hash-based schemes show up in products and protocols

The lattice-based algorithms reach production mostly through key exchange, and the sources name concrete products for that. The IETF draft draft-ietf-tls-ecdhe-mlkem-04, dated 8 February 2026 and still a Standards Track draft, defines the TLS 1.3 hybrid groups X25519MLKEM768 (codepoint 4588), SecP256r1MLKEM768 (4587) and SecP384r1MLKEM1024 (4589). For X25519MLKEM768, the draft gives a client key share of 1216 bytes and a server key share of 1120 bytes, so confirm the sizes your load balancers, proxies and firewalls accept before enabling it. draft-ietf-tls-ecdhe-mlkem-04 is the document to check for the other two groups. On the software side, the sources say OpenSSL 3.5.0, released 8 April 2025, changes its default TLS key shares to offer X25519MLKEM768 and X25519. Go 1.24 enables X25519MLKEM768 by default in crypto/tls when Config.CurvePreferences is nil, and the GODEBUG setting tlsmlkem=0 reverts that default. OpenSSH 10.0, released 9 April 2025, uses the hybrid mlkem768x25519-sha256 for key agreement by default.

Hash-based schemes appear in a different place: certificates and certificate revocation lists. The X.509 identifiers RFC 9881 (October 2025) cover ML-DSA, RFC 9909 (December 2025) covers SLH-DSA, and RFC 9802 (June 2025) covers the stateful hash-based schemes HSS, XMSS and XMSS^MT, all for certificates and CRLs. The stateful schemes need care: RFC 8391 and RFC 8554 both state that signing updates secret key state, and reusing a state can make forgery feasible. Any PKI or HSM that signs with HSS, LMS or XMSS must track that state, so ask a vendor how it enforces single use before adopting one. The sources list these identifiers as a reference for certificate issuers, but they do not say which certificate authority or client library implements them.

Before you rely on any of this, confirm support in the exact versions you run. The sources name the versions above, but they do not say whether a later release, a distribution build, a managed load balancer or a hardware security module carries the same defaults or identifiers. Check the release notes of each product, run a handshake test against a staging endpoint, and check the TLS and SSH configuration your clients negotiate. Most of these defaults can be overridden, so record what your environment actually offers, not only what the release notes state.

How to work out which family applies to your systems

This sequence sorts your cryptographic uses by function and then matches each one to a specific standard, version and parameter set, so you know whether lattice-based or hash-based schemes apply to a given system. It ends with a check on the configuration you actually run, rather than on what a document says.

  1. Check requirements and contracts that name a standard

    Start with the documents that bind you: contracts, tender requirements, internal security policies and any customer or federal obligations. Note every place where a specific standard is named, such as FIPS 203, FIPS 204, FIPS 205, RFC 9881 or RFC 8554, and whether the named standard is one that covers a lattice-based or a hash-based scheme. Where a requirement names only a security level or a family without a standard, record that gap for follow-up. The step is done when you have a list of named standards, each tied to the document and clause that names it. Commercial organizations should confirm with their own legal or procurement team whether a federal customer's requirement reaches their systems, since the NSA's advisory and CNSA 2.0 apply to national security systems.

  2. Sort the cryptographic inventory by function

    Using your cryptographic inventory, label each use as encryption, key establishment, signing of certificates or certificate revocation lists, signing of firmware or software updates, or other signing. Keep these functions separate, because the sources treat key establishment (ML-KEM and its hybrid forms) differently from signatures (ML-DSA, SLH-DSA, LMS and XMSS). A single product can use both families for different functions, so do not assign one family to a whole system. The step is done when each inventory entry names its function, the system it runs on and the owner who can confirm it.

  3. Identify which signing uses are stateful

    For every signing use, establish whether the scheme is stateful. The sources say that LMS and XMSS (and their multi-tree variants HSS and XMSS-MT) are stateful, meaning the secret key state changes over time and reusing a state can make forging a signature feasible. Stateless schemes such as ML-DSA and SLH-DSA do not carry this requirement. For each stateful use, record whether your signing system can update and protect key state safely, who manages it and how state is backed up or recovered. The step is done when each stateful use has a documented answer to whether the state can be safely managed, or is flagged as a blocker.

  4. Match each use to a standard and parameter set

    For each inventory entry, record the exact standard and parameter set the system is designed to use, drawing on the sources you have, such as RFC 9935 for ML-KEM sizes, RFC 9881 for ML-DSA and RFC 9909 for SLH-DSA, and RFC 9802 for the stateful hash-based schemes in X.509. Note where a draft is involved, such as the TLS hybrid groups in draft-ietf-tls-ecdhe-mlkem, since drafts can change. Record the public key, signature and ciphertext sizes the standard gives, because these affect certificate chains, handshakes and storage. The step is done when each entry names a standard, a version and a parameter set that can be verified against the standard itself.

  5. Check vendor documentation for exact versions

    For each product you run, ask the vendor, or read its documentation, for the precise FIPS, RFC or draft version it implements and the parameter set it uses. Ask which components are affected, whether hybrid key exchange is enabled by default and whether that default can be changed. Ask whether the implementation has any validation or certificate, and if so, read the module, version and issuer exactly as stated, without treating it as a product-wide conclusion. Where vendor documents do not answer a point, record the gap and ask for a written answer. The step is done when each product has a written version and parameter statement from its vendor, or a documented gap.

  6. Verify your own configuration on the versions you run

    Test the configuration on the versions your systems actually run, not on the versions in the documentation. For example, check whether a TLS endpoint negotiates a hybrid group such as X25519MLKEM768, whether an SSH server or client offers mlkem768x25519-sha256, and which signature algorithm appears in a certificate you issue. Compare the observed behavior with the versions the vendor named in the previous step. Confirm compatibility for each version pair in your environment, since the sources do not establish that different implementations are interoperable. The step is done when each system has a recorded test result showing the negotiated algorithm and version, with any mismatch raised as a finding.

  7. Record the family decision and open gaps

    Bring the results together into one record for each system: the functions it performs, the lattice-based or hash-based standards it uses, whether any stateful signing is in scope and whether that state is manageable, and the vendor and configuration evidence behind each answer. List any system where the requirements, inventory, vendor documents and configuration disagree, and any use with no named standard. Assign an owner to each open gap. The step is done when every system has a dated record that a security lead, auditor or procurement reviewer can check, and each open gap has an owner.

Common mix-ups between the two families and their names

The two families share a lot of vocabulary in vendor documents, standards and tender responses, and several names look alike while meaning different things. The cards below cover the mix-ups that most often cause errors in inventories, configuration and audit answers.

SLH-DSA is not lattice-based

SLH-DSA belongs to the hash-based family. FIPS 205 specifies it as a stateless hash-based signature scheme, while ML-DSA, specified in FIPS 204, is the lattice-based signature standard. Both are signature algorithms, so a document that lists them together can make them look like one family. When you map an inventory or review a vendor answer, check the family against the standard number, not the category heading.

FIPS 204 page

Sphincs+ and SLH-DSA are the same scheme

Sphincs+ is the earlier name of SLH-DSA. NIST's announcement of the first three finalized standards records SLH-DSA as formerly Sphincs+, with FIPS 205 as the standard. A vendor or older paper that says Sphincs+ may be describing the same scheme, but parameter sets and encodings can differ between a draft and the final standard, so confirm the version your product implements before treating the names as interchangeable.

NIST announcement

LMS signatures are not reusable like stateless ones

LMS and XMSS are stateful, so each signing operation changes the secret key. RFC 8554 says signing requires an API that can update the key state, and RFC 8391 warns that reusing a key state can make forging a signature on a new message feasible. A signer that copies a key or restores a backup can break this guarantee, so treat key state as a managed resource, not a file to duplicate.

RFC 8554 text

ML-KEM sizes are not signature sizes

ML-KEM is a key encapsulation mechanism, so its figures describe keys and ciphertexts. RFC 9935 lists ML-KEM-768 with a 1184-byte public key and a 1088-byte ciphertext, while ML-DSA signature sizes come from RFC 9881, where ML-DSA-65 has a 3309-byte signature. Sizing a certificate chain or handshake from the wrong table gives a wrong total, so match each figure to the operation it measures.

RFC 9935 text

A hybrid label is not one family

A hybrid combines a post-quantum component with a traditional one. RFC 9794 defines a PQ/T hybrid as a multi-algorithm scheme with at least one post-quantum and at least one traditional algorithm, so a name such as X25519MLKEM768 pairs an elliptic-curve exchange with a lattice-based KEM. Read the component list rather than the label, because a hybrid does not place the scheme in either family alone.

RFC 9794 text

Questions people search about lattice-based and hash-based cryptography

Are lattice-based and hash-based cryptography the same thing?

No. They rest on different mathematical foundations. Lattice-based schemes such as ML-DSA (FIPS 204) rely on the hardness of lattice problems over module lattices, according to the CRYSTALS-Dilithium project page. Hash-based schemes rely only on the properties of cryptographic hash functions, as RFC 8391 describes for XMSS, and RFC 8554 describes LMS in the same way. Both families produce digital signatures, but the assumptions, key sizes and operational behavior differ, so a comparison should be made scheme by scheme.

Which of the two families is newer?

The sources do not establish a general answer to this question. What they do show is the timing of standardization. NIST published FIPS 204 (ML-DSA, a lattice-based signature standard) as final on 13 August 2024, and FIPS 205 (SLH-DSA, a stateless hash-based scheme) on the same date. NIST SP 800-208, published 29 October 2020, specified the stateful hash-based schemes LMS and XMSS, and RFC 8391 (May 2018) and RFC 8554 (April 2019) described them earlier still. Hash-based designs therefore reached standard documents first, while the lattice-based ML-DSA standard came later.

Does a migration need both lattice-based and hash-based signatures?

The sources do not say that every organization needs both. NIST announced FIPS 204 (ML-DSA) as the primary standard for protecting digital signatures and FIPS 205 (SLH-DSA) as a signature standard with a different mathematical basis that serves as a backup. Whether a backup is needed depends on the organization's risk assessment, its contractual obligations and the systems involved. Before deciding, confirm the requirements with the relevant standards documents and your own compliance owner.

Which family does a rule or customer ask for?

The sources listed on this page do not say that any specific rule or customer requires either family. They name the standards each family is published under: ML-DSA in FIPS 204, SLH-DSA in FIPS 205, and the stateful schemes LMS and XMSS in NIST SP 800-208. Check the requirement text that applies to you, and ask the customer which named standard or parameter set they expect, since a requirement may name one family, both, or neither.

Why are hash-based signatures stateful, and what does that mean for operations?

RFC 8391 states that XMSS is stateful, meaning the secret key changes over time, and that reusing a key state can make forging a signature on a new message feasible. RFC 8554 says LMS is also stateful, so signing requires an API able to update the secret key state. Operationally, the signing system must store and advance the state reliably after every signature, and backups or restored copies of a key can cause reuse. Plan for state storage, key-state protection and recovery procedures before deployment.

Which key and signature sizes differ between the two families?

The sizes are scheme-specific, so compare the figures in the RFCs. RFC 9881 gives ML-DSA-44 a public key of 1312 bytes and a signature of 2420 bytes, ML-DSA-65 a public key of 1952 bytes and a signature of 3309 bytes, and ML-DSA-87 a public key of 2592 bytes and a signature of 4627 bytes. RFC 9909 gives SLH-DSA signatures from 7856 bytes (128s) up to 49856 bytes (256f), with public keys of 32 to 64 bytes. Check the size tables against the exact parameter set you deploy, because certificate and handshake sizes depend on them.

What should I ask a vendor about lattice-based and hash-based support?

Ask which exact standard and version each product implements. For example, ask whether ML-DSA follows FIPS 204 and whether SLH-DSA follows FIPS 205, and whether hash-based signing uses LMS or XMSS under NIST SP 800-208. For stateful schemes, ask how the product stores and advances key state, how it prevents reuse after restore, and what happens on failure. Ask which X.509 identifiers and encodings it uses, citing RFC 9881, RFC 9909 or RFC 9802 where relevant, and whether a documented test or validation covers the claim.

Where do these signature families appear in certificates and protocols?

The sources show certificate encodings for both families. RFC 9881 defines X.509 algorithm identifiers for ML-DSA in certificates and CRLs, and RFC 9909 defines them for SLH-DSA. RFC 9802 defines them for the stateful schemes HSS, XMSS and XMSS^MT. For key exchange, the sources cover ML-KEM rather than these signature families, so they should not be read as protocol support for signatures. Confirm current support in your PKI tooling and TLS stack against those RFCs and the product documentation.

How the two families map onto key establishment and signatures

The diagram starts from the two families, lattice-based and hash-based cryptography, and shows which standardized schemes sit under each. The lattice family holds ML-KEM for key establishment and ML-DSA for signatures, while the hash-based family holds the stateful LMS and XMSS schemes and the stateless SLH-DSA for signatures. The hybrid groups, such as X25519MLKEM768, combine a post-quantum component with a traditional one, as RFC 9794 defines a PQ/T hybrid. Check which family each algorithm belongs to, and note that LMS and XMSS are stateful, so key state must be managed.

Algorithms in each family, mapped to key establishment, signatures and hybrid groups.

How DeployOpen helps with post-quantum migration choices

DeployOpen helps teams work out which family fits each system they run, by scoping the written requirements, building and testing the chosen configuration inside the client's own infrastructure, and documenting the result for their security and compliance reviewers. The engagement covers the protocols, certificates and signing workflows where these two families appear.

How we scope

  • We list the systems that sign, certify or establish keys, and note which of them need a signature or a key exchange.
  • We agree the scope in writing before work starts, including which signature and key exchange schemes are in and out.
  • We record which systems can run stateful hash-based signing, since that family requires careful management of key state.
  • Engagements are fixed-scope, and ongoing support can be added as a retainer once the scope is agreed.

How we build

  • We configure the chosen schemes in the client's own infrastructure, using the versions and encodings each standard names.
  • We check certificate and signature encodings against the RFCs that define them for X.509 certificates and CRLs.
  • We test hybrid key exchange where a TLS or SSH stack offers it, and confirm which groups are actually negotiated.
  • For stateful schemes, we build the signing procedure so the secret key state is updated and never reused.

How we hand over

  • We document each scheme in use, its standard reference, and the parameter set or variant the client selected.
  • We provide the configuration, test results and key-state procedures that the client's reviewers can check directly.
  • We identify which components need confirmation of compatibility for the exact versions the client runs.
  • We train the client's operators on the signing and key-management steps they will perform after handover.

How we support

  • We can retest the configuration after upgrades to TLS libraries, SSH clients or certificate tooling.
  • We can review new certificate and signature profiles as the client's vendors add support for them.
  • We can extend continuous testing to cover key-state handling for stateful signing systems over time.
  • Ask any vendor or standards body for the exact version and edition behind each claim before you rely on it.

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.