<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8391 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8391.xml">
<!ENTITY RFC5280 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5280.xml">
<!ENTITY RFC4086 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4086.xml">
<!ENTITY RFC3279 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3279.xml">
<!ENTITY RFC8410 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8410.xml">
<!ENTITY RFC8411 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8411.xml">
<!ENTITY RFC4506 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4506.xml">
<!ENTITY I-D.mcgrew-hash-sigs SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.mcgrew-hash-sigs.xml">
<!ENTITY I-D.ietf-lamps-cms-hash-sig SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lamps-cms-hash-sig.xml">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> <!-- used by XSLT processors -->
<!-- OPTIONS, known as processing instructions (PIs) go here. -->
<!-- For a complete list and description of PIs,
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable PIs that most I-Ds might want to use. -->
<?rfc strict="yes" ?> <!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC): -->
<?rfc toc="yes"?> <!-- generate a ToC -->
<?rfc tocdepth="2"?> <!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references: -->
<?rfc symrefs="yes"?> <!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?> <!-- sort the reference entries alphabetically -->
<!-- control vertical white space: 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?> <!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?> <!-- keep one blank line between list items -->
<!-- end of popular PIs -->
<rfc  category="std" docName="draft-vangeest-x509-hash-sigs-02" ipr="trust200902">
  <front>
    <title abbrev="Hash-Based Signatures for X.509">Algorithm Identifiers for HSS and XMSS for Use in the Internet X.509 Public Key Infrastructure</title>
    <author fullname="Daniel Van Geest" initials="D" surname="Van Geest">
      <organization>ISARA Corporation</organization>
      <address>
        <postal>
      <street>560 Westmount Rd N</street>
      <city>Waterloo</city>
      <region>Ontario</region>
      <code>N2L 0A9</code>
      <country>Canada</country>
        </postal>
<!-- <phone/> -->
<!-- <facsimile/> -->
      <email>daniel.vangeest@isara.com</email>
<!-- <uri/> -->
      </address>
    </author>
    <author fullname="Scott Fluhrer" initials="S" surname="Fluhrer">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
      <street>170 West Tasman Drive</street>
      <city>San Jose</city>
      <region>CA</region>
      <code>95134</code>
      <country>USA</country>
        </postal>
<!-- <phone/> -->
<!-- <facsimile/> -->
      <email>sfluhrer@cisco.com</email>
<!-- <uri/> -->
      </address>
    </author>
    <date year="2019" />
<!-- <area/> -->
<!-- <workgroup/> -->
      <keyword>x509</keyword>
      <keyword>HSS</keyword>
      <keyword>XMSS</keyword>
      <keyword>AlgorithmIdentifier</keyword>
    <abstract>
      <t>
        This document specifies algorithm identifiers and ASN.1 encoding formats for the Hierarchical Signature System (HSS), eXtended Merkle Signature Scheme (XMSS), and XMSS^MT, a multi-tree variant of XMSS.  This specification applies to the Internet X.509 Public Key infrastructure (PKI) when digital signatures are used to sign certificates and certificate revocation lists (CRLs).
      </t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction">

      <t>
        The Hierarchical Signature System (HSS) is described in <xref target="I-D.mcgrew-hash-sigs"/>.
      </t>
      <t>
        The eXtended Merkle Signature Scheme (XMSS), and its multi-tree variant XMSS^MT, are described in <xref target="RFC8391"/>.
      </t>
      <t>
        These signature algorithms are based on well-studied Hash Based Signature (HBS) schemes, which can withstand known attacks using quantum computers.  They combine Merkle Trees with One Time Signature (OTS) schemes in order to create signature systems which can sign a large but limited number of messages per private key.  The private keys are stateful; a key's state must be updated and persisted after signing to prevent reuse of OTS keys.  If an OTS key is reused, cryptographic security is not guaranteed for that key.
      </t>
      <t>
        Due to the statefulness of the private key and the limited number of signatures that can be created, these signature algorithms might not be appropriate for use in interactive protocols.  While the right selection of algorithm parameters would allow a private key to sign a virtually unbounded number of messages (e.g. 2^60), this is at the cost of a larger signature size and longer signing time.  Since these algorithms are already known to be secure against quantum attacks, and because roots of trust are generally long-lived and can take longer to be deployed than end-entity certificates, these signature algorithms are more appropriate to be used in root and subordinate CA certificates.  They are also appropriate in non-interactive contexts such as code signing.  In particular, there are multi-party IoT ecosystems where publicly trusted code signing certificates are useful.
      </t>
      <t>
        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
        this document are to be interpreted as described in
        <xref target="RFC2119"/>.
      </t>
