<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.5.26 (Ruby 2.3.7) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-housley-lamps-cms-sphincs-plus-01" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.14.2 -->
  <front>
    <title abbrev="SPHINCS+ Signature Algorithm in CMS">Use of the SPHINCS+ Signature Algorithm in the Cryptographic Message Syntax (CMS)</title>
    <seriesInfo name="Internet-Draft" value="draft-housley-lamps-cms-sphincs-plus-01"/>
    <author initials="R." surname="Housley" fullname="Russ Housley">
      <organization abbrev="Vigil Security">Vigil Security, LLC</organization>
      <address>
        <email>housley@vigilsec.com</email>
      </address>
    </author>
    <author initials="S." surname="Fluhrer" fullname="Scott Fluhrer">
      <organization>Cisco Systems</organization>
      <address>
        <email>sfluhrer@cisco.com</email>
      </address>
    </author>
    <author initials="P." surname="Kampanakis" fullname="Panos Kampanakis">
      <organization>Amazon Web Services</organization>
      <address>
        <email>kpanos@amazon.com</email>
      </address>
    </author>
    <author initials="B." surname="Westerbaan" fullname="Bas Westerbaan">
      <organization>Cloudflare</organization>
      <address>
        <email>bas@westerbaan.name</email>
      </address>
    </author>
    <date year="2022" month="September" day="03"/>
    <area>Security</area>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>SPHINCS+ is a stateless hash-based signature scheme.  This document
specifies the conventions for using the SPHINCS+ stateless hash-based
signature algorithm with the Cryptographic Message Syntax (CMS).  In
addition, the algorithm identifier and public key syntax are
provided.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>NOTICE: This document will be adjusted to match the SPHINCS+ specification
that is published by NIST.  Until that happens, just about everything in
this document is likely to change.</t>
      <t>This document specifies the conventions for using the SPHINCS+ hash-based
signature algorithm (add reference to the NIST document here)
with the Cryptographic Message Syntax (CMS) <xref target="RFC5652"/>
signed-data content type.</t>
      <t>SPHINCS+ offers three security levels.  The parameters for each of the
security levels were chosen to provide 128 bits of security, 192 bits of
security, and 256 bits of security.  A separate algorithm identifier has
been assigned for SPHINCS+ at each of these security levels.</t>
      <t>SPHINCS+ is a stateless hash-based signature algorithm.  Other hash-based
signature algorithms are stateful, including HSS/LMS <xref target="RFC8554"/> and
XMSS <xref target="RFC8391"/>.  Without the need for state kept by the signer,
SPHINCS+ is much less fragile.</t>
      <section anchor="asn1">
        <name>ASN.1</name>
        <t>CMS values are generated using ASN.1 <xref target="X680"/>, using the Basic
Encoding Rules (BER) and the Distinguished Encoding Rules
(DER) <xref target="X690"/>.</t>
      </section>
      <section anchor="motivation">
        <name>Motivation</name>
        <t>There have been recent advances in cryptanalysis and advances in the
development of quantum computers.  Each of these advances pose a
threat to widely deployed digital signature.</t>
        <t>If large-scale quantum computers are ever built, they will be able to
break many of the public-key cryptosystems currently in use, including
RSA, DSA, ECDSA, and EdDSA.  A post-quantum cryptosystem (PQC) is secure
against quantum computers that have more than a trivial number of quantum
bits (qu-bits).  It is open to conjecture when it will be feasible to build
such quantum computers; however, it is prudent to use cryptographic
algorithms that remain secure if a large-scale quantum computer is
invented.  SPHINCS+ is a PQC signature algorithm.</t>
        <t>One use of a PQC signature algoritm is the protection of software
updates, perhaps using the format described in <xref target="RFC4108"/>, to enable
deployment of software that implements other new PQC algorithms for
key management and confidentiality.</t>
      </section>
      <section anchor="terminology">
        <name>Terminology</name>
        <t>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"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      </section>
    </section>
    <section anchor="sphincs-hash-based-signature-algorithm-overview">
      <name>SPHINCS+ Hash-based Signature Algorithm Overview</name>
      <t>SPHINCS+ is a hash-based signature scheme which consists of a few
