<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-lamps-cms-hash-sig-10" indexInclude="true" ipr="trust200902" number="8708" prepTime="2020-02-12T14:58:29" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-lamps-cms-hash-sig-10" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8708" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="Use of the HSS/LMS Hash-Based Signature">Use of the HSS/LMS Hash-Based Signature Algorithm in the Cryptographic Message Syntax (CMS)</title>
    <seriesInfo name="RFC" value="8708" stream="IETF"/>
    <author fullname="Russ Housley" initials="R." surname="Housley">
      <organization abbrev="Vigil Security" showOnFrontPage="true">Vigil Security, LLC</organization>
      <address>
        <postal>
          <street>516 Dranesville Road</street>
          <city>Herndon</city>
          <region>VA</region>
          <code>20170</code>
          <country>United States of America</country>
        </postal>
        <email>housley@vigilsec.com</email>
      </address>
    </author>
    <date month="02" year="2020"/>
    <abstract pn="section-abstract">
      <t pn="section-abstract-1">
   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>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (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.
        </t>
        <t pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc8708" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t pn="section-boilerplate.2-1">
            Copyright (c) 2020 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-asn1">ASN.1</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.3">
                <t keepWithNext="true" pn="section-toc.1-1.1.2.3.1"><xref derivedContent="1.3" format="counter" sectionFormat="of" target="section-1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-motivation">Motivation</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t keepWithNext="true" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-hss-lms-hash-based-signatur">HSS/LMS Hash-Based Signature Algorithm Overview</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t keepWithNext="true" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-hierarchical-signature-syst">Hierarchical Signature System (HSS)</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t keepWithNext="true" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-leighton-micali-signature-l">Leighton-Micali Signature (LMS)</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t keepWithNext="true" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-leighton-micali-one-time-si">Leighton-Micali One-Time Signature (LM-OTS) Algorithm</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t keepWithNext="true" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-algorithm-identifiers-and-p">Algorithm Identifiers and Parameters</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t keepWithNext="true" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-hss-lms-public-key-identifi">HSS/LMS Public Key Identifier</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t keepWithNext="true" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-signed-data-conventions">Signed-Data Conventions</xref></t>
          </li>
          <li pn="section-toc.1-1.6">
            <t keepWithNext="true" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t keepWithNext="true" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t keepWithNext="true" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t keepWithNext="true" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t keepWithNext="true" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t keepWithNext="true" pn="section-toc.1-1.9.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-asn1-module">ASN.1 Module</xref></t>
          </li>
          <li pn="section-toc.1-1.10">
            <t keepWithNext="true" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t keepWithNext="true" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-address">Author's Address</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t pn="section-1-1">
   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) <xref target="RFC5652" format="default" sectionFormat="of" derivedContent="CMS"/>
   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 of hash-based digital signature, and it is described in <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>.  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 <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> are currently defined
   to exclusively use SHA-256 <xref target="SHS" format="default" sectionFormat="of" derivedContent="SHS"/>.</t>
      <section anchor="sect-1.1" numbered="true" toc="include" removeInRFC="false" pn="section-1.1">
        <name slugifiedName="name-asn1">ASN.1</name>
        <t pn="section-1.1-1">
   CMS values are generated using ASN.1 <xref target="ASN1-B" format="default" sectionFormat="of" derivedContent="ASN1-B"/>, using the Basic
   Encoding Rules (BER) and the Distinguished Encoding Rules (DER)
   <xref target="ASN1-E" format="default" sectionFormat="of" derivedContent="ASN1-E"/>.</t>
      </section>
      <section anchor="sect-1.2" numbered="true" toc="include" removeInRFC="false" pn="section-1.2">
        <name slugifiedName="name-terminology">Terminology</name>
        <t pn="section-1.2-1">
    The key words "<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 "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>
      <section anchor="sect-1.3" numbered="true" toc="include" removeInRFC="false" pn="section-1.3">
        <name slugifiedName="name-motivation">Motivation</name>
        <t pn="section-1.3-1">
   Recent advances in cryptanalysis <xref target="BH2013" format="default" sectionFormat="of" derivedContent="BH2013"/> and progress in the
   development of quantum computers <xref target="NAS2019" format="default" sectionFormat="of" derivedContent="NAS2019"/> pose a threat to widely
   deployed digital signature algorithms.  As a result, there is a need
   to prepare for a day when cryptosystems such as RSA and DSA that
   depend on discrete logarithms and factoring cannot be depended upon.</t>
        <t pn="section-1.3-2">
   If large-scale quantum computers are ever built, these computers will
   be able to break many of the public key cryptosystems currently in
   use.  A post-quantum cryptosystem <xref target="PQC" format="default" sectionFormat="of" derivedContent="PQC"/> 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, Elliptic Curve Digital
   Signature Algorithm (ECDSA), and Edwards-curve Digital Signature Algorithm (EdDSA)
   are all vulnerable if large-scale quantum computers are ever developed.</t>
        <t pn="section-1.3-3">
   Since the HSS/LMS signature algorithm does not depend on the
   difficulty of discrete logarithms or factoring, the HSS/LMS signature
   algorithm is considered to be post-quantum secure.  One use of post-quantum-secure signatures is the protection of software updates,
   perhaps using the format described in <xref target="RFC4108" format="default" sectionFormat="of" derivedContent="FWPROT"/>, to enable deployment
   of software that implements new cryptosystems.</t>
      </section>
    </section>
    <section anchor="sect-2" numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-hss-lms-hash-based-signatur">HSS/LMS Hash-Based Signature Algorithm Overview</name>
      <t pn="section-2-1">
   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 pn="section-2-2">
   This specification makes use of the hash-based algorithm specified in
   <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>, which is the Leighton and Micali adaptation <xref target="LM" format="default" sectionFormat="of" derivedContent="LM"/> of the
   original Lamport-Diffie-Winternitz-Merkle one-time signature system
   <xref target="M1979" format="default" sectionFormat="of" derivedContent="M1979"/> <xref target="M1987" format="default" sectionFormat="of" derivedContent="M1987"/> <xref target="M1989a" format="default" sectionFormat="of" derivedContent="M1989a"/> <xref target="M1989b" format="default" sectionFormat="of" derivedContent="M1989b"/>.</t>
      <t pn="section-2-3">
   As implied by the name, the hash-based signature algorithm depends on
   a collision-resistant hash function.  The hash-based signature
   algorithm specified in <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> uses only the SHA-256 one-way hash
   function <xref target="SHS" format="default" sectionFormat="of" derivedContent="SHS"/>, but it establishes an IANA registry <xref target="IANA-LMS" format="default" sectionFormat="of" derivedContent="IANA-LMS"/> to
   permit the registration of additional one-way hash functions in the
   future.</t>
      <section anchor="sect-2.1" numbered="true" toc="include" removeInRFC="false" pn="section-2.1">
        <name slugifiedName="name-hierarchical-signature-syst">Hierarchical Signature System (HSS)</name>
        <t pn="section-2.1-1">
   The MTS system specified in <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> uses a hierarchy of trees.  The
   N-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 pn="section-2.1-2">
   An HSS signature as specified in <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> carries the number of
   signed public keys (Nspk), followed by that number of signed public
   keys, followed by the LMS signature as described in <xref target="sect-2.2" format="default" sectionFormat="of" derivedContent="Section 2.2"/>.  The
   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
   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 <xref target="sect-2.2" format="default" sectionFormat="of" derivedContent="Section 2.2"/>.</t>
        <t pn="section-2.1-3">
   The elements of the HSS signature value for a standalone tree (a top
   tree with no children) can be summarized as:</t>
        <artwork name="" type="" align="left" alt="" pn="section-2.1-4">
   u32str(0) ||
   lms_signature  /* signature of message */
