LMS vs ML-DSA for firmware: which signature fits code signing

LMS is a stateful hash-based signature that needs its one-time key state protected at every signing, while ML-DSA is a stateless signature standardized in FIPS 204. Which one fits depends on your signing workflow and what your vendors and customers ask for.

On this page

Which signature fits your firmware signing workflow

A vendor, tender or audit request now names LMS or ML-DSA when it asks for post-quantum firmware signing, and the two names are not interchangeable. LMS is a stateful hash-based scheme specified in RFC 8554, and NIST SP 800-208 covers it alongside the related stateful schemes. ML-DSA is a stateless lattice-based scheme defined in FIPS 204. The key distinction is whether the signing system can safely track one-time key state. An LMS signer must record which leaves have been used after every signature and must never let that record be lost, rolled back or restored from an older backup, because reuse of a one-time key can enable forgery. ML-DSA has no such state requirement.

Security, platform and vendor-risk teams usually meet this question first. Security teams read it in product security questionnaires and signing design documents. Platform and build teams meet it when they design the signing service, the hardware security module or the release pipeline. Vendor-risk reviewers meet it when a supplier states which scheme signs its firmware updates and asks the customer to accept that choice. In each case the question is whether the signing environment can hold and protect a counter-like state safely, not which scheme sounds newer.

Before accepting either scheme, confirm three things with the vendor. First, whether signing state is persisted after each signature and how that state is protected from backup and restore events, since RFC 9802 flags standard backup and restore as a cause of one-time key reuse. Second, how many signatures each key can produce, which RFC 9708 says is fixed by tree size for HSS/LMS. Third, whether the signed artifact carries the signature size and key format the verifying devices can handle, since RFC 9881 and RFC 9708 give very different signature sizes. RFC 9802 also says stateful hash-based keys are generally not suited to end-entity certificates, with firmware and software signing as possible exceptions, so confirm the role the key plays in the chain.

LMS and ML-DSA side by side: defining documents, status and signature sizes

This table sets the stateful hash signature LMS against the lattice signature ML-DSA on the attributes the sources give, including defining documents, status, state handling, sizes and where each is supported. Read each row across both columns to see which requirements apply to a firmware or software signing design. The main takeaway is that LMS keeps small public keys but needs persistent state and has large signatures, while ML-DSA is stateless with signatures in the low kilobytes.

AttributeLMS (stateful hash-based)ML-DSA (lattice-based)
Defining document and dateRFC 8554, April 2019 (Informational); NIST SP 800-208, published 29 October 2020, status FinalNIST FIPS 204, published 13 August 2024, status Final; RFC 9881, Proposed Standard, October 2025
StatusInformational RFC and a Final NIST special publication covering LMS, XMSS, HSS and XMSS^MTFinal NIST standard; RFC 9881 is a Proposed Standard for X.509 use
Whether state is requiredYes. The private key changes on each signature and a one-time key must never sign twice (RFC 8554)No. The sources describe no per-key signature limit or persistent state for ML-DSA (RFC 9881)
Signature sizeHSS with W=8 from 1616 bytes (height 15) to 3652 bytes (two-level 25/15) per RFC 8554 Table 3; RFC 9708 calls these quite large2420, 3309 and 4627 bytes for ML-DSA-44, -65 and -87 (RFC 9881)
Public key sizeSmall, per RFC 9708, with the exact size set by the tree parameters in the defining document1312, 1952 and 2592 bytes for ML-DSA-44, -65 and -87 (RFC 9881)
CMS identifierHSS/LMS in CMS with OID 1.2.840.113549.1.9.16.3.17 (RFC 9708)ML-DSA OIDs placed in the SignerInfo signatureAlgorithm field with parameters absent (RFC 9882)
X.509 identifierThe sources in this set do not give an X.509 identifier for LMS; RFC 9802 says stateful keys are generally unsuitable for end-entity certificates2.16.840.1.101.3.4.3.17, .18 and .19 for ML-DSA-44, -65 and -87, with parameters absent (RFC 9881)
Where supportedNamed in NIST SP 800-208 and RFC 9708 for CMS; RFC 9802 names firmware and software signing as possible exceptions for certificatesNamed in RFC 9881 (X.509 and CRL), RFC 9882 (CMS) and RFC 9964 (JOSE and COSE); confirm versions in each product

What LMS and ML-DSA each are and where they are defined