<!-- NOT YET
      <t>
        This document is being discussed on the xyz@example.org mailing list.
      </t>
-->

    </section>  <!-- Introduction -->

    <section anchor="SPKA" title="Subject Public Key Algorithms">

      <t>
        Certificates conforming to <xref target="RFC5280"/> can convey a public key for any public key algorithm.  The certificate indicates the algorithm through an algorithm identifier.  An algorithm identifier consists of an OID and optional parameters.
      </t>
      <t>
        In this document, we define new OIDs for identifying the different hash-based signature algorithms.  An additional OID is defined in <xref target="I-D.ietf-lamps-cms-hash-sig"/> and repeated here for convenience.  For all of the OIDs, the parameters MUST be absent.
      </t>

      <section anchor="HSS-PUB" title="HSS Public Keys">

        <t>
          The object identifier and public key algorithm identifier for HSS is defined in <xref target="I-D.ietf-lamps-cms-hash-sig"/>.  The definitions are repeated here for reference.
        </t>
        <t>
          The object identifier for an HSS public key is id-alg-hss-lms-hashsig:
          <figure><artwork>
   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>
          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 of the document that became <xref target="I-D.ietf-lamps-cms-hash-sig"/>.
        </t>
        <t>
          The HSS public key's properties are defined as follows:
          <figure><artwork>
   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>
        </t>
        <t>
          <xref target="I-D.ietf-lamps-cms-hash-sig"/> contains more information on the contents and format of an HSS public key.
        </t>

      </section> <!-- HSS Public Keys -->

      <section anchor="XMSS-PUB" title="XMSS Public Keys">

        <t>
          The object identifier for an XMSS public key is id-alg-xmss:
        </t>
        <t>
          <figure><artwork>
   id-alg-xmss  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmss(13) 0 }
          </artwork></figure>
        </t>
        <t>
          The XMSS public key's properties are defined as follows:
          <figure><artwork>
   pk-XMSS PUBLIC-KEY ::= {
      IDENTIFIER id-alg-xmss
      KEY XMSS-PublicKey
      PARAMS ARE absent
      CERT-KEY-USAGE
         { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

   XMSS-PublicKey ::= OCTET STRING
          </artwork></figure>
        </t>
        <t>
          The format of an XMSS public key is is formally defined using XDR <xref target="RFC4506"/> and is defined in Appendix B.3 of <xref target="RFC8391"/>.  In particular, the first 4 bytes represents the big-ending encoding of the XMSS algorithm type.
        </t>

      </section>  <!-- XMSS Public Keys -->

      <section anchor="XMSSMT-PUB" title="XMSS^MT Public Keys">

        <t>
          The object identifier for an XMSS^MT public key is id-alg-xmssmt:
        </t>
        <t>
          <figure><artwork>
   id-alg-xmssmt  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmssmt(14) 0 }
          </artwork></figure>
        </t>
        <t>
          The XMSS^MT public key's properties are defined as follows:
          <figure><artwork>
   pk-XMSSMT PUBLIC-KEY ::= {
      IDENTIFIER id-alg-xmssmt
      KEY XMSSMT-PublicKey
      PARAMS ARE absent
      CERT-KEY-USAGE
         { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

   XMSSMT-PublicKey ::= OCTET STRING
          </artwork></figure>
        </t>
        <t>
          The format of an XMSS^MT public key is is formally defined using XDR <xref target="RFC4506"/> and is defined in Appendix C.3 of <xref target="RFC8391"/>.  In particular, the first 4 bytes represents the big-ending encoding of the XMSS^MT algorithm type.
        </t>

      </section> <!-- XMSS^MT Public Keys -->

    </section>  <!-- Subject Public Key Algorithms -->

    <section anchor="KeyUsage" title="Key Usage Bits">
      <t>
        The intended application for the key is indicated in the keyUsage certificate extension.
      </t>
      <t>
        If the keyUsage extension is present in an end-entity certificate that indicates id-alg-xmss or id-alg-xmssmt in SubjectPublicKeyInfo, then the keyUsage extension MUST contain one or both of the following values:
        <?rfc subcompact="yes" ?>
        <list>
           <t>nonRepudiation; and</t>
           <t>digitalSignature.</t>
        </list>
        <?rfc subcompact="no" ?>
      </t>
      <t>
        If the keyUsage extension is present in a certification authority certificate that indicates id-alg-xmss or id-alg-xmssmt, then the keyUsage extension MUST contain one or more of the following values:
        <?rfc subcompact="yes" ?>
        <list>
          <t>nonRepudiation;</t>
          <t>digitalSignature;</t>
          <t>keyCertSign; and</t>
          <t>cRLSign.</t>
        </list>
        <?rfc subcompact="no" ?>
      </t>
      <t>
        <xref target="I-D.ietf-lamps-cms-hash-sig"/> defines the key usage for id-alg-hss-lms-hashsig, which is the same as for the keys above.
      </t>
    </section> <!-- Key Usage Bits -->

    <section anchor="SigAlgs" title="Signature Algorithms">

      <t>
        This section identifies OIDs for signing using HSS, XMSS, and XMSS^MT.  When these algorithm identifiers appear in the algorithm field as an AlgorithmIdentifier, the encoding MUST omit the parameters field.  That is, the AlgorithmIdentifier SHALL be a SEQUENCE of one component, one of the OIDs defined below.
      </t>
      <t>
        The data to be signed is prepared for signing.  With the OIDs id-alg-hss-lms-hashsig, id-alg-xmss and id-alg-xmssmt the full data is signed directly.  With the other OIDs defined in this document, an appropriate hash function is applied first and the resulting digest is signed.  Then, a private key operation is performed to generate the signature value.  For HSS, the signature value is described in section 3.3 of <xref target="I-D.mcgrew-hash-sigs"/>. For XMSS and XMSS^MT the signature values are described in sections B.2 and C.2 of <xref target="RFC8391"/> respectively.  The octet string representing the signature is encoded directly in the BIT STRING without adding any additional ASN.1 wrapping.  For the Certificate and CertificateList structures, the signature value is wrapped in the "signatureValue" BIT STRING field.
      </t>

      <section anchor="HSS-SIG" title="HSS Signature Algorithm">
        <t>
          The HSS public key OID is also used to specify that an HSS signature was generated on the full message, i.e. the message was not hashed before being processed by the HSS signature algorithm.
        </t>
        <t>
          <figure><artwork>
   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>
        </t>
        <t>
          The ASN.1 OIDs used to specify that an HSS signature was generated on a SHA-256, SHA-384 or SHA-512 hash of an object are, respectively:
        </t>
        <t>
          <figure><artwork>
   id-alg-hss-with-SHA256  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) hss(12) 2 }
          </artwork></figure>
        </t>
        <t>
          <figure><artwork>
   id-alg-hss-with-SHA384  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) hss(12) 3 }
          </artwork></figure>
        </t>
        <t>
          <figure><artwork>
   id-alg-hss-with-SHA512  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) hss(12) 1 }
          </artwork></figure>
        </t>
        <t>
          <xref target="I-D.ietf-lamps-cms-hash-sig"/> contains more information on the contents and format of an HSS signature.
        </t>

      </section> <!-- HSS Signature Algorithm -->

      <section anchor="XMSS-SIG" title="XMSS Signature Algorithm">

        <t>
          The XMSS public key OID is also used to specify that an XMSS signature was generated on the full message, i.e. the message was not hashed before being processed by the XMSS signature algorithm.
        </t>
        <t>
          <figure><artwork>
   id-alg-xmss  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmss(13) 0 }
          </artwork></figure>
        </t>
        <t>
          The ASN.1 OIDs used to specify that an XMSS signature was generated on a SHA-256, SHA-384 or SHA-512 hash of an object are, respectively:
        </t>
        <t>
          <figure><artwork>
   id-alg-xmss-with-SHA256  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmss(13) 2 }
          </artwork></figure>
        </t>
        <t>
          <figure><artwork>
   id-alg-xmss-with-SHA384  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmss(13) 3 }
          </artwork></figure>
        </t>
        <t>
          <figure><artwork>
   id-alg-xmss-with-SHA512  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmss(13) 1 }
          </artwork></figure>
        </t>
        <t>
          The format of an XMSS signature is is formally defined using XDR <xref target="RFC4506"/> and is defined in Appendix B.2 of <xref target="RFC8391"/>.
        </t>

      </section> <!-- XMSS Signature Algorithm -->

      <section anchor="XMSSMT-SIG" title="XMSS^MT Signature Algorithm">

        <t>
          The XMSS^MT public key OID is also used to specify that an XMSS^MT signature was generated on the full message, i.e. the message was not hashed before being processed by the XMSS^MT signature algorithm.
        </t>
        <t>
          <figure><artwork>
   id-alg-xmssmt  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmssmt(14) 0 }
          </artwork></figure>
        </t>
        <t>
          The ASN.1 OIDs used to specify that an XMSS^MT signature was generated on a SHA-256, SHA384 or SHA-512 hash of an object are, respectively:
        </t>
        <t>
          <figure><artwork>
   id-alg-xmssmt-with-SHA256  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmssmt(14) 2 }
          </artwork></figure>
        </t>
        <t>
          <figure><artwork>
   id-alg-xmssmt-with-SHA384  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmssmt(14) 3 }
          </artwork></figure>
        </t>
        <t>
          <figure><artwork>
   id-alg-xmssmt-with-SHA512  OBJECT IDENTIFIER ::= { itu-t(0)
      identified-organization(4) etsi(0) reserved(127)
      etsi-identified-organization(0) isara(15) algorithms(1)
      asymmetric(1) xmssmt(14) 1 }
          </artwork></figure>
        </t>
        <t>
          The format of an XMSS^MT signature is is formally defined using XDR <xref target="RFC4506"/> and is defined in Appendix C.2 of <xref target="RFC8391"/>.
        </t>

      </section> <!-- XMSS^MT Signature Algorithm -->

    </section>  <!-- Signature Algorithms -->

    <section title="ASN.1 Module">

      <t>
        For reference purposes, the ASN.1 syntax is presented as an ASN.1 module here.
      </t>

      <figure><artwork>
