draft-ietf-lamps-cms-hash-sig-10.txt   rfc8708.txt 
INTERNET-DRAFT R. Housley Internet Engineering Task Force (IETF) R. Housley
Internet Engineering Task Force (IETF) Vigil Security Request for Comments: 8708 Vigil Security
Intended Status: Proposed Standard Category: Standards Track February 2020
Expires: 18 March 2020 18 September 2019 ISSN: 2070-1721
Use of the HSS/LMS Hash-based Signature Algorithm Use of the HSS/LMS Hash-Based Signature Algorithm in the Cryptographic
in the Cryptographic Message Syntax (CMS) Message Syntax (CMS)
<draft-ietf-lamps-cms-hash-sig-10>
Abstract Abstract
This document specifies the conventions for using the Hierarchical This document specifies the conventions for using the Hierarchical
Signature System (HSS) / Leighton-Micali Signature (LMS) hash-based Signature System (HSS) / Leighton-Micali Signature (LMS) hash-based
signature algorithm with the Cryptographic Message Syntax (CMS). In signature algorithm with the Cryptographic Message Syntax (CMS). In
addition, the algorithm identifier and public key syntax are addition, the algorithm identifier and public key syntax are
provided. The HSS/LMS algorithm is one form of hash-based digital provided. The HSS/LMS algorithm is one form of hash-based digital
signature; it is described in RFC 8554. signature; it is described in RFC 8554.
Status of this Memo Status of This Memo
This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months This is an Internet Standards Track document.
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at This document is a product of the Internet Engineering Task Force
http://www.ietf.org/1id-abstracts.html (IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 7841.
The list of Internet-Draft Shadow Directories can be accessed at Information about the current status of this document, any errata,
http://www.ietf.org/shadow.html and how to provide feedback on it may be obtained at
https://www.rfc-editor.org/info/rfc8708.
Copyright and License Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction
1.1. ASN.1 . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. ASN.1
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Terminology
1.3. Motivation . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3. Motivation
2. HSS/LMS Hash-based Signature Algorithm Overview . . . . . . . 4 2. HSS/LMS Hash-Based Signature Algorithm Overview
2.1. Hierarchical Signature System (HSS) . . . . . . . . . . . 4 2.1. Hierarchical Signature System (HSS)
2.2. Leighton-Micali Signature (LMS) . . . . . . . . . . . . . 5 2.2. Leighton-Micali Signature (LMS)
2.3. Leighton-Micali One-time Signature Algorithm (LM-OTS) . . 6 2.3. Leighton-Micali One-Time Signature (LM-OTS) Algorithm
3. Algorithm Identifiers and Parameters . . . . . . . . . . . . . 7 3. Algorithm Identifiers and Parameters
4. HSS/LMS Public Key Identifier . . . . . . . . . . . . . . . . 8 4. HSS/LMS Public Key Identifier
5. Signed-data Conventions . . . . . . . . . . . . . . . . . . . 8 5. Signed-Data Conventions
6. Security Considerations . . . . . . . . . . . . . . . . . . . 9 6. Security Considerations
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 7. IANA Considerations
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 8. References
8.1. Normative References . . . . . . . . . . . . . . . . . . . 10 8.1. Normative References
8.2. Informative References . . . . . . . . . . . . . . . . . . 11 8.2. Informative References
Appendix: ASN.1 Module . . . . . . . . . . . . . . . . . . . . . . 13 Appendix A. ASN.1 Module
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . 14 Acknowledgements
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 14 Author's Address
1. Introduction 1. Introduction
This document specifies the conventions for using the Hierarchical This document specifies the conventions for using the Hierarchical
Signature System (HSS) / Leighton-Micali Signature (LMS) hash-based Signature System (HSS) / Leighton-Micali Signature (LMS) hash-based
signature algorithm with the Cryptographic Message Syntax (CMS) [CMS] signature algorithm with the Cryptographic Message Syntax (CMS) [CMS]
signed-data content type. The LMS system provides a one-time digital signed-data content type. The LMS system provides a one-time digital
signature that is a variant of Merkle Tree Signatures (MTS). The HSS signature that is a variant of Merkle Tree Signatures (MTS). The HSS
is built on top of the LMS system to efficiently scale for a larger is built on top of the LMS system to efficiently scale for a larger
numbers of signatures. The HSS/LMS algorithm is one form of hash- numbers of signatures. The HSS/LMS algorithm is one form of hash-
based digital signature, and it is described in [HASHSIG]. The based digital signature, and it is described in [HASHSIG]. The HSS/
HSS/LMS signature algorithm can only be used for a fixed number of LMS signature algorithm can only be used for a fixed number of
signing operations with a given private key, and the number of signing operations with a given private key, and the number of
signing operations depends upon the size of the tree. The HSS/LMS signing operations depends upon the size of the tree. The HSS/LMS
signature algorithm uses small public keys, and it has low signature algorithm uses small public keys, and it has low
computational cost; however, the signatures are quite large. The computational cost; however, the signatures are quite large. The
HSS/LMS private key can be very small when the signer is willing to HSS/LMS private key can be very small when the signer is willing to
perform additional computation at signing time; alternatively, the perform additional computation at signing time; alternatively, the
private key can consume additional memory and provide a faster private key can consume additional memory and provide a faster
signing time. The HSS/LMS signatures [HASHSIG] are currently defined signing time. The HSS/LMS signatures [HASHSIG] are currently defined
to use exclusively SHA-256 [SHS]. to exclusively use SHA-256 [SHS].
1.1. ASN.1 1.1. ASN.1
CMS values are generated using ASN.1 [ASN1-B], using the Basic CMS values are generated using ASN.1 [ASN1-B], using the Basic
Encoding Rules (BER) and the Distinguished Encoding Rules (DER) Encoding Rules (BER) and the Distinguished Encoding Rules (DER)
[ASN1-E]. [ASN1-E].
1.2. Terminology 1.2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
1.3. Motivation 1.3. Motivation
Recent advances in cryptanalysis [BH2013] and progress in the Recent advances in cryptanalysis [BH2013] and progress in the
development of quantum computers [NAS2019] pose a threat to widely development of quantum computers [NAS2019] pose a threat to widely
deployed digital signature algorithms. As a result, there is a need deployed digital signature algorithms. As a result, there is a need
to prepare for a day that cryptosystems such as RSA and DSA that to prepare for a day when cryptosystems such as RSA and DSA that
depend on discrete logarithm and factoring cannot be depended upon. depend on discrete logarithms and factoring cannot be depended upon.
If large-scale quantum computers are ever built, these computers will If large-scale quantum computers are ever built, these computers will
be able to break many of the public-key cryptosystems currently in be able to break many of the public key cryptosystems currently in
use. A post-quantum cryptosystem [PQC] is a system that is secure use. A post-quantum cryptosystem [PQC] is a system that is secure
against quantum computers that have more than a trivial number of against quantum computers that have more than a trivial number of
quantum bits (qubits). It is open to conjecture when it will be quantum bits (qubits). It is open to conjecture when it will be
feasible to build such computers; however, RSA, DSA, ECDSA, and EdDSA feasible to build such computers; however, RSA, DSA, Elliptic Curve
are all vulnerable if large-scale quantum computers come to pass. Digital Signature Algorithm (ECDSA), and Edwards-curve Digital
Signature Algorithm (EdDSA) are all vulnerable if large-scale quantum
computers are ever developed.
Since the HSS/LMS signature algorithm does not depend on the Since the HSS/LMS signature algorithm does not depend on the
difficulty of discrete logarithm or factoring, the HSS/LMS signature difficulty of discrete logarithms or factoring, the HSS/LMS signature
algorithm is considered to be post-quantum secure. One use of post- algorithm is considered to be post-quantum secure. One use of post-
quantum secure signatures is the protection of software updates, quantum-secure signatures is the protection of software updates,
perhaps using the format described in [FWPROT], to enable deployment perhaps using the format described in [FWPROT], to enable deployment
of software that implements new cryptosystems. of software that implements new cryptosystems.
2. HSS/LMS Hash-based Signature Algorithm Overview 2. HSS/LMS Hash-Based Signature Algorithm Overview
Merkle Tree Signatures (MTS) are a method for signing a large but Merkle Tree Signatures (MTS) are a method for signing a large but
fixed number of messages. An MTS system depends on a one-time fixed number of messages. An MTS system depends on a one-time
signature method and a collision-resistant hash function. signature method and a collision-resistant hash function.
This specification makes use of the hash-based algorithm specified in This specification makes use of the hash-based algorithm specified in
[HASHSIG], which is the Leighton and Micali adaptation [LM] of the [HASHSIG], which is the Leighton and Micali adaptation [LM] of the
original Lamport-Diffie-Winternitz-Merkle one-time signature system original Lamport-Diffie-Winternitz-Merkle one-time signature system
[M1979][M1987][M1989a][M1989b]. [M1979] [M1987] [M1989a] [M1989b].
As implied by the name, the hash-based signature algorithm depends on As implied by the name, the hash-based signature algorithm depends on
a collision-resistant hash function. The hash-based signature a collision-resistant hash function. The hash-based signature
algorithm specified in [HASHSIG] uses only the SHA-256 one-way hash algorithm specified in [HASHSIG] uses only the SHA-256 one-way hash
function [SHS], but it establishes an IANA registry [IANA-LMS] to function [SHS], but it establishes an IANA registry [IANA-LMS] to
permit the registration of additional one-way hash functions in the permit the registration of additional one-way hash functions in the
future. future.
2.1. Hierarchical Signature System (HSS) 2.1. Hierarchical Signature System (HSS)
The MTS system specified in [HASHSIG] uses a hierarchy of trees. The The MTS system specified in [HASHSIG] uses a hierarchy of trees. The
Hierarchical N-time Signature System (HSS) allows subordinate trees N-time Hierarchical Signature System (HSS) allows subordinate trees
to be generated when needed by the signer. Otherwise, generation of to be generated when needed by the signer. Otherwise, generation of
the entire tree might take weeks or longer. the entire tree might take weeks or longer.
An HSS signature as specified in [HASHSIG] carries the number of An HSS signature as specified in [HASHSIG] carries the number of
signed public keys (Nspk), followed by that number of signed public signed public keys (Nspk), followed by that number of signed public
keys, followed by the LMS signature as described in Section 2.2. The keys, followed by the LMS signature as described in Section 2.2. The
public key for the top-most LMS tree is the public key of the HSS public key for the topmost LMS tree is the public key of the HSS
system. The LMS private key in the parent tree signs the LMS public system. The LMS private key in the parent tree signs the LMS public
key in the child tree, and the LMS private key in the bottom-most key in the child tree, and the LMS private key in the bottom-most
tree signs the actual message. The signature over the public key and tree signs the actual message. The signature over the public key and
the signature over the actual message are LMS signatures as described the signature over the actual message are LMS signatures as described
in Section 2.2. in Section 2.2.
The elements of the HSS signature value for a stand-alone tree (a top The elements of the HSS signature value for a standalone tree (a top
tree with no children) can be summarized as: tree with no children) can be summarized as:
u32str(0) || u32str(0) ||
lms_signature /* signature of message */ lms_signature /* signature of message */
where, u32str() and || are used as defined in [HASHSIG]. where, u32str() and || are used as defined in [HASHSIG].
The elements of the HSS signature value for a tree with Nspk signed The elements of the HSS signature value for a tree with Nspk signed
public keys can be summarized as: public keys can be summarized as:
u32str(Nspk) || u32str(Nspk) ||
signed_public_key[0] || signed_public_key[0] ||
signed_public_key[1] || signed_public_key[1] ||
... ...
signed_public_key[Nspk-2] || signed_public_key[Nspk-2] ||
signed_public_key[Nspk-1] || signed_public_key[Nspk-1] ||
lms_signature /* signature of message */ lms_signature /* signature of message */
where, as defined in Section 3.3 of [HASHSIG], the signed_public_key where, as defined in Section 3.3 of [HASHSIG], the signed_public_key
structure contains the lms_signature over the public key followed by structure contains the lms_signature over the public key, followed by
the public key itself. Note that Nspk is the number of levels in the the public key itself. Note that Nspk is the number of levels in the
hierarchy of trees minus 1. hierarchy of trees minus 1.
2.2. Leighton-Micali Signature (LMS) 2.2. Leighton-Micali Signature (LMS)
Each tree in the system specified in [HASHSIG] uses the Leighton- Each tree in the system specified in [HASHSIG] uses the Leighton-
Micali Signature (LMS) system. LMS systems have two parameters. The Micali Signature (LMS) system. LMS systems have two parameters. The
first parameter is the height of the tree, h, which is the number of first parameter is the height of the tree, h, which is the number of
levels in the tree minus one. The [HASHSIG] specification supports levels in the tree minus one. The [HASHSIG] specification supports
five values for this parameter: h=5; h=10; h=15; h=20; and h=25. five values for this parameter: h=5, h=10, h=15, h=20, and h=25.
Note that there are 2^h leaves in the tree. The second parameter, m, Note that there are 2^h leaves in the tree. The second parameter, m,
is the number of bytes output by the hash function, and it is the is the number of bytes output by the hash function, and it is the
amount of data associated with each node in the tree. The [HASHSIG] amount of data associated with each node in the tree. The [HASHSIG]
specification supports only the SHA-256 hash function [SHS], with specification supports only the SHA-256 hash function [SHS], with
m=32. As a result, the [HASHSIG] specification supports five tree m=32. As a result, the [HASHSIG] specification supports five tree
sizes; they are identified as: sizes; they are identified as:
LMS_SHA256_M32_H5; * LMS_SHA256_M32_H5
LMS_SHA256_M32_H10;
LMS_SHA256_M32_H15; * LMS_SHA256_M32_H10
LMS_SHA256_M32_H20; and
LMS_SHA256_M32_H25. * LMS_SHA256_M32_H15
* LMS_SHA256_M32_H20
* LMS_SHA256_M32_H25
The [HASHSIG] specification establishes an IANA registry [IANA-LMS] The [HASHSIG] specification establishes an IANA registry [IANA-LMS]
to permit the registration of additional hash functions and to permit the registration of additional hash functions and
additional tree sizes in the future. additional tree sizes in the future.
As specified in [HASHSIG], the LMS public key consists of four As specified in [HASHSIG], the LMS public key consists of four
elements: the lms_algorithm_type from the list above, the otstype to elements: the lms_algorithm_type from the list above, the otstype to
identify the LM-OTS type as discussed in Section 2.3, the private key identify the Leighton-Micali One-Time Signature (LM-OTS) type as
identifier (I) as described in Section 5.3 of [HASHSIG], and the m- discussed in Section 2.3, the private key identifier (I) as described
byte string associated with the root node of the tree (T[1]). in Section 5.3 of [HASHSIG], and the m-byte string associated with
the root node of the tree (T[1]).
The LMS public key can be summarized as: The LMS public key can be summarized as:
u32str(lms_algorithm_type) || u32str(otstype) || I || T[1] u32str(lms_algorithm_type) || u32str(otstype) || I || T[1]
As specified in [HASHSIG], an LMS signature consists of four As specified in [HASHSIG], an LMS signature consists of four
elements: the number of the leaf (q) associated with the LM-OTS elements: the number of the leaf (q) associated with the LM-OTS
signature, an LM-OTS signature as described in Section 2.3, a signature value, an LM-OTS signature value as described in
typecode indicating the particular LMS algorithm, and an array of Section 2.3, a typecode indicating the particular LMS algorithm, and
values that is associated with the path through the tree from the an array of values that is associated with the path through the tree
leaf associated with the LM-OTS signature to the root. The array of from the leaf associated with the LM-OTS signature value to the root.
values contains the siblings of the nodes on the path from the leaf The array of values contains the siblings of the nodes on the path
to the root but does not contain the nodes on the path itself. The from the leaf to the root but does not contain the nodes on the path
array for a tree with height h will have h values. The first value itself. The array for a tree with height h will have h values. The
is the sibling of the leaf, the next value is the sibling of the first value is the sibling of the leaf, the next value is the sibling
parent of the leaf, and so on up the path to the root. of the parent of the leaf, and so on up the path to the root.
The four elements of the LMS signature value can be summarized as: The four elements of the LMS signature value can be summarized as:
u32str(q) || u32str(q) ||
ots_signature || ots_signature ||
u32str(type) || u32str(type) ||
path[0] || path[1] || ... || path[h-1] path[0] || path[1] || ... || path[h-1]
2.3. Leighton-Micali One-time Signature Algorithm (LM-OTS) 2.3. Leighton-Micali One-Time Signature (LM-OTS) Algorithm
Merkle Tree Signatures (MTS) depend on a one-time signature method, Merkle Tree Signatures (MTS) depend on a one-time signature method,
and [HASHSIG] specifies the use of the LM-OTS, which has five and [HASHSIG] specifies the use of the LM-OTS, which has five
parameters: parameters:
n - The length in bytes of the hash function output. [HASHSIG] n: The length in bytes of the hash function output. [HASHSIG]
supports only SHA-256 [SHS], with n=32. supports only SHA-256 [SHS], with n=32.
H - A preimage-resistant hash function that accepts byte strings H: A preimage-resistant hash function that accepts byte strings of
of any length, and returns an n-byte string. any length and returns an n-byte string.
w - The width in bits of the Winternitz coefficients. [HASHSIG] w: The width in bits of the Winternitz coefficients. [HASHSIG]
supports four values for this parameter: w=1; w=2; w=4; and supports four values for this parameter: w=1, w=2, w=4, and w=8.
w=8.
p - The number of n-byte string elements that make up the LM-OTS p: The number of n-byte string elements that make up the LM-OTS
signature. signature value.
ls - The number of bits that are left-shifted in the final step of ls: The number of bits that are left-shifted in the final step of
the checksum function, which is defined in Section 4.4 of the checksum function, which is defined in Section 4.4 of
[HASHSIG]. [HASHSIG].
The values of p and ls are dependent on the choices of the parameters The values of p and ls are dependent on the choices of the parameters
n and w, as described in Appendix B of [HASHSIG]. n and w, as described in Appendix B of [HASHSIG].
The [HASHSIG] specification supports four LM-OTS variants: The [HASHSIG] specification supports four LM-OTS variants:
LMOTS_SHA256_N32_W1; * LMOTS_SHA256_N32_W1
LMOTS_SHA256_N32_W2;
LMOTS_SHA256_N32_W4; and * LMOTS_SHA256_N32_W2
LMOTS_SHA256_N32_W8.
* LMOTS_SHA256_N32_W4
* LMOTS_SHA256_N32_W8
The [HASHSIG] specification establishes an IANA registry [IANA-LMS] The [HASHSIG] specification establishes an IANA registry [IANA-LMS]
to permit the registration of additional variants in the future. to permit the registration of additional variants in the future.
Signing involves the generation of C, an n-byte random value. Signing involves the generation of C, an n-byte random value.
The LM-OTS signature value can be summarized as the identifier of the The LM-OTS signature value can be summarized as the identifier of the
LM-OTS variant, the random value, and a sequence of hash values (y[0] LM-OTS variant, the random value, and a sequence of hash values (y[0]
through y[p-1]) that correspond to the elements of the public key as through y[p-1]) that correspond to the elements of the public key, as
described in Section 4.5 of [HASHSIG]: described in Section 4.5 of [HASHSIG]:
u32str(otstype) || C || y[0] || ... || y[p-1] u32str(otstype) || C || y[0] || ... || y[p-1]
3. Algorithm Identifiers and Parameters 3. Algorithm Identifiers and Parameters
The algorithm identifier for an HSS/LMS hash-based signatures is: The algorithm identifier for an HSS/LMS hash-based signature is:
id-alg-hss-lms-hashsig OBJECT IDENTIFIER ::= { iso(1) id-alg-hss-lms-hashsig OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) alg(3) 17 } smime(16) alg(3) 17 }
When this object identifier is used for an HSS/LMS signature, the When this object identifier is used for an HSS/LMS signature, the
AlgorithmIdentifier parameters field MUST be absent (that is, the AlgorithmIdentifier parameters field MUST be absent (that is, the
parameters are not present; the parameters are not set to NULL). parameters are not present, and the parameters are not set to NULL).
The signature value is a large OCTET STRING as described in Section 2 The signature value is a large OCTET STRING, as described in
of this document. The signature format is designed for easy parsing. Section 2 of this document. The signature format is designed for
The HSS, LMS, and LMOTS component of the signature value each format easy parsing. The HSS, LMS, and LM-OTS components of the signature
include a counter and a type code that indirectly provide all of the value each include a counter and a typecode that indirectly provide
information that is needed to parse the value during signature all of the information that is needed to parse the value during
validation. signature validation.
The signature value identifies the hash function used in the HSS/LMS The signature value identifies the hash function used in the HSS/LMS
tree. In [HASHSIG] uses only the SHA-256 hash function [SHS], but it tree. [HASHSIG] uses only the SHA-256 hash function [SHS], but it
establishes an IANA registry [IANA-LMS] to permit the registration of establishes an IANA registry [IANA-LMS] to permit the registration of
additional hash functions in the future. additional hash functions in the future.
4. HSS/LMS Public Key Identifier 4. HSS/LMS Public Key Identifier
The AlgorithmIdentifier for an HSS/LMS public key uses the id-alg- The AlgorithmIdentifier for an HSS/LMS public key uses the id-alg-
hss-lms-hashsig object identifier, and the parameters field MUST be hss-lms-hashsig object identifier, and the parameters field MUST be
absent. absent.
When this AlgorithmIdentifier appears in the SubjectPublicKeyInfo When this AlgorithmIdentifier appears in the SubjectPublicKeyInfo
skipping to change at page 8, line 28 skipping to change at line 340
IDENTIFIER id-alg-hss-lms-hashsig IDENTIFIER id-alg-hss-lms-hashsig
KEY HSS-LMS-HashSig-PublicKey KEY HSS-LMS-HashSig-PublicKey
PARAMS ARE absent PARAMS ARE absent
CERT-KEY-USAGE CERT-KEY-USAGE
{ digitalSignature, nonRepudiation, keyCertSign, cRLSign } } { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }
HSS-LMS-HashSig-PublicKey ::= OCTET STRING HSS-LMS-HashSig-PublicKey ::= OCTET STRING
Note that the id-alg-hss-lms-hashsig algorithm identifier is also Note that the id-alg-hss-lms-hashsig algorithm identifier is also
referred to as id-alg-mts-hashsig. This synonym is based on the referred to as id-alg-mts-hashsig. This synonym is based on the
terminology used in an early draft of the document that became terminology used in an early draft version of the document that
[HASHSIG]. became [HASHSIG].
The public key value is an OCTET STRING. Like the signature format, The public key value is an OCTET STRING. Like the signature format,
it is designed for easy parsing. The value is the number of levels it is designed for easy parsing. The value is the number of levels
in the public key, L, followed by the LMS public key. in the public key, L, followed by the LMS public key.
The HSS/LMS public key value can be described as: The HSS/LMS public key value can be described as:
u32str(L) || lms_public_key u32str(L) || lms_public_key
Note that the public key for the top-most LMS tree is the public key Note that the public key for the topmost LMS tree is the public key
of the HSS system. When L=1, the HSS system is a single tree. of the HSS system. When L=1, the HSS system is a single tree.
5. Signed-data Conventions 5. Signed-Data Conventions
As specified in [CMS], the digital signature is produced from the As specified in [CMS], the digital signature is produced from the
message digest and the signer's private key. The signature is message digest and the signer's private key. The signature is
computed over different values depending on whether signed attributes computed over different values depending on whether signed attributes
are absent or present. are absent or present.
When signed attributes are absent, the HSS/LMS signature is computed When signed attributes are absent, the HSS/LMS signature is computed
over the content. When signed attributes are present, a hash is over the content. When signed attributes are present, a hash is
computed over the content using the same hash function that is used computed over the content using the same hash function that is used
in the HSS/LMS tree, and then a message-digest attribute is in the HSS/LMS tree, then a message-digest attribute is constructed
constructed with the hash of the content, and then the HSS/LMS with the hash of the content, and then the HSS/LMS signature is
signature is computed over the DER-encoded set of signed attributes computed over the DER-encoded set of signed attributes (which MUST
(which MUST include a content-type attribute and a message-digest include a content-type attribute and a message-digest attribute). In
attribute). In summary: summary:
IF (signed attributes are absent) IF (signed attributes are absent)
THEN HSS_LMS_Sign(content) THEN HSS_LMS_Sign(content)
ELSE message-digest attribute = Hash(content); ELSE message-digest attribute = Hash(content);
HSS_LMS_Sign(DER(SignedAttributes)) HSS_LMS_Sign(DER(SignedAttributes))
When using [HASHSIG], the fields in the SignerInfo are used as When using [HASHSIG], the fields in the SignerInfo are used as
follows: follows:
digestAlgorithm MUST contain the one-way hash function used in the * digestAlgorithm MUST contain the one-way hash function used in the
HSS/LMS tree. In [HASHSIG], SHA-256 is the only supported hash HSS/LMS tree. In [HASHSIG], SHA-256 is the only supported hash
function, but other hash functions might be registered in the function, but other hash functions might be registered in the
future. For convenience, the AlgorithmIdentifier for SHA-256 future. For convenience, the AlgorithmIdentifier for SHA-256 from
from [PKIXASN1] is repeated here: [PKIXASN1] is repeated here:
mda-sha256 DIGEST-ALGORITHM ::= { mda-sha256 DIGEST-ALGORITHM ::= {
IDENTIFIER id-sha256 IDENTIFIER id-sha256
PARAMS TYPE NULL ARE preferredAbsent } PARAMS TYPE NULL ARE preferredAbsent }
id-sha256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) id-sha256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
country(16) us(840) organization(1) gov(101) csor(3) country(16) us(840) organization(1) gov(101) csor(3)
nistAlgorithms(4) hashalgs(2) 1 } nistAlgorithms(4) hashalgs(2) 1 }
signatureAlgorithm MUST contain id-alg-hss-lms-hashsig, and the * signatureAlgorithm MUST contain id-alg-hss-lms-hashsig, and the
algorithm parameters field MUST be absent. algorithm parameters field MUST be absent.
signature contains the single HSS signature value resulting from * signature contains the single HSS signature value resulting from
the signing operation as specified in [HASHSIG]. the signing operation as specified in [HASHSIG].
6. Security Considerations 6. Security Considerations
Implementations MUST protect the private keys. Compromise of the Implementations MUST protect the private keys. Compromise of the
private keys may result in the ability to forge signatures. Along private keys may result in the ability to forge signatures. Along
with the private key, the implementation MUST keep track of which with the private key, the implementation MUST keep track of which
leaf nodes in the tree have been used. Loss of integrity of this leaf nodes in the tree have been used. Loss of integrity of this
tracking data can cause a one-time key to be used more than once. As tracking data can cause a one-time key to be used more than once. As
a result, when a private key and the tracking data are stored on non- a result, when a private key and the tracking data are stored on non-
volatile media or stored in a virtual machine environment, failed volatile media or in a virtual machine environment, failed writes,
writes, virtual machine snapshotting or cloning, and other virtual machine snapshotting or cloning, and other operational
operational concerns must be considered to ensure confidentiality and concerns must be considered to ensure confidentiality and integrity.
integrity.
When generating an LMS key pair, an implementation MUST generate each When generating an LMS key pair, an implementation MUST generate each
key pair independently of all other key pairs in the HSS tree. key pair independently of all other key pairs in the HSS tree.
An implementation MUST ensure that a LM-OTS private key is used to An implementation MUST ensure that an LM-OTS private key is used to
generate a signature only one time, and ensure that it cannot be used generate a signature only one time and ensure that it cannot be used
for any other purpose. for any other purpose.
The generation of private keys relies on random numbers. The use of The generation of private keys relies on random numbers. The use of
inadequate pseudo-random number generators (PRNGs) to generate these inadequate pseudorandom number generators (PRNGs) to generate these
values can result in little or no security. An attacker may find it values can result in little or no security. An attacker may find it
much easier to reproduce the PRNG environment that produced the keys, much easier to reproduce the PRNG environment that produced the keys,
searching the resulting small set of possibilities, rather than brute searching the resulting small set of possibilities, rather than
force searching the whole key space. The generation of quality brute-force searching the whole key space. The generation of quality
random numbers is difficult, and [RFC4086] offers important guidance random numbers is difficult, and [RFC4086] offers important guidance
in this area. in this area.
The generation of hash-based signatures also depends on random The generation of hash-based signatures also depends on random
numbers. While the consequences of an inadequate pseudo-random numbers. While the consequences of an inadequate pseudorandom number
number generator (PRNG) to generate these values is much less severe generator (PRNG) to generate these values is much less severe than in
than in the generation of private keys, the guidance in [RFC4086] the generation of private keys, the guidance in [RFC4086] remains
remains important. important.
When computing signatures, the same hash function SHOULD be used to When computing signatures, the same hash function SHOULD be used to
compute the message digest of the content and the signed attributes, compute the message digest of the content and the signed attributes,
if they are present. if they are present.
7. IANA Considerations 7. IANA Considerations
SMI Security for S/MIME Module Identifier (1.2.840.113549.1.9.16.0) In the "SMI Security for S/MIME Module Identifier
registry, change the reference for value 64 to point to this (1.2.840.113549.1.9.16.0)" registry, IANA has updated the reference
document. for value 64 to point to this document.
In the SMI Security for S/MIME Algorithms (1.2.840.113549.1.9.16.3) In the "SMI Security for S/MIME Algorithms (1.2.840.113549.1.9.16.3)"
registry, change the description for value 17 to registry, IANA has updated the description for value 17 to "id-alg-
"id-alg-hss-lms-hashsig" and change the reference to point to this hss-lms-hashsig" and updated the reference to point to this document.
document.
Also, add the following note to the registry: IANA has also added the following note to the "SMI Security for
S/MIME Algorithms (1.2.840.113549.1.9.16.3)" registry:
Value 17, "id-alg-hss-lms-hashsig", is also referred to as Value 17, "id-alg-hss-lms-hashsig", is also referred to as "id-
"id-alg-mts-hashsig". alg-mts-hashsig".
8. References 8. References
8.1. Normative References 8.1. Normative References
[ASN1-B] ITU-T, "Information technology -- Abstract Syntax Notation [ASN1-B] ITU-T, "Information technology -- Abstract Syntax Notation
One (ASN.1): Specification of basic notation", ITU-T One (ASN.1): Specification of basic notation",
Recommendation X.680, 2015. ITU-T Recommendation X.680, August 2015.
[ASN1-E] ITU-T, "Information technology -- ASN.1 encoding rules: [ASN1-E] ITU-T, "Information technology -- ASN.1 encoding rules:
Specification of Basic Encoding Rules (BER), Canonical Specification of Basic Encoding Rules (BER), Canonical
Encoding Rules (CER) and Distinguished Encoding Rules Encoding Rules (CER) and Distinguished Encoding Rules
(DER)", ITU-T Recommendation X.690, 2015. (DER)", ITU-T Recommendation X.690, August 2015.
[CMS] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, [CMS] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70,
RFC 5652, DOI 10.17487/RFC5652, September 2009, RFC 5652, DOI 10.17487/RFC5652, September 2009,
<http://www.rfc-editor.org/info/rfc5652>. <https://www.rfc-editor.org/info/rfc5652>.
[HASHSIG] McGrew, D., Curcio, M., and S. Fluhrer, "Leighton-Micali [HASHSIG] McGrew, D., Curcio, M., and S. Fluhrer, "Leighton-Micali
Hash-Based Signatures", RFC 8554, April 2019, Hash-Based Signatures", RFC 8554, DOI 10.17487/RFC8554,
<https://rfc-editor.org/rfc/rfc8554.txt>. April 2019, <https://www.rfc-editor.org/info/rfc8554>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, DOI Requirement Levels", BCP 14, RFC 2119,
10.17487/RFC2119, March 1997, <http://www.rfc- DOI 10.17487/RFC2119, March 1997,
editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
<https://www.rfc-editor.org/info/rfc5280>. <https://www.rfc-editor.org/info/rfc5280>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
RFC 2119 Key Words", BCP 14, RFC 8174, DOI 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
10.17487/RFC8174, May 2017, <https://www.rfc- May 2017, <https://www.rfc-editor.org/info/rfc8174>.
editor.org/info/rfc8174>.
[SHS] National Institute of Standards and Technology (NIST), [SHS] National Institute of Standards and Technology (NIST),
FIPS Publication 180-3: Secure Hash Standard, October "Secure Hash Standard (SHS)", FIPS PUB 180-4,
2008. DOI 10.6028/NIST.FIPS.180-4, August 2015,
<https://doi.org/10.6028/NIST.FIPS.180-4>.
8.2. Informative References 8.2. Informative References
[BH2013] Ptacek, T., T. Ritter, J. Samuel, and A. Stamos, "The [BH2013] Ptacek, T., Ritter, T., Samuel, J., and A. Stamos, "The
Factoring Dead: Preparing for the Cryptopocalypse", August Factoring Dead: Preparing for the Cryptopocalypse", August
2013. <https://media.blackhat.com/us-13/us-13-Stamos-The- 2013, <https://media.blackhat.com/us-13/us-13-Stamos-The-
Factoring-Dead.pdf> Factoring-Dead.pdf>.
[CMSASN1] Hoffman, P. and J. Schaad, "New ASN.1 Modules for [CMSASN1] Hoffman, P. and J. Schaad, "New ASN.1 Modules for
Cryptographic Message Syntax (CMS) and S/MIME", RFC 5911, Cryptographic Message Syntax (CMS) and S/MIME", RFC 5911,
DOI 10.17487/RFC5911, June 2010, <http://www.rfc- DOI 10.17487/RFC5911, June 2010,
editor.org/info/rfc5911>. <https://www.rfc-editor.org/info/rfc5911>.
[CMSASN1U] Schaad, J. and S. Turner, "Additional New ASN.1 Modules [CMSASN1U] Schaad, J. and S. Turner, "Additional New ASN.1 Modules
for the Cryptographic Message Syntax (CMS) and the Public for the Cryptographic Message Syntax (CMS) and the Public
Key Infrastructure Using X.509 (PKIX)", RFC 6268, DOI Key Infrastructure Using X.509 (PKIX)", RFC 6268,
10.17487/RFC6268, July 2011, <http://www.rfc- DOI 10.17487/RFC6268, July 2011,
editor.org/info/rfc6268>. <https://www.rfc-editor.org/info/rfc6268>.
[FWPROT] Housley, R., "Using Cryptographic Message Syntax (CMS) to [FWPROT] Housley, R., "Using Cryptographic Message Syntax (CMS) to
Protect Firmware Packages", RFC 4108, DOI Protect Firmware Packages", RFC 4108,
10.17487/RFC4108, August 2005, <http://www.rfc- DOI 10.17487/RFC4108, August 2005,
editor.org/info/rfc4108>. <https://www.rfc-editor.org/info/rfc4108>.
[IANA-LMS] IANA Registry for Leighton-Micali Signatures (LMS). [IANA-LMS] IANA, "Leighton-Micali Signatures (LMS)",
<https://www.iana.org/assignments/leighton-micali- <https://www.iana.org/assignments/leighton-micali-
signatures/leighton-micali-signatures.xhtml>. signatures/>.
[LM] Leighton, T. and S. Micali, "Large provably fast and [LM] Leighton, T. and S. Micali, "Large provably fast and
secure digital signature schemes from secure hash secure digital signature schemes based on secure hash
functions", U.S. Patent 5,432,852, July 1995. functions", U.S. Patent 5,432,852, July 1995.
[M1979] Merkle, R., "Secrecy, Authentication, and Public Key [M1979] Merkle, R., "Secrecy, Authentication, and Public Key
Systems", Stanford University Information Systems Systems", Technical Report No. 1979-1, Information Systems
Laboratory Technical Report 1979-1, 1979. Laboratory, Stanford University, 1979.
[M1987] Merkle, R., "A Digital Signature Based on a Conventional [M1987] Merkle, R., "A Digital Signature Based on a Conventional
Encryption Function", Lecture Notes in Computer Science Encryption Function", Advances in Cryptology -- CRYPTO '87
crypto87, 1988. Proceedings, Lecture Notes in Computer Science Vol. 293,
DOI 10.1007/3-540-48184-2_32, 1988,
<https://doi.org/10.1007/3-540-48184-2_32>.
[M1989a] Merkle, R., "A Certified Digital Signature", Lecture Notes [M1989a] Merkle, R., "A Certified Digital Signature", Advances in
in Computer Science crypto89, 1990. Cryptology -- CRYPTO '89 Proceedings, Lecture Notes in
Computer Science Vol. 435, DOI 10.1007/0-387-34805-0_21,
1990, <https://doi.org/10.1007/0-387-34805-0_21>.
[M1989b] Merkle, R., "One Way Hash Functions and DES", Lecture Notes [M1989b] Merkle, R., "One Way Hash Functions and DES", Advances in
in Computer Science crypto89, 1990. Cryptology -- CRYPTO '89 Proceedings, Lecture Notes in
Computer Science Vol. 435, DOI 10.1007/0-387-34805-0_40,
1990, <https://doi.org/10.1007/0-387-34805-0_40>.
[NAS2019] National Academies of Sciences, Engineering, and Medicine, [NAS2019] National Academies of Sciences, Engineering, and Medicine,
"Quantum Computing: Progress and Prospects", The National "Quantum Computing: Progress and Prospects", The National
Academies Press, DOI 10.17226/25196, 2019. Academies Press, DOI 10.17226/25196, 2019,
<https://doi.org/10.17226/25196>.
[PKIXASN1] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the [PKIXASN1] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the
Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, Public Key Infrastructure Using X.509 (PKIX)", RFC 5912,
DOI 10.17487/RFC5912, June 2010, <http://www.rfc- DOI 10.17487/RFC5912, June 2010,
editor.org/info/rfc5912>. <https://www.rfc-editor.org/info/rfc5912>.
[PQC] Bernstein, D., "Introduction to post-quantum [PQC] Bernstein, D., "Introduction to post-quantum
cryptography", 2009. cryptography", DOI 10.1007/978-3-540-88702-7_1, 2009,
<http://www.pqcrypto.org/www.springer.com/cda/content/ <http://www.springer.com/cda/content/document/
document/cda_downloaddocument/9783540887010-c1.pdf> cda_downloaddocument/9783540887010-c1.pdf>.
[RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker,
"Randomness Requirements for Security", BCP 106, RFC 4086, "Randomness Requirements for Security", BCP 106, RFC 4086,
DOI 10.17487/RFC4086, June 2005, <http://www.rfc- DOI 10.17487/RFC4086, June 2005,
editor.org/info/rfc4086>. <https://www.rfc-editor.org/info/rfc4086>.
Appendix: ASN.1 Module Appendix A. ASN.1 Module
<CODE STARTS> <CODE STARTS>
MTS-HashSig-2013 MTS-HashSig-2013
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
id-smime(16) id-mod(0) id-mod-mts-hashsig-2013(64) } id-smime(16) id-mod(0) id-mod-mts-hashsig-2013(64) }
DEFINITIONS IMPLICIT TAGS ::= BEGIN DEFINITIONS IMPLICIT TAGS ::= BEGIN
EXPORTS ALL; EXPORTS ALL;
skipping to change at page 14, line 34 skipping to change at line 632
SMimeCaps SMIME-CAPS ::= SMimeCaps SMIME-CAPS ::=
{ sa-HSS-LMS-HashSig.&smimeCaps, ... } { sa-HSS-LMS-HashSig.&smimeCaps, ... }
END END
<CODE ENDS> <CODE ENDS>
Acknowledgements Acknowledgements
Many thanks to Scott Fluhrer, Jonathan Hammell, Ben Kaduk, Panos Many thanks to Joe Clarke, Roman Danyliw, Scott Fluhrer, Jonathan
Kampanakis, Barry Leiba, John Mattsson, Jim Schaad, Sean Turner, Hammell, Ben Kaduk, Panos Kampanakis, Barry Leiba, John Mattsson, Jim
Daniel Van Geest, Roman Danyliw, Dale Worley, and Joe Clarke for Schaad, Sean Turner, Daniel Van Geest, and Dale Worley for their
their careful review and comments. careful review and comments.
Author's Address Author's Address
Russ Housley Russ Housley
Vigil Security, LLC Vigil Security, LLC
516 Dranesville Road 516 Dranesville Road
Herndon, VA 20170 Herndon, VA 20170
USA United States of America
EMail: housley@vigilsec.com Email: housley@vigilsec.com
 End of changes. 87 change blocks. 
206 lines changed or deleted 213 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/