<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-ietf-lamps-cms-sha3-hash-04" number="9688" obsoletes="" updates="" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" xml:lang="en" prepTime="2024-11-18T14:33:15" indexInclude="true" scripts="Common,Latin" tocDepth="3">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-lamps-cms-sha3-hash-04" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9688" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="Using SHA3 with the CMS">Use of the SHA3 One-Way Hash Functions in the Cryptographic Message Syntax (CMS)</title>
    <seriesInfo name="RFC" value="9688" stream="IETF"/>
    <author initials="R." surname="Housley" fullname="Russ Housley">
      <organization abbrev="Vigil Security" showOnFrontPage="true">Vigil Security, LLC</organization>
      <address>
        <postal>
          <city>Herndon</city>
          <region>VA</region>
          <country>United States of America</country>
        </postal>
        <email>housley@vigilsec.com</email>
      </address>
    </author>
    <date month="11" year="2024"/>
    <area>SEC</area>
    <workgroup>lamps</workgroup>
    <keyword>example</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">This document describes the conventions for using the one-way hash functions
in the SHA3 family with the Cryptographic Message Syntax (CMS).  The SHA3
family can be used as a message digest algorithm, as part of a signature
algorithm, as part of a message authentication code, or as part of a Key
Derivation Function (KDF).</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9688" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2024 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-asn1">ASN.1</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-message-digest-algorithms">Message Digest Algorithms</xref></t>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-signature-algorithms">Signature Algorithms</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rsassa-pkcs1-v15-with-sha3">RSASSA PKCS#1 v1.5 with SHA3</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ecdsa-with-sha3">ECDSA with SHA3</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-message-authentication-code">Message Authentication Codes Using HMAC and SHA3</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-derivation-functions">Key Derivation Functions</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-hkdf-with-sha3">HKDF with SHA3</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-kmac128-kdf-and-kmac256-kdf">KMAC128-KDF and KMAC256-KDF</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.3">
                <t indent="0" pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-kdf2-and-kdf3-with-sha3">KDF2 and KDF3 with SHA3</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t indent="0" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-asn1-module">ASN.1 Module </xref></t>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-address">Author's Address</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="intro" numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">The Cryptographic Message Syntax (CMS) <xref target="RFC5652" format="default" sectionFormat="of" derivedContent="RFC5652"/> is used to digitally sign,
digest, authenticate, or encrypt arbitrary message contents.  This
specification describes the use of the four one-way hash functions in the
SHA3 family (SHA3-224, SHA3-256, SHA3-384, and SHA3-512) <xref target="SHA3" format="default" sectionFormat="of" derivedContent="SHA3"/> with the
CMS.  In addition, this specification describes the use of these four
one-way hash functions with the RSASSA PKCS#1 version 1.5 signature
algorithm <xref target="RFC8017" format="default" sectionFormat="of" derivedContent="RFC8017"/> and the Elliptic Curve Digital Signature Algorithm
(ECDSA) <xref target="DSS" format="default" sectionFormat="of" derivedContent="DSS"/> with the CMS signed-data content type.</t>
      <t indent="0" pn="section-1-2">This document should not be confused with <xref target="RFC8702" format="default" sectionFormat="of" derivedContent="RFC8702"/>, which defines
conventions for using the SHAKE family of SHA3-based extensible output
functions with the CMS.</t>
      <section anchor="asn1" numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-asn1">ASN.1</name>
        <t indent="0" pn="section-1.1-1">CMS values are generated with ASN.1 <xref target="X.680" format="default" sectionFormat="of" derivedContent="X.680"/>, using the Basic
Encoding Rules (BER) and the Distinguished Encoding Rules (DER) <xref target="X.690" format="default" sectionFormat="of" derivedContent="X.690"/>.</t>
      </section>
      <section anchor="terminology" numbered="true" removeInRFC="false" toc="include" pn="section-1.2">
        <name slugifiedName="name-terminology">Terminology</name>
        <t indent="0" pn="section-1.2-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>",
    "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be
    interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals, as
    shown here.
        </t>
      </section>
    </section>
    <section anchor="sha3oids" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-message-digest-algorithms">Message Digest Algorithms</name>
      <t indent="0" pn="section-2-1">One-way hash functions are also referred to as message digest algorithms.
This section specifies the conventions employed by CMS implementations
that support SHA3-224, SHA3-256, SHA3-384, and SHA3-512 <xref target="SHA3" format="default" sectionFormat="of" derivedContent="SHA3"/>.</t>
      <t indent="0" pn="section-2-2">Digest algorithm identifiers are located in the SignedData digestAlgorithms
field, the SignerInfo digestAlgorithm field, the DigestedData digestAlgorithm
field, and the AuthenticatedData digestAlgorithm field.</t>
      <t indent="0" pn="section-2-3">Digest values
are located in the DigestedData digest field and the Message Digest
authenticated attribute.  In addition, digest values are input to signature
algorithms.</t>
      <t indent="0" pn="section-2-4">SHA3-224, SHA3-256, SHA3-384, and SHA3-512 produce output values with
224, 256, 384, and 512 bits, respectively.  The object identifiers for
      these four one-way hash functions are as follows:</t>
      <sourcecode type="asn.1" markers="false" pn="section-2-5">
   hashAlgs OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16)
       us(840) organization(1) gov(101) csor(3) nistAlgorithm(4) 2 }

   id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 }

   id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 }

   id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 }

   id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 }
</sourcecode>
      <t indent="0" pn="section-2-6">When using the id-sha3-224, id-sha3-s256, id-sha3-384, or id-sha3-512
algorithm identifiers, the parameters field <bcp14>MUST</bcp14> be absent, not NULL
but absent.</t>
    </section>
    <section anchor="signature-algorithms" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-signature-algorithms">Signature Algorithms</name>
      <t indent="0" pn="section-3-1">This section specifies the conventions employed by CMS implementations
that support the four SHA3 one-way hash functions with the RSASSA PKCS#1 v1.5 signature algorithm <xref target="RFC8017" format="default" sectionFormat="of" derivedContent="RFC8017"/> and the ECDSA <xref target="DSS" format="default" sectionFormat="of" derivedContent="DSS"/> with the CMS signed-data content type.</t>
      <t indent="0" pn="section-3-2">Signature algorithm identifiers are located in the SignerInfo
signatureAlgorithm field of SignedData.  Also, signature algorithm
identifiers are located in the SignerInfo signatureAlgorithm field
of countersignature attributes.</t>
      <t indent="0" pn="section-3-3">Signature values are located in the SignerInfo signature field of