LMS is a stateful hash-based signature scheme. Its base specification is RFC 8554, published in April 2019 as an Informational RFC from the IRTF Crypto Forum Research Group. Practitioners meet LMS mainly through the multi-level HSS construction and its use in signed messages, and through NIST's guidance on stateful hash-based schemes, which covers LMS, XMSS and the multi-tree variants.

  • Base specification: RFC 8554 (April 2019, Informational, IRTF CFRG) defines LMS and the HSS construction.
  • CMS carriage: RFC 9708 defines HSS/LMS in CMS and identifies it with OID 1.2.840.113549.1.9.16.3.17.
  • NIST guidance: NIST SP 800-208, published 29 October 2020 with status Final, covers LMS, XMSS, HSS and XMSS^MT.
  • Signature limit: RFC 9708 says each key allows a fixed number of signing operations, set by tree size.
  • State handling: RFC 8554 says a one-time key must never sign a second message, and RFC 9708 requires implementations to track which leaf nodes have been used.

Confirm in your own environment that the signing tool persists state after every signature and that backup and restore procedures cannot roll that state back, because RFC 9802 warns that restoring old state can cause one-time key reuse.

Six differences that change firmware signing decisions

Firmware signing with LMS and ML-DSA is shaped less by which algorithm is stronger than by how each one handles state, limits, size and integration. The six differences below cover what a signing system must do differently under each choice, and what a reviewer should confirm before committing to one.

One-time key state

LMS is a stateful hash-based scheme: the signer modifies its private key with every signature, and a one-time key must never sign a second message. RFC 8554 warns that reusing secret key state removes the cryptographic guarantees and can enable forgery, and says these schemes should be used only in systems that prevent state reuse. ML-DSA has no such state requirement. Check whether your build and signing process can enforce single use of each key before choosing LMS.

RFC 8554

Leaf usage tracking

RFC 9708 requires implementations to track which leaf nodes have been used. It says that loss of integrity of that usage data could allow one-time key reuse, so the tracking record must be protected as carefully as the key itself. It also notes that private key size can be traded against signing time. Ask a vendor how and where the used-leaf record is stored and protected before accepting an LMS signing design.

RFC 9708

Persist state and backup risk

RFC 9802 says state must be persisted after every signature, and that standard backup and restore can cause one-time key reuse. A restored backup from before a signing event can present a leaf that was already used. Build restore procedures that account for signing counters before any LMS key is used in a release pipeline. ML-DSA keys do not carry this restore hazard, so backup planning for them focuses on key confidentiality and availability.

RFC 9802

Signing operation limits

RFC 9708 allows only a fixed number of signing operations per LMS or HSS key, set by tree size. Once that limit is reached, the key must be retired, so release volume and key rollover planning must be done against that count. RFC 9881 states no per-key signature limit for ML-DSA. Confirm the signing count for your planned tree size and release cadence before committing to a key lifetime.

RFC 9708

Signature size on images

HSS signatures in RFC 8554 Table 3 range from 1616 bytes for a single tree of height 15 to 3652 bytes for the two-level 25/15 set, while ML-DSA signatures in RFC 9881 range from 2420 to 4627 bytes. Both add bytes to every signed image and manifest, so measure the overhead against your firmware size budget and update channel constraints. Check which parameter set and tree size your device actually uses before estimating the increase.

RFC 9881

Stateful keys and firmware exceptions

RFC 9802 says stateful hash-based keys are generally not appropriate for end-entity certificates, but names firmware and software signing as possible exceptions. This makes LMS a candidate for firmware signing in a way it is not for general certificates. Confirm that your organization's policy and the relevant standards body accept stateful signing for your use case, and do not assume the exception applies to every signing role in your PKI.

RFC 9802

Where LMS and ML-DSA appear in CMS, X.509 and vendor documents

Teams comparing LMS and ML-DSA for firmware signing will meet both names in standards, in vendor documents and in tender or audit requests, and the places they appear differ. For LMS, the relevant CMS specification is RFC 9708, which defines HSS/LMS in CMS and identifies it with the OID 1.2.840.113549.1.9.16.3.17. Its SignerInfo carries a single HSS/LMS signature value, and the digestAlgorithm field names SHA-256 or SHAKE256 as the tree hash. RFC 9708 also states that a key allows only a fixed number of signing operations, set by tree size, so a reviewer should confirm how the signing system tracks used leaf nodes. RFC 9802 adds that stateful hash-based keys are generally not appropriate for end-entity certificates, with firmware and software signing as possible exceptions.

For ML-DSA, the two documents to check are RFC 9882 for CMS and RFC 9881 for X.509. RFC 9882 places the ML-DSA OIDs in the SignerInfo signatureAlgorithm field with parameters absent, uses pure mode with an empty context string, and does not specify HashML-DSA for CMS. RFC 9881 assigns the OIDs 2.16.840.1.101.3.4.3.17, .18 and .19 to ML-DSA-44, ML-DSA-65 and ML-DSA-87 for certificates and CRLs, and prohibits HashML-DSA there. A tender asking for ML-DSA support should specify which parameter set and which carrier, CMS or X.509, the vendor must support, since the two RFCs cover different objects.

