<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" consensus="true" docName="draft-liu-lamps-cms-kem-psk-01" ipr="trust200902" sortRefs="true" submissionType="IETF" symRefs="true" tocInclude="true" updates="8696" version="3" xml:lang="en">
  <front>
    <title abbrev="CMS KEM with External PSK">Using Key Encapsulation Mechanisms with External Pre-Shared Keys in the Cryptographic Message Syntax (CMS)</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-lamps-cms-kem-psk-01"/>
    <author fullname="Penghui Liu" initials="P." role="editor" surname="Liu">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>No.2 Xingke 1 Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>liuph@pcl.ac.cn</email>
      </address>
    </author>
    <author fullname="Rongwei Yang" initials="R." role="editor" surname="Yang">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>No.2 Xingke 1 Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>yangrw@pcl.ac.cn</email>
      </address>
    </author>
    <author fullname="Xiang Liu" initials="X." role="editor" surname="Liu">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>No.2 Xingke 1 Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>liux15@pcl.ac.cn</email>
      </address>
    </author>
    <author fullname="Yu Zhang" initials="Y." role="editor" surname="Zhang">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>No.2 Xingke 1 Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>zhangy08@pcl.ac.cn</email>
      </address>
    </author>
    <author fullname="Weizhe Zhang" initials="W." role="editor" surname="Zhang">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>No.2 Xingke 1 Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>weizhe.zhang@pcl.ac.cn</email>
      </address>
    </author>
    <date year="2026" month="December" day="2"/>
    <area>Security</area>
    <workgroup>LAMPS</workgroup>
    <keyword>CMS</keyword>
    <keyword>external pre-shared key</keyword>
    <keyword>KEM</keyword>
    <abstract>
      <t>This document updates RFC 8696 by adding a KEM-with-PSK recipient mechanism alongside its key-transport-with-PSK and key-agreement-with-PSK mechanisms. It uses a KEM shared secret as the input keying material to the existing key derivation procedure and includes the external PSK in the locally constructed CMSORIforPSKOtherInfo. It adds a keyMgmtAlgType value and a CMS OtherRecipientInfo type. It does not define a new KDF or select a mandatory algorithm suite.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Status</name>
      <t>This is an individual contribution for discussion in the Limited Additional Mechanisms for PKIX and SMIME (LAMPS) Working Group. It has not been adopted by the working group. Revision -01 reuses the key derivation conventions of RFC 8696 and replaces the custom combiner and context of revision -00. The proposed recipient structure and keyKEM(15) value require review.</t>
      <t>TBD1 and TBD2 denote requested object identifier assignments. They are not assigned values. The derivation example uses only existing algorithm identifiers and does not depend on these assignments.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>Using Pre-Shared Key (PSK) in CMS <xref target="RFC8696"/> defines keyTransPSK and keyAgreePSK. Each combines a public-key mechanism with an external PSK when deriving the key-encryption key (KEK) used to protect a content key. Using KEM Algorithms in CMS <xref target="RFC9629"/> defines the corresponding KEM concepts and recipient-identification conventions.</t>
      <t>This document adds keyKEMPSK as a third PSK recipient mechanism. The originator encapsulates to the recipient's KEM public key and uses the resulting shared secret as the input keying material for the procedure in Section 5 of RFC 8696. The external PSK is included in CMSORIforPSKOtherInfo, with a new keyMgmtAlgType value distinguishing KEM processing.</t>
      <t>The new mechanism is usable with the CMS enveloped-data content type <xref target="RFC5652"/> and authenticated-enveloped-data content type <xref target="RFC5083"/>, as in RFC 8696. Application specifications select the KEM, KDF, key-encryption algorithm, and content-encryption algorithm. This document does not select a mandatory suite.</t>
      <t>This document updates RFC 8696 by extending its PSK key-management mechanisms and OtherInfo enumeration. It uses the KEM conventions of RFC 9629 as a reference; it does not change KEMRecipientInfo, its identifier, or its key derivation rules.</t>
    </section>
    <section anchor="conventions">
      <name>Conventions and 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>
      <t>The terms IKM, salt, info, L, and OKM have the meanings used in Section 5 of RFC 8696. ss denotes the KEM shared secret. CEK denotes either the content-encryption key or the content-authenticated-encryption key, as appropriate for the enclosing CMS content type. DER(X) is the Distinguished Encoding Rules encoding of X. Lengths are in octets.</t>
    </section>
    <section anchor="recipient-info">
      <name>keyKEMPSK Recipient Information</name>
      <t>Per-recipient information is represented in KEMPSKRecipientInfo using the OtherRecipientInfo alternative of RecipientInfo. Its oriType <bcp14>MUST</bcp14> be id-ori-kemPSK and its oriValue <bcp14>MUST</bcp14> contain a KEMPSKRecipientInfo:</t>
      <sourcecode type="asn.1">