SignedData.  Also, signature values are located in the SignerInfo
signature field of countersignature attributes.</t>
      <section anchor="rsassa-pkcs1-v15-with-sha3" numbered="true" removeInRFC="false" toc="include" pn="section-3.1">
        <name slugifiedName="name-rsassa-pkcs1-v15-with-sha3">RSASSA PKCS#1 v1.5 with SHA3</name>
        <t indent="0" pn="section-3.1-1">The RSASSA PKCS#1 v1.5 is defined in <xref target="RFC8017" format="default" sectionFormat="of" derivedContent="RFC8017"/>.  When RSASSA PKCS#1 v1.5 is
used in conjunction with one of the SHA3 one-way hash functions, the
object identifiers are:</t>
        <sourcecode type="asn.1" markers="false" pn="section-3.1-2">
   OID ::= OBJECT IDENTIFIER

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

   id-rsassa-pkcs1-v1-5-with-sha3-224 OID ::= { sigAlgs 13 }

   id-rsassa-pkcs1-v1-5-with-sha3-256 OID ::= { sigAlgs 14 }

   id-rsassa-pkcs1-v1-5-with-sha3-384 OID ::= { sigAlgs 15 }

   id-rsassa-pkcs1-v1-5-with-sha3-512 OID ::= { sigAlgs 16 }
</sourcecode>
        <t indent="0" pn="section-3.1-3">The algorithm identifier for RSASSA PKCS#1 v1.5 subject public keys
in certificates is specified in <xref target="RFC3279" format="default" sectionFormat="of" derivedContent="RFC3279"/>, and it is repeated here for
convenience:</t>
        <sourcecode type="asn.1" markers="false" pn="section-3.1-4">
   rsaEncryption OBJECT IDENTIFIER ::= { iso(1) member-body(2)
       us(840) rsadsi(113549) pkcs(1) pkcs-1(1) 1 }
</sourcecode>
        <t indent="0" pn="section-3.1-5">When the rsaEncryption, id-rsassa-pkcs1-v1-5-with-sha3-224,
id-rsassa-pkcs1-v1-5-with-sha3-256,
id-rsassa-pkcs1-v1-5-with-sha3-384, and
id-rsassa-pkcs1-v1-5-with-sha3-512 algorithm identifiers are used,
the AlgorithmIdentifier parameters field <bcp14>MUST</bcp14> contain NULL.</t>
        <t indent="0" pn="section-3.1-6">When the rsaEncryption algorithm identifier is used, the RSA public key,
which is composed of a modulus and a public exponent, <bcp14>MUST</bcp14> be encoded
using the RSAPublicKey type as specified in <xref target="RFC3279" format="default" sectionFormat="of" derivedContent="RFC3279"/>.  The output of
this encoding is carried in the certificate subject public key.  The
definition of RSAPublicKey is repeated here for convenience:</t>
        <sourcecode type="asn.1" markers="false" pn="section-3.1-7">
   RSAPublicKey ::= SEQUENCE {
      modulus INTEGER, -- n
      publicExponent INTEGER } -- e
</sourcecode>
        <t indent="0" pn="section-3.1-8">When signing, the RSASSA PKCS#1 v1.5 signature algorithm generates a
single value. That value is used directly as the signature value.</t>
      </section>
      <section anchor="ecdsa-with-sha3" numbered="true" removeInRFC="false" toc="include" pn="section-3.2">
        <name slugifiedName="name-ecdsa-with-sha3">ECDSA with SHA3</name>
        <t indent="0" pn="section-3.2-1">The ECDSA is defined in
<xref target="DSS" format="default" sectionFormat="of" derivedContent="DSS"/>.  When the ECDSA is used in conjunction with one of the SHA3
one-way hash functions, the object identifiers are:</t>
        <sourcecode type="asn.1" markers="false" pn="section-3.2-2">
   sigAlgs OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16)
       us(840) organization(1) gov(101) csor(3) nistAlgorithm(4) 3 }

   id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 }

   id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 }

   id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 }

   id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 }
</sourcecode>
        <t indent="0" pn="section-3.2-3"> When the id-sha3-224, id-sha3-s256, id-sha3-384, or id-sha3-512 algorithm
identifier is used, the parameters field <bcp14>MUST</bcp14> be absent, not NULL but absent.</t>
        <t indent="0" pn="section-3.2-4"> When the id-ecdsa-with-sha3-224, id-ecdsa-with-sha3-256, id-
ecdsa-with-sha3-384, and id-ecdsa-with-sha3-512 algorithm identifiers are
used, the parameters field <bcp14>MUST</bcp14> be absent, not NULL but absent.</t>
        <t indent="0" pn="section-3.2-5">The conventions for
ECDSA public keys are as specified in <xref target="RFC5480" format="default" sectionFormat="of" derivedContent="RFC5480"/>.  The
ECParameters associated with the ECDSA public key in the signers certificate
<bcp14>SHALL</bcp14> apply to the verification of the signature.</t>
        <t indent="0" pn="section-3.2-6">When
signing, the ECDSA algorithm generates two values.  These values are commonly
referred to as r and s.  To easily transfer these two values as one signature,
they <bcp14>MUST</bcp14> be ASN.1 encoded using the ECDSA-Sig-Value defined in
<xref target="RFC3279" format="default" sectionFormat="of" derivedContent="RFC3279"/>, which is repeated here for convenience:</t>
        <sourcecode type="asn.1" markers="false" pn="section-3.2-7"> ECDSA-Sig-Value ::= SEQUENCE { r INTEGER, s
INTEGER }</sourcecode>
      </section>
    </section>
    <section anchor="message-authentication-codes-using-hmac-and-sha3" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-message-authentication-code">Message Authentication Codes Using HMAC and SHA3</name>
      <t indent="0" pn="section-4-1">This section specifies the conventions employed by CMS implementations
that support the Hashed Message Authentication Code (HMAC) <xref target="RFC2104" format="default" sectionFormat="of" derivedContent="RFC2104"/> with SHA3 message authentication code (MAC).</t>
      <t indent="0" pn="section-4-2">MAC algorithm identifiers are located in the AuthenticatedData
macAlgorithm field.</t>
      <t indent="0" pn="section-4-3">MAC values are located in the AuthenticatedData mac field.</t>
      <t indent="0" pn="section-4-4">When HMAC is used in conjunction with one of the SHA3
one-way hash functions, the object identifiers are:</t>
      <sourcecode type="asn.1" markers="false" pn="section-4-5">
   hashAlgs OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16)
       us(840) organization(1) gov(101) csor(3) nistAlgorithm(4) 2 }

   id-hmacWithSHA3-224 OBJECT IDENTIFIER ::= { hashAlgs 13 }

   id-hmacWithSHA3-256 OBJECT IDENTIFIER ::= { hashAlgs 14 }

   id-hmacWithSHA3-384 OBJECT IDENTIFIER ::= { hashAlgs 15 }

   id-hmacWithSHA3-512 OBJECT IDENTIFIER ::= { hashAlgs 16 }