</artwork>
        <t pn="section-2.1-5">where, u32str() and || are used as defined in <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>.</t>
        <t pn="section-2.1-6">
   The elements of the HSS signature value for a tree with Nspk signed
   public keys can be summarized as:</t>
        <artwork name="" type="" align="left" alt="" pn="section-2.1-7">
   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>
        <t pn="section-2.1-8">
   where, as defined in <xref target="RFC8554" sectionFormat="of" section="3.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8554#section-3.3" derivedContent="HASHSIG"/>, the signed_public_key
   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
   hierarchy of trees minus 1.</t>
      </section>
      <section anchor="sect-2.2" numbered="true" toc="include" removeInRFC="false" pn="section-2.2">
        <name slugifiedName="name-leighton-micali-signature-l">Leighton-Micali Signature (LMS)</name>
        <t pn="section-2.2-1">
   Each tree in the system specified in <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> uses the Leighton-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 <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> specification supports
   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,
   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 <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>
   specification supports only the SHA-256 hash function <xref target="SHS" format="default" sectionFormat="of" derivedContent="SHS"/>, with
   m=32.  As a result, the <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> specification supports five tree
   sizes; they are identified as:</t>
        <ul bare="false" empty="false" spacing="normal" pn="section-2.2-2">
          <li pn="section-2.2-2.1">LMS_SHA256_M32_H5</li>
          <li pn="section-2.2-2.2">LMS_SHA256_M32_H10</li>
          <li pn="section-2.2-2.3">LMS_SHA256_M32_H15</li>
          <li pn="section-2.2-2.4">LMS_SHA256_M32_H20</li>
          <li pn="section-2.2-2.5">LMS_SHA256_M32_H25</li>
        </ul>
        <t pn="section-2.2-3">
   The <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> specification establishes an IANA registry <xref target="IANA-LMS" format="default" sectionFormat="of" derivedContent="IANA-LMS"/>
   to permit the registration of additional hash functions and
   additional tree sizes in the future.</t>
        <t pn="section-2.2-4">
   As specified in <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>, the LMS public key consists of four
   elements: the lms_algorithm_type from the list above, the otstype to
   identify the Leighton-Micali One-Time Signature (LM-OTS) type as discussed in <xref target="sect-2.3" format="default" sectionFormat="of" derivedContent="Section 2.3"/>, the private key
   identifier (I) as described in <xref target="RFC8554" sectionFormat="of" section="5.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8554#section-5.3" derivedContent="HASHSIG"/>, and the m-byte string associated with the root node of the tree (T[1]).</t>
        <t pn="section-2.2-5">
   The LMS public key can be summarized as:</t>
        <artwork name="" type="" align="left" alt="" pn="section-2.2-6">
   u32str(lms_algorithm_type) || u32str(otstype) || I || T[1]