id-ori-kemPSK OBJECT IDENTIFIER ::= { id-ori TBD1 }

KEMPSKRecipientInfo ::= SEQUENCE {
  version                 CMSVersion,  -- MUST be 0
  pskid                   PreSharedKeyIdentifier,
  rid                     RecipientIdentifier,
  kem                     KEMAlgorithmIdentifier,
  kemct                   OCTET STRING,
  kdfAlgorithm            KeyDerivationAlgorithmIdentifier,
  keyEncryptionAlgorithm  KeyEncryptionAlgorithmIdentifier,
  encryptedKey            EncryptedKey }
</sourcecode>
      <t>version <bcp14>MUST</bcp14> be 0. pskid is the public identifier of the external PSK and uses PreSharedKeyIdentifier from RFC 8696. It does not contain the PSK. A recipient <bcp14>MUST</bcp14> use only PSKs authorized for the applicable application and recipient context. As permitted by Section 2 of RFC 8696, a recipient <bcp14>MAY</bcp14> try multiple authorized PSKs with the same identifier. If no authorized PSK is found or none succeeds, processing of that entry fails.</t>
      <t>The enclosing CMS version follows the content-type specification. Because this mechanism uses OtherRecipientInfo, EnvelopedData.version <bcp14>MUST</bcp14> be 3, except when originatorInfo requires version 4 under Section 6.1 of RFC 5652. AuthEnvelopedData.version <bcp14>MUST</bcp14> be 0 under Section 2.1 of RFC 5083. These values are distinct from KEMPSKRecipientInfo.version.</t>
      <t>rid, kem, and kemct have the recipient-identification, KEM-algorithm, and ciphertext meanings specified in Section 3 of RFC 9629. The originator <bcp14>MUST</bcp14> validate the recipient credential and its authorization. Certificate processing follows <xref target="RFC5280"/> and the applicable KEM algorithm specification. Recipients <bcp14>MUST</bcp14> support issuerAndSerialNumber and subjectKeyIdentifier; originators <bcp14>MUST</bcp14> support at least one. When a certificate with keyUsage is used, keyEncipherment <bcp14>MUST</bcp14> be asserted and any further constraints of the KEM specification apply.</t>
      <t>kdfAlgorithm identifies the KDF and any parameters used with <xref target="derivation"/>. keyEncryptionAlgorithm identifies the algorithm and any parameters used to encrypt or wrap the CEK. encryptedKey is the result of that operation using the derived KEK. The KEM ciphertext and all AlgorithmIdentifier values <bcp14>MUST</bcp14> follow their defining specifications.</t>
      <t>This structure has no ukm or kekLength field: the derivation context is the RFC 8696 OtherInfo structure, and the KEK length is determined by keyEncryptionAlgorithm. A KEM or key-encryption algorithm requiring additional inputs is usable only if its defining specification or an application specification defines how all required inputs are supplied by this mechanism.</t>
      <t>The new structure <bcp14>MUST NOT</bcp14> be encoded under id-ori-kem or either PSK recipient identifier from RFC 8696. An unsupported recipient type, version, or algorithm <bcp14>MUST NOT</bcp14> be reinterpreted as KEM-only or another recipient mechanism.</t>
    </section>
    <section anchor="derivation">
      <name>Key Derivation</name>
      <t>The KDF inputs and processing in Section 5 of RFC 8696 apply, with the following additional mechanism-specific values:</t>
      <dl>
        <dt>IKM</dt>
        <dd>The shared secret ss output by KEM encapsulation or decapsulation.</dd>
        <dt>info</dt>
        <dd>The DER encoding of CMSORIforPSKOtherInfo, with psk set to the external PSK, keyMgmtAlgType set to keyKEM(15), keyEncryptionAlgorithm copied from KEMPSKRecipientInfo, pskLength set to the length of the PSK, and kdkLength set to the length of ss.</dd>
        <dt>L</dt>
        <dd>The KEK length required by keyEncryptionAlgorithm, in octets. Algorithms with more than one permitted key length require an unambiguous selection defined by the algorithm or application specification.</dd>
        <dt>OKM</dt>
        <dd>The KEK used to encrypt or wrap the CEK.</dd>
      </dl>
      <t>This document extends the keyMgmtAlgType enumeration in Sections 5 and 6 of RFC 8696 with keyKEM(15). The updated structure is:</t>
      <sourcecode type="asn.1">