-- ASN.1 Module

Hashsigs-pkix-0 -- TBD - IANA assigned module OID
      </artwork></figure>
      <figure><artwork>
DEFINITIONS EXPLICIT TAGS ::=
BEGIN
      </artwork></figure>
      <figure><artwork>
IMPORTS
  PUBLIC-KEY, SIGNATURE-ALGORITHM
  FROM AlgorithmInformation-2009
    {iso(1) identified-organization(3) dod(6) internet(1) security(5)
    mechanisms(5) pkix(7) id-mod(0)
    id-mod-algorithmInformation-02(58)}
;
      </artwork></figure>
      <figure><artwork>
--
-- HSS Signatures
--

-- HSS Object Identifiers

--
-- id-alg-hss-lms-hashsig is defined in [ietf-lamps-cms-hash-sig]
--
-- 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>
      <figure><artwork>
id-alg-hss-with-SHA256  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) hss(12) 2 }
      </artwork></figure>
      <figure><artwork>
id-alg-hss-with-SHA384  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) hss(12) 3 }
      </artwork></figure>
      <figure><artwork>
id-alg-hss-with-SHA512  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) hss(12) 1 }
      </artwork></figure>
      <figure><artwork>
-- HSS Signature Algorithms and Public Key

--
-- sa-HSS-LMS-HashSig is defined in [ietf-lamps-cms-hash-sig]
--
-- 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 } }
      </artwork></figure>
      <figure><artwork>