time signature construction, namely Forest of Random Subsets (FORS)
and a hypertree. FORS signs a message with a private key. The
corresponding FORS public keys are the leaves in k binary trees.
The roots of these trees are hashed together to form a FORS root.
SPHINCS+ uses a one-time signature scheme called WOTS+. The FORS
tree roots are signed by a WOTS+ one-time signature private
key. The corresponding WOTS+ public keys form the leaves in d-layers
of Merkle subtrees in the SPHINCS+ hypertree. The bottom layer of
that hypertree signs the FORS roots with WOTS+. The root of the
bottom Merkle subtrees are then signed with WOTS+ and the
corresponding WOTS+ public keys form the leaves of the next level up
subtree. Subtree roots are consequently signed by their corresponding
subtree layers until we reach the top subtree. The top layer subtree
forms the hypertree root which is trusted at the verifier.</t>
      <t>A SPHINCS+ signature consists of the FORS signature, the WOTS+
signature in each layer and the path to the root of each subtree
until we reach the root of the hypertree.</t>
      <t>A SPHINCS+ signature is verified by verifying the FORS signature, the
WOTS+ signatures and the path to the root of each subtree. When reaching
the root of the hypertree, the signature verifies only if it hashes to
the pre-trusted root of the SPHINCS+ hypertree.</t>
      <t>SPHINCS+ is a stateless hash-based signature algorithm. Stateful
hash-based signature schemes require that the WOTS+ private key
(generated by using a state index) is never reused or the scheme
loses it security. Although its security decreases, FORS which is
used at the bottom of the SPHINCS+ hypertree does not collapse if
the same private key used to sign two or more different messages
like in stateful hash-based signature schemes. Without the need for
state kept by the signer to ensure it is not reused, SPHINCS+
is much less fragile.</t>
      <t>SPHINCS+ was designed to sign up to 2^64 messages and
offers three security levels. The parameters of the
SPHINCS+ hypertree include the security parameter,
the hash function, the tree height, the number of
layers of subtrees, the Winternitz parameter of WOTS+,
the number of FORS trees and leaves in each. The
parameters for each of the security levels were
chosen to provide 128 bits of security, 192 bits
of security, and 256 bits of security.</t>
    </section>
    <section anchor="sphincs-public-key-identifier">
      <name>SPHINCS+ Public Key Identifier</name>
      <t>The AlgorithmIdentifier for a SPHINCS+ public key <bcp14>MUST</bcp14> use one of the
id-alg-sphincs-plus object identifiers listed below, based on the
security level used to generate the SPHINCS+ hypertree.  The parameters
field of the AlgorithmIdentifier for the SPHINCS+ public key <bcp14>MUST</bcp14> be absent.</t>
      <t>When this AlgorithmIdentifier appears in the SubjectPublicKeyInfo field of