CMSORIforPSKOtherInfo ::= SEQUENCE {
  psk                     OCTET STRING,
  keyMgmtAlgType           ENUMERATED {
    keyTrans (5), keyAgree (10), keyKEM (15) },
  keyEncryptionAlgorithm  KeyEncryptionAlgorithmIdentifier,
  pskLength               INTEGER (1..MAX),
  kdkLength               INTEGER (1..MAX) }
</sourcecode>
      <t>The field order, tagging, and meanings are otherwise unchanged. The existing keyTrans(5) and keyAgree(10) encodings and processing continue to apply to their respective mechanisms. <xref target="asn1-module"/> provides the updated type in a new module; the original published module identifier is not reassigned.</t>
      <t>The OtherInfo value is constructed locally by each party. It contains the secret PSK, not pskid, and <bcp14>MUST NOT</bcp14> be transmitted with the CMS message, placed in attributes, or logged as public metadata. It and its DER encoding <bcp14>MUST</bcp14> be protected as secret material.</t>
      <t>When an HKDF identifier from <xref target="RFC8619"/> is used, AlgorithmIdentifier parameters <bcp14>MUST</bcp14> be absent. No salt is supplied; the default salt processing of <xref target="RFC5869"/> applies. The derivation is:</t>
      <artwork type="ascii-art">
