RFC 9858: Additional Parameter Sets for HSS/LMS Hash-Based Signatures
- S. Fluhrer,
- Q. Dang
Abstract
This document extends HSS/LMS (RFC 8554) by defining parameter sets that use alternative hash functions. These include hash functions that result in signatures with significantly smaller sizes than the signatures that use the RFC 8554 parameter sets and should have sufficient security.¶
This document is a product of the Internet Research Task Force (IRTF).
The IRTF publishes the results of Internet
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This document is a product of the Internet Research Task Force
(IRTF). The IRTF publishes the results of Internet
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://
1. Introduction
Stateful hash-based signatures have small private and public keys,
are efficient to compute, and are believed to have excellent security.
One disadvantage is that the signatures they produce tend to be somewhat
large (possibly 1-4 kilobytes).
This document defines a set of parameter sets for the HSS/LMS
stateful hash-based signature method [RFC8554] that reduce the size of the signature
significantly or rely on a hash function other than SHA-256 (to increase
cryptodiversity
This document represents the consensus of the Crypto Forum Research Group (CFRG) in the IRTF. It is not an IETF product and is not a standard.¶
According to official definitions and common usage, a Leighton-Micali Signature (LMS) is a stateful hash-based signature scheme that is based on a single-level Merkle tree. The Hierarchical Signature System (HSS) is a way of binding several LMS signatures together in a hierarchical manner to increase the number of signatures available. Strictly speaking, all the signatures discussed in this document are HSS signatures (even if the HSS signature consists of a single LMS signature). However, it is common to refer to these signatures as "LMS signatures". This document uses the term "HSS/LMS" to cover both the pedantic and the common meanings.¶
This document is intended to be compatible with the NIST document [NIST_SP_800-208].¶
2. Additional Hash Function Definitions
This section defines three hash functions that are used with the parameter sets defined in Sections 3 and 4. These hash functions are used where SHA-256 is used in the original parameter sets from [RFC8554]. The hash function used is specified by the parameter set that is selected.¶
2.1. 192-Bit Hash Function Based on SHA-256
This document defines a SHA-2-based hash function with a 192-bit output. As such, we define SHA-256/192 as a truncated version of SHA-256 [FIPS180]. That is, it is the result of performing a SHA-256 operation to a message and then omitting the final 64 bits of the output. This procedure for truncating the hash output to 192 bits is described in Section 7 of [FIPS180].¶
The following test vector illustrates this:¶
We use the same initial hash value (initialization vector) as the untruncated SHA-256, rather than defining a distinct one, so that we can use a standard SHA-256 hash implementation without modification. In addition, the fact that anyone gets partial knowledge of the SHA-256 hash of a message by examining the SHA-256/192 hash of the same message is not a concern for this application. Each message that is hashed is randomized. Any message being signed includes the C randomizer (a value that is selected by the signer and is included in the hash), which varies per message. Therefore, signing the same message by SHA-256 and by SHA-256/192 will not result in the same value being hashed, and so the latter hash value is not a prefix of the former one. In addition, all hashes include the I identifier, which is included as a part of the signature process in [RFC8554]. This I identifier is selected randomly for each private key (and hence two keys will have different I values with high probability), and so two intermediate hashes computed as a part of signing with two HSS private keys (one with a SHA-256 parameter set and one with a SHA-256/192 parameter set) will also be distinct with high probability.¶
2.2. 256-Bit Hash Function Based on SHAKE256
This document defines a SHAKE-based hash function with a 256-bit output.
As such, we define SHAKE256/256 to be the first 256 bits of the SHAKE256 extendable
2.3. 192-Bit Hash Function Based on SHAKE256
This document defines a SHAKE-based hash function with a 192-bit output. As such, we define SHAKE256/192 to be the first 192 bits of the SHAKE256 XOF. That is, it is the result of performing a SHAKE-256 operation to a message and then using the first 192 bits of output. See [FIPS202] for more detail.¶
3. Additional LM-OTS Parameter Sets
The table below defines the Leighton-Micali One-Time Signature (LM-OTS) parameters that use the hashes defined in Section 2:¶
- Parameter Set Name:
- The human-readable name of the parameter set.¶
- H:
- The second
-preimage -resistant cryptographic hash function used within this parameter set.¶ - n:
- The number of bytes of the output of the hash function.¶
- w:
- The width (in bits) of the Winternitz coefficients; that is, the number of bits from the hash or checksum that is used with a single Winternitz chain. It is a member of the set { 1, 2, 4, 8 }.¶
- p:
- The number of n-byte string elements that make up the LM-OTS signature.¶
- ls:
- The number of left-shift bits used in the checksum function Cksm (used by algorithm 2 of [RFC8554]).¶
- id:
- The IANA-defined identifier used to denote this specific parameter set, which appears in both public keys and signatures.¶
These values are additions to the entries in Table 1 of [RFC8554].¶
The SHA256_N24, SHAKE_N32, and SHAKE_N24 in the parameter set names denote the SHA-256/192, SHAKE256/256, and SHAKE256/192 hash functions defined in Section 2.¶
Remember that the C message randomizer (which is included in the signature) has the same size (n bytes) as the hash output, and so it shrinks from 32 bytes to 24 bytes for the parameter sets that use either SHA-256/192 or SHAKE256/192.¶
4. Additional LMS Parameter Sets
The table below defines several many-time signature parameters called Leighton-Micali Signature (LMS) parameters, using the SHA-256/192, SHAKE256/256, and SHAKE256/192 hash functions:¶
- Parameter Set Name:
- The human-readable name of the parameter set.¶
- H:
- The second
-preimage -resistant cryptographic hash function used within this parameter set.¶ - m:
- The size in bytes of the hash function output.¶
- h:
- The height of the Merkle tree.¶
- id:
- The IANA-defined identifier used to denote this specific parameter set, which appears in both public keys and signatures.¶
These values are additions to the entries in Table 2 of [RFC8554].¶
The SHA256_M24, SHAKE_M32, and SHAKE_M24 in the parameter set names denote the SHA-256/192, SHAKE256/256, and SHAKE256/192 hash functions defined in Section 2.¶
5. Usage for These Additional Hash Functions within HSS
To use the additional hash functions within HSS, one would use the appropriate LM-OTS id from Table 1 and the appropriate LMS id from Table 2 and use that additional hash function when computing the hashes for key generation, signature generation, and signature verification.¶
Note that the size of the I Merkle tree identifier remains 16 bytes, independent of what hash function is used.¶
6. Parameter Set Selection
This document, along with [RFC8554], defines four hash functions for use within HSS/LMS: SHA-256, SHA-256/192, SHAKE256/256, and SHAKE256/192. The main reason one would select a hash with a 192-bit output (either SHA-256/192 or SHAKE256/192) would be to reduce the signature size; this comes at the cost of reducing the security margin. However, the security should be sufficient for most uses.¶
In contrast, there is no security or signature size difference between the SHA-256-based parameter sets (SHA-256 or SHA-256/192) versus the SHAKE-based parameter sets (SHAKE256/256 or SHAKE256/192). The reason for selecting between the two would be based on practical considerations, for example, if the implementation happens to have an existing SHA-256 (or SHAKE) implementation or if one of the two happens to give better hashing performance on the platform.¶
7. Comparisons of 192-Bit and 256-Bit Parameter Sets
Switching to a 192-bit hash affects the signature size, the computation time, and the security strength. It significantly reduces the signature size and somewhat reduces the computation time, at the cost of security strength. See Section 8 for a discussion of the security strength.¶
The impact on signature size and computation time is based on two effects:¶
For signature length, both effects are relevant. The first is relevant because the signature consists of a series of hashes and each hash is shorter. The second is relevant because when we need fewer Winternitz chains, we need fewer hashes in each LM-OTS signature.¶
For computation time (for both signature generation and verification), effect 1 is irrelevant (we still need to perform essentially the same hash computation), but effect 2 still applies. For example, with W=8, SHA-256 requires 34 Winternitz chains per LM-OTS signature, but SHA-256/192 requires only 26. Since the vast majority of time (for both signature generation and verification) is spent computing these Winternitz chains, this reduction in the number of chains gives us some performance improvement.¶
The table below gives the space used by both the 256-bit and 192-bit parameter sets for a range of commonly used Winternitz parameters and tree heights:¶
- ParmSet:
- The height of the Merkle tree(s), which is the parameter "h" from Table 2. Parameter sets listed as a single integer have L=1 and consist of a single Merkle tree of that height; parameter sets with L=2 are listed as x/y, with x being the height of the top-level Merkle tree and y being the bottom level.¶
- Winternitz:
- The Winternitz parameter used, which is the parameter "w" from Table 1. For the tests that use multiple trees, this applies to all of them.¶
- 256-bit hash:
- The size in bytes of a signature, assuming that a 256-bit hash is used in the signature (either SHA-256 or SHAKE256/256).¶
- 192-bit hash:
- The size in bytes of a signature, assuming that a 192-bit hash is used in the signature (either SHA-256/192 or SHAKE256/192).¶
An examination of the signature sizes shows that the 192-bit parameters consistently give a 35-40% reduction in the size of the signature in comparison with the 256-bit parameters.¶
For SHA-256/192, there is a smaller (circa 20%) reduction in the amount of computation required for a signature operation with a 192-bit hash, because fewer Winternitz chains would need to be computed. The SHAKE256/192 signatures may have either a faster or slower computation, depending on the implementation speed of SHAKE versus SHA-256 hashes.¶
The SHAKE256
8. Security Considerations
The strength of a signature that uses the SHA-256/192, SHAKE256/256, and SHAKE256/192 hash functions is based
on the difficulty in finding preimages or second preimages to those hash functions.
As shown in [Katz16], if we assume that the hash function can be modeled as a random oracle, then the security of the system is at least 8N-1 bits (where N is the size of the hash output in bytes); this gives us a security level of 255 bits for SHAKE256/256 and 191 bits for SHA-256/192 and SHAKE256/192).
That is, the strength of SHA-256/192 and SHAKE256/192 can be expected to be equivalent to the strength of AES-192, while the strength of SHAKE256/256 is equivalent to the strength of AES-256.
If AES-192 and AES-256 are quantum
If we look at this in a different way, we see that the case of SHAKE256/256 is essentially the same as the existing SHA-256-based signatures; the difficultly of finding preimages and second preimages is essentially the same, and so they have (barring unexpected cryptographical advances) essentially the same level of security.¶
The case of SHA-256/192 and SHAKE256/192 requires closer analysis.¶
For a classical (non-quantum) computer, there is no known attack better than performing hashes of a large number of distinct preimages. Therefore, a successful attack has a high probability of requiring nearly 2192 hash computations (for either SHA-256/192 or SHAKE256/192). These can be taken as the expected work effort and would appear to be completely infeasible in practice.¶
In theory, an attacker with a quantum computer could use Grover's algorithm [Grover96] to reduce the expected complexity to circa 296 hash computations (for N=24). On the other hand, implementing Grover's algorithm with this number of hash computations would require performing circa 296 hash computations in succession, which will take more time than is likely to be acceptable to any attacker. To speed this up, the attacker would need to run a number of instances of Grover's algorithm in parallel. This would necessarily increase the total work effort required, and to an extent, that makes it likely infeasible. This is because if we limit the time taken by Grover's algorithm to 2t steps (for t <= 96), then to attack a hash preimage problem of 192 bits, it requires a total of 2(192-t) hash computations, rather than the 2(192/2) hash computations it would require if we did not limit the time taken. In other words, the hash preimage can be found in 2t steps by using 2(192-2t) quantum computers (for t <= 96), with one of the quantum computers finding the preimage. For example, if the adversary is willing to wait for 264 times the time taken by a hash computation (which is over 50 years if a quantum computer can compute a hash in 0.1 nanoseconds), this implies that a total of 2(192-64) = 2128 hash computations will need to be performed, on 264 (18 quintillion) separate quantum computers, each of which computes 264 hash evaluations.¶
Hence, we expect that HSS/LMS based on these hash functions is secure against both classical and quantum computers, even though, in both cases, the expected work effort is less (for the N=24 case) than against either SHA-256 or SHAKE256/256.¶
SHA-256 is subject to a length extension attack. In this attack, if the attacker is given the hash value of an unknown message (and the message length), then the attacker can compute the hash of the message appended with certain strings (even though the attacker does not know the contents of the initial part of the modified message). This would appear to be irrelevant to HSS for two reasons:¶
In addition, to perform a length extension attack on SHA-256/192, the attacker has to guess the 64 omitted bits (because the attack requires all 256 bits of the hash value); hence, that is even less of a concern than it is for the standard SHA-256.¶
There is one corner case for which the security strength is reduced: if we need to assume that the signer will never deliberately generate a signature that is valid for two different messages. HSS uses randomized hashing when signing a message. That is, when a message is being presented to be signed, the signer generates a random value C and includes that in what is prepended to the message. Because the attacker cannot predict this value, it is infeasible for anyone other than the signer to find a generic collision. That is, practically speaking, a signature that is valid for two colliding messages is feasible only if the signer signed both messages. For this to happen, a signer (that is, the one with the private key and who picks the random C value) would have to break the collision resistance of the hash function to generate those two colliding messages. Note that this does not apply to someone who submits the messages for signing; only the signer could perform this. This would result in a signature that would be valid for two different selected messages. This is a nonstandard assumption for signature schemes and is usually not a concern, as we assume that the signer is trusted to generate signatures for any message. However, if the application needs to assume that it is infeasible for the signer to generate such a signature, then the security strength assumptions are reduced (128 bits for SHAKE256/256 and 96 bits for SHA-256/192 and SHAKE256/192).¶
Some cryptographers have raised the possibility of a multi-target attack (where the attacker has signatures from a large number of public keys and succeeds if they can generate a forgery against any one of those public keys). While no such method of attack has been proposed, the possibility cannot be excluded; if there are a large number of public keys, it might be prudent to consider the possibility of some security loss with N=24. If there are 2K public keys, this security loss cannot be more than K bits of security.¶
8.1. Note on the Version of SHAKE
[FIPS202] defines both SHAKE128 and SHAKE256. This specification selects SHAKE256, even though it is less efficient for large messages. The reason is that SHAKE128 has a low upper bound on the difficulty of finding preimages (due to the invertibility of its internal permutation), which would limit the strength of HSS/LMS (whose strength is based on the difficulty of finding preimages). Hence, we specify the use of SHAKE256, which has a considerably stronger preimage resistance.¶
9. IANA Considerations
IANA has assigned the code points for the parameter sets in Section 3 in the "LM-OTS Signatures" registry and the parameter sets in Section 4 in the "Leighton
10. References
10.1. Normative References
- [FIPS180]
-
NIST, "Secure Hash Standard", NIST FIPS 180-4, DOI 10
.6028 , , <https:///NIST .FIPS .180 -4 nvlpubs >..nist .gov /nistpubs /FIPS /NIST .FIPS .180 -4 .pdf - [FIPS202]
-
NIST, "SHA-3 Standard: Permutation
-Based Hash and Extendable , NIST FIPS 202, DOI 10-Output Functions" .6028 , , <https:///NIST .FIPS .202 nvlpubs >..nist .gov /nistpubs /FIPS /NIST .FIPS .202 .pdf - [RFC8554]
-
McGrew, D., Curcio, M., and S. Fluhrer, "Leighton-Micali Hash-Based Signatures", RFC 8554, DOI 10
.17487 , , <https:///RFC8554 www >..rfc -editor .org /info /rfc8554
10.2. Informative References
- [Grover96]
-
Grover, L., "A fast quantum mechanical algorithm for database search", Proceedings of the twenty-eighth annual ACM symposium on Theory of Computing (STOC '96), pp. 212-219, DOI 10
.1145 , , <https:///237814 .237866 doi >..org /10 .1145 /237814 .237866 - [Katz16]
-
Katz, J., "Analysis of a Proposed Hash-Based Signature Standard", Security Standardisation Research (SSR 2016), Lecture Notes in Computer Science, vol. 10074, pp. 261-273, DOI 10
.1007 , , <https:///978 -3 -319 -49100 -4 _12 doi >..org /10 .1007 /978 -3 -319 -49100 -4 _12 - [NIST
_SP _800 -208] -
Cooper, D., Apon, D., Dang, Q., Davidson, M., Dworkin, M., and C. Miller, "Recommendation for Stateful Hash-Based Signature Schemes", National Institute of Standards and Technology, NIST SP 800-208, DOI 10
.6028 , , <https:///NIST .SP .800 -208 doi >..org /10 .6028 /NIST .SP .800 -208
Appendix A. Test Cases
This appendix provides four test cases that can be used to verify or debug an implementation. This data is formatted with the name of the elements on the left and the value of the elements on the right, in hexadecimal. The concatenation of all of the values within a public key or signature produces that public key or signature, and values that do not fit within a single line are listed across successive lines.¶
A.1. Test Case 1 - SHA-256/192
A.2. Test Vector for SHAKE256/192
A.3. Test Vector for SHA-256/256
A.4. Test Vector for SHA-256/192, W=4
Acknowledgements
We would like to thank Carsten Bormann, Russ Housley, Andrey Jivsov, Mallory Knodel, Virendra Kumar, Thomas Pornin, and Stanislav Smyshlyaev for their insightful and helpful reviews.¶