</artwork>
        <t pn="section-2.2-7">
   As specified in <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>, 
an LMS signature consists of four
  elements: the number of the leaf (q) associated with the LM-OTS
  signature value, an LM-OTS signature value as described in
<xref target="sect-2.3" format="default" sectionFormat="of" derivedContent="Section 2.3"/>, 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 the root.
</t>
        <t pn="section-2.2-8">
   The four elements of the LMS signature value can be summarized as:</t>
        <artwork name="" type="" align="left" alt="" pn="section-2.2-9">
   u32str(q) ||
   ots_signature ||
   u32str(type) ||
   path[0] || path[1] || ... || path[h-1]
</artwork>
      </section>
      <section anchor="sect-2.3" numbered="true" toc="include" removeInRFC="false" pn="section-2.3">
        <name slugifiedName="name-leighton-micali-one-time-si">Leighton-Micali One-Time Signature (LM-OTS) Algorithm</name>
        <t pn="section-2.3-1">
   Merkle Tree Signatures (MTS) depend on a one-time signature method,
   and <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> specifies the use of the LM-OTS, which has five
   parameters:</t>
        <dl indent="5" newline="false" spacing="normal" pn="section-2.3-2">
          <dt pn="section-2.3-2.1">n:</dt>
          <dd pn="section-2.3-2.2">The length in bytes of the hash function output.  <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> supports only SHA-256 <xref target="SHS" format="default" sectionFormat="of" derivedContent="SHS"/>, with n=32.</dd>
          <dt pn="section-2.3-2.3">H:</dt>
          <dd pn="section-2.3-2.4">A preimage-resistant hash function that accepts byte strings of any length and returns an n-byte string.</dd>
          <dt pn="section-2.3-2.5">w:</dt>
          <dd pn="section-2.3-2.6">The width in bits of the Winternitz coefficients. <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> supports four values for this parameter: w=1, w=2, w=4, and w=8.</dd>
          <dt pn="section-2.3-2.7">p:</dt>
          <dd pn="section-2.3-2.8">The number of n-byte string elements that make up the LM-OTS signature value.</dd>
          <dt pn="section-2.3-2.9">ls:</dt>
          <dd pn="section-2.3-2.10">The number of bits that are left-shifted in the final step of