IKM  = ss
info = DER(CMSORIforPSKOtherInfo)
PRK  = HKDF-Extract(salt = empty, IKM = ss)
KEK  = HKDF-Expand(PRK, info, L)
</artwork>
      <t>Here empty denotes the zero-length string; for HKDF this produces the same extraction result as the default all-zero salt of HashLen octets. The PSK enters through info, as in RFC 8696. It <bcp14>MUST NOT</bcp14> replace ss as IKM or be used as an additional salt under these conventions. The complete KEK <bcp14>MUST</bcp14> be computed before any part is used.</t>
    </section>
    <section anchor="processing">
      <name>Originator and Recipient Processing</name>
      <t>The content processing rules of RFC 5652 or RFC 5083, as applicable, continue to apply. The originator generates one fresh CEK for the envelope according to the content-encryption specification. For each KEM-with-PSK recipient, the originator:</t>
      <ol>
        <li>
          <t>Selects and validates the authorized KEM credential, PSK, and algorithm combination.</t>
        </li>
        <li>
          <t>Performs a fresh encapsulation to the recipient public key, obtaining ss and kemct.</t>
        </li>
        <li>
          <t>Constructs CMSORIforPSKOtherInfo, derives the KEK as specified in <xref target="derivation"/>, and encrypts or wraps the CEK.</t>
        </li>
        <li>
          <t>Places the public parameters, identifiers, kemct, and encryptedKey in KEMPSKRecipientInfo.</t>
        </li>
      </ol>
      <t>After producing all recipient entries, the originator constructs the enclosing CMS content using the CEK. For several recipients, each KEMPSKRecipientInfo uses a fresh encapsulation and the appropriate PSK to protect the same CEK.</t>
      <t>The recipient:</t>
      <ol>
        <li>
          <t>Checks the recipient type, version, permitted algorithms, and recipient identifier, then selects the authorized KEM private key and candidate PSK identified by pskid. Multiple authorized PSK candidates may be tried as described in <xref target="recipient-info"/>.</t>
        </li>
        <li>
          <t>Processes kemct according to the KEM specification and obtains ss.</t>
        </li>
        <li>
          <t>Reconstructs CMSORIforPSKOtherInfo, derives the KEK, and decrypts or unwraps encryptedKey to recover the CEK.</t>
        </li>
        <li>
          <t>Processes the content under the enclosing CMS specification, including all required authentication checks before releasing plaintext.</t>
        </li>
      </ol>
      <t>A failure <bcp14>MUST NOT</bcp14> cause substitution of an empty PSK, a PSK-only derivation, or KEM-only processing. The KEM's implicit-rejection and error-handling requirements <bcp14>MUST</bcp14> be followed; an implementation <bcp14>MUST NOT</bcp14> expose distinguishable external errors that create a decapsulation or key-recovery oracle.</t>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t>The security considerations of RFC 8696, RFC 9629, and the enclosing CMS content type apply. The KEM, KDF, key-encryption algorithm, and content-encryption algorithm <bcp14>MUST</bcp14> satisfy the application's security requirements. In particular, KDF selection <bcp14>MUST</bcp14> account for the PSK being carried in info, including the threat model in which ss is known to an attacker. Accepting IKM, info, and L is not by itself sufficient to establish that property. Reusing the RFC 8696 KDF inputs does not establish a new general security proof for arbitrary algorithms or related secret inputs.</t>
      <t>The PSK <bcp14>MUST</bcp14> be independently generated high-entropy secret material with at least 256 bits of entropy, as required for the quantum-resistant objective of RFC 8696. It <bcp14>MUST NOT</bcp14> be a password or be derived from the KEM private key or ss. Provisioning and rotation <bcp14>MUST</bcp14> preserve this independence. Applications define identifier scope, authorized PSK use, retention, and retirement; identifiers are public and can enable linkability.</t>
      <t>The PSK supplements the confidentiality protection of the KEM. If the PSK is compromised, protection depends on the KEM and the remaining algorithms. If ss is compromised, protection depends on the PSK and the KDF's treatment of secret info. In the HKDF case, PRK depends on ss alone; the PSK participates in expansion through info. PRK <bcp14>MUST NOT</bcp14> be used as the KEK. Implementations <bcp14>MUST</bcp14> protect ss, the PSK, the secret OtherInfo encoding, and derived keys. Compromise of the CEK exposes the content regardless of this mechanism.</t>
      <t>For the 128-bit quantum-security objective discussed in Section 7 of RFC 8696, the KDF needs to be quantum resistant and the KEK and CEK each need to be at least 256 bits long, in addition to the PSK entropy requirement. KDF and key-encryption strength must be commensurate with the content-encryption strength. A long PSK alone does not establish the security level of the complete envelope.</t>
      <t>CMSORIforPSKOtherInfo binds the PSK value, mechanism category, key-encryption algorithm, and input lengths. It does not explicitly bind pskid, rid, the KEM identifier or ciphertext, the recipient set, or the enclosing content-encryption parameters. Identifier aliases resolving to the same keys need not change the KEK. Applications <bcp14>MUST NOT</bcp14> treat successful key recovery as authentication of that metadata. Applications requiring those bindings <bcp14>MUST</bcp14> supply an appropriate authentication mechanism covering the required fields. AuthEnvelopedData does not authenticate the complete recipient list.</t>
      <t>Each RecipientInfo provides an alternative route to the CEK. Where policy requires KEM-with-PSK protection, originators <bcp14>MUST NOT</bcp14> provide another route to the same CEK that fails that policy, and recipients <bcp14>MUST NOT</bcp14> fall back to such a route. Copies of the plaintext protected by weaker mechanisms can likewise defeat the intended confidentiality policy.</t>
      <t>This mechanism does not establish a unique sender identity: any holder of the PSK and the recipient public key can construct an envelope. It provides neither forward secrecy against later compromise of both required secrets nor replay protection. Applications needing sender authentication or freshness <bcp14>MUST</bcp14> provide those services. EnvelopedData alone supplies no content-integrity guarantee; applications requiring authenticated encryption can use AuthEnvelopedData with an appropriate algorithm.</t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>IANA is requested to assign two object identifiers in the S/MIME registries <xref target="IANA-SMIME"/>:</t>
      <table>
        <name>Requested Object Identifiers</name>
        <thead>
          <tr>
            <th>Registry arc</th>
            <th>Description</th>
            <th>Value</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>1.2.840.113549.1.9.16.13</td>
            <td>id-ori-kemPSK</td>
            <td>TBD1</td>
          </tr>
          <tr>
            <td>1.2.840.113549.1.9.16.0</td>
            <td>id-mod-cms-kem-psk-2026</td>
            <td>TBD2</td>
          </tr>
        </tbody>
      </table>
      <t>TBD1 and TBD2 are unassigned placeholders to be replaced consistently before RFC publication. The keyKEM(15) enumeration value is defined by this document's update to RFC 8696; it is not an object identifier or an allocation from an IANA registry. No new KDF identifier is requested.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="normative-references">
        <name>Normative References</name>
        <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"/>
            <date month="March" year="1997"/>
          </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"/>
            <date month="May" year="2017"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8696" target="https://www.rfc-editor.org/info/rfc8696">
          <front>
            <title>Using Pre-Shared Key (PSK) in the Cryptographic Message Syntax (CMS)</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="December" year="2019"/>
          </front>
          <seriesInfo name="RFC" value="8696"/>
          <seriesInfo name="DOI" value="10.17487/RFC8696"/>
        </reference>
        <reference anchor="RFC9629" target="https://www.rfc-editor.org/info/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"/>
          </front>
          <seriesInfo name="RFC" value="9629"/>
          <seriesInfo name="DOI" value="10.17487/RFC9629"/>
        </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"/>
            <date month="September" year="2009"/>
          </front>
          <seriesInfo name="STD" value="70"/>
          <seriesInfo name="RFC" value="5652"/>
          <seriesInfo name="DOI" value="10.17487/RFC5652"/>
        </reference>
        <reference anchor="RFC5083" target="https://www.rfc-editor.org/info/rfc5083">
          <front>
            <title>Cryptographic Message Syntax (CMS) Authenticated-Enveloped-Data Content Type</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="November" year="2007"/>
          </front>
          <seriesInfo name="RFC" value="5083"/>
          <seriesInfo name="DOI" value="10.17487/RFC5083"/>
        </reference>
        <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"/>
            <author fullname="S. Santesson" initials="S." surname="Santesson"/>
            <author fullname="S. Farrell" initials="S." surname="Farrell"/>
            <author fullname="S. Boeyen" initials="S." surname="Boeyen"/>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <author fullname="W. Polk" initials="W." surname="Polk"/>
            <date month="May" year="2008"/>
          </front>
          <seriesInfo name="RFC" value="5280"/>
          <seriesInfo name="DOI" value="10.17487/RFC5280"/>
        </reference>
        <reference anchor="RFC5869" target="https://www.rfc-editor.org/info/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"/>
          </front>
          <seriesInfo name="RFC" value="5869"/>
          <seriesInfo name="DOI" value="10.17487/RFC5869"/>
        </reference>
        <reference anchor="RFC8619" target="https://www.rfc-editor.org/info/rfc8619">
          <front>
            <title>Algorithm Identifiers for the HMAC-based Extract-and-Expand Key Derivation Function (HKDF)</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="June" year="2019"/>
          </front>
          <seriesInfo name="RFC" value="8619"/>
          <seriesInfo name="DOI" value="10.17487/RFC8619"/>
        </reference>
        <reference anchor="RFC5912" target="https://www.rfc-editor.org/info/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"/>
          </front>
          <seriesInfo name="RFC" value="5912"/>
          <seriesInfo name="DOI" value="10.17487/RFC5912"/>
        </reference>
        <reference anchor="RFC6268" target="https://www.rfc-editor.org/info/rfc6268">
          <front>
            <title>Additional New ASN.1 Modules for the Cryptographic Message Syntax (CMS) and the Public Key Infrastructure Using X.509 (PKIX)</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <author fullname="S. Turner" initials="S." surname="Turner"/>
            <date month="July" year="2011"/>
          </front>
          <seriesInfo name="RFC" value="6268"/>
          <seriesInfo name="DOI" value="10.17487/RFC6268"/>
        </reference>
      </references>
      <references anchor="informative-references">
        <name>Informative References</name>
        <reference anchor="RFC3394" target="https://www.rfc-editor.org/info/rfc3394">
          <front>
            <title>Advanced Encryption Standard (AES) Key Wrap Algorithm</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="October" year="2002"/>
          </front>
          <seriesInfo name="RFC" value="3394"/>
          <seriesInfo name="DOI" value="10.17487/RFC3394"/>
        </reference>
        <reference anchor="IANA-SMIME" target="https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml">
          <front>
            <title>Structure of Management Information (SMI) Numbers: S/MIME Registries</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="asn1-module">
      <name>ASN.1 Module</name>
      <t>This module follows the ASN.1 conventions of <xref target="RFC5912"/> and <xref target="RFC6268"/>. It imports PreSharedKeyIdentifier from RFC 8696 and KEMAlgorithmIdentifier from RFC 9629. It restates CMSORIforPSKOtherInfo with the additional keyKEM value. The identifier placeholders require assigned numeric values before the module can be compiled for production use.</t>
      <sourcecode type="asn.1" markers="true" name="CMS-KEM-PSK-2026.asn">