sa-HSS-with-SHA256 SIGNATURE-ALGORITHM ::= {
   IDENTIFIER id-alg-hss-with-SHA256
   PARAMS ARE absent
   HASHES { mda-sha256 }
   PUBLIC-KEYS { pk-HSS-LMS-HashSig }
   SMIME-CAPS { IDENTIFIED BY id-alg-hss-with-SHA256 } }
      </artwork></figure>
      <figure><artwork>
sa-HSS-with-SHA384 SIGNATURE-ALGORITHM ::= {
   IDENTIFIER id-alg-hss-with-SHA384
   PARAMS ARE absent
   HASHES { mda-sha384 }
   PUBLIC-KEYS { pk-HSS-LMS-HashSig }
   SMIME-CAPS { IDENTIFIED BY id-alg-hss-with-SHA384 } }
      </artwork></figure>
      <figure><artwork>
sa-HSS-with-SHA512 SIGNATURE-ALGORITHM ::= {
   IDENTIFIER id-alg-hss-with-SHA512
   PARAMS ARE absent
   HASHES { mda-sha512 }
   PUBLIC-KEYS { pk-HSS-LMS-HashSig }
   SMIME-CAPS { IDENTIFIED BY id-alg-hss-with-SHA512 } }

--
-- pk-HSS-LMS-HashSig is defined in [ietf-lamps-cms-hash-sig]
--
-- 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>
      <figure><artwork>