</sourcecode>
      <t indent="0" pn="section-4-6">When the id-hmacWithSHA3-224, id-hmacWithSHA3-256,
id-hmacWithSHA3-384, and id-hmacWithSHA3-512 algorithm
identifiers are used, the parameters field <bcp14>MUST</bcp14> be absent,
not NULL but absent.</t>
    </section>
    <section anchor="key-derivation-functions" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-key-derivation-functions">Key Derivation Functions</name>
      <t indent="0" pn="section-5-1">The CMS KEMRecipientInfo structure <xref target="RFC9629" format="default" sectionFormat="of" derivedContent="RFC9629"/> is one place where
algorithm identifiers for key-derivation functions are needed.</t>
      <section anchor="hkdf-with-sha3" numbered="true" removeInRFC="false" toc="include" pn="section-5.1">
        <name slugifiedName="name-hkdf-with-sha3">HKDF with SHA3</name>
        <t indent="0" pn="section-5.1-1">This section assigns four algorithm identifiers that can be employed by CMS
implementations that support the HMAC-based Extract-and-Expand Key Derivation
Function (HKDF) <xref target="RFC5869" format="default" sectionFormat="of" derivedContent="RFC5869"/> with the SHA3 family of hash functions.</t>
        <t indent="0" pn="section-5.1-2">When HKDF is used in conjunction with one of the SHA3
one-way hash functions, the object identifiers are:</t>
        <sourcecode type="asn.1" markers="false" pn="section-5.1-3">
   id-alg OBJECT IDENTIFIER ::= { iso(1) member-body(2)
       us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) 3 }

   id-alg-hkdf-with-sha3-224 OBJECT IDENTIFIER ::= { id-alg 32 }

   id-alg-hkdf-with-sha3-256 OBJECT IDENTIFIER ::= { id-alg 33 }

   id-alg-hkdf-with-sha3-384 OBJECT IDENTIFIER ::= { id-alg 34 }

   id-alg-hkdf-with-sha3-512 OBJECT IDENTIFIER ::= { id-alg 35 }
</sourcecode>
        <t indent="0" pn="section-5.1-4">When id-alg-hkdf-with-sha3-224, id-alg-hkdf-with-sha3-256,
id-alg-hkdf-with-sha3-384, or id-alg-hkdf-with-sha3-512 is used in
an algorithm identifier, the parameters field <bcp14>MUST</bcp14> be absent,
not NULL but absent.</t>
      </section>
      <section anchor="kmac128-kdf-and-kmac256-kdf" numbered="true" removeInRFC="false" toc="include" pn="section-5.2">
        <name slugifiedName="name-kmac128-kdf-and-kmac256-kdf">KMAC128-KDF and KMAC256-KDF</name>
        <t indent="0" pn="section-5.2-1">This section specifies the conventions employed by CMS implementations
that employ either KMAC128 or KMAC256 as KDFs as
defined in Section 4.4 of <xref target="NIST.SP.800-108r1-upd1" format="default" sectionFormat="of" derivedContent="NIST.SP.800-108r1-upd1"/>.</t>
        <t indent="0" pn="section-5.2-2">KMAC128 and KMAC256 are specified in <xref target="NIST.SP.800-185" format="default" sectionFormat="of" derivedContent="NIST.SP.800-185"/>. The use of KMAC128
and KMAC256 as KDFs are defined as follows:</t>
        <t indent="3" pn="section-5.2-3">KMAC128-KDF is KMAC128(K, X, L, S).</t>
        <t indent="3" pn="section-5.2-4">KMAC256-KDF is KMAC256(K, X, L, S).</t>
        <t indent="0" pn="section-5.2-5">The parameters to the KMAC128 and KMAC256 functions are:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-5.2-6">
          <dt pn="section-5.2-6.1">K</dt>
          <dd pn="section-5.2-6.2">
            <t indent="0" pn="section-5.2-6.2.1">The input key-derivation key.  The length of K <bcp14>MUST</bcp14> be less than 2<sup>2040</sup>.</t>
          </dd>
          <dt pn="section-5.2-6.3">X</dt>
          <dd pn="section-5.2-6.4">
            <t indent="0" pn="section-5.2-6.4.1">The context, which contains the ASN.1 DER encoding of CMSORIforKEMOtherInfo when the KDF is used with <xref target="RFC9629" format="default" sectionFormat="of" derivedContent="RFC9629"/>.</t>
          </dd>
          <dt pn="section-5.2-6.5">L</dt>
          <dd pn="section-5.2-6.6">
            <t indent="0" pn="section-5.2-6.6.1">The output length in bits.  L <bcp14>MUST</bcp14> be greater than or equal to 0 and <bcp14>MUST</bcp14> be less than 2<sup>2040</sup>.</t>
          </dd>
          <dt pn="section-5.2-6.7">S</dt>
          <dd pn="section-5.2-6.8">
            <t indent="0" pn="section-5.2-6.8.1">The optional customization label, such as "KDF" (0x4B4446).  The length of S <bcp14>MUST</bcp14> be less than 2<sup>2040</sup>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-5.2-7">The K parameter is known to all authorized parties; it is often the output
of a KEM Decap() operation.  The X parameter is assembled from data that
is transmitted by the originator.  The L parameter is determined by the
size of the output keying material.  The S parameter is optional, and if
it is provided by the originator, it is passed in the parameters field of
the KDF algorithm identifier.</t>
        <t indent="0" pn="section-5.2-8">When KMAC128-KDF or KMAC256-KDF is used, the object identifiers are:</t>
        <sourcecode type="asn.1" markers="false" pn="section-5.2-9">
   hashAlgs OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16)
       us(840) organization(1) gov(101) csor(3) nistAlgorithm(4) 2 }

   id-kmac128 OBJECT IDENTIFIER ::= { hashAlgs 21 }

   id-kmac256 OBJECT IDENTIFIER ::= { hashAlgs 22 }
</sourcecode>
        <t indent="0" pn="section-5.2-10">When id-kmac128 or id-kmac256 is used as part of an algorithm identifier, the
parameters field <bcp14>MUST</bcp14> be absent when there is no customization label (S).  If any
value is provided for S, then the parameters field <bcp14>MUST</bcp14> be present and
contain the value of S, encoded as Customization.</t>
        <sourcecode type="asn.1" markers="false" pn="section-5.2-11">
   Customization ::= OCTET STRING