The sources listed on this page do not record which products or vendors have adopted either scheme in CMS, X.509 or vendor firmware tooling. Vendor-risk reviewers should request written statements from the vendor naming the RFC and OID they implement, the version tested, and any state-handling controls for LMS. Confirm each claim against the relevant RFC text and the vendor's own documentation rather than relying on the names alone.

How to work out which scheme applies to your firmware signing

This sequence establishes whether your firmware signing is bound to a named scheme, which keys sign and how their state is handled, and whether the signature size fits your update channel and device storage. It ends with vendor documentation that names the RFC or FIPS it follows, so the scheme choice can be checked rather than assumed.

  1. Check the contract, tender or customer requirement

    Start by reading the contract, tender or customer requirement for any named signature scheme, such as LMS, XMSS, ML-DSA or SLH-DSA. Record the exact scheme name, the document that requires it and any version or parameter set it mentions. Owner: the team that holds the contract or tender, with security review. Done when you have a written statement of either a named scheme or the explicit absence of one, which tells you whether the choice is already made for you or is open to your design.

  2. Inventory which keys sign firmware

    List every key that signs firmware or software releases, including build, release and emergency keys. For each key, record whether it is held offline (for example in an HSM kept off the network) or online (reachable by a build pipeline). Owner: the platform or release engineering team, with input from security. Done when the list covers every signing key and each entry states its storage location and connectivity, because state handling and the choice of scheme depend on this.

  3. Ask whether the signer persists state

    Ask the vendor whether its signer persists state after every signature. RFC 9802 states that state must be persisted after each signature, and RFC 8554 warns that reusing secret key state removes the cryptographic guarantees and can enable forgery. Also ask how backup and restore handle that state, since RFC 9802 notes that standard backup and restore can cause one-time key reuse. Done when you have written answers covering persistence after every signature and the specific backup and restore procedure, for each key in your inventory.

  4. Check signature size against limits

    Compare the signature size of each candidate scheme with your update channel and device storage limits. The sources give concrete sizes: RFC 8554 Table 3 lists HSS signatures of 1616, 1936 and 3652 bytes for the listed tree configurations, and RFC 9881 gives ML-DSA signatures of 2420, 3309 and 4627 bytes. Confirm the limits on your update channel and devices with your own engineering team, because the sources here do not set them. Done when each candidate scheme has been checked against the largest size your channel and storage can accept.

  5. Request vendor documentation naming the RFC or FIPS

    Request the vendor's documentation naming the RFC or FIPS that its signing implementation follows, such as RFC 9708 for HSS/LMS in CMS, RFC 9882 for ML-DSA in CMS or RFC 9881 for ML-DSA in X.509. Ask the vendor to confirm the version and parameter set it uses, and confirm compatibility with your own tooling rather than assuming it. Done when you hold a document from the vendor that names the specification, version and parameter set in use, and you have checked it against the requirement recorded in the first step.

How the signing and verification path differs for LMS and ML-DSA

The diagram starts with the vendor signing a firmware image and then splits into two branches. The LMS branch updates and persists tree state after each signature, which RFC 9802 says must happen, while the ML-DSA branch has no per-signature state update. Both branches converge on verification in the device. Check the state persistence step first, because RFC 8554 warns that reused state can enable forgery.

Signing path for an LMS branch with persisted state and an ML-DSA branch without it.

Common mix-ups between LMS, ML-DSA and their relatives

Are LMS and XMSS the same signature scheme?

No. They are related stateful hash-based schemes, and both are covered by NIST SP 800-208, Recommendation for Stateful Hash-Based Signature Schemes, published on 29 October 2020 with status Final. That document covers LMS, XMSS and the multi-tree variants HSS and XMSS^MT. Because the standard groups them, a reviewer may see the names used interchangeably in a vendor document, but they are separate constructions with separate specifications. LMS is specified in RFC 8554, an Informational RFC from April 2019. When a vendor says it uses "hash-based signatures," ask which scheme and which parameter set it means, and check the signature and key sizes against the specification that scheme cites.

Are ML-DSA and SLH-DSA both lattice-based schemes?

No. ML-DSA is a lattice-based signature standard, defined in NIST FIPS 204 with status Final, published on 13 August 2024. SLH-DSA is a different family. RFC 9909 lists SLH-DSA as a separate stateless scheme with its own sizes, with signatures from 7856 to 49856 bytes and public keys of 32 to 64 bytes. The two are sometimes grouped together because both are stateless and both are standardized for post-quantum use, but their size profiles differ a lot. In a tender or design document, check which of the two is named, since the signature size used in a bandwidth or storage estimate depends on it.