--
-- XMSS Keys and Signatures
--

-- XMSS Object Identifiers

id-alg-xmss  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) xmss(13) 0 }
      </artwork></figure>
      <figure><artwork>
id-alg-xmss-with-SHA256  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) xmss(13) 2 }
      </artwork></figure>
      <figure><artwork>
id-alg-xmss-with-SHA384  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) xmss(13) 3 }
      </artwork></figure>
      <figure><artwork>
id-alg-xmss-with-SHA512  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) xmss(13) 1 }
      </artwork></figure>
      <figure><artwork>
-- XMSS Signature Algorithms and Public Key

sa-XMSS SIGNATURE-ALGORITHM ::= {
    IDENTIFIER id-alg-xmss
    PARAMS ARE absent
    PUBLIC-KEYS { pk-XMSS }
    SMIME-CAPS { IDENTIFIED BY id-alg-xmss } }
      </artwork></figure>
      <figure><artwork>
sa-XMSS-with-SHA256 SIGNATURE-ALGORITHM ::= {
   IDENTIFIER id-alg-xmss-with-SHA256
   PARAMS ARE absent
   HASHES { mda-sha256 }
   PUBLIC-KEYS { pk-XMSS }
   SMIME-CAPS { IDENTIFIED BY id-alg-xmss-with-SHA256 } }
      </artwork></figure>
      <figure><artwork>
sa-XMSS-with-SHA384 SIGNATURE-ALGORITHM ::= {
   IDENTIFIER id-alg-xmss-with-SHA384
   PARAMS ARE absent
   HASHES { mda-sha384 }
   PUBLIC-KEYS { pk-XMSS }
   SMIME-CAPS { IDENTIFIED BY id-alg-xmss-with-SHA384 } }
      </artwork></figure>
      <figure><artwork>
sa-XMSS-with-SHA512 SIGNATURE-ALGORITHM ::= {
   IDENTIFIER id-alg-xmss-with-SHA512
   PARAMS ARE absent
   HASHES { mda-sha512 }
   PUBLIC-KEYS { pk-XMSS }
   SMIME-CAPS { IDENTIFIED BY id-alg-xmss-with-SHA512 } }
      </artwork></figure>
      <figure><artwork>
pk-XMSS PUBLIC-KEY ::= {
   IDENTIFIER id-alg-xmss
   KEY XMSS-PublicKey
   PARAMS ARE absent
   CERT-KEY-USAGE
      { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

XMSS-PublicKey ::= OCTET STRING
      </artwork></figure>
      <figure><artwork>
--
-- XMSS^MT Keys and Signatures
--

-- XMSS^MT Object Identifiers

id-alg-xmssmt  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) xmssmt(14) 0 }
      </artwork></figure>
      <figure><artwork>
id-alg-xmssmt-with-SHA256  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) xmssmt(14) 2 }
      </artwork></figure>
      <figure><artwork>
id-alg-xmssmt-with-SHA384  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) xmssmt(14) 3 }
      </artwork></figure>
      <figure><artwork>