</sourcecode>
      </section>
      <section anchor="kdf2-and-kdf3-with-sha3" numbered="true" removeInRFC="false" toc="include" pn="section-5.3">
        <name slugifiedName="name-kdf2-and-kdf3-with-sha3">KDF2 and KDF3 with SHA3</name>
        <t indent="0" pn="section-5.3-1">This section specifies the conventions employed by CMS implementations
that employ either the KDF2 or KDF3 functions defined in <xref target="ANS-X9.44-2007" format="default" sectionFormat="of" derivedContent="ANS-X9.44-2007"/>.
The CMS KEMRecipientInfo structure <xref target="RFC9629" format="default" sectionFormat="of" derivedContent="RFC9629"/> is one
place where algorithm identifiers for key-derivation functions are needed.</t>
        <t indent="0" pn="section-5.3-2">The key-derivation function algorithm identifier is an object identifier
and optional parameters.  When KDF2 and KDF3 are used, they are identified by
the id-kdf-kdf2 and id-kdf-kdf3 object identifiers, respectively.  The
key-derivation function algorithm identifier parameters carry a message
digest algorithm identifier, which indicates the hash function that
is being employed.  To support SHA3, the key-derivation function
algorithm identifier parameters contain an algorithm identifier from
<xref target="sha3oids" format="default" sectionFormat="of" derivedContent="Section 2"/>.</t>
        <sourcecode type="asn.1" markers="false" pn="section-5.3-3">
   x9-44 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
       tc68(133) country(16) x9(840) x9Standards(9) x9-44(44) }

   x9-44-components OBJECT IDENTIFIER ::= { x9-44 components(1) }

   id-kdf-kdf2 OBJECT IDENTIFIER ::= { x9-44-components kdf2(1) }

   id-kdf-kdf3 OBJECT IDENTIFIER ::= { x9-44-components kdf3(2) }
</sourcecode>
      </section>
    </section>
    <section anchor="security-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-6-1">Implementations must protect the signer's private key.  Compromise of the
signer's private key permits masquerade.</t>
      <t indent="0" pn="section-6-2">Implementations must protect the key-derivation key.  Compromise of the
key-derivation key permits others to derive the derived keying material,
which would result in loss of confidentiality, integrity, or authentication,
depending on the use of the derived keying material.</t>
      <t indent="0" pn="section-6-3">When more than two parties share the same message-authentication key,
data origin authentication is not assured.  Any party that knows the
message-authentication key can compute a valid MAC; therefore, the content
could originate from any one of the parties.</t>
      <t indent="0" pn="section-6-4">  Implementations must randomly generate message-authentication keys
  and one-time values, such as the a per-message secret number (called the
  k value) when generating an ECDSA signature.
In addition, the generation of public/private key pairs relies on a
random numbers.  The use of inadequate pseudorandom number generators
(PRNGs) to generate cryptographic values can result in little or no
security.  Instead of brute-force searching the whole key space, an
attacker may find it much easier to reproduce the PRNG environment that
produced the keys and then search the resulting small set of
possibilities.  The generation of quality random numbers is
difficult.  <xref target="RFC4086" format="default" sectionFormat="of" derivedContent="RFC4086"/> offers important guidance in this area,
and Appendix 3 of FIPS PUB 186-4 <xref target="DSS" format="default" sectionFormat="of" derivedContent="DSS"/> provides some PRNG techniques.</t>
      <t indent="0" pn="section-6-5">Implementers should be aware that cryptographic algorithms become weaker
with time.  As new cryptanalysis techniques are developed and computing
performance improves, the work factor to break a particular cryptographic
algorithm will reduce.  Therefore, cryptographic algorithm
implementations should be modular, allowing new algorithms to be readily
inserted.  That is, implementers should be prepared to regularly update
the set of algorithms in their implementations.</t>
    </section>
    <section anchor="iana-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-7">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-7-1">IANA has assigned one object identifier for the ASN.1 module in <xref target="asn1mod" format="default" sectionFormat="of" derivedContent="Appendix A"/>
in the "SMI Security for S/MIME Module Identifiers (1.2.840.113549.1.9.16.0)"
registry <xref target="IANA-MOD" format="default" sectionFormat="of" derivedContent="IANA-MOD"/>:</t>
      <sourcecode type="asn1" markers="false" pn="section-7-2">
   id-mod-sha3-oids-2023 OBJECT IDENTIFIER ::= {
      iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
      pkcs-9(9) smime(16) mod(0) 78 }
</sourcecode>
      <t indent="0" pn="section-7-3">IANA has assigned four object identifiers for the HKDF using SHA3 algorithm
identifiers in the "SMI Security for S/MIME Algorithms (1.2.840.113549.1.9.16.3)"
registry <xref target="IANA-ALG" format="default" sectionFormat="of" derivedContent="IANA-ALG"/>:</t>
      <sourcecode type="asn1" markers="false" pn="section-7-4">
   id-alg-hkdf-with-sha3-224 OBJECT IDENTIFIER ::= { id-alg 32 }

   id-alg-hkdf-with-sha3-256 OBJECT IDENTIFIER ::= { id-alg 33 }

   id-alg-hkdf-with-sha3-384 OBJECT IDENTIFIER ::= { id-alg 34 }

   id-alg-hkdf-with-sha3-512 OBJECT IDENTIFIER ::= { id-alg 35 }
