← Back to section · Post-Quantum Cryptography

LMS and HSS Explained: The Stateful Route Built for Firmware Signing (RFC 8554)

Why LMS is plainer than XMSS: the LM-OTS one-time component, the division of labor between single-tree LMS and hierarchical HSS, approval under SP 800-208, and its place in firmware and code signing.

Published 22 November 2026 · 6 min read · PQ Frontier

LMS and HSS Explained: The Stateful Route Built for Firmware Signing (RFC 8554)
AI-generated site artwork
Video explainer · Hash-based signatures

Approved in SP 800-208 alongside XMSS, LMS (Leighton–Micali Signatures) takes the opposite stylistic route: where XMSS is the academic design that refines the security argument to the last detail, LMS is the engineering design that keeps the specification short and leaves implementers the fewest ways to go wrong. Standardized as RFC 8554 in 2019 and named after its authors, Leighton and Micali, it is the stateful scheme that appears most often in scenarios that “sign rarely and verify for decades” — firmware signing and code signing.

LM-OTS: a deliberately plain one-time component

The leaf component of LMS is LM-OTS, in essence a Winternitz-style one-time signature: the digest is split into base-2^w digits, one hash chain per digit, with checksum chains sealing the forgery direction. Its parameters and encodings are intentionally minimal: chain counts and lengths follow directly from the digest length and w, with none of XMSS’s per-position address and masking machinery. One layer less of refinement buys specification readability and implementation determinism — and for devices whose verification code is burned into ROM and cannot change for decades, “simple enough to audit line by line” is itself a security property.

A single LMS tree is a textbook Merkle tree: leaves are hashes of LM-OTS public keys, folded layer by layer to the root, which is the public key; a signature carries the leaf index, the LM-OTS signature and the authentication path. The tree height is written into the parameter set and fixes how many times the key can ever sign — a finite, predetermined budget that must be calculated before deployment: once a firmware key has signed its tree-height number of messages, the whole tree retires, with no possibility of extension.

HSS: hierarchy multiplies both count and deployability

When one tree’s budget is not enough, or signing must be spread across locations, HSS (Hierarchical Signature System) stacks LMS trees into levels. The top level holds a single tree whose leaves do not sign messages directly; instead, each leaf signs the public key of one tree in the level below, and only the bottom level’s leaves sign messages. The total signature count is the product of the levels’ leaf counts. The top tree signs extremely rarely and can live in the most protected environment, while lower-level trees can be pre-generated in batches and distributed to separate signing servers or production-line stations, each keeping its own count.

The hierarchy also pays off operationally: an exhausted lower-level tree is simply discarded and replaced by a fresh one issued from above, while the top-level key itself barely moves. The price is stated just as plainly: an HSS signature must carry the certification material of every level — the bottom tree’s signature, each level’s signature issuing the public key below, and the authentication paths level by level — so the more levels, the longer the signature, and verification must climb the whole stack. Levels are therefore not “the more the better”: they are set by the actual arithmetic of total signature demand against per-signature size, and two to three levels suffice for most deployments; beyond that, one pays size interest on capacity that will never be used. For a firmware vendor this mirrors the real organizational structure — an offline root in a vault issues intermediate keys for the production line, and the intermediates sign each firmware release. The HSS specification pins down these inter-level relationships, each level’s parameters and its counting duties, so implementers can simply follow the text.

The budget becomes intuitive in the firmware setting: a device typically receives a few dozen to a few hundred firmware updates over its life, and even counting test builds, regional variants and emergency patches, the total stays within the low thousands — a medium-height tree is more than sufficient, and every release is a plannable, auditable, ceremonial operation in which the count is fully controlled. The verification bill is equally favorable: at boot time, verifying a firmware signature needs only LM-OTS chain completion and one authentication-path recomputation — a small amount of code, low memory use, and no dependence on any bignum library. For bootloader code running in a minimal environment, that means a verification module of a few hundred lines that can be audited completely. Slightly slower signing and slightly larger signatures are simply not problems in the firmware world; verification that is small, stable and unchanged for thirty years is the real requirement. LMS’s parameters and structure read as if reverse-engineered from exactly that requirements list.

Differences from XMSS, and where LMS wins

Set LMS and XMSS side by side: the security assumption is the same (hash functions only), the state discipline is the same (never reuse an index); what differs is engineering character. XMSS’s address-based domain separation and WOTS+ give it tighter reductions, more flexible parameters and a built-in derivation route to forward security; LMS’s components are more old-school, its specification shorter, and behavioral consistency across implementations easier to verify. In compliance terms they are peers — SP 800-208 approves both, and CNSA 2.0, when it addresses firmware and software signing, points at exactly this class of stateful hash-based signatures. Choosing between them in practice usually follows the vetted implementations and audit checklists available in the target ecosystem, not a claim that one is “more secure”.

LMS’s home ground is scenarios with predictable signature counts and verification horizons measured in decades: firmware images, bootloaders, code signing, long-term document signing. These scenarios hold a hidden advantage as well: verification uses only a hash function, a primitive every device platform necessarily already has and has already validated, so no new mathematics library must be introduced for post-quantum verification — for industrial and embedded systems with long supply chains and frozen software stacks, migration cost lands almost entirely on the signing side, while the verifying side changes little enough to be reviewed item by item. There, signature size (a few kilobytes) does not matter, verification code must be tiny and stable, and keys sit in HSMs or offline environments where counting is controllable — every LMS trait lines up. Conversely, high-frequency, distributed signing where state cannot be centrally guarded is its forbidden zone.

Closing

LMS/HSS demonstrates a second value system within the hash-based family: rather than chasing the tightest reduction or the fullest feature set, it compresses the specification to the shortest and the implementation to the most auditable, then uses the HSS hierarchy to recover scale and deployment structure. Its joint approval with XMSS marks the stateful route’s passage from papers into procurement lists. The thing most worth remembering from this pair of standards is not any parameter but their shared bottom line — state is key material. Whoever keeps the count watertight can trade the most conservative mathematical assumption in cryptography for the longest-lived trust.

Tags: LMSHSSRFC 8554firmware signing