the checksum function, which is defined in <xref target="RFC8554" sectionFormat="of" section="4.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8554#section-4.4" derivedContent="HASHSIG"/>.</dd>
        </dl>
        <t pn="section-2.3-3">
   The values of p and ls are dependent on the choices of the parameters
   n and w, as described in <xref target="RFC8554" sectionFormat="of" section="B" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8554#appendix-B" derivedContent="HASHSIG"/>.</t>
        <t pn="section-2.3-4">
   The <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> specification supports four LM-OTS variants:</t>
        <ul bare="false" empty="false" spacing="normal" pn="section-2.3-5">
          <li pn="section-2.3-5.1">LMOTS_SHA256_N32_W1</li>
          <li pn="section-2.3-5.2">LMOTS_SHA256_N32_W2</li>
          <li pn="section-2.3-5.3">LMOTS_SHA256_N32_W4</li>
          <li pn="section-2.3-5.4">LMOTS_SHA256_N32_W8</li>
        </ul>
        <t pn="section-2.3-6">
   The <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> specification establishes an IANA registry <xref target="IANA-LMS" format="default" sectionFormat="of" derivedContent="IANA-LMS"/>
   to permit the registration of additional variants in the future.</t>
        <t pn="section-2.3-7">
   Signing involves the generation of C, an n-byte random value.</t>
        <t pn="section-2.3-8">
   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 public key, as
   described in <xref target="RFC8554" sectionFormat="of" section="4.5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8554#section-4.5" derivedContent="HASHSIG"/>:</t>
        <artwork name="" type="" align="left" alt="" pn="section-2.3-9">
   u32str(otstype) || C || y[0] || ... || y[p-1]
</artwork>
      </section>
    </section>
    <section anchor="sect-3" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-algorithm-identifiers-and-p">Algorithm Identifiers and Parameters</name>
      <t pn="section-3-1">
   The algorithm identifier for an HSS/LMS hash-based signature is: </t>
      <sourcecode type="asn.1" markers="false" pn="section-3-2">
   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 }
</sourcecode>
      <t pn="section-3-3">
   When this object identifier is used for an HSS/LMS signature, the
   AlgorithmIdentifier parameters field <bcp14>MUST</bcp14> be absent (that is, the
   parameters are not present, and the parameters are not set to NULL).</t>
      <t pn="section-3-4">
   The signature value is a large OCTET STRING, as described in <xref target="sect-2" format="default" sectionFormat="of" derivedContent="Section 2"/>
   of this document.  The signature format is designed for easy parsing.
 The HSS, LMS, and LM-OTS components of the signature value each
 include a counter and a typecode that indirectly provide all of the
 information
 that is needed to parse the value during signature validation.
</t>
      <t pn="section-3-5">
   The signature value identifies the hash function used in the HSS/LMS
   tree.  <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/> uses only the SHA-256 hash function <xref target="SHS" format="default" sectionFormat="of" derivedContent="SHS"/>, but it
   establishes an IANA registry <xref target="IANA-LMS" format="default" sectionFormat="of" derivedContent="IANA-LMS"/> to permit the registration of
   additional hash functions in the future.</t>
    </section>
    <section anchor="sect-4" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-hss-lms-public-key-identifi">HSS/LMS Public Key Identifier</name>
      <t pn="section-4-1">
   The AlgorithmIdentifier for an HSS/LMS public key uses the id-alg-hss-lms-hashsig object identifier, and the parameters field <bcp14>MUST</bcp14> be
   absent.</t>
      <t pn="section-4-2">
   When this AlgorithmIdentifier appears in the SubjectPublicKeyInfo
   field of an X.509 certificate <xref target="RFC5280" format="default" sectionFormat="of" derivedContent="RFC5280"/>, the certificate key usage
   extension <bcp14>MAY</bcp14> contain digitalSignature, nonRepudiation, keyCertSign,
   and cRLSign; however, it <bcp14>MUST NOT</bcp14> contain other values.</t>
      <sourcecode type="asn.1" markers="false" pn="section-4-3">
   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
</sourcecode>
      <t pn="section-4-4">
   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
   <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>.</t>
      <t pn="section-4-5">
   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 pn="section-4-6">
   The HSS/LMS public key value can be described as:</t>
      <artwork name="" type="" align="left" alt="" pn="section-4-7">
      u32str(L) || lms_public_key