Is a stateful signature scheme safe without a state-management design?

No source supports that claim. RFC 8554 says that signing modifies the private key, that a one-time key must never sign a second message, and that reusing secret key state removes the cryptographic guarantees and can enable forgery. It says these schemes should be used only in systems that prevent state reuse. RFC 9708 requires implementations to track which leaf nodes have been used, and RFC 9802 says state must be persisted after each signature and that standard backup and restore can cause one-time key reuse. A design therefore needs a defined state store, a way to avoid restoring old state from backups, and a process for handling failures. Ask any vendor to describe how state is persisted, protected and restored before accepting a stateful scheme for signing.

What is the difference between the ML-DSA seed and expanded key formats?

They are two encodings of the same ML-DSA private key material. RFC 9881 defines the ML-DSA private key as a CHOICE of a 32-byte seed, an expanded key of 2560, 4032 or 4896 bytes for ML-DSA-44, -65 and -87, or both. The seed is the compact form, and RFC 9881 recommends it. When both are present, a recipient should check that the seed and expanded key are consistent and must reject the key if they are not. Some profiles restrict the choice: RFC 9964 requires the seed form for JOSE and COSE. When you review a key store or an interchange format, confirm which form each component writes and which it accepts, because a parser that expects one form may reject the other.

Should a tender compare LMS and ML-DSA signature sizes directly?

Only with care, because the sizes depend on the scheme, parameter set and tree configuration. RFC 8554 Table 3 lists HSS signature sizes with W=8 of 1616 bytes for a single tree of height 15, 1936 bytes for height 25, and 3652 bytes for the two-level 25/15 set. RFC 9881 gives ML-DSA signatures of 2420, 3309 and 4627 bytes for ML-DSA-44, -65 and -87. A tender that asks for a single "maximum signature size" should state the parameter set it expects, and bidders should report sizes for the exact configuration they propose. Ask each bidder to name the RFC or standard its figures come from, so the comparison uses the same basis.

Does LMS have a limit on how many times a key can sign?

Yes. RFC 9708 says an HSS/LMS key allows only a fixed number of signing operations, set by the tree size, and that private key size can be traded against signing time. RFC 9881 states no per-key signature limit for ML-DSA. This difference matters for firmware signing, because a release key must be able to sign every release for its whole supported life. Before choosing LMS, calculate the number of signatures the key must produce over its lifetime, including test builds and re-signs, and confirm that the tree size gives enough headroom. Ask the vendor how signing counts are tracked and what happens when the key is close to exhaustion.

Can ML-DSA replace LMS in a firmware signing pipeline without other changes?

Not without checking the surrounding pipeline. The two schemes differ in signature size, state handling, and the format fields that carry them. RFC 9708 defines HSS/LMS in CMS, with OID 1.2.840.113549.1.9.16.3.17. RFC 9882 defines ML-DSA in CMS, places the ML-DSA OIDs in the SignerInfo signatureAlgorithm field with parameters absent, and uses pure mode with an empty context string. Verifiers, signing tools and hardware roots of trust each need to support the chosen format. RFC 9802 says stateful hash-based keys are generally not appropriate for end-entity certificates, with firmware and software signing as possible exceptions. Confirm which signing formats and verifiers the device fleet and build tools accept before deciding.

How DeployOpen helps teams plan firmware signing changes

DeployOpen works through LMS vs ML-DSA for firmware in four stages, starting from the signing workflow your team already runs. The output is a written plan that shows where a stateful hash scheme or a lattice scheme would fit, with the state handling and key management each one requires.

How we scope

  • We map your current firmware and software signing workflow, including where private keys and signing state are stored today.
  • We confirm which signing formats your release pipeline uses, such as CMS or other container formats, before comparing signature options.
  • We agree the scope in writing as a fixed-scope engagement, with deliverables and timelines set before work starts.

How we build

  • We test how your signing tooling persists signing state after each signature, since RFC 9802 says standard backup and restore can cause one-time key reuse.
  • We assess signature and public key sizes against your device storage and bandwidth limits, using the sizes the RFCs and FIPS 204 publish.
  • We document the key handling, backup and restore procedures each option would require, so your reviewers can check them.

How we hand over

  • We deliver a written comparison of LMS and ML-DSA for your signing workflow, with the trade-offs stated as the sources give them.
  • We provide configuration notes and state-handling procedures your engineers can review and keep under change control.
  • We confirm the versions and standards each recommendation applies to, and list the points your team should check with the vendor or standards documents.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after the initial plan is delivered.
  • We can retest the signing setup after changes to tooling, key storage or backup procedures.
  • Questions from your auditors or vendor-risk reviewers can be answered from the documented plan and its evidence.

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.