CMS-KEM-PSK-2026
  { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
    pkcs-9(9) smime(16) modules(0)
    id-mod-cms-kem-psk-2026(TBD2) }

DEFINITIONS EXPLICIT TAGS ::=
BEGIN

IMPORTS
  OTHER-RECIPIENT, CMSVersion, RecipientIdentifier, EncryptedKey,
  KeyDerivationAlgorithmIdentifier, KeyEncryptionAlgorithmIdentifier
    FROM CryptographicMessageSyntax-2010
      { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
        pkcs-9(9) smime(16) modules(0) id-mod-cms-2009(58) }
  PreSharedKeyIdentifier
    FROM CMSORIforPSK-2019
      { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
        pkcs-9(9) smime(16) modules(0)
        id-mod-cms-ori-psk-2019(69) }
  KEMAlgorithmIdentifier
    FROM CMS-KEMRecipientInfo-2023
      { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
        pkcs-9(9) smime(16) modules(0)
        id-mod-cms-kemri-2023(77) };

id-ori OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
  rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) 13 }

id-ori-kemPSK OBJECT IDENTIFIER ::= { id-ori TBD1 }

ori-kemPSK OTHER-RECIPIENT ::= {
  KEMPSKRecipientInfo IDENTIFIED BY id-ori-kemPSK }