</artwork>
      <t pn="section-4-8">
   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.</t>
    </section>
    <section anchor="sect-5" numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-signed-data-conventions">Signed-Data Conventions</name>
      <t pn="section-5-1">
   As specified in <xref target="RFC5652" format="default" sectionFormat="of" derivedContent="CMS"/>, 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 pn="section-5-2">
   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, then 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
   (which <bcp14>MUST</bcp14> include a content-type attribute and a message-digest
   attribute).  In summary:</t>
      <sourcecode name="pseudocode" type="" markers="false" pn="section-5-3">
   IF (signed attributes are absent)
   THEN HSS_LMS_Sign(content)
   ELSE message-digest attribute = Hash(content);
        HSS_LMS_Sign(DER(SignedAttributes))
</sourcecode>
      <t pn="section-5-4">
   When using <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>, the fields in the SignerInfo are used as
   follows:</t>
      <ul bare="false" empty="false" spacing="normal" pn="section-5-5">
        <li pn="section-5-5.1">
      digestAlgorithm <bcp14>MUST</bcp14> contain the one-way hash function used in the
      HSS/LMS tree.  In <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>, 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 <xref target="RFC5912" format="default" sectionFormat="of" derivedContent="PKIXASN1"/> is repeated here:</li>
      </ul>
      <sourcecode type="asn.1" markers="false" pn="section-5-6">
         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 }