</sourcecode>
    </section>
  </middle>
  <back>
    <references pn="section-8">
      <name slugifiedName="name-references">References</name>
      <references anchor="sec-normative-references" pn="section-8.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="ANS-X9.44-2007" target="https://webstore.ansi.org/standards/ascx9/ansix9442007r2017" quoteTitle="true" derivedAnchor="ANS-X9.44-2007">
          <front>
            <title>Public Key Cryptography for the Financial Services Industry -- Key Establishment Using Integer Factorization Cryptography</title>
            <author>
              <organization showOnFrontPage="true">American National Standards Institute</organization>
            </author>
            <date year="2017"/>
          </front>
          <seriesInfo name="ANSI" value="X9.44-2007 (R2017)"/>
        </reference>
        <reference anchor="DSS" target="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf" quoteTitle="true" derivedAnchor="DSS">
          <front>
            <title>Digital Signature Standard (DSS)</title>
            <author>
              <organization showOnFrontPage="true">National Institute of Standards and Technology</organization>
            </author>
            <date year="2023" month="February" day="03"/>
          </front>
          <seriesInfo name="FIPS PUB" value="186-5"/>
          <seriesInfo name="DOI" value="10.6028/NIST.FIPS.186-5"/>
        </reference>
        <reference anchor="NIST.SP.800-108r1-upd1" target="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1-upd1.pdf" quoteTitle="true" derivedAnchor="NIST.SP.800-108r1-upd1">
          <front>
            <title>Recommendation for Key Derivation Using Pseudorandom Functions</title>
            <author fullname="Lily Chen">
              <organization showOnFrontPage="true">National Institute of Standards and Technology</organization>
            </author>
            <date year="2024" month="February" day="02"/>
          </front>
          <seriesInfo name="NIST SP" value="800-108r1-upd1"/>
          <seriesInfo name="DOI" value="10.6028/NIST.SP.800-108r1-upd1"/>
        </reference>
        <reference anchor="NIST.SP.800-185" target="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf" quoteTitle="true" derivedAnchor="NIST.SP.800-185">
          <front>
            <title>SHA-3 Derived Functions: cSHAKE, KMAC, TupleHash and ParallelHash</title>
            <author fullname="John Kelsey">
              <organization showOnFrontPage="true">National Institute of Standards and Technology</organization>
            </author>
            <author fullname="Shu-jen Chang">
              <organization showOnFrontPage="true">National Institute of Standards and Technology</organization>
            </author>
            <author fullname="Ray Perlner">
              <organization showOnFrontPage="true">National Institute of Standards and Technology</organization>
            </author>
            <date year="2016" month="December"/>
          </front>
          <seriesInfo name="NIST SP" value="800-185"/>
          <seriesInfo name="DOI" value="10.6028/NIST.SP.800-185"/>
        </reference>
        <reference anchor="RFC2104" target="https://www.rfc-editor.org/info/rfc2104" quoteTitle="true" derivedAnchor="RFC2104">
          <front>
            <title>HMAC: Keyed-Hashing for Message Authentication</title>
            <author fullname="H. Krawczyk" initials="H." surname="Krawczyk"/>
            <author fullname="M. Bellare" initials="M." surname="Bellare"/>
            <author fullname="R. Canetti" initials="R." surname="Canetti"/>
            <date month="February" year="1997"/>
            <abstract>
              <t indent="0">This document describes HMAC, a mechanism for message authentication using cryptographic hash functions. HMAC can be used with any iterative cryptographic hash function, e.g., MD5, SHA-1, in combination with a secret shared key. The cryptographic strength of HMAC depends on the properties of the underlying hash function. This memo provides information for the Internet community. This memo does not specify an Internet standard of any kind</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2104"/>
          <seriesInfo name="DOI" value="10.17487/RFC2104"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t indent="0">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="RFC3279" target="https://www.rfc-editor.org/info/rfc3279" quoteTitle="true" derivedAnchor="RFC3279">
          <front>
            <title>Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <author fullname="L. Bassham" initials="L." surname="Bassham"/>
            <author fullname="W. Polk" initials="W." surname="Polk"/>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="April" year="2002"/>
            <abstract>
              <t indent="0">This document specifies algorithm identifiers and ASN.1 encoding formats for digital signatures and subject public keys used in the Internet X.509 Public Key Infrastructure (PKI). Digital signatures are used to sign certificates and certificate revocation list (CRLs). Certificates include the public key of the named subject. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3279"/>
          <seriesInfo name="DOI" value="10.17487/RFC3279"/>
        </reference>
        <reference anchor="RFC5480" target="https://www.rfc-editor.org/info/rfc5480" quoteTitle="true" derivedAnchor="RFC5480">
          <front>
            <title>Elliptic Curve Cryptography Subject Public Key Information</title>
            <author fullname="S. Turner" initials="S." surname="Turner"/>
            <author fullname="D. Brown" initials="D." surname="Brown"/>
            <author fullname="K. Yiu" initials="K." surname="Yiu"/>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <author fullname="T. Polk" initials="T." surname="Polk"/>
            <date month="March" year="2009"/>
            <abstract>
              <t indent="0">This document specifies the syntax and semantics for the Subject Public Key Information field in certificates that support Elliptic Curve Cryptography. This document updates Sections 2.3.5 and 5, and the ASN.1 module of "Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3279. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5480"/>
          <seriesInfo name="DOI" value="10.17487/RFC5480"/>
        </reference>
        <reference anchor="RFC5652" target="https://www.rfc-editor.org/info/rfc5652" quoteTitle="true" derivedAnchor="RFC5652">
          <front>
            <title>Cryptographic Message Syntax (CMS)</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="September" year="2009"/>
            <abstract>
              <t indent="0">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="RFC5869" target="https://www.rfc-editor.org/info/rfc5869" quoteTitle="true" derivedAnchor="RFC5869">
          <front>
            <title>HMAC-based Extract-and-Expand Key Derivation Function (HKDF)</title>
            <author fullname="H. Krawczyk" initials="H." surname="Krawczyk"/>
            <author fullname="P. Eronen" initials="P." surname="Eronen"/>
            <date month="May" year="2010"/>
            <abstract>
              <t indent="0">This document specifies a simple Hashed Message Authentication Code (HMAC)-based key derivation function (HKDF), which can be used as a building block in various protocols and applications. The key derivation function (KDF) is intended to support a wide range of applications and requirements, and is conservative in its use of cryptographic hash functions. This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5869"/>
          <seriesInfo name="DOI" value="10.17487/RFC5869"/>
        </reference>
        <reference anchor="RFC5912" target="https://www.rfc-editor.org/info/rfc5912" quoteTitle="true" derivedAnchor="RFC5912">
          <front>
            <title>New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)</title>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <date month="June" year="2010"/>
            <abstract>
              <t indent="0">The Public Key Infrastructure using X.509 (PKIX) certificate format, and many associated formats, are expressed using ASN.1. The current ASN.1 modules conform to the 1988 version of ASN.1. This document updates those ASN.1 modules to conform to the 2002 version of ASN.1. There are no bits-on-the-wire changes to any of the formats; this is simply a change to the syntax. This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5912"/>
          <seriesInfo name="DOI" value="10.17487/RFC5912"/>
        </reference>
        <reference anchor="RFC8017" target="https://www.rfc-editor.org/info/rfc8017" quoteTitle="true" derivedAnchor="RFC8017">
          <front>
            <title>PKCS #1: RSA Cryptography Specifications Version 2.2</title>
            <author fullname="K. Moriarty" initials="K." role="editor" surname="Moriarty"/>
            <author fullname="B. Kaliski" initials="B." surname="Kaliski"/>
            <author fullname="J. Jonsson" initials="J." surname="Jonsson"/>
            <author fullname="A. Rusch" initials="A." surname="Rusch"/>
            <date month="November" year="2016"/>
            <abstract>
              <t indent="0">This document provides recommendations for the implementation of public-key cryptography based on the RSA algorithm, covering cryptographic primitives, encryption schemes, signature schemes with appendix, and ASN.1 syntax for representing keys and for identifying the schemes.</t>
              <t indent="0">This document represents a republication of PKCS #1 v2.2 from RSA Laboratories' Public-Key Cryptography Standards (PKCS) series. By publishing this RFC, change control is transferred to the IETF.</t>
              <t indent="0">This document also obsoletes RFC 3447.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8017"/>
          <seriesInfo name="DOI" value="10.17487/RFC8017"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t indent="0">RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="SHA3" target="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf" quoteTitle="true" derivedAnchor="SHA3">
          <front>
            <title>SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions</title>
            <author>
              <organization showOnFrontPage="true">National Institute of Standards and Technology</organization>
            </author>
            <date year="2015" month="August"/>
          </front>
          <seriesInfo name="NIST FIPS" value="202"/>
          <seriesInfo name="DOI" value="10.6028/NIST.FIPS.202"/>
        </reference>
        <reference anchor="X.680" target="https://www.itu.int/rec/T-REC-X.680-202102-I/en" quoteTitle="true" derivedAnchor="X.680">
          <front>
            <title>Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation</title>
            <author>
              <organization showOnFrontPage="true">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="X.690" target="https://www.itu.int/rec/T-REC-X.690-202102-I/en" quoteTitle="true" derivedAnchor="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 showOnFrontPage="true">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>
      </references>
      <references anchor="sec-informative-references" pn="section-8.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="IANA-ALG" target="https://www.iana.org/assignments/smi-numbers/" quoteTitle="true" derivedAnchor="IANA-ALG">
          <front>
            <title>SMI Security for S/MIME Algorithms (1.2.840.113549.1.9.16.3)</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="IANA-MOD" target="https://www.iana.org/assignments/smi-numbers/" quoteTitle="true" derivedAnchor="IANA-MOD">
          <front>
            <title>SMI Security for S/MIME Module Identifier (1.2.840.113549.1.9.16.0)</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="RFC4086" target="https://www.rfc-editor.org/info/rfc4086" quoteTitle="true" derivedAnchor="RFC4086">
          <front>
            <title>Randomness Requirements for Security</title>
            <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
            <author fullname="J. Schiller" initials="J." surname="Schiller"/>
            <author fullname="S. Crocker" initials="S." surname="Crocker"/>
            <date month="June" year="2005"/>
            <abstract>
              <t indent="0">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 indent="0">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="RFC8702" target="https://www.rfc-editor.org/info/rfc8702" quoteTitle="true" derivedAnchor="RFC8702">
          <front>
            <title>Use of the SHAKE One-Way Hash Functions in the Cryptographic Message Syntax (CMS)</title>
            <author fullname="P. Kampanakis" initials="P." surname="Kampanakis"/>
            <author fullname="Q. Dang" initials="Q." surname="Dang"/>
            <date month="January" year="2020"/>
            <abstract>
              <t indent="0">This document updates the "Cryptographic Message Syntax (CMS) Algorithms" (RFC 3370) and describes the conventions for using the SHAKE family of hash functions in the Cryptographic Message Syntax as one-way hash functions with the RSA Probabilistic Signature Scheme (RSASSA-PSS) and Elliptic Curve Digital Signature Algorithm (ECDSA). The conventions for the associated signer public keys in CMS are also described.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8702"/>
          <seriesInfo name="DOI" value="10.17487/RFC8702"/>
        </reference>
        <reference anchor="RFC9629" target="https://www.rfc-editor.org/info/rfc9629" quoteTitle="true" derivedAnchor="RFC9629">
          <front>
            <title>Using Key Encapsulation Mechanism (KEM) Algorithms in the Cryptographic Message Syntax (CMS)</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <author fullname="J. Gray" initials="J." surname="Gray"/>
            <author fullname="T. Okubo" initials="T." surname="Okubo"/>
            <date month="August" year="2024"/>
            <abstract>
              <t indent="0">The Cryptographic Message Syntax (CMS) supports key transport and key agreement algorithms. In recent years, cryptographers have been specifying Key Encapsulation Mechanism (KEM) algorithms, including quantum-secure KEM algorithms. This document defines conventions for the use of KEM algorithms by the originator and recipients to encrypt and decrypt CMS content. This document updates RFC 5652.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9629"/>
          <seriesInfo name="DOI" value="10.17487/RFC9629"/>
        </reference>
      </references>
    </references>
    <section numbered="true" anchor="asn1mod" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-asn1-module">ASN.1 Module </name>
      <t indent="0" pn="section-appendix.a-1">This section contains the ASN.1 module for the algorithm identifiers using the SHA3