id-alg-xmssmt-with-SHA512  OBJECT IDENTIFIER ::= { itu-t(0)
   identified-organization(4) etsi(0) reserved(127)
   etsi-identified-organization(0) isara(15) algorithms(1)
   asymmetric(1) xmssmt(14) 1 }
      </artwork></figure>
      <figure><artwork>
-- XMSS^MT Signature Algorithms and Public Key

sa-XMSSMT SIGNATURE-ALGORITHM ::= {
    IDENTIFIER id-alg-xmssmt
    PARAMS ARE absent
    PUBLIC-KEYS { pk-XMSSMT }
    SMIME-CAPS { IDENTIFIED BY id-alg-xmssmt } }
      </artwork></figure>
      <figure><artwork>
sa-XMSSMT-with-SHA256 SIGNATURE-ALGORITHM ::= {
   IDENTIFIER id-alg-xmssmt-with-SHA256
   PARAMS ARE absent
   HASHES { mda-sha256 }
   PUBLIC-KEYS { pk-XMSSMT }
   SMIME-CAPS { IDENTIFIED BY id-alg-xmssmt-with-SHA256 } }
      </artwork></figure>
      <figure><artwork>
sa-XMSSMT-with-SHA384 SIGNATURE-ALGORITHM ::= {
   IDENTIFIER id-alg-xmssmt-with-SHA384
   PARAMS ARE absent
   HASHES { mda-sha384 }
   PUBLIC-KEYS { pk-XMSSMT }
   SMIME-CAPS { IDENTIFIED BY id-alg-xmssmt-with-SHA384 } }
      </artwork></figure>
      <figure><artwork>
sa-XMSSMT-with-SHA512 SIGNATURE-ALGORITHM ::= {
   IDENTIFIER id-alg-xmssmt-with-SHA512
   PARAMS ARE absent
   HASHES { mda-sha512 }
   PUBLIC-KEYS { pk-XMSSMT }
   SMIME-CAPS { IDENTIFIED BY id-alg-xmssmt-with-SHA512 } }
      </artwork></figure>
      <figure><artwork>