</sourcecode>
      <ul bare="false" empty="false" spacing="normal" pn="section-5-7">
        <li pn="section-5-7.1">
      signatureAlgorithm <bcp14>MUST</bcp14> contain id-alg-hss-lms-hashsig, and the
      algorithm parameters field <bcp14>MUST</bcp14> be absent.</li>
        <li pn="section-5-7.2">
      signature contains the single HSS signature value resulting from
      the signing operation as specified in <xref target="RFC8554" format="default" sectionFormat="of" derivedContent="HASHSIG"/>.</li>
      </ul>
    </section>
    <section anchor="sect-6" numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t pn="section-6-1">
   Implementations <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 implementation <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 on non-volatile media or in 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 pn="section-6-2">
   When generating an LMS key pair, an implementation <bcp14>MUST</bcp14> generate each
   key pair independently of all other key pairs in the HSS tree.</t>
      <t pn="section-6-3">
   An implementation <bcp14>MUST</bcp14> ensure that an LM-OTS private key is used to
   generate a signature only one time and ensure that it cannot be used
   for any other purpose.</t>
      <t pn="section-6-4">
   The generation of private keys relies on random numbers.  The use of
   inadequate pseudorandom 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 than brute-force searching the whole key space.  The generation of quality
   random numbers is difficult, and <xref target="RFC4086" format="default" sectionFormat="of" derivedContent="RFC4086"/> offers important guidance
   in this area.</t>
      <t pn="section-6-5">
   The generation of hash-based signatures also depends on random
   numbers.  While the consequences of an inadequate pseudorandom
   number generator (PRNG) to generate these values is much less severe
   than in the generation of private keys, the guidance in <xref target="RFC4086" format="default" sectionFormat="of" derivedContent="RFC4086"/>
   remains important.</t>
      <t pn="section-6-6">
   When computing signatures, the same hash function <bcp14>SHOULD</bcp14> be used to
   compute the message digest of the content and the signed attributes, if they are present.</t>
    </section>
    <section anchor="sect-7" numbered="true" toc="include" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t pn="section-7-1">
   In the "SMI Security for S/MIME Module Identifier (1.2.840.113549.1.9.16.0)"
   registry, IANA has updated the reference for value 64 to point to this
   document.</t>
      <t pn="section-7-2">
   In the "SMI Security for S/MIME Algorithms (1.2.840.113549.1.9.16.3)"
   registry, IANA has updated the description for value 17 to
   "id-alg-hss-lms-hashsig" and updated the reference to point to this
   document.</t>
      <t pn="section-7-3">
   IANA has also added the following note to the "SMI Security for S/⁠MIME
      Algorithms (1.2.840.113549.1.9.16.3)" registry:</t>
      <ul empty="true" bare="false" spacing="normal" pn="section-7-4">
        <li pn="section-7-4.1">Value 17, "id-alg-hss-lms-hashsig", is also referred to as
      "id-alg-mts-hashsig".</li>
      </ul>
    </section>
  </middle>
  <back>
    <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 pn="section-8">
      <name slugifiedName="name-references">References</name>
      <references pn="section-8.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="ASN1-B" quoteTitle="true" derivedAnchor="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 showOnFrontPage="true">ITU-T</organization>
            </author>
            <date month="August" year="2015"/>
          </front>
        </reference>
        <reference anchor="ASN1-E" quoteTitle="true" derivedAnchor="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>
            <seriesInfo name="ITU-T" value="Recommendation X.690"/>
            <author>
              <organization showOnFrontPage="true">ITU-T</organization>
            </author>
            <date month="August" year="2015"/>
          </front>
        </reference>
        <reference anchor="RFC5652" target="https://www.rfc-editor.org/info/rfc5652" quoteTitle="true" derivedAnchor="CMS">
          <front>
            <title>Cryptographic Message Syntax (CMS)</title>
            <author initials="R." surname="Housley" fullname="R. Housley">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2009" month="September"/>
            <abstract>
              <t>This document describes the Cryptographic Message Syntax (CMS).  This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary message content.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="70"/>
          <seriesInfo name="RFC" value="5652"/>
          <seriesInfo name="DOI" value="10.17487/RFC5652"/>
        </reference>
        <reference anchor="RFC8554" target="https://www.rfc-editor.org/info/rfc8554" quoteTitle="true" derivedAnchor="HASHSIG">
          <front>
            <title>Leighton-Micali Hash-Based Signatures</title>
            <author initials="D." surname="McGrew" fullname="D. McGrew">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Curcio" fullname="M. Curcio">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Fluhrer" fullname="S. Fluhrer">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2019" month="April"/>
            <abstract>
              <t>This note describes a digital-signature system based on cryptographic hash functions, following the seminal work in this area of Lamport, Diffie, Winternitz, and Merkle, as adapted by Leighton and Micali in 1995.  It specifies a one-time signature scheme and a general signature scheme.  These systems provide asymmetric authentication without using large integer mathematics and can achieve a high security level.  They are suitable for compact implementations, are relatively simple to implement, and are naturally resistant to side-channel attacks.  Unlike many other signature systems, hash-based signatures would still be secure even if it proves feasible for an attacker to build a quantum computer.</t>
              <t>This document is a product of the Crypto Forum Research Group (CFRG) in the IRTF.  This has been reviewed by many researchers, both in the research group and outside of it.  The Acknowledgements section lists many of them.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8554"/>
          <seriesInfo name="DOI" value="10.17487/RFC8554"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280" quoteTitle="true" derivedAnchor="RFC5280">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <author initials="D." surname="Cooper" fullname="D. Cooper">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Santesson" fullname="S. Santesson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Farrell" fullname="S. Farrell">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Boeyen" fullname="S. Boeyen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Housley" fullname="R. Housley">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="W." surname="Polk" fullname="W. Polk">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2008" month="May"/>
            <abstract>
              <t>This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet.  An overview of this approach and model is provided as an introduction.  The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms.  Standard certificate extensions are described and two Internet-specific extensions are defined.  A set of required certificate extensions is specified.  The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions.  An algorithm for X.509 certification path validation is described.  An ASN.1 module and examples are provided in the appendices.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5280"/>
          <seriesInfo name="DOI" value="10.17487/RFC5280"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="SHS" quoteTitle="true" target="https://doi.org/10.6028/NIST.FIPS.180-4" derivedAnchor="SHS">
          <front>
            <title>Secure Hash Standard (SHS)</title>
            <seriesInfo name="FIPS PUB" value="180-4"/>
            <author>
              <organization showOnFrontPage="true">National Institute of Standards and Technology (NIST)</organization>
            </author>
            <date month="August" year="2015"/>
          </front>
          <seriesInfo name="DOI" value="10.6028/NIST.FIPS.180-4"/>
        </reference>
      </references>
      <references pn="section-8.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="BH2013" target="https://media.blackhat.com/us-13/us-13-Stamos-The-Factoring-Dead.pdf" quoteTitle="true" derivedAnchor="BH2013">
          <front>
            <title>The Factoring Dead: Preparing for the Cryptopocalypse</title>
            <author fullname="Thomas Ptacek" initials="T." surname="Ptacek"/>
            <author fullname="Tom Ritter" initials="T." surname="Ritter"/>
            <author fullname="Javed Samuel" initials="J." surname="Samuel"/>
            <author fullname="Alex Stamos" initials="A." surname="Stamos"/>
            <date month="August" year="2013"/>
          </front>
        </reference>
        <reference anchor="RFC5911" target="https://www.rfc-editor.org/info/rfc5911" quoteTitle="true" derivedAnchor="CMSASN1">
          <front>
            <title>New ASN.1 Modules for Cryptographic Message Syntax (CMS) and S/MIME</title>
            <author initials="P." surname="Hoffman" fullname="P. Hoffman">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Schaad" fullname="J. Schaad">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="June"/>
            <abstract>
              <t>The Cryptographic Message Syntax (CMS) format, and many associated formats, are expressed using ASN.1.  The current ASN.1 modules conform to the 1988 version of ASN.1.  This document updates those ASN.1 modules to conform to the 2002 version of ASN.1.  There are no bits-on-the-wire changes to any of the formats; this is simply a change to the syntax.  This document is not an Internet Standards Track  specification; it is published for informational purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5911"/>
          <seriesInfo name="DOI" value="10.17487/RFC5911"/>
        </reference>
        <reference anchor="RFC6268" target="https://www.rfc-editor.org/info/rfc6268" quoteTitle="true" derivedAnchor="CMSASN1U">
          <front>
            <title>Additional New ASN.1 Modules for the Cryptographic Message Syntax (CMS) and the Public Key Infrastructure Using X.509 (PKIX)</title>
            <author initials="J." surname="Schaad" fullname="J. Schaad">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Turner" fullname="S. Turner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2011" month="July"/>
            <abstract>
              <t>The Cryptographic Message Syntax (CMS) format, and many associated formats, are expressed using ASN.1.  The current ASN.1 modules conform to the 1988 version of ASN.1.  This document updates some auxiliary ASN.1 modules to conform to the 2008 version of ASN.1; the 1988 ASN.1 modules remain the normative version.  There are no bits- on-the-wire changes to any of the formats; this is simply a change to the syntax.  This document is not an Internet Standards Track  specification; it is published for informational purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6268"/>
          <seriesInfo name="DOI" value="10.17487/RFC6268"/>
        </reference>
        <reference anchor="RFC4108" target="https://www.rfc-editor.org/info/rfc4108" quoteTitle="true" derivedAnchor="FWPROT">
          <front>
            <title>Using Cryptographic Message Syntax (CMS) to Protect Firmware Packages</title>
            <author initials="R." surname="Housley" fullname="R. Housley">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2005" month="August"/>
            <abstract>
              <t>This document describes the use of the Cryptographic Message Syntax (CMS) to protect firmware packages, which provide object code for one or more hardware module components.  CMS is specified in RFC 3852.  A digital signature is used to protect the firmware package from undetected modification and to provide data origin authentication. Encryption is optionally used to protect the firmware package from disclosure, and compression is optionally used to reduce the size of the protected firmware package.  A firmware package loading receipt can optionally be generated to acknowledge the successful loading of a firmware package.  Similarly, a firmware package load error report can optionally be generated to convey the failure to load a firmware package.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4108"/>
          <seriesInfo name="DOI" value="10.17487/RFC4108"/>
        </reference>
        <reference anchor="IANA-LMS" target="https://www.iana.org/assignments/leighton-micali-signatures/" quoteTitle="true" derivedAnchor="IANA-LMS">
          <front>
            <title>Leighton-Micali Signatures (LMS)</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="LM" quoteTitle="true" derivedAnchor="LM">
          <front>
            <title>Large provably fast and secure digital signature schemes based on secure hash functions</title>
            <seriesInfo name="U.S." value="Patent 5,432,852"/>
            <author fullname="T. Leighton" initials="T." surname="Leighton"/>
            <author fullname="S. Micali" initials="S." surname="Micali"/>
            <date month="July" year="1995"/>
          </front>
        </reference>
        <reference anchor="M1979" quoteTitle="true" derivedAnchor="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"/>
            <date year="1979"/>
          </front>
        </reference>
        <reference anchor="M1987" quoteTitle="true" target="https://doi.org/10.1007/3-540-48184-2_32" derivedAnchor="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"/>
            <date year="1988"/>
          </front>
          <refcontent>Advances in Cryptology -- CRYPTO '87 Proceedings</refcontent>
          <refcontent>Lecture Notes in Computer Science Vol. 293</refcontent>
        </reference>
        <reference anchor="M1989a" quoteTitle="true" target="https://doi.org/10.1007/0-387-34805-0_21" derivedAnchor="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"/>
            <date year="1990"/>
          </front>
          <refcontent>Advances in Cryptology -- CRYPTO '89 Proceedings</refcontent>
          <refcontent>Lecture Notes in Computer Science Vol. 435</refcontent>
        </reference>
        <reference anchor="M1989b" quoteTitle="true" target="https://doi.org/10.1007/0-387-34805-0_40" derivedAnchor="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"/>
            <date year="1990"/>
          </front>
          <refcontent>Advances in Cryptology -- CRYPTO '89 Proceedings</refcontent>
          <refcontent>Lecture Notes in Computer Science Vol. 435</refcontent>
        </reference>
        <reference anchor="NAS2019" quoteTitle="true" target="https://doi.org/10.17226/25196" derivedAnchor="NAS2019">
          <front>
            <title>Quantum Computing: Progress and Prospects</title>
            <seriesInfo name="DOI" value="10.17226/25196"/>
            <author>
              <organization showOnFrontPage="true">National Academies of Sciences, Engineering, and Medicine</organization>
            </author>
            <date year="2019"/>
          </front>
          <refcontent>The National Academies Press</refcontent>
        </reference>
        <reference anchor="RFC5912" target="https://www.rfc-editor.org/info/rfc5912" quoteTitle="true" derivedAnchor="PKIXASN1">
          <front>
            <title>New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)</title>
            <author initials="P." surname="Hoffman" fullname="P. Hoffman">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Schaad" fullname="J. Schaad">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="June"/>
            <abstract>
              <t>The Public Key Infrastructure using X.509 (PKIX) certificate format, and many associated formats, are expressed using ASN.1.  The current ASN.1 modules conform to the 1988 version of ASN.1.  This document updates those ASN.1 modules to conform to the 2002 version of ASN.1. There are no bits-on-the-wire changes to any of the formats; this is simply a change to the syntax.  This document is not an Internet  Standards Track specification; it is published for informational  purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5912"/>
          <seriesInfo name="DOI" value="10.17487/RFC5912"/>
        </reference>
        <reference anchor="PQC" target="http://www.springer.com/cda/content/document/cda_downloaddocument/9783540887010-c1.pdf" quoteTitle="true" derivedAnchor="PQC">
          <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"/>
            <date year="2009"/>
          </front>
        </reference>
        <reference anchor="RFC4086" target="https://www.rfc-editor.org/info/rfc4086" quoteTitle="true" derivedAnchor="RFC4086">
          <front>
            <title>Randomness Requirements for Security</title>
            <author initials="D." surname="Eastlake 3rd" fullname="D. Eastlake 3rd">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Schiller" fullname="J. Schiller">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Crocker" fullname="S. Crocker">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2005" month="June"/>
            <abstract>
              <t>Security systems are built on strong cryptographic algorithms that foil pattern analysis attempts.  However, the security of these systems is dependent on generating secret quantities for passwords, cryptographic keys, and similar quantities.  The use of pseudo-random processes to generate secret quantities can result in pseudo-security. A sophisticated attacker may find it easier to reproduce the environment that produced the secret quantities and to search the resulting small set of possibilities than to locate the quantities in the whole of the potential number space.</t>
              <t>Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult.  This document points out many pitfalls in using poor entropy sources or traditional pseudo-random number generation techniques for generating such quantities.  It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. It provides suggestions to ameliorate the problem when a hardware solution is not available, and it gives examples of how large such quantities need to be for some applications.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="106"/>
          <seriesInfo name="RFC" value="4086"/>
          <seriesInfo name="DOI" value="10.17487/RFC4086"/>
        </reference>
      </references>
    </references>
    <section anchor="sect-appendix" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-asn1-module">ASN.1 Module</name>
      <sourcecode name="" type="asn.1" markers="false" pn="section-appendix.a-1">
&lt;CODE STARTS&gt;

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.&amp;smimeCaps, ... }

END

&lt;CODE ENDS&gt;
</sourcecode>
    </section>
    <section numbered="false" anchor="acknowledgements" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t pn="section-appendix.b-1">
   Many thanks to <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 Van Geest"/>, and <contact fullname="Dale Worley"/> for their careful review and
   comments.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-address">Author's Address</name>
      <author fullname="Russ Housley" initials="R." surname="Housley">
        <organization abbrev="Vigil Security" showOnFrontPage="true">Vigil Security, LLC</organization>
        <address>
          <postal>
            <street>516 Dranesville Road</street>
            <city>Herndon</city>
            <region>VA</region>
            <code>20170</code>
            <country>United States of America</country>
          </postal>
          <email>housley@vigilsec.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
