<?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-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.14.0 -->
  <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-00"/>
    <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="August" day="19"/>
    <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 FIPS public keys are the leaves in k binary trees.
The roots of these trees are hashed together to form a FORS root.
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 (with WOTS+) the FORS roots. 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. The 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 an SPHINCS+ public key uses the
id-alg-sphincs-plus object identifier, and the parameters field
<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>The SPHINCS+ public key value is an OCTET STRING. (Should we say
something more here about the size?)</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.  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 stored in a virtual machine
environment, care must be taken to preserve confidentiality and
integrity.</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+ tree.</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>
  </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:
H4sIACDl/2IAA9Vbe3Pbxnb/fz/FVpmpqZagRdmyJeYmDU1RNhu9QtJNMndu
MyC4EhGBAIIFJDOu81n6WfrJ+jtnd/HgQ35kOpPeuRODwD7O+/zO2ZXneULn
fjz/xY+SWPVknhVKhGnGTzo/PDg4OTgU8ySI/SU+zzP/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