an X.509 certificate <xref target="RFC5280"/>, the certificate key usage extension <bcp14>MAY</bcp14>
contain digitalSignature, nonRepudiation, keyCertSign, and cRLSign; the
certificate key usage extension <bcp14>MUST NOT</bcp14> contain other values.</t>
      <artwork><![CDATA[
   pk-sphincs-plus-128 PUBLIC-KEY ::= {
       IDENTIFIER id-alg-sphincs-plus-128
       KEY SPHINCS-Plus-PublicKey
       PARAMS ARE absent
       CERT-KEY-USAGE
         { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

   pk-sphincs-plus-192 PUBLIC-KEY ::= {
       IDENTIFIER id-alg-sphincs-plus-192
       KEY SPHINCS-Plus-PublicKey
       PARAMS ARE absent
       CERT-KEY-USAGE
         { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

   pk-sphincs-plus-256 PUBLIC-KEY ::= {
       IDENTIFIER id-alg-sphincs-plus-256
       KEY SPHINCS-Plus-PublicKey
       PARAMS ARE absent
       CERT-KEY-USAGE
         { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

   SPHINCS-Plus-PublicKey ::= OCTET STRING
]]></artwork>
      <t>NOTE: The values for these object identifiers will be assigned by NIST.
Once assigned, they will be added to a future revision of this document.</t>
      <t>The SPHINCS+ public key value is an OCTET STRING.</t>
    </section>
    <section anchor="signed-data-conventions">
      <name>Signed-data Conventions</name>
      <t>As specified in CMS <xref target="RFC5652"/>, the digital signature is produced from
the message digest and the signer's private key.  The signature is computed
over different values depending on whether signed attributes are absent or
present.</t>
      <t>When signed attributes are absent, the SPHINCS+ 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 SPHINCS+ tree,
and then a message-digest attribute is constructed to contain the resulting
hash value, and then the result of DER encoding the set of signed attributes,
which <bcp14>MUST</bcp14> include a content-type attribute and a message-digest attribute,
and then the SPHINCS+ signature is computed over the DER-encoded output.
In summary:</t>
      <artwork><![CDATA[
   IF (signed attributes are absent)
   THEN SPHINCS+_Sign(content)
   ELSE message-digest attribute = Hash(content);
        SPHINCS+_Sign(DER(SignedAttributes))
]]></artwork>
      <t>When using SPHINCS+, the fields in the SignerInfo are used as follows:</t>
      <dl newline="true">
        <dt>
digestAlgorithm:  </dt>
        <dd>
          <t>The digestAlgorithm <bcp14>MUST</bcp14> contain the one-way hash
function used to in the SPHINCS+ tree.  The algorithm identifiers for
<xref target="FIPS180"/> and <xref target="FIPS202"/> are repeated below for convenience.</t>
        </dd>
      </dl>
      <artwork><![CDATA[
      mda-sha256 DIGEST-ALGORITHM ::= {
        IDENTIFIER id-sha256
        PARAMS TYPE NULL ARE preferredAbsent }

      mda-shake256 DIGEST-ALGORITHM ::= {
        IDENTIFIER id-shake256
        PARAMS TYPE NULL ARE preferredAbsent }

      hashalgs OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
        country(16) us(840) organization(1) gov(101) csor(3)
        nistAlgorithms(4) 2 }
    
      id-sha256 OBJECT IDENTIFIER ::= { hashalgs 1 }

      id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 }
]]></artwork>
      <dl newline="true">
        <dt>
signatureAlgorithm:  </dt>
        <dd>
          <t>The signatureAlgorithm <bcp14>MUST</bcp14> contain one of the the SPHINCS+ algorithm
identifiers, and the algorithm parameters field <bcp14>MUST</bcp14> be absent.  The
algorithm identifier <bcp14>MUST</bcp14> be one of the following: 
id-alg-sphincs-plus-128, id-alg-sphincs-plus-192, or
id-alg-sphincs-plus-256.</t>
        </dd>
        <dt>
signature:  </dt>
        <dd>
          <t>The signature contains the signature value resulting from the
SPHINCS+ signing operation with the parameters associated with the
selected signatureAlgorithm.  The SPHINCS+ signing operation and the
signature verification operation are specified in TBD.</t>
        </dd>
      </dl>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>Implementations <bcp14>MUST</bcp14> protect the private keys.  Compromise of the
private keys may result in the ability to forge signatures.</t>
      <t>When generating an SPHINCS+ key pair, an implementation <bcp14>MUST</bcp14> generate
each key pair independently of all other key pairs in the SPHINCS+
hypertree.</t>
      <t>A SPHINCS+ tree <bcp14>MUST NOT</bcp14> be used for more than 2^64 signing operations.</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, and <xref target="RFC4086"/> offers
important guidance in this area.</t>
      <t>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>
      <t>When computing signatures, implementations <bcp14>SHOULD</bcp14> include protections against
fault injection attacks <xref target="CMP2018"/>.  Protections against these attacks
include signature verification prior to releasing the signature value to
confirm that no error injected and generating the signature a few times to
confirm that the same signature value is produced each time.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>TBD</t>
    </section>
    <section anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>Thanks to Mike Ounsworth for his careful review and constructive comments.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <author fullname="D. Cooper" initials="D." surname="Cooper">
              <organization/>
            </author>
            <author fullname="S. Santesson" initials="S." surname="Santesson">
              <organization/>
            </author>
            <author fullname="S. Farrell" initials="S." surname="Farrell">
              <organization/>
            </author>
            <author fullname="S. Boeyen" initials="S." surname="Boeyen">
              <organization/>
            </author>
            <author fullname="R. Housley" initials="R." surname="Housley">
              <organization/>
            </author>
            <author fullname="W. Polk" initials="W." surname="Polk">
              <organization/>
            </author>
            <date month="May" year="2008"/>
            <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="RFC5652" target="https://www.rfc-editor.org/info/rfc5652">
          <front>
            <title>Cryptographic Message Syntax (CMS)</title>
            <author fullname="R. Housley" initials="R." surname="Housley">
              <organization/>
            </author>
            <date month="September" year="2009"/>
            <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="X680" target="https://www.itu.int/rec/T-REC-X.680">
          <front>
            <title>Information technology -- Abstract Syntax Notation One (ASN.1): Specification of basic notation</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date year="2021" month="February"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="X.680"/>
          <seriesInfo name="ISO/IEC" value="8824-1:2021"/>
        </reference>
        <reference anchor="X690" target="https://www.itu.int/rec/T-REC-X.690">
          <front>
            <title>Information technology -- ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date year="2021" month="February"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="X.690"/>
          <seriesInfo name="ISO/IEC" value="8825-1-2021"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner">
              <organization/>
            </author>
            <date month="March" year="1997"/>
            <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="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba">
              <organization/>
            </author>
            <date month="May" year="2017"/>
            <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>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC4086" target="https://www.rfc-editor.org/info/rfc4086">
          <front>
            <title>Randomness Requirements for Security</title>
            <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd">
              <organization/>
            </author>
            <author fullname="J. Schiller" initials="J." surname="Schiller">
              <organization/>
            </author>
            <author fullname="S. Crocker" initials="S." surname="Crocker">
              <organization/>
            </author>
            <date month="June" year="2005"/>
            <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>
        <reference anchor="RFC4108" target="https://www.rfc-editor.org/info/rfc4108">
          <front>
            <title>Using Cryptographic Message Syntax (CMS) to Protect Firmware Packages</title>
            <author fullname="R. Housley" initials="R." surname="Housley">
              <organization/>
            </author>
            <date month="August" year="2005"/>
            <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="RFC5911" target="https://www.rfc-editor.org/info/rfc5911">
          <front>
            <title>New ASN.1 Modules for Cryptographic Message Syntax (CMS) and S/MIME</title>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman">
              <organization/>
            </author>
            <author fullname="J. Schaad" initials="J." surname="Schaad">
              <organization/>
            </author>
            <date month="June" year="2010"/>
            <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="RFC8554" target="https://www.rfc-editor.org/info/rfc8554">
          <front>
            <title>Leighton-Micali Hash-Based Signatures</title>
            <author fullname="D. McGrew" initials="D." surname="McGrew">
              <organization/>
            </author>
            <author fullname="M. Curcio" initials="M." surname="Curcio">
              <organization/>
            </author>
            <author fullname="S. Fluhrer" initials="S." surname="Fluhrer">
              <organization/>
            </author>
            <date month="April" year="2019"/>
            <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="RFC8391" target="https://www.rfc-editor.org/info/rfc8391">
          <front>
            <title>XMSS: eXtended Merkle Signature Scheme</title>
            <author fullname="A. Huelsing" initials="A." surname="Huelsing">
              <organization/>
            </author>
            <author fullname="D. Butin" initials="D." surname="Butin">
              <organization/>
            </author>
            <author fullname="S. Gazdag" initials="S." surname="Gazdag">
              <organization/>
            </author>
            <author fullname="J. Rijneveld" initials="J." surname="Rijneveld">
              <organization/>
            </author>
            <author fullname="A. Mohaisen" initials="A." surname="Mohaisen">
              <organization/>
            </author>
            <date month="May" year="2018"/>
            <abstract>
              <t>This note describes the eXtended Merkle Signature Scheme (XMSS), a hash-based digital signature system that is based on existing descriptions in scientific literature.  This note specifies Winternitz One-Time Signature Plus (WOTS+), a one-time signature scheme; XMSS, a single-tree scheme; and XMSS^MT, a multi-tree variant of XMSS.  Both XMSS and XMSS^MT use WOTS+ as a main building block. XMSS provides cryptographic digital signatures without relying on the conjectured hardness of mathematical problems.  Instead, it is proven that it only relies on the properties of cryptographic hash functions.  XMSS provides strong security guarantees and is even secure when the collision resistance of the underlying hash function is broken.  It is suitable for compact implementations, is relatively simple to implement, and naturally resists side-channel attacks. Unlike most other signature systems, hash-based signatures can so far withstand known attacks using quantum computers.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8391"/>
          <seriesInfo name="DOI" value="10.17487/RFC8391"/>
        </reference>
        <reference anchor="FIPS180">
          <front>
            <title>Secure Hash Standard (SHS)</title>
            <author>
              <organization>National Institute of Standards and Technology (NIST)</organization>
            </author>
            <date year="2015" month="August"/>
          </front>
          <seriesInfo name="FIPS PUB" value="180-4"/>
        </reference>
        <reference anchor="FIPS202">
          <front>
            <title>SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions</title>
            <author>
              <organization>National Institute of Standards and Technology (NIST)</organization>
            </author>
            <date year="2015" month="August"/>
          </front>
          <seriesInfo name="FIPS PUB" value="202"/>
        </reference>
        <reference anchor="CMP2018" target="https://link.springer.com/chapter/10.1007/978-3-319-79063-3_8">
          <front>
            <title>Grafting Trees: A Fault Attack Against the SPHINCS Framework</title>
            <author initials="L." surname="Castelnovi" fullname="Laurent Castelnovi">
              <organization/>
            </author>
            <author initials="" surname="A, Martinelli" fullname="Ange Martinelli">
              <organization/>
            </author>
            <author initials="T." surname="Prest" fullname="Thomas Prest">
              <organization/>
            </author>
            <date year="2018"/>
          </front>
          <seriesInfo name="Post-Quantum Cryptography" value="pp. 165-184"/>
          <seriesInfo name="PQCrypto" value="2018"/>
          <seriesInfo name="Lecture Notes in Computer Science" value="vol 10786"/>
        </reference>
      </references>
    </references>
    <section anchor="appendix-asn1-module">
      <name>Appendix: ASN.1 Module</name>
      <t>This ASN.1 Module builds upon the conventions established in <xref target="RFC5911"/>.</t>
      <sourcecode type="asn.1"><![CDATA[
<CODE STARTS>

SPHINCS-Plus-Module-2022
  { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
    id-smime(16) id-mod(0) id-mod-sphincs-plus-2022(TBD) }

DEFINITIONS IMPLICIT TAGS ::= BEGIN

EXPORTS ALL;

IMPORTS
  PUBLIC-KEY, SIGNATURE-ALGORITHM, SMIME-CAPS
    FROM AlgorithmInformation-2009  -- RFC 5911
      { 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-sphincs-plus-128 OBJECT IDENTIFIER ::= { TBD }

id-alg-sphincs-plus-192 OBJECT IDENTIFIER ::= { TBD }

id-alg-sphincs-plus-256 OBJECT IDENTIFIER ::= { TBD }

--
-- Signature Algorithm and Public Key
--

sa-sphincs-plus-128 SIGNATURE-ALGORITHM ::= {
    IDENTIFIER id-alg-sphincs-plus-128
    PARAMS ARE absent
    PUBLIC-KEYS { pk-sphincs-plus-128 }
    SMIME-CAPS { IDENTIFIED BY id-alg-sphincs-plus-128 } }

sa-sphincs-plus-192 SIGNATURE-ALGORITHM ::= {
    IDENTIFIER id-alg-sphincs-plus-192
    PARAMS ARE absent
    PUBLIC-KEYS { pk-sphincs-plus-192 }
    SMIME-CAPS { IDENTIFIED BY id-alg-sphincs-plus-192 } }

sa-sphincs-plus-256 SIGNATURE-ALGORITHM ::= {
    IDENTIFIER id-alg-sphincs-plus-256
    PARAMS ARE absent
    PUBLIC-KEYS { pk-sphincs-plus-256 }
    SMIME-CAPS { IDENTIFIED BY id-alg-sphincs-plus-256 } }

pk-sphincs-plus-128 PUBLIC-KEY ::= {
    IDENTIFIER id-alg-sphincs-plus-128
    KEY SPHINCS-Plus-PublicKey
    PARAMS ARE absent
    CERT-KEY-USAGE
        { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

pk-sphincs-plus-192 PUBLIC-KEY ::= {
    IDENTIFIER id-alg-sphincs-plus-192
    KEY SPHINCS-Plus-PublicKey
    PARAMS ARE absent
    CERT-KEY-USAGE
        { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

pk-sphincs-plus-256 PUBLIC-KEY ::= {
    IDENTIFIER id-alg-sphincs-plus-256
    KEY SPHINCS-Plus-PublicKey
    PARAMS ARE absent
    CERT-KEY-USAGE
        { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

SPHINCS-Plus-PublicKey ::= OCTET STRING

--
-- Expand the signature algorithm set used by CMS [RFC5911]
--

SignatureAlgorithmSet SIGNATURE-ALGORITHM ::=
    { sa-sphincs-plus-128 |
      sa-sphincs-plus-192 |
      sa-sphincs-plus-256,
      ... }

--
-- Expand the S/MIME capabilities set used by CMS [RFC5911]
--

SMimeCaps SMIME-CAPS ::=
    { sa-sphincs-plus-128.&smimeCaps |
      sa-sphincs-plus-192.&smimeCaps |
      sa-sphincs-plus-256.&smimeCaps,
      ... }
     
END

<CODE ENDS>
]]></sourcecode>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIANe6E2MAA9Vb63LbRpb+30/Rq1StqR2CFmXLlpRJKjRF2dzoFpLeJDU1
mwKBlogIBBA0IJnxOs+yz7JPtt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