family of hash functions <xref target="SHA3" format="default" sectionFormat="of" derivedContent="SHA3"/>.  This module imports types from other ASN.1
modules that are defined in <xref target="RFC5912" format="default" sectionFormat="of" derivedContent="RFC5912"/>.</t>
      <sourcecode type="asn.1" markers="true" pn="section-appendix.a-2">
   SHA3-OIDs-2023
     { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
       smime(16) modules(0) id-mod-sha3-oids-2023(78) }

   DEFINITIONS IMPLICIT TAGS ::=
   BEGIN

   EXPORTS ALL;

   IMPORTS

     AlgorithmIdentifier{}, DIGEST-ALGORITHM, SIGNATURE-ALGORITHM,
     KEY-DERIVATION, MAC-ALGORITHM
     FROM AlgorithmInformation-2009  -- [RFC5912]
       { iso(1) identified-organization(3) dod(6) internet(1)
         security(5) mechanisms(5) pkix(7) id-mod(0)
         id-mod-algorithmInformation-02(58) }

    mda-sha1, pk-rsa, pk-ec, ECDSA-Sig-Value
    FROM PKIXAlgs-2009  -- [RFC5912]
      { iso(1) identified-organization(3) dod(6) internet(1)
        security(5) mechanisms(5) pkix(7) id-mod(0)
        id-mod-pkix1-algorithms2008-02(56) }

    mda-sha224, mda-sha256, mda-sha384, mda-sha512
    FROM PKIX1-PSS-OAEP-Algorithms-2009  -- [RFC5912]
      { iso(1) identified-organization(3) dod(6) internet(1)
        security(5) mechanisms(5) pkix(7) id-mod(0)
        id-mod-pkix1-rsa-pkalgs-02(54) } ;


   --
   -- Alias
   --

   OID ::= OBJECT IDENTIFIER


   --
   -- Object Identifier Arcs
   --

   nistAlgorithm OID ::= { joint-iso-itu-t(2) country(16)
       us(840) organization(1) gov(101) csor(3) 4 }

   hashAlgs OID ::= { nistAlgorithm 2 }

   sigAlgs OID ::= { nistAlgorithm 3 }

   x9-44 OID ::= { iso(1) identified-organization(3) tc68(133)
       country(16) x9(840) x9Standards(9) x9-44(44) }

   x9-44-components OID ::= { x9-44 components(1) }

   id-alg OID ::= { iso(1) member-body(2) us(840)
       rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) 3 }


   --
   -- Message Digest Algorithms
   --

   id-sha3-224 OID ::= { hashAlgs 7 }

   id-sha3-256 OID ::= { hashAlgs 8 }

   id-sha3-384 OID ::= { hashAlgs 9 }

   id-sha3-512 OID ::= { hashAlgs 10 }

   mda-sha3-224 DIGEST-ALGORITHM ::= {
       IDENTIFIER id-sha3-224
       PARAMS ARE absent }

   mda-sha3-256 DIGEST-ALGORITHM ::= {
       IDENTIFIER id-sha3-256
       PARAMS ARE absent }

   mda-sha3-384 DIGEST-ALGORITHM ::= {
       IDENTIFIER id-sha3-384
       PARAMS ARE absent }

   mda-sha3-512 DIGEST-ALGORITHM ::= {
       IDENTIFIER id-sha3-512
       PARAMS ARE absent }

   HashAlgorithm ::= AlgorithmIdentifier{ DIGEST-ALGORITHM,
                         { HashAlgorithms } }

   HashAlgorithms DIGEST-ALGORITHM ::=  {
       mda-sha3-224 |
       mda-sha3-256 |
       mda-sha3-384 |
       mda-sha3-512,
       ... }


   --
   -- Signature Algorithms
   --

   id-rsassa-pkcs1-v1-5-with-sha3-224 OID ::= { sigAlgs 13 }

   id-rsassa-pkcs1-v1-5-with-sha3-256 OID ::= { sigAlgs 14 }

   id-rsassa-pkcs1-v1-5-with-sha3-384 OID ::= { sigAlgs 15 }

   id-rsassa-pkcs1-v1-5-with-sha3-512 OID ::= { sigAlgs 16 }

   id-ecdsa-with-sha3-224 OID ::= { sigAlgs 9 }

   id-ecdsa-with-sha3-256 OID ::= { sigAlgs 10 }

   id-ecdsa-with-sha3-384 OID ::= { sigAlgs 11 }

   id-ecdsa-with-sha3-512 OID ::= { sigAlgs 12 }

   sa-rsaWithSHA3-224 SIGNATURE-ALGORITHM ::= {
       IDENTIFIER id-rsassa-pkcs1-v1-5-with-sha3-224
       PARAMS TYPE NULL ARE required
       HASHES { mda-sha3-224 }
       PUBLIC-KEYS { pk-rsa }
       SMIME-CAPS {IDENTIFIED BY
           id-rsassa-pkcs1-v1-5-with-sha3-224 } }

   sa-rsaWithSHA3-256 SIGNATURE-ALGORITHM ::= {
       IDENTIFIER id-rsassa-pkcs1-v1-5-with-sha3-256
       PARAMS TYPE NULL ARE required
       HASHES { mda-sha3-256 }
       PUBLIC-KEYS { pk-rsa }
       SMIME-CAPS {IDENTIFIED BY
           id-rsassa-pkcs1-v1-5-with-sha3-256 } }

   sa-rsaWithSHA3-384 SIGNATURE-ALGORITHM ::= {
       IDENTIFIER id-rsassa-pkcs1-v1-5-with-sha3-384
       PARAMS TYPE NULL ARE required
       HASHES { mda-sha3-384 }
       PUBLIC-KEYS { pk-rsa }
       SMIME-CAPS {IDENTIFIED BY
           id-rsassa-pkcs1-v1-5-with-sha3-384 } }

   sa-rsaWithSHA3-512 SIGNATURE-ALGORITHM ::= {
       IDENTIFIER id-rsassa-pkcs1-v1-5-with-sha3-512
       PARAMS TYPE NULL ARE required
       HASHES { mda-sha3-512 }
       PUBLIC-KEYS { pk-rsa }
       SMIME-CAPS {IDENTIFIED BY
           id-rsassa-pkcs1-v1-5-with-sha3-512 } }

   sa-ecdsaWithSHA3-224 SIGNATURE-ALGORITHM ::= {
       IDENTIFIER id-ecdsa-with-sha3-224
       VALUE ECDSA-Sig-Value
       PARAMS ARE absent
       HASHES { mda-sha3-224 }
       PUBLIC-KEYS { pk-ec }
       SMIME-CAPS {IDENTIFIED BY id-ecdsa-with-sha3-224 } }

   sa-ecdsaWithSHA3-256 SIGNATURE-ALGORITHM ::= {
       IDENTIFIER id-ecdsa-with-sha3-256
       VALUE ECDSA-Sig-Value
       PARAMS ARE absent
       HASHES { mda-sha3-256 }
       PUBLIC-KEYS { pk-ec }
       SMIME-CAPS {IDENTIFIED BY id-ecdsa-with-sha3-256 } }

   sa-ecdsaWithSHA3-384 SIGNATURE-ALGORITHM ::= {
       IDENTIFIER id-ecdsa-with-sha3-384
       VALUE ECDSA-Sig-Value
       PARAMS ARE absent
       HASHES { mda-sha3-384 }
       PUBLIC-KEYS { pk-ec }
       SMIME-CAPS {IDENTIFIED BY id-ecdsa-with-sha3-384 } }

   sa-ecdsaWithSHA3-512 SIGNATURE-ALGORITHM ::= {
       IDENTIFIER id-ecdsa-with-sha3-512
       VALUE ECDSA-Sig-Value
       PARAMS ARE absent
       HASHES { mda-sha3-512 }
       PUBLIC-KEYS { pk-ec }
       SMIME-CAPS {IDENTIFIED BY id-ecdsa-with-sha3-512 } }

   SignatureAlg ::= AlgorithmIdentifier{ SIGNATURE-ALGORITHM,
                         { SignatureAlgs } }

   SignatureAlgs SIGNATURE-ALGORITHM ::= {
       sa-rsaWithSHA3-224 |
       sa-rsaWithSHA3-256 |
       sa-rsaWithSHA3-384 |
       sa-rsaWithSHA3-512 |
       sa-ecdsaWithSHA3-224 |
       sa-ecdsaWithSHA3-256 |
       sa-ecdsaWithSHA3-384 |
       sa-ecdsaWithSHA3-512,
       ... }


   --
   -- Message Authentication Codes
   --

   id-hmacWithSHA3-224 OID ::= { hashAlgs 13 }

   id-hmacWithSHA3-256 OID ::= { hashAlgs 14 }

   id-hmacWithSHA3-384 OID ::= { hashAlgs 15 }

   id-hmacWithSHA3-512 OID ::= { hashAlgs 16 }

   maca-hmacWithSHA3-224 MAC-ALGORITHM ::= {
       IDENTIFIER id-hmacWithSHA3-224
       PARAMS ARE absent
       IS-KEYED-MAC TRUE
       SMIME-CAPS {IDENTIFIED BY id-hmacWithSHA3-224 } }

   maca-hmacWithSHA3-256 MAC-ALGORITHM ::= {
       IDENTIFIER id-hmacWithSHA3-256
       PARAMS ARE absent
       IS-KEYED-MAC TRUE
       SMIME-CAPS {IDENTIFIED BY id-hmacWithSHA3-256 } }

   maca-hmacWithSHA3-384 MAC-ALGORITHM ::= {
       IDENTIFIER id-hmacWithSHA3-384
       PARAMS ARE absent
       IS-KEYED-MAC TRUE
       SMIME-CAPS {IDENTIFIED BY id-hmacWithSHA3-384 } }

   maca-hmacWithSHA3-512 MAC-ALGORITHM ::= {
       IDENTIFIER id-hmacWithSHA3-512
       PARAMS ARE absent
       IS-KEYED-MAC TRUE
       SMIME-CAPS {IDENTIFIED BY id-hmacWithSHA3-512 } }

   MACAlgorithm ::= AlgorithmIdentifier{ MAC-ALGORITHM,
                       { MACAlgorithms } }

   MACAlgorithms MAC-ALGORITHM ::= {
       maca-hmacWithSHA3-224 |
       maca-hmacWithSHA3-256 |
       maca-hmacWithSHA3-384 |
       maca-hmacWithSHA3-512,
       ... }


   --
   -- Key Derivation Algorithms
   --

   id-alg-hkdf-with-sha3-224 OID ::= { id-alg 32 }

   id-alg-hkdf-with-sha3-256 OID ::= { id-alg 33 }

   id-alg-hkdf-with-sha3-384 OID ::= { id-alg 34 }

   id-alg-hkdf-with-sha3-512 OID ::= { id-alg 35 }

   id-kmac128 OID ::= { hashAlgs 21 }

   id-kmac256  OID ::= { hashAlgs 22 }

   id-kdf-kdf2 OID ::= { x9-44-components kdf2(1) }

   id-kdf-kdf3 OID ::= { x9-44-components kdf3(2) }

   kda-hkdf-with-sha3-224 KEY-DERIVATION ::= {
       IDENTIFIER id-alg-hkdf-with-sha3-224
       PARAMS ARE absent
       -- No S/MIME caps defined -- }

   kda-hkdf-with-sha3-256 KEY-DERIVATION ::= {
       IDENTIFIER id-alg-hkdf-with-sha3-256
       PARAMS ARE absent
       -- No S/MIME caps defined -- }

   kda-hkdf-with-sha3-384 KEY-DERIVATION ::= {
       IDENTIFIER id-alg-hkdf-with-sha3-384
       PARAMS ARE absent
       -- No S/MIME caps defined -- }

   kda-hkdf-with-sha3-512 KEY-DERIVATION ::= {
       IDENTIFIER id-alg-hkdf-with-sha3-512
       PARAMS ARE absent
       -- No S/MIME caps defined -- }

   kda-kmac128 KEY-DERIVATION ::= {
       IDENTIFIER id-kmac128
       PARAMS TYPE Customization ARE optional
       -- PARAMS are absent when Customization is ''H --
       -- No S/MIME caps defined -- }

   kda-kmac256 KEY-DERIVATION ::= {
       IDENTIFIER id-kmac256
       PARAMS TYPE Customization ARE optional
       -- PARAMS are absent when Customization is ''H --
       -- No S/MIME caps defined -- }

   kda-kdf2 KEY-DERIVATION ::= {
       IDENTIFIER id-kdf-kdf2
       PARAMS TYPE KDF2-HashFunction ARE required
       -- No S/MIME caps defined -- }

   kda-kdf3 KEY-DERIVATION ::= {
       IDENTIFIER id-kdf-kdf3
       PARAMS TYPE KDF3-HashFunction ARE required
       -- No S/MIME caps defined -- }

   Customization ::= OCTET STRING

   KDF2-HashFunction ::= AlgorithmIdentifier { DIGEST-ALGORITHM,
                             { KDF2-HashFunctions } }

   KDF2-HashFunctions DIGEST-ALGORITHM ::= {
      X9-HashFunctions,
      ... }

   KDF3-HashFunction ::= AlgorithmIdentifier { DIGEST-ALGORITHM,
                             { KDF3-HashFunctions } }

   KDF3-HashFunctions DIGEST-ALGORITHM ::= {
      X9-HashFunctions,
      ... }

   X9-HashFunctions DIGEST-ALGORITHM ::= {
       mda-sha1 |
       mda-sha224 |
       mda-sha256 |
       mda-sha384 |
       mda-sha512 |
       mda-sha3-224 |
       mda-sha3-256 |
       mda-sha3-384 |
       mda-sha3-512,
       ... }

   KeyDerivationFunction ::=  AlgorithmIdentifier{ KEY-DERIVATION,
                                  { KeyDevAlgs } }

   KeyDevAlgs KEY-DERIVATION ::= {
       kda-hkdf-with-sha3-224 |
       kda-hkdf-with-sha3-256 |
       kda-hkdf-with-sha3-384 |
       kda-hkdf-with-sha3-512 |
       kda-kmac128 |
       kda-kmac256 |
       kda-kdf2 |
       kda-kdf3,
       ... }

   END
</sourcecode>
    </section>
    <section numbered="false" anchor="acknowledgements" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.b-1">Thanks to <contact fullname="Daniel Van Geest"/> and <contact fullname="Sean Turner"/> for their careful review and thoughtful
      comments.</t>
      <t indent="0" pn="section-appendix.b-2">Thanks to <contact fullname="Sara Kerman"/>, <contact fullname="Quynh       Dang"/>, and <contact fullname="David Cooper"/> for getting the object
      identifiers assigned for KMAC128 and KMAC256.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-address">Author's Address</name>
      <author initials="R." surname="Housley" fullname="Russ Housley">
        <organization abbrev="Vigil Security" showOnFrontPage="true">Vigil Security, LLC</organization>
        <address>
          <postal>
            <city>Herndon</city>
            <region>VA</region>
            <country>United States of America</country>
          </postal>
          <email>housley@vigilsec.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