pk-XMSSMT PUBLIC-KEY ::= {
   IDENTIFIER id-alg-xmssmt
   KEY XMSSMT-PublicKey
   PARAMS ARE absent
   CERT-KEY-USAGE
      { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

XMSSMT-PublicKey ::= OCTET STRING
      </artwork></figure>
      <figure><artwork>
END
      </artwork></figure>

    </section> <!-- ASN.1 Module -->

    <section anchor="Security" title="Security Considerations">
      <section anchor="SecurityAlgo" title="Algorithm Security Considerations">
        <t>
          The cryptographic security of the signatures generated by the algorithms mentioned in this document depends only on the hash algorithms used within the signature algorithms and the pre-hash algorithm used to create an X.509 certificate's message digest.  Grover's algorithm <xref target="Grover96"/> is a quantum search algorithm which gives a quadratic improvement in search time to brute-force pre-image attacks.  The results of <xref target="BBBV97"/> show that this improvement is optimal, however <xref target="Fluhrer17"/> notes that Grover's algorithm doesn't parallelize well.  Thus, given a bounded amount of time to perform the attack and using a conservative estimate of the performance of a real quantum computer, the pre-image quantum security of SHA-256 is closer to 190 bits.  All parameter sets for the signature algorithms in this document currently use SHA-256 internally and thus have at least 128 bits of quantum pre-image resistance, or 190 bits using the security assumptions in <xref target="Fluhrer17"/>.
        </t>
        <t>
          <xref target="Zhandry15"/> shows that hash collisions can be found using an algorithm with a lower bound on the number of oracle queries on the order of 2^(n/3) on the number of bits, however <xref target="DJB09"/> demonstrates that the quantum memory requirements would be much greater.  Therefore a pre-hash using SHA-256 would have at least 128 bits of quantum collision-resistance as well as the pre-image resistance mentioned in the previous paragraph.
        </t>
        <t>
          Given the quantum collision and pre-image resistance of SHA-256 estimated above, the algorithm identifiers id-alg-hss-with-SHA256, id-alg-xmss-with-SHA256 and id-alg-xmssmt-with-SHA256 defined in this document provide 128 bits or more of quantum security.  This is believed to be secure enough to protect X.509 certificates for well beyond any reasonable certificate lifetime, although the SHA-384 and SHA-512 variants could be used if there are any doubts.
        </t>
      </section> <!-- Algorithm Security Considerations -->

      <section anchor="SecurityImpl" title="Implementation Security Considerations">
        <t>
          Implementations MUST protect the private keys.  Compromise of the private keys may result in the ability to forge signatures.  Along with the private key, the implementation MUST 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 stored in a virtual machine environment, care must be taken to preserve confidentiality and integrity.
        </t>
        <t>
          The generation of private keys relies on random numbers.  The use of inadequate pseudo-random 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.  <xref target="RFC4086"/> offers important guidance in this area.
        </t>
        <t>
          The generation of hash-based signatures also depends on random numbers.  While the consequences of an inadequate pseudo-random number generator (PRNGs) to generate these values is much less severe than the generation of private keys, the guidance in <xref target="RFC4086"/> remains important.
        </t>
        <t>
        </t>
      </section> <!-- Implementation Security Considerations -->
    </section> <!-- Security Considerations -->

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>
        Thanks for Russ Housley for the helpful suggestions.
      </t>
      <t>
        This document uses a lot of text from similar documents (<xref target="RFC3279"/> and <xref target="RFC8410"/>) as well as <xref target="I-D.ietf-lamps-cms-hash-sig"/>.  Thanks go to the authors of those documents.  "Copying always makes things easier and less error prone" - <xref target="RFC8411"/>.
      </t>
    </section> <!-- Acknowledgements -->

    <section anchor="IANA" title="IANA Considerations">
      <t>
        IANA is requested to assign a module OID from the "SMI for PKIX Module Identifier" registry for the ASN.1 module in Section 5.
      </t>
    </section> <!-- IANA Considerations -->

  </middle>
  <back>
    <references title="Normative References">
      &RFC2119;
      &RFC8391;
      &RFC5280;
      &RFC4506;
      &I-D.mcgrew-hash-sigs;
      &I-D.ietf-lamps-cms-hash-sig;
    </references>
    <references title="Informative References">
      &RFC4086;
      &RFC3279;
      &RFC8410;
      &RFC8411;
      <reference anchor="Grover96" target="">
        <front>
          <title>A fast quantum mechanical algorithm for database search</title>
          <author initials="L" surname="Grover" fullname="" />
          <date month="" year="1996" />
        </front>
        <seriesInfo name="28th ACM Symposium on the Theory of Computing" value="p. 212" />
      </reference>
      <reference anchor="Zhandry15" target="">
        <front>
          <title>A note on the quantum collision and set equality problems</title>
          <author initials="M" surname="Zhandry" fullname="" />
          <date month="May" year="2015" />
        </front>
        <seriesInfo name="Quantum Information &amp; Computation" value="15, 7-8, 557-567" />
      </reference>
      <reference anchor="DJB09" target="">
        <front>
          <title>Cost analysis of hash collisions: Will quantum computers make SHARCS obsolete?</title>
          <author initials="D. J" surname="Bernstein" fullname="" />
          <date month="" year="2009" />
        </front>
        <seriesInfo name="SHARCS" value="9, p. 105" />
      </reference>
      <reference anchor="BBBV97" target="">
        <front>
          <title>Strengths and weaknesses of quantum computing</title>
          <author initials="C. H" surname="Bennett" fullname="" />
          <author initials="E" surname="Bernstein" fullname="" />
          <author initials="G" surname="Brassard" fullname="" />
          <author initials="U" surname="Vazirani" fullname="" />
          <date month="" year="1997" />
        </front>
        <seriesInfo name="SIAM J. Comput." value="26(5), 1510-1523" />
      </reference>
      <reference anchor="Fluhrer17" target="https://eprint.iacr.org/2017/811.pdf">
        <front>
          <title>Reassessing Grover's Algorithm</title>
          <author initials="S" surname="Fluhrer" fullname="" />
          <date month="August" year="2017" />
        </front>
        <seriesInfo name="Cryptology ePrint Archive" value="Report 2017/811" />
      </reference>
    </references>
  </back>
</rfc>