SupportedOtherRecipInfo OTHER-RECIPIENT ::= {
  ori-kemPSK, ... }

KEMPSKRecipientInfo ::= SEQUENCE {
  version                 CMSVersion,  -- MUST be 0
  pskid                   PreSharedKeyIdentifier,
  rid                     RecipientIdentifier,
  kem                     KEMAlgorithmIdentifier,
  kemct                   OCTET STRING,
  kdfAlgorithm            KeyDerivationAlgorithmIdentifier,
  keyEncryptionAlgorithm  KeyEncryptionAlgorithmIdentifier,
  encryptedKey            EncryptedKey }

CMSORIforPSKOtherInfo ::= SEQUENCE {
  psk                     OCTET STRING,
  keyMgmtAlgType           ENUMERATED {
    keyTrans (5), keyAgree (10), keyKEM (15) },
  keyEncryptionAlgorithm  KeyEncryptionAlgorithmIdentifier,
  pskLength               INTEGER (1..MAX),
  kdkLength               INTEGER (1..MAX) }

END
</sourcecode>
    </section>
    <section anchor="example-vector">
      <name>Derivation and Key-Wrap Example</name>
      <t>This example illustrates HKDF-SHA-256 and AES-256 Key Wrap <xref target="RFC3394"/>. The algorithm selection is illustrative, not a mandatory suite. The ss, PSK, and CEK below are synthetic inputs; the example is not a KEM encapsulation vector or a complete CMS message.</t>
      <t>OtherInfo uses keyKEM(15), id-aes256-wrap with absent parameters, pskLength 32, and kdkLength 32. No salt is supplied to HKDF. The derivation is independent of the unassigned recipient and module object identifiers.</t>
      <artwork type="ascii-art">
ss:
  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
PSK:
  a0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf
CEK:
  404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f
DER(CMSORIforPSKOtherInfo), 58 octets:
  30380420a0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babb
  bcbdbebf0a010f300b060960864801650304012d020120020120
PRK:
  46bd320605c5a6b6163ab70bc6345b92a5f908e79fe58979c23ebb47d1a5e307
KEK:
  d03dbe5a74828e808d835a2e61cbf31bd6420e142d7d4a21da50f910b7519ba1
encryptedKey (AES-256 Key Wrap), 40 octets:
  d263ca722df5c56e37b2de0b5e45c57eabdc044710cf015df45dec19d0a4c4ac
  530006c13323e553
</artwork>
    </section>
    <section anchor="changes" removeInRFC="true">
      <name>Changes from Revision -00</name>
      <ul>
        <li>
          <t>Recast the mechanism as a third PSK recipient type updating RFC 8696, with RFC 9629 providing KEM conventions.</t>
        </li>
        <li>
          <t>Reused CMSORIforPSKOtherInfo and added keyKEM(15). Removed the custom KEMPSKOtherInfo, combiner OID, and salt-based combination.</t>
        </li>
        <li>
          <t>Simplified the recipient structure to omit ukm and kekLength and align KDF and key-encryption field names with RFC 8696.</t>
        </li>
        <li>
          <t>Removed the fixed algorithm suite and AuthEnvelopedData-only restriction. Algorithm selection is left to applications.</t>
        </li>
        <li>
          <t>Retained RFC 8696's handling of multiple PSKs with the same identifier and clarified the enclosing CMS version values and KDF selection requirements.</t>
        </li>
        <li>
          <t>Replaced the derivation example and documented the metadata-binding limits of the reused context. Revision -00 encodings and derivation are not compatible with this revision.</t>
        </li>
      </ul>
    </section>
  </back>
</rfc>
