<?xmlversion='1.0' encoding='utf-8'?>version="1.0" encoding="utf-8"?> <!DOCTYPE rfc SYSTEM"rfc2629.dtd" [ <!ENTITY RFC5652 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5652.xml"> <!ENTITY RFC8554 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8554.xml"> <!ENTITY RFC2119 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"> <!ENTITY RFC5280 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"> <!ENTITY RFC8174 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"> <!ENTITY RFC5911 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5911.xml"> <!ENTITY RFC6268 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6268.xml"> <!ENTITY RFC4108 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4108.xml"> <!ENTITY RFC5912 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5912.xml"> <!ENTITY RFC4086 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4086.xml"> ]>"rfc2629-xhtml.ent"> <rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF"docName="draft-ietf-lamps-cms-hash-sig-10"category="std"ipr="trust200902">consensus="true" docName="draft-ietf-lamps-cms-hash-sig-10" number="8708" ipr="trust200902" obsoletes="" updates="" xml:lang="en" sortRefs="true" symRefs="true" tocInclude="true" version="3"> <!-- xml2rfc v2v3 conversion 2.34.0 --> <!-- Generated by id2xml 1.5.0 on 2019-10-23T17:15:15Z --><?rfc compact="yes"?> <?rfc text-list-symbols="o*+-"?> <?rfc subcompact="no"?> <?rfc sortrefs="yes"?> <?rfc symrefs="yes"?> <?rfc strict="yes"?> <?rfc toc="yes"?><front> <title abbrev="Use of the HSS/LMSHash-based Signature ">UseHash-Based Signature">Use of the HSS/LMSHash-basedHash-Based Signature Algorithm in the Cryptographic Message Syntax (CMS)</title> <seriesInfo name="RFC" value="8708"/> <author fullname="Russ Housley" initials="R." surname="Housley"> <organization abbrev="Vigil Security">Vigil Security, LLC</organization><address><postal><street>516<address> <postal> <street>516 Dranesville Road</street> <city>Herndon</city> <region>VA</region> <code>20170</code><country>USA</country><country>United States of America</country> </postal> <email>housley@vigilsec.com</email> </address> </author> <datemonth="October" year="2019"/> <abstract><t>month="January" year="2020"/> <abstract> <t> This document specifies the conventions for using the Hierarchical Signature System (HSS) / Leighton-Micali Signature (LMS) hash-based signature algorithm with the Cryptographic Message Syntax (CMS). In addition, the algorithm identifier and public key syntax are provided. The HSS/LMS algorithm is one form of hash-based digital signature; it is described in RFC 8554.</t> </abstract> </front> <middle> <sectiontitle="Introduction" anchor="sect-1"><t>anchor="sect-1" numbered="true" toc="default"> <name>Introduction</name> <t> This document specifies the conventions for using the Hierarchical Signature System (HSS) / Leighton-Micali Signature (LMS) hash-based signature algorithm with the Cryptographic Message Syntax (CMS) <xreftarget="CMS"/>target="RFC5652" format="default"/> signed-data content type. The LMS system provides a one-time digital 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 numbers of signatures. The HSS/LMS algorithm is one form ofhash- basedhash-based digital signature, and it is described in <xreftarget="HASHSIG"/>.target="RFC8554" format="default"/>. The HSS/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 depends upon the size of the tree. The HSS/LMS signature algorithm uses small public keys, and it has low computational cost; however, the signatures are quite large. The HSS/LMS private key can be very small when the signer is willing to perform additional computation at signing time; alternatively, the private key can consume additional memory and provide a faster signing time. The HSS/LMS signatures <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> are currently defined touseexclusively use SHA-256 <xreftarget="SHS"/>.</t>target="SHS" format="default"/>.</t> <sectiontitle="ASN.1" anchor="sect-1.1"><t>anchor="sect-1.1" numbered="true" toc="default"> <name>ASN.1</name> <t> CMS values are generated using ASN.1 <xreftarget="ASN1-B"/>,target="ASN1-B" format="default"/>, using the Basic Encoding Rules (BER) and the Distinguished Encoding Rules (DER) <xreftarget="ASN1-E"/>.</t>target="ASN1-E" format="default"/>.</t> </section> <sectiontitle="Terminology" anchor="sect-1.2"><t>anchor="sect-1.2" numbered="true" toc="default"> <name>Terminology</name> <t> The key words"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY","<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and"OPTIONAL""<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described inBCP 14BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shownhere.</t>here. </t> </section> <sectiontitle="Motivation" anchor="sect-1.3"><t>anchor="sect-1.3" numbered="true" toc="default"> <name>Motivation</name> <t> Recent advances in cryptanalysis <xreftarget="BH2013"/>target="BH2013" format="default"/> and progress in the development of quantum computers <xreftarget="NAS2019"/>target="NAS2019" format="default"/> pose a threat to widely deployed digital signature algorithms. As a result, there is a need to prepare for a daythatwhen cryptosystems such as RSA and DSA that depend on discretelogarithmlogarithms and factoring cannot be depended upon.</t> <t> If large-scale quantum computers are ever built, these computers will be able to break many of thepublic-keypublic key cryptosystems currently in use. A post-quantum cryptosystem <xreftarget="PQC"/>target="PQC" format="default"/> is a system that is secure against quantum computers that have more than a trivial number of quantum bits (qubits). It is open to conjecture when it will be feasible to build such computers; however, RSA, DSA,ECDSA,Elliptic Curve Digital Signature Algorithm (ECDSA), andEdDSAEdwards-curve Digital Signature Algorithm (EdDSA) are all vulnerable if large-scale quantum computerscome to pass.</t>are ever developed.</t> <t> Since the HSS/LMS signature algorithm does not depend on the difficulty of discretelogarithmlogarithms or factoring, the HSS/LMS signature algorithm is considered to be post-quantum secure. One use ofpost- quantum securepost-quantum-secure signatures is the protection of software updates, perhaps using the format described in <xreftarget="FWPROT"/>,target="RFC4108" format="default"/>, to enable deployment of software that implements new cryptosystems.</t> </section> </section> <sectiontitle="HSS/LMS Hash-basedanchor="sect-2" numbered="true" toc="default"> <name>HSS/LMS Hash-Based Signature AlgorithmOverview" anchor="sect-2"><t>Overview</name> <t> Merkle Tree Signatures (MTS) are a method for signing a large but fixed number of messages. An MTS system depends on a one-time signature method and a collision-resistant hash function.</t> <t> This specification makes use of the hash-based algorithm specified in <xreftarget="HASHSIG"/>,target="RFC8554" format="default"/>, which is the Leighton and Micali adaptation <xreftarget="LM"/>target="LM" format="default"/> of the original Lamport-Diffie-Winternitz-Merkle one-time signature system <xreftarget="M1979"/><xref target="M1987"/><xref target="M1989a"/><xref target="M1989b"/>.</t>target="M1979" format="default"/> <xref target="M1987" format="default"/> <xref target="M1989a" format="default"/> <xref target="M1989b" format="default"/>.</t> <t> As implied by the name, the hash-based signature algorithm depends on a collision-resistant hash function. The hash-based signature algorithm specified in <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> uses only the SHA-256 one-way hash function <xreftarget="SHS"/>,target="SHS" format="default"/>, but it establishes an IANA registry <xreftarget="IANA-LMS"/>target="IANA-LMS" format="default"/> to permit the registration of additional one-way hash functions in the future.</t> <sectiontitle="Hierarchicalanchor="sect-2.1" numbered="true" toc="default"> <name>Hierarchical Signature System(HSS)" anchor="sect-2.1"><t>(HSS)</name> <t> The MTS system specified in <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> uses a hierarchy of trees. TheHierarchicalN-time Hierarchical Signature System (HSS) allows subordinate trees to be generated when needed by the signer. Otherwise, generation of the entire tree might take weeks or longer.</t> <t> An HSS signature as specified in <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> carries the number of signed public keys (Nspk), followed by that number of signed public keys, followed by the LMS signature as described in <xreftarget="sect-2.2"/>.target="sect-2.2" format="default"/>. The public key for thetop-mosttopmost LMS tree is the public key of the HSS 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 tree signs the actual message. The signature over the public key and the signature over the actual message are LMS signatures as described in <xreftarget="sect-2.2"/>.</t>target="sect-2.2" format="default"/>.</t> <t> The elements of the HSS signature value for astand-alonestandalone tree (a top tree with no children) can be summarized as:</t><figure><artwork><![CDATA[<artwork name="" type="" align="left" alt=""><![CDATA[ u32str(0) || lms_signature /* signature of message */where,]]></artwork> <t>where, u32str() and || are used as defined in[HASHSIG]. ]]></artwork> </figure><xref target="RFC8554" format="default"/>.</t> <t> The elements of the HSS signature value for a tree with Nspk signed public keys can be summarized as:</t><figure><artwork><![CDATA[<artwork name="" type="" align="left" alt=""><![CDATA[ u32str(Nspk) || signed_public_key[0] || signed_public_key[1] || ... signed_public_key[Nspk-2] || signed_public_key[Nspk-1] || lms_signature /* signature of message */ ]]></artwork></figure><t> where, as defined inSection 3.3 of<xreftarget="HASHSIG"/>,target="RFC8554" sectionFormat="of" section="3.3"/>, the signed_public_key structure contains the lms_signature over the publickeykey, followed by the public key itself. Note that Nspk is the number of levels in the hierarchy of trees minus 1.</t> </section> <sectiontitle="Leighton-Micalianchor="sect-2.2" numbered="true" toc="default"> <name>Leighton-Micali Signature(LMS)" anchor="sect-2.2"><t>(LMS)</name> <t> Each tree in the system specified in <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> uses theLeighton- MicaliLeighton-Micali Signature (LMS) system. LMS systems have two parameters. The first parameter is the height of the tree, h, which is the number of levels in the tree minus one. The <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> specification supports five values for this parameter:h=5; h=10; h=15; h=20;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, 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 <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> specification supports only the SHA-256 hash function <xreftarget="SHS"/>,target="SHS" format="default"/>, with m=32. As a result, the <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> specification supports five tree sizes; they are identified as:</t><figure><artwork><![CDATA[ LMS_SHA256_M32_H5; LMS_SHA256_M32_H10; LMS_SHA256_M32_H15; LMS_SHA256_M32_H20; and LMS_SHA256_M32_H25. ]]></artwork> </figure><ul> <li>LMS_SHA256_M32_H5</li> <li>LMS_SHA256_M32_H10</li> <li>LMS_SHA256_M32_H15</li> <li>LMS_SHA256_M32_H20</li> <li>LMS_SHA256_M32_H25</li> </ul> <t> The <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> specification establishes an IANA registry <xreftarget="IANA-LMS"/>target="IANA-LMS" format="default"/> to permit the registration of additional hash functions and additional tree sizes in the future.</t> <t> As specified in <xreftarget="HASHSIG"/>,target="RFC8554" format="default"/>, the LMS public key consists of four elements: the lms_algorithm_type from the list above, the otstype to identify theLM-OTSLeighton-Micali One-Time Signature (LM-OTS) type as discussed in <xreftarget="sect-2.3"/>,target="sect-2.3" format="default"/>, the private key identifier (I) as described inSection 5.3 of<xreftarget="HASHSIG"/>,target="RFC8554" sectionFormat="of" section="5.3"/>, and them- bytem-byte string associated with the root node of the tree (T[1]).</t> <t> The LMS public key can be summarized as:</t><figure><artwork><![CDATA[<artwork name="" type="" align="left" alt=""><![CDATA[ u32str(lms_algorithm_type) || u32str(otstype) || I || T[1] ]]></artwork></figure><t> As specified in <xreftarget="HASHSIG"/>,target="RFC8554" format="default"/>, an LMS signature consists of four elements: the number of the leaf (q) associated with the LM-OTSsignature,signature value, an LM-OTS signature value as described in <xreftarget="sect-2.3"/>,target="sect-2.3" format="default"/>, a typecode indicating the particular LMS algorithm, and an array of values that is associated with the path through the tree from the leaf associated with the LM-OTS signature value to the root. The array of values contains the siblings of the nodes on the path from the leaf to the root but does not contain the nodes on the path itself. The array for a tree with height h will have h values. The first value is the sibling of the leaf, the next value is the sibling of the parent of the leaf, and so on up the path to theroot.</t>root. </t> <t> The four elements of the LMS signature value can be summarized as:</t><figure><artwork><![CDATA[<artwork name="" type="" align="left" alt=""><![CDATA[ u32str(q) || ots_signature || u32str(type) || path[0] || path[1] || ... || path[h-1] ]]></artwork></figure></section> <sectiontitle="Leighton-Micali One-timeanchor="sect-2.3" numbered="true" toc="default"> <name>Leighton-Micali One-Time SignatureAlgorithm (LM-OTS)" anchor="sect-2.3"><t>(LM-OTS) Algorithm</name> <t> Merkle Tree Signatures (MTS) depend on a one-time signature method, and <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> specifies the use of the LM-OTS, which has five parameters:</t><figure><artwork><![CDATA[ n - The<dl indent="5"> <dt>n:</dt><dd>The length in bytes of the hash function output.[HASHSIG]<xref target="RFC8554" format="default"/> supports only SHA-256[SHS],<xref target="SHS" format="default"/>, withn=32. H - An=32.</dd> <dt>H:</dt><dd>A preimage-resistant hash function that accepts byte strings of anylength,length and returns an n-bytestring. w - Thestring.</dd> <dt>w:</dt><dd>The width in bits of the Winternitz coefficients.[HASHSIG]<xref target="RFC8554" format="default"/> supports four values for this parameter:w=1; w=2; w=4;w=1, w=2, w=4, andw=8. p - Thew=8.</dd> <dt>p:</dt><dd>The number of n-byte string elements that make up the LM-OTSsignature. ls - Thesignature value.</dd> <dt>ls:</dt><dd>The number of bits that are left-shifted in the final step of the checksum function, which is defined inSection 4.4 of [HASHSIG]. ]]></artwork> </figure><xref target="RFC8554" sectionFormat="of" section="4.4"/>.</dd> </dl> <t> The values of p and ls are dependent on the choices of the parameters n and w, as described inAppendix B of<xreftarget="HASHSIG"/>.</t>target="RFC8554" sectionFormat="of" section="B"/>.</t> <t> The[HASHSIG]<xref target="RFC8554"/> specification supports four LM-OTS variants:</t><figure><artwork><![CDATA[ LMOTS_SHA256_N32_W1; LMOTS_SHA256_N32_W2; LMOTS_SHA256_N32_W4; and LMOTS_SHA256_N32_W8. ]]></artwork> </figure><ul> <li>LMOTS_SHA256_N32_W1</li> <li>LMOTS_SHA256_N32_W2</li> <li>LMOTS_SHA256_N32_W4</li> <li>LMOTS_SHA256_N32_W8</li> </ul> <t> The <xreftarget="HASHSIG"/>target="RFC8554" format="default"/> specification establishes an IANA registry <xreftarget="IANA-LMS"/>target="IANA-LMS" format="default"/> to permit the registration of additional variants in the future.</t> <t> Signing involves the generation of C, an n-byte random value.</t> <t> 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] through y[p-1]) that correspond to the elements of the publickeykey, as described inSection 4.5 of<xreftarget="HASHSIG"/>:</t> <figure><artwork><![CDATA[target="RFC8554" sectionFormat="of" section="4.5"/>:</t> <artwork name="" type="" align="left" alt=""><![CDATA[ u32str(otstype) || C || y[0] || ... || y[p-1] ]]></artwork></figure></section> </section> <sectiontitle="Algorithmanchor="sect-3" numbered="true" toc="default"> <name>Algorithm Identifiers andParameters" anchor="sect-3">Parameters</name> <t> The algorithm identifier for an HSS/LMS hash-basedsignaturessignature is: </t><figure><artwork><![CDATA[<sourcecode type="asn.1"><![CDATA[ id-alg-hss-lms-hashsig OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) alg(3) 17 }]]></artwork> </figure>]]></sourcecode> <t> When this object identifier is used for an HSS/LMS signature, the AlgorithmIdentifier parameters fieldMUST<bcp14>MUST</bcp14> be absent (that is, the parameters are notpresent;present, and the parameters are not set to NULL).</t> <t> The signature value is a large OCTETSTRINGSTRING, as described inSection 2<xref target="sect-2"/> of this document. The signature format is designed for easy parsing. The HSS, LMS, andLMOTS componentLM-OTS components of the signature value eachformatinclude a counter and atype codetypecode that indirectly provide all of the information that is needed to parse the value during signaturevalidation.</t>validation. </t> <t> The signature value identifies the hash function used in the HSS/LMS tree.In<xreftarget="HASHSIG"/>target="RFC8554" format="default"/> uses only the SHA-256 hash function <xreftarget="SHS"/>,target="SHS" format="default"/>, but it establishes an IANA registry <xreftarget="IANA-LMS"/>target="IANA-LMS" format="default"/> to permit the registration of additional hash functions in the future.</t> </section> <sectiontitle="HSS/LMSanchor="sect-4" numbered="true" toc="default"> <name>HSS/LMS Public KeyIdentifier" anchor="sect-4"><t>Identifier</name> <t> The AlgorithmIdentifier for an HSS/LMS public key uses theid-alg- hss-lms-hashsigid-alg-hss-lms-hashsig object identifier, and the parameters fieldMUST<bcp14>MUST</bcp14> be absent.</t> <t> When this AlgorithmIdentifier appears in the SubjectPublicKeyInfo field of an X.509 certificate <xreftarget="RFC5280"/>,target="RFC5280" format="default"/>, the certificate key usage extensionMAY<bcp14>MAY</bcp14> contain digitalSignature, nonRepudiation, keyCertSign, and cRLSign; however, itMUST NOT<bcp14>MUST NOT</bcp14> contain other values.</t><figure><artwork><![CDATA[<sourcecode type="asn.1"><![CDATA[ pk-HSS-LMS-HashSig PUBLIC-KEY ::= { IDENTIFIER id-alg-hss-lms-hashsig KEY HSS-LMS-HashSig-PublicKey PARAMS ARE absent CERT-KEY-USAGE { digitalSignature, nonRepudiation, keyCertSign, cRLSign } } HSS-LMS-HashSig-PublicKey ::= OCTET STRING]]></artwork> </figure>]]></sourcecode> <t> 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 terminology used in an early draft version of the document that became <xreftarget="HASHSIG"/>.</t>target="RFC8554" format="default"/>.</t> <t> 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 in the public key, L, followed by the LMS public key.</t> <t> The HSS/LMS public key value can be described as:</t><figure><artwork><![CDATA[<artwork name="" type="" align="left" alt=""><![CDATA[ u32str(L) || lms_public_key ]]></artwork></figure><t> Note that the public key for thetop-mosttopmost LMS tree is the public key of the HSS system. When L=1, the HSS system is a single tree.</t> </section> <sectiontitle="Signed-data Conventions" anchor="sect-5"><t>anchor="sect-5" numbered="true" toc="default"> <name>Signed-Data Conventions</name> <t> As specified in <xreftarget="CMS"/>,target="RFC5652" format="default"/>, the digital signature is produced from the message digest and the signer's private key. The signature is computed over different values depending on whether signed attributes are absent or present.</t> <t> When signed attributes are absent, the HSS/LMS signature is computed over the content. When signed attributes are present, a hash is computed over the content using the same hash function that is used in the HSS/LMS tree,andthen a message-digest attribute is constructed with the hash of the content, and then the HSS/LMS signature is computed over the DER-encoded set of signed attributes (whichMUST<bcp14>MUST</bcp14> include a content-type attribute and a message-digest attribute). In summary:</t><figure><artwork><![CDATA[<sourcecode name="pseudocode" type=""><![CDATA[ IF (signed attributes are absent) THEN HSS_LMS_Sign(content) ELSE message-digest attribute = Hash(content); HSS_LMS_Sign(DER(SignedAttributes))]]></artwork> </figure>]]></sourcecode> <t> When using <xreftarget="HASHSIG"/>,target="RFC8554" format="default"/>, the fields in the SignerInfo are used as follows:</t><t><list hangIndent="3" style="hanging"><t><ul> <li> digestAlgorithmMUST<bcp14>MUST</bcp14> contain the one-way hash function used in the HSS/LMS tree. In <xreftarget="HASHSIG"/>,target="RFC8554" format="default"/>, SHA-256 is the only supported hash function, but other hash functions might be registered in the future. For convenience, the AlgorithmIdentifier for SHA-256 from <xreftarget="PKIXASN1"/>target="RFC5912" format="default"/> is repeatedhere:</t> </list> </t> <figure><artwork><![CDATA[here:</li></ul> <sourcecode type="asn.1"><![CDATA[ mda-sha256 DIGEST-ALGORITHM ::= { IDENTIFIER id-sha256 PARAMS TYPE NULL ARE preferredAbsent } id-sha256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) nistAlgorithms(4) hashalgs(2) 1 }]]></artwork> </figure> <t><list hangIndent="3" style="hanging"><t>]]></sourcecode> <ul> <li> signatureAlgorithmMUST<bcp14>MUST</bcp14> contain id-alg-hss-lms-hashsig, and the algorithm parameters fieldMUST<bcp14>MUST</bcp14> beabsent.</t> </list> </t> <t><list hangIndent="3" style="hanging"><t>absent.</li> <li> signature contains the single HSS signature value resulting from the signing operation as specified in <xreftarget="HASHSIG"/>.</t> </list> </t>target="RFC8554" format="default"/>.</li> </ul> </section> <sectiontitle="Security Considerations" anchor="sect-6"><t>anchor="sect-6" numbered="true" toc="default"> <name>Security Considerations</name> <t> ImplementationsMUST<bcp14>MUST</bcp14> protect the private keys. Compromise of the private keys may result in the ability to forge signatures. Along with the private key, the implementationMUST<bcp14>MUST</bcp14> keep track of which 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 a result, when a private key and the tracking data are stored onnon- volatilenon-volatile media orstoredin a virtual machine environment, failed writes, virtual machine snapshotting or cloning, and other operational concerns must be considered to ensure confidentiality and integrity.</t> <t> When generating an LMS key pair, an implementationMUST<bcp14>MUST</bcp14> generate each key pair independently of all other key pairs in the HSS tree.</t> <t> An implementationMUST<bcp14>MUST</bcp14> ensure thataan LM-OTS private key is used to generate a signature only onetime,time and ensure that it cannot be used for any other purpose.</t> <t> The generation of private keys relies on random numbers. The use of inadequatepseudo-randompseudorandom number generators (PRNGs) to generate these values can result in little or no security. An attacker may find it much easier to reproduce the PRNG environment that produced the keys, searching the resulting small set of possibilities, rather thanbrute forcebrute-force searching the whole key space. The generation of quality random numbers is difficult, and <xreftarget="RFC4086"/>target="RFC4086" format="default"/> offers important guidance in this area.</t> <t> The generation of hash-based signatures also depends on random numbers. While the consequences of an inadequatepseudo-randompseudorandom number generator (PRNG) to generate these values is much less severe than in the generation of private keys, the guidance in <xreftarget="RFC4086"/>target="RFC4086" format="default"/> remains important.</t> <t> When computing signatures, the same hash functionSHOULD<bcp14>SHOULD</bcp14> be used to compute the message digest of the content and the signed attributes, if they are present.</t> </section> <sectiontitle="IANA Considerations" anchor="sect-7"><t> SMIanchor="sect-7" numbered="true" toc="default"> <name>IANA Considerations</name> <t> In the "SMI Security for S/MIME Module Identifier(1.2.840.113549.1.9.16.0)(1.2.840.113549.1.9.16.0)" registry,changeIANA has updated the reference for value 64 to point to this document.</t> <t> In theSMI"SMI Security for S/MIME Algorithms(1.2.840.113549.1.9.16.3)(1.2.840.113549.1.9.16.3)" registry,changeIANA has updated the description for value 17 to "id-alg-hss-lms-hashsig" andchangeupdated the reference to point to this document.</t> <t>Also, addIANA has also added the following note to the "SMI Security for S/&wj;MIME Algorithms (1.2.840.113549.1.9.16.3)" registry:</t><t><list style="hanging" hangIndent="3"><t> Value<ul empty="true"> <li>Value 17, "id-alg-hss-lms-hashsig", is also referred to as"id-alg-mts-hashsig". </t> </list> </t>"id-alg-mts-hashsig".</li> </ul> </section> </middle> <back><references title="Normative References"><displayreference target="RFC8554" to="HASHSIG"/> <displayreference target="RFC5652" to="CMS"/> <displayreference target="RFC5911" to="CMSASN1"/> <displayreference target="RFC6268" to="CMSASN1U"/> <displayreference target="RFC4108" to="FWPROT"/> <displayreference target="RFC5912" to="PKIXASN1"/> <references> <name>References</name> <references> <name>Normative References</name> <referenceanchor="ASN1-B"><front>anchor="ASN1-B"> <front> <title>Information technology -- Abstract Syntax Notation One (ASN.1): Specification of basic notation</title> <seriesInfo name="ITU-T" value="Recommendation X.680"/> <author> <organization>ITU-T</organization> </author> <date month="August" year="2015"/> </front><seriesInfo name="ITU-T" value="Recommendation X.680"/></reference> <referenceanchor="ASN1-E"><front>anchor="ASN1-E"> <front> <title>Information technology -- ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)</title><author> <organization>ITU-T</organization> </author> <date year="2015"/> </front><seriesInfo name="ITU-T" value="Recommendation X.690"/></reference> <reference anchor="CMS" target="http://www.rfc-editor.org/info/rfc5652"><front> <title>Cryptographic Message Syntax (CMS)</title> <author fullname="R. Housley" initials="R." surname="Housley"> </author> <date month="September" year="2009"/> </front> <seriesInfo name="STD" value="70"/> <seriesInfo name="RFC" value="5652"/> <seriesInfo name="DOI" value="10.17487/RFC5652"/> </reference> <reference anchor="HASHSIG" target="https://rfc-editor.org/rfc/rfc8554.txt"><front> <title>Leighton-Micali Hash-Based Signatures</title> <author fullname="D. McGrew" initials="D." surname="McGrew"> </author> <author fullname="M. Curcio" initials="M." surname="Curcio"> </author> <author fullname="S. Fluhrer" initials="S." surname="Fluhrer"><author> <organization>ITU-T</organization> </author> <datemonth="April" year="2019"/>month="August" year="2015"/> </front><seriesInfo name="RFC" value="8554"/></reference>&RFC2119; &RFC5280; &RFC8174;<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5652.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8554.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/> <referenceanchor="SHS"><front> <title>FIPS Publication 180-3: Secureanchor="SHS"> <front> <title>Secure HashStandard</title>Standard (SHS)</title> <seriesInfo name="FIPS PUB" value="180-3"/> <author> <organization>National Institute of Standards and Technology (NIST)</organization> </author> <date month="October" year="2008"/> </front> </reference> </references><references title="Informative References"><references> <name>Informative References</name> <reference anchor="BH2013"target="https://media.blackhat.com/us-13/us-13-Stamos-The-Factoring-Dead.pdf"><front>target="https://media.blackhat.com/us-13/us-13-Stamos-The-Factoring-Dead.pdf"> <front> <title>The Factoring Dead: Preparing for the Cryptopocalypse</title><author> <organization>Ptacek, T., T. Ritter, J. Samuel, and A. Stamos</organization> </author> <date month="August" year="2013"/> </front> </reference> <reference anchor="CMSASN1" target="http://www.rfc-editor.org/info/rfc5911"><front> <title>New ASN.1 Modules for Cryptographic Message Syntax (CMS) and S/MIME</title><authorfullname="P. Hoffman" initials="P." surname="Hoffman"> </author>fullname="Thomas Ptacek" initials="T." surname="Ptacek"/> <authorfullname="J. Schaad" initials="J." surname="Schaad"> </author> <date month="June" year="2010"/> </front> <seriesInfo name="RFC" value="5911"/> <seriesInfo name="DOI" value="10.17487/RFC5911"/> </reference> <reference anchor="CMSASN1U" target="http://www.rfc-editor.org/info/rfc6268"><front> <title>Additional New ASN.1 Modules for the Cryptographic Message Syntax (CMS) and the Public Key Infrastructure Using X.509 (PKIX)</title>fullname="Tom Ritter" initials="T." surname="Ritter"/> <authorfullname="J. Schaad"fullname="Javed Samuel" initials="J."surname="Schaad"> </author>surname="Samuel"/> <authorfullname="S. Turner" initials="S." surname="Turner"> </author> <date month="July" year="2011"/> </front> <seriesInfo name="RFC" value="6268"/> <seriesInfo name="DOI" value="10.17487/RFC6268"/> </reference> <reference anchor="FWPROT" target="http://www.rfc-editor.org/info/rfc4108"><front> <title>Using Cryptographic Message Syntax (CMS) to Protect Firmware Packages</title> <author fullname="R. Housley" initials="R." surname="Housley"> </author>fullname="Alex Stamos" initials="A." surname="Stamos"/> <date month="August"year="2005"/>year="2013"/> </front><seriesInfo name="RFC" value="4108"/> <seriesInfo name="DOI" value="10.17487/RFC4108"/></reference> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5911.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6268.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4108.xml"/> <reference anchor="IANA-LMS"target="https://www.iana.org/assignments/leighton-micali-signatures/leighton-micali-signatures.xhtml"><front> <title>IANA Registry for Leighton-Micalitarget="https://www.iana.org/assignments/leighton-micali-signatures/"> <front> <title>Leighton-Micali Signatures(LMS) </title> <author> </author>(LMS)</title> <author><organization>IANA</organization></author> <date/> </front> </reference> <referenceanchor="LM"><front>anchor="LM"> <front> <title>Large provably fast and secure digital signature schemesfrombased on secure hash functions</title> <seriesInfo name="U.S." value="Patent 5,432,852"/> <author fullname="T. Leighton" initials="T."surname="Leighton"> </author>surname="Leighton"/> <author fullname="S. Micali" initials="S."surname="Micali"> </author>surname="Micali"/> <date month="July" year="1995"/> </front><seriesInfo name="U.S." value="Patent 5,432,852"/></reference> <referenceanchor="M1979"><front>anchor="M1979"> <front> <title>Secrecy, Authentication, and Public Key Systems</title> <seriesInfo name="Technical Report" value="No. 1979-1"/> <seriesInfo name="Information Systems Laboratory," value="Stanford University"/> <author fullname="R. Merkle" initials="R."surname="Merkle"> </author>surname="Merkle"/> <date year="1979"/> </front><seriesInfo name="Stanford" value="University Information Systems Laboratory Technical Report 1979-1"/></reference> <referenceanchor="M1987"><front>anchor="M1987"> <front> <title>A Digital Signature Based on a Conventional Encryption Function</title> <seriesInfo name="DOI" value="10.1007/3-540-48184-2_32"/> <author fullname="R. Merkle" initials="R."surname="Merkle"> </author>surname="Merkle"/> <date year="1988"/> </front><seriesInfo name="Lecture" value="Notes<refcontent>Advances in Cryptology -- CRYPTO '87 Proceedings</refcontent> <refcontent>Lecture Notes in Computer Sciencecrypto87"/>Vol. 293</refcontent> </reference> <referenceanchor="M1989a"><front>anchor="M1989a"> <front> <title>A Certified Digital Signature</title> <seriesInfo name="DOI" value="10.1007/0-387-34805-0_21"/> <author fullname="R. Merkle" initials="R."surname="Merkle"> </author>surname="Merkle"/> <date year="1990"/> </front><seriesInfo name="Lecture" value="Notes<refcontent>Advances in Cryptology -- CRYPTO '89 Proceedings</refcontent> <refcontent>Lecture Notes in Computer Sciencecrypto89"/>Vol. 435</refcontent> </reference> <referenceanchor="M1989b"><front>anchor="M1989b"> <front> <title>One Way Hash Functions and DES</title> <seriesInfo name="DOI" value="10.1007/0-387-34805-0_40"/> <author fullname="R. Merkle" initials="R."surname="Merkle"> </author>surname="Merkle"/> <date year="1990"/> </front><seriesInfo name="Lecture" value="Notes<refcontent>Advances in Cryptology -- CRYPTO '89 Proceedings</refcontent> <refcontent>Lecture Notes in Computer Sciencecrypto89"/>Vol. 435</refcontent> </reference> <referenceanchor="NAS2019"><front>anchor="NAS2019"> <front> <title>Quantum Computing: Progress and Prospects</title> <seriesInfo name="DOI" value="10.17226/25196"/> <author> <organization>National Academies of Sciences, Engineering, and Medicine</organization> </author> <date year="2019"/> </front><seriesInfo name="The<refcontent>The National AcademiesPress," value="DOI 10.17226/25196"/> </reference> <reference anchor="PKIXASN1" target="http://www.rfc-editor.org/info/rfc5912"><front> <title>New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)</title> <author fullname="P. Hoffman" initials="P." surname="Hoffman"> </author> <author fullname="J. Schaad" initials="J." surname="Schaad"> </author> <date month="June" year="2010"/> </front> <seriesInfo name="RFC" value="5912"/> <seriesInfo name="DOI" value="10.17487/RFC5912"/>Press</refcontent> </reference> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5912.xml"/> <reference anchor="PQC"target="http://www.pqcrypto.org/www.springer.com/cda/content/document/cda_downloaddocument/9783540887010-c1.pdf"><front>target="http://www.springer.com/cda/content/document/cda_downloaddocument/9783540887010-c1.pdf"> <front> <title>Introduction to post-quantum cryptography</title> <seriesInfo name="DOI" value="10.1007/978-3-540-88702-7_1"/> <author fullname="D. Bernstein" initials="D."surname="Bernstein"> </author>surname="Bernstein"/> <date year="2009"/> </front> </reference>&RFC4086;<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4086.xml"/> </references> </references> <sectiontitle="ASN.1 Module" anchor="sect-appendix"> <figure><artwork><![CDATA[anchor="sect-appendix" numbered="true" toc="default"> <name>ASN.1 Module</name> <sourcecode name="" type="asn.1"><![CDATA[ <CODE STARTS> MTS-HashSig-2013 { 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) } DEFINITIONS IMPLICIT TAGS ::= BEGIN EXPORTS ALL; IMPORTS PUBLIC-KEY, SIGNATURE-ALGORITHM, SMIME-CAPS FROM AlgorithmInformation-2009 -- RFC 5911 [CMSASN1] { iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-algorithmInformation-02(58) } ; -- -- Object Identifiers -- id-alg-hss-lms-hashsig OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) alg(3) 17 } id-alg-mts-hashsig OBJECT IDENTIFIER ::= id-alg-hss-lms-hashsig -- -- Signature Algorithm and Public Key -- sa-HSS-LMS-HashSig SIGNATURE-ALGORITHM ::= { IDENTIFIER id-alg-hss-lms-hashsig PARAMS ARE absent PUBLIC-KEYS { pk-HSS-LMS-HashSig } SMIME-CAPS { IDENTIFIED BY id-alg-hss-lms-hashsig } } pk-HSS-LMS-HashSig PUBLIC-KEY ::= { IDENTIFIER id-alg-hss-lms-hashsig KEY HSS-LMS-HashSig-PublicKey PARAMS ARE absent CERT-KEY-USAGE { digitalSignature, nonRepudiation, keyCertSign, cRLSign } } HSS-LMS-HashSig-PublicKey ::= OCTET STRING -- -- Expand the signature algorithm set used by CMS [CMSASN1U] -- SignatureAlgorithmSet SIGNATURE-ALGORITHM ::= { sa-HSS-LMS-HashSig, ... } -- -- Expand the S/MIME capabilities set used by CMS [CMSASN1] -- SMimeCaps SMIME-CAPS ::= { sa-HSS-LMS-HashSig.&smimeCaps, ... } END <CODE ENDS>]]></artwork> </figure>]]></sourcecode> </section> <sectiontitle="Acknowledgements" numbered="no" anchor="acknowledgements"><t>numbered="false" anchor="acknowledgements" toc="default"> <name>Acknowledgements</name> <t> Many thanks toScott Fluhrer, Jonathan Hammell, Ben Kaduk, Panos Kampanakis, Barry Leiba, John Mattsson, Jim Schaad, Sean Turner, Daniel<contact fullname="Joe Clarke" />, <contact fullname="Roman Danyliw" />, <contact fullname="Scott Fluhrer" />, <contact fullname="Jonathan Hammell" />, <contact fullname="Ben Kaduk" />, <contact fullname="Panos Kampanakis" />, <contact fullname="Barry Leiba" />, <contact fullname="John Mattsson" />, <contact fullname="Jim Schaad" />, <contact fullname="Sean Turner" />, <contact fullname="Daniel VanGeest, Roman Danyliw, Dale Worley,Geest" />, andJoe Clarke<contact fullname="Dale Worley" /> for their careful review and comments.</t> </section> </back> </rfc>