<?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-00" ipr="trust200902" sortRefs="true" submissionType="IETF" symRefs="true" tocInclude="true" updates="8696,9629" 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-00"/>
    <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="1"/>
    <area>Security</area>
    <workgroup>LAMPS</workgroup>
    <keyword>CMS</keyword>
    <keyword>external pre-shared key</keyword>
    <keyword>KEM</keyword>
    <keyword>ML-KEM</keyword>
    <keyword>post-quantum cryptography</keyword>
    <abstract>
      <t>This document specifies a Cryptographic Message Syntax (CMS) recipient mechanism that combines a key encapsulation mechanism (KEM) shared secret and an independently provisioned, high-entropy external pre-shared key (PSK). Both secret contributions participate in deriving the key-encryption key used to wrap a content-encryption key. An explicit recipient type distinguishes this mechanism from KEM-only or PSK-only processing.</t>
      <t>This document updates RFC 8696 by adding a KEM-with-PSK mechanism alongside its key-transport-with-PSK and key-agreement-with-PSK mechanisms. It updates RFC 9629 by specifying a separate KEM-and-PSK recipient structure and its key derivation conventions. It leaves the syntax and processing of the existing recipient types unchanged. This revision specifies ML-KEM-768, HKDF-SHA-256, AES-256 Key Wrap, and AES-256-GCM for the CMS authenticated-enveloped-data content type.</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. The combiner, context binding, and recipient structure are proposals for cryptographic and interoperability review. The authors seek evidence of deployment requirements and feedback on the scope of the proposed Updates relationships.</t>
      <t>The three identifiers marked TBD1, TBD2, and TBD3 are requested assignments, not assigned object identifiers. Appendix <xref target="example-vector" format="counter"/> uses documentation-only identifiers to make an example reproducible. Those identifiers are not an experimental protocol allocation or suitable for production use.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>CMS <xref target="RFC5652"/> supports several mechanisms for delivering a symmetric content-encryption key to a recipient. <xref target="RFC8696"/> combines an external PSK with a secret obtained through key transport or key agreement. <xref target="RFC9629"/> defines KEMRecipientInfo for delivering a content key using a KEM shared secret. <xref target="RFC9936"/> specifies ML-KEM for that recipient type.</t>
      <t>The RFC 8696 structures do not directly carry the KEMRecipientInfo defined in RFC 9629: KeyTransPSKRecipientInfo contains KeyTransRecipientInfo values, while KeyAgreePSKRecipientInfo uses the key-agreement structure. Conversely, the ordinary KEMRecipientInfo does not identify an external PSK or specify how one participates in key derivation.</t>
      <t>A deployment can require a recipient's decapsulation key and a separately provisioned secret to contribute to the same decryption path. For example, an archival delivery service could manage a recipient's KEM private key in one security domain and a high-entropy delivery PSK in another. Such a separation is an illustrative requirement, not a claim of a measured deployment or automatic protection against compromise of the receiving application.</t>
      <t>This document defines KEMPSKRecipientInfo and a two-secret HKDF convention for this purpose. It binds recipient-specific metadata and the content-encryption algorithm into the derivation context. An implementation recognizing only the existing KEMRecipientInfo cannot process this mechanism as ordinary KEM-only encryption.</t>
      <t>ML-KEM alone already provides a post-quantum key-encapsulation mechanism. An external PSK is not a prerequisite for using ML-KEM securely. The additional contribution specified here is useful only where the provisioning, independence, lifecycle, and policy for the PSK meet the deployment's requirements.</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.</t>
      <dl>
        <dt>Originator</dt><dd>The entity constructing a CMS authenticated envelope.</dd>
        <dt>Recipient</dt><dd>An entity authorized to open that envelope.</dd>
        <dt>External PSK</dt><dd>A secret provisioned independently of the KEM operation, with the entropy and lifecycle requirements in <xref target="psk-management"/>.</dd>
        <dt>ss</dt><dd>The shared secret produced by KEM encapsulation or decapsulation. It is distinct from the external PSK.</dd>
        <dt>PRK</dt><dd>The pseudorandom key output by HKDF-Extract.</dd>
        <dt>KEK</dt><dd>The key-encryption key used to wrap a CMS content key.</dd>
        <dt>CEK</dt><dd>The CMS content-authenticated-encryption key. In this document it is the 32-octet key used with AES-256-GCM.</dd>
        <dt>Authorized configuration</dt><dd>Configuration that binds an application and intended recipient to the accepted KEM credential, PSK identifier, and required protection mechanism.</dd>
      </dl>
      <t><tt>DER(X)</tt> is the ASN.1 Distinguished Encoding Rules encoding of X. Hexadecimal strings describe octets, and all lengths in the derivation equations are in octets. ASN.1 absent parameters and a present NULL value are different encodings. The terms salt, IKM, info, and L have the meanings defined in HKDF <xref target="RFC5869"/>.</t>
    </section>
    <section anchor="scope">
      <name>Scope and Security Objective</name>
      <t>This revision specifies KEMPSKRecipientInfo only for AuthEnvelopedData <xref target="RFC5083"/> using ML-KEM-768, the combiner in <xref target="derivation"/>, AES-256 Key Wrap, and AES-256-GCM. EnvelopedData, AuthenticatedData, password-derived PSKs, additional KEM parameter sets, composite KEMs, and other combiners are outside this revision. Their use requires a separate specification or a revision that defines their complete processing rules.</t>
      <t>The confidentiality objective is that, for an honestly constructed envelope, learning one secret contribution alone should not suffice to recover the KEK while the other contribution remains independent and secure. This objective assumes the KEM, HKDF, wrapping algorithm, authenticated encryption, provisioning, and implementation retain their required properties. This document does not claim a general proof of robustness against arbitrary related or adversarially chosen secret contributions.</t>
      <t>The mechanism is not threshold cryptography, a two-party authorization protocol, or a substitute for local access control. An originator knows the CEK. A recipient that has recovered the CEK can disclose it or the plaintext. A compromised process able to invoke both secret operations can defeat a separation between storage domains.</t>
      <t>The authenticated envelope supplies content integrity after key recovery; it does not establish a unique sender identity. Anyone with the PSK and the recipient's public KEM key can construct a new valid envelope, including the recipient itself. Applications requiring sender identity <bcp14>MUST</bcp14> use a separate, appropriate authentication mechanism, such as a validated CMS signature, and bind it to the expected application context.</t>
    </section>
    <section anchor="overview">
      <name>Mechanism Overview</name>
      <t>The originator obtains and validates an authorized recipient KEM credential and selects the corresponding external PSK from authorized configuration. It generates a fresh CEK and an AES-GCM nonce, and fixes the content type and content-encryption AlgorithmIdentifier before deriving any recipient KEK.</t>
      <t>For each recipient, the originator performs a fresh KEM encapsulation, constructs KEMPSKOtherInfo, and combines ss with the external PSK using <xref target="derivation"/>. It wraps the CEK with the resulting KEK and stores the per-recipient fields in KEMPSKRecipientInfo. It then encrypts the content and produces the authentication tag using the CEK.</t>
      <t>The recipient selects its local KEM key and exactly one PSK from the recipient and PSK identifiers. It decapsulates the KEM ciphertext, reconstructs the identical context, derives the KEK, unwraps the CEK, and verifies the authenticated encryption before releasing plaintext.</t>
      <artwork type="ascii-art"><![CDATA[
recipient KEM public key                  recipient KEM private key
            |                                         |
       Encapsulate ---- transmitted kemct ------> Decapsulate
            |                                         |
            ss                                        ss
            |                                         |
external PSK + ss                          external PSK + ss
            |                                         |
       HKDF-Extract                              HKDF-Extract
            |                                         |
           PRK                                       PRK
            |                                         |
    HKDF-Expand(context)                       HKDF-Expand(context)
            |                                         |
           KEK                                       KEK
            |                                         |
fresh CEK -> Key Wrap ---- encryptedKey -------> Key Unwrap -> CEK
            |                                         |
       AES-256-GCM ---- ciphertext and tag ----> verify and decrypt
]]></artwork>
      <t>Adding a KEM-only RecipientInfo and a PSK-only RecipientInfo does not implement this flow: those would be alternative ways to recover the same CEK. The recipient-selection and no-fallback requirements in <xref target="multiple-recipients"/> are therefore part of the protection policy.</t>
    </section>
    <section anchor="recipient-info">
      <name>KEMPSKRecipientInfo</name>
      <t>The OtherRecipientInfo alternative of RecipientInfo <bcp14>MUST</bcp14> be used. Its oriType <bcp14>MUST</bcp14> be id-ori-kemPSK and its oriValue <bcp14>MUST</bcp14> contain a KEMPSKRecipientInfo. The requested identifier is:</t>
      <sourcecode type="asn.1"><![CDATA[
id-ori-kemPSK OBJECT IDENTIFIER ::= {
  iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
  pkcs-9(9) smime(16) id-ori(13) TBD1 }
]]></sourcecode>
      <t>TBD1 is to be replaced by an assigned value before publication. The structure, using the IMPLICIT TAGS convention, is:</t>
      <sourcecode type="asn.1"><![CDATA[
KEMPSKRecipientInfo ::= SEQUENCE {
  version       CMSVersion,  -- MUST be 0
  pskid         KEMPSKIdentifier,
  rid           RecipientIdentifier,
  kem           KEMAlgorithmIdentifier,
  kemct         OCTET STRING,
  kdf           KeyDerivationAlgorithmIdentifier,
  kekLength     INTEGER (1..65535),
  ukm       [0] EXPLICIT UserKeyingMaterial OPTIONAL,
  wrap          KeyEncryptionAlgorithmIdentifier,
  encryptedKey  EncryptedKey }

KEMPSKIdentifier ::= OCTET STRING (SIZE (1..64))
]]></sourcecode>
      <t>The version <bcp14>MUST</bcp14> be 0. It is the version of this new recipient structure and is independent of the AuthEnvelopedData version, which also remains 0 as required by RFC 5083. A receiver <bcp14>MUST</bcp14> reject an unsupported recipient version instead of attempting to reinterpret it as another recipient type.</t>
      <t>pskid is an opaque, case-sensitive octet-string identifier for an external PSK. It is public metadata, not the PSK. It <bcp14>MUST</bcp14> contain between 1 and 64 octets, inclusive. Its lookup and lifecycle semantics are specified in <xref target="psk-management"/>. It <bcp14>MUST NOT</bcp14> be interpreted as a network location from which to retrieve a key.</t>
      <t>rid identifies the recipient KEM certificate or key using the RecipientIdentifier conventions of Section 3 of <xref target="RFC9629"/>. Recipients <bcp14>MUST</bcp14> support issuerAndSerialNumber and subjectKeyIdentifier; originators <bcp14>MUST</bcp14> support at least one. When an X.509 certificate is referenced, a subjectKeyIdentifier <bcp14>MUST</bcp14> match its extension value. The originator <bcp14>MUST</bcp14> validate the recipient credential, its key usage, and authorization before using it.</t>
      <t>kem <bcp14>MUST</bcp14> identify ML-KEM-768 using id-alg-ml-kem-768 with absent parameters. Public keys and certificates <bcp14>MUST</bcp14> follow <xref target="RFC9935"/>. When a keyUsage extension is present, keyEncipherment <bcp14>MUST</bcp14> be its only set bit. The path-validation requirements of <xref target="RFC5280"/> and the deployment's recipient-authentication policy apply.</t>
      <t>kemct <bcp14>MUST</bcp14> be the 1088-octet ML-KEM-768 ciphertext generated for this recipient. The ciphertext <bcp14>MUST NOT</bcp14> have an additional ASN.1 wrapper inside the OCTET STRING.</t>
      <t>kdf <bcp14>MUST</bcp14> identify id-alg-kemPSK-hkdf-sha256, with absent parameters. This new identifier denotes the complete two-secret convention in <xref target="derivation"/>. It is not interchangeable with id-alg-hkdf-with-sha256 from <xref target="RFC8619"/>.</t>
      <t>kekLength <bcp14>MUST</bcp14> be 32. wrap <bcp14>MUST</bcp14> identify id-aes256-wrap, with absent parameters, using AES Key Wrap as specified in <xref target="RFC3394"/> and <xref target="RFC3565"/>. encryptedKey <bcp14>MUST</bcp14> contain the resulting 40-octet wrapping of the 32-octet CEK.</t>
      <t>ukm is optional public context. When present, its OCTET STRING value <bcp14>MUST NOT</bcp14> exceed 64 octets. Receivers <bcp14>MUST</bcp14> support its presence and bind its exact value and presence to the derivation context. Absent ukm and a present zero-length ukm are distinct. A sender <bcp14>SHOULD</bcp14> omit ukm when no additional application context is needed. The PSK <bcp14>MUST NOT</bcp14> be placed in ukm or another transmitted field.</t>
      <t>All fields in oriValue <bcp14>MUST</bcp14> be DER encoded. A receiver <bcp14>MUST</bcp14> reject trailing fields, invalid parameter encodings, incorrect fixed lengths, or an unsupported algorithm combination. The surrounding CMS object can use BER where the relevant CMS specification permits it.</t>
    </section>
    <section anchor="derivation">
      <name>Two-Secret Key Derivation</name>
      <section anchor="combiner-id">
        <name>Combiner Identifier</name>
        <t>The following identifier is requested for the exact convention in this section:</t>
        <sourcecode type="asn.1"><![CDATA[
id-alg-kemPSK-hkdf-sha256 OBJECT IDENTIFIER ::= {
  iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
  pkcs-9(9) smime(16) alg(3) TBD2 }
]]></sourcecode>
        <t>TBD2 is unassigned. The AlgorithmIdentifier parameters <bcp14>MUST</bcp14> be absent. This identifier is defined only for the kdf field of KEMPSKRecipientInfo. It <bcp14>MUST NOT</bcp14> be used as a drop-in KDF identifier in an ordinary KEMRecipientInfo or an RFC 8696 recipient structure.</t>
      </section>
      <section anchor="context">
        <name>Derivation Context</name>
        <t>The originator and recipient <bcp14>MUST</bcp14> independently construct the following value using the IMPLICIT TAGS convention. Its DER encoding is the HKDF info input.</t>
        <sourcecode type="asn.1"><![CDATA[
KEMPSKOtherInfo ::= SEQUENCE {
  label                       UTF8String,
  oriType                     OBJECT IDENTIFIER,
  version                     CMSVersion,
  pskid                       KEMPSKIdentifier,
  rid                         RecipientIdentifier,
  kem                         KEMAlgorithmIdentifier,
  kemct                       OCTET STRING,
  kdf                         KeyDerivationAlgorithmIdentifier,
  kekLength                   INTEGER (1..65535),
  ukm                     [0] EXPLICIT UserKeyingMaterial OPTIONAL,
  wrap                        KeyEncryptionAlgorithmIdentifier,
  envelopeType                ContentType,
  contentType                 ContentType,
  contentEncryptionAlgorithm  ContentEncryptionAlgorithmIdentifier }
]]></sourcecode>
        <t>label <bcp14>MUST</bcp14> contain the exact ASCII characters <tt>CMS-KEM-PSK-v1</tt>, encoded as UTF8String, with no terminating zero, whitespace, or case conversion. oriType <bcp14>MUST</bcp14> be id-ori-kemPSK. The fields version through wrap <bcp14>MUST</bcp14> be copied from the KEMPSKRecipientInfo, preserving all values and optional-field presence.</t>
        <t>envelopeType <bcp14>MUST</bcp14> be id-ct-authEnvelopedData. contentType and contentEncryptionAlgorithm <bcp14>MUST</bcp14> be taken from the enclosing AuthEnvelopedData.authEncryptedContentInfo. The AlgorithmIdentifier includes the complete GCMParameters, including the nonce and authentication-tag length. The fields are not taken from unauthenticated attributes, an inferred default algorithm, or a local replacement for the transmitted algorithm.</t>
        <t>These values <bcp14>MUST</bcp14> be re-encoded as DER. A receiver <bcp14>MUST NOT</bcp14> substitute a hash of the context, raw BER bytes, a textual rendering of an OID, or the CMSORIforKEMOtherInfo or CMSORIforPSKOtherInfo structure of an earlier mechanism. In particular, encryptedKey is not part of this context, avoiding a circular dependency.</t>
        <t>Binding the enclosing content-encryption algorithm makes a change of that algorithm or its parameters change the derived KEK. Binding pskid and rid associates the selected secret and recipient with the derivation. This does not itself authenticate either identifier or the originator before the envelope has been successfully processed.</t>
      </section>
      <section anchor="equations">
        <name>Extract and Expand</name>
        <t>Both ss and PSK <bcp14>MUST</bcp14> be exactly 32 octets. For ss, this is the ML-KEM shared-secret length. For PSK, this is the required independently generated secret length. An empty PSK, a missing PSK, or an all-zero substitute for a missing secret <bcp14>MUST NOT</bcp14> be used.</t>
        <t>The derivation <bcp14>MUST</bcp14> use the HKDF-Extract and HKDF-Expand functions of <xref target="RFC5869"/> with HMAC-SHA-256 and the following inputs:</t>
        <artwork type="ascii-art"><![CDATA[
PRK = HKDF-Extract(salt = ss, IKM = PSK)
info = DER(KEMPSKOtherInfo)
KEK = HKDF-Expand(PRK, info, L = 32)

Equivalently, for this fixed output length:
PRK = HMAC-SHA-256(key = ss, data = PSK)
KEK = HMAC-SHA-256(key = PRK, data = info || 0x01)
]]></artwork>
        <t>The two inputs <bcp14>MUST NOT</bcp14> be swapped, XORed, concatenated into a different IKM, pre-hashed, or truncated. No additional HKDF extraction step, implicit zero salt, or independent derivation of a KEM-only KEK is performed by this convention. Implementations <bcp14>MUST</bcp14> compute the complete PRK and KEK before using them.</t>
        <t>In the KEM-only case of RFC 9936, salt is unused and IKM is ss. Here ss is the salt input and PSK is the IKM input. The new identifier and recipient type make this distinction explicit. Neither secret is encoded into the transmitted OtherInfo value.</t>
        <t>The requirement for a secret contribution in each input position relies on HKDF's extraction and HMAC pseudorandomness assumptions with independent inputs. This is a proposed two-secret convention; the one-secret-compromise confidentiality objective in <xref target="scope"/> is subject to cryptographic review. Security strengths <bcp14>MUST NOT</bcp14> be added together or inferred simply from the 256-bit output length.</t>
      </section>
    </section>
    <section anchor="content-protection">
      <name>Authenticated Content Encryption</name>
      <t>The enclosing content type <bcp14>MUST</bcp14> be AuthEnvelopedData as specified in <xref target="RFC5083"/>. Its version <bcp14>MUST</bcp14> be 0. The content-encryption algorithm <bcp14>MUST</bcp14> be AES-256-GCM with the identifier id-aes256-GCM from <xref target="RFC5084"/>.</t>
      <t>The GCMParameters <bcp14>MUST</bcp14> be present. The aes-nonce <bcp14>MUST</bcp14> have 12 octets. The aes-ICVlen <bcp14>MUST</bcp14> be explicitly encoded with value 16, since this differs from the ASN.1 DEFAULT value 12. The authentication tag <bcp14>MUST</bcp14> have 16 octets and <bcp14>MUST</bcp14> be carried in AuthEnvelopedData.mac, not appended to the encryptedContent field.</t>
      <t>A fresh random 32-octet CEK <bcp14>MUST</bcp14> be generated for each new envelope. The nonce <bcp14>MUST</bcp14> be freshly generated and <bcp14>MUST NOT</bcp14> repeat with the same CEK. A complete envelope can be retransmitted unchanged, but retransmission <bcp14>MUST NOT</bcp14> encrypt different content or different authenticated attributes with the same CEK and nonce.</t>
      <t>Authenticated attributes and the AAD <bcp14>MUST</bcp14> follow RFC 5083, including its DER SET OF encoding rule for the AAD. If the encapsulated content type is not id-data, authAttrs <bcp14>MUST</bcp14> be present. This mechanism does not introduce a new authenticated attribute. When an application requires identifiers, counters, expiry, or sender-authentication information, its specification needs to define how those are authenticated.</t>
      <t>The recipient <bcp14>MUST</bcp14> check the algorithm and parameter combination before key derivation and <bcp14>MUST</bcp14> reconstruct the content-encryption binding in <xref target="context"/>. It <bcp14>MUST NOT</bcp14> process the same recipient structure under EnvelopedData, AuthenticatedData, AES-CBC, another AEAD algorithm, or an alternate tag length.</t>
      <t>RFC 9709 <xref target="RFC9709"/> describes a related problem of content-encryption algorithm substitution. This document binds that algorithm in its own recipient KEK derivation and restricts the permitted content format. It does not invoke RFC 9709's content-key derivation or its algorithm identifier, and support for that RFC is not required by this profile.</t>
    </section>
    <section anchor="originator-processing">
      <name>Originator Processing</name>
      <t>An originator <bcp14>MUST</bcp14> perform the following steps:</t>
      <ol>
        <li><t>Determine the complete authorized recipient set and protection policy. For each recipient, obtain an authenticated ML-KEM-768 credential and an authorized mapping to one external PSK and pskid. Check credential validity, authorization, algorithm, and applicable key usage.</t></li>
        <li><t>Generate a fresh 32-octet CEK and 12-octet GCM nonce. Fix the content type, complete contentEncryptionAlgorithm, and any authenticated attributes. These choices <bcp14>MUST NOT</bcp14> change after the per-recipient contexts are constructed.</t></li>
        <li><t>For each recipient, invoke ML-KEM-768 encapsulation with fresh randomness as specified in <xref target="FIPS203"/>. Populate the version, pskid, rid, kem, kemct, kdf, kekLength, optional ukm, and wrap fields.</t></li>
        <li><t>Construct KEMPSKOtherInfo from those fields and the fixed content-encryption information. Derive the KEK using ss and the external PSK exactly as specified in <xref target="equations"/>.</t></li>
        <li><t>Wrap the CEK using AES-256 Key Wrap and the KEK. Place the 40-octet result in encryptedKey. Encode KEMPSKRecipientInfo as DER in OtherRecipientInfo using id-ori-kemPSK.</t></li>
        <li><t>Encrypt the content and calculate the GCM tag using the CEK, nonce, and AAD defined by RFC 5083. Populate encryptedContent and mac and assemble AuthEnvelopedData.</t></li>
        <li><t>Erase ss, encapsulation randomness, PRK, KEK, and transient CEK copies when no longer required. Keep a persistent PSK only under the authorized lifecycle policy. Do not log transient or persistent secrets.</t></li>
      </ol>
      <t>Each recipient entry <bcp14>MUST</bcp14> use a fresh encapsulation, even when several entries use the same PSK or recipient key. The CEK is shared by the recipients of one envelope, but no per-recipient ss or KEK is shared or reused for a new envelope.</t>
      <t>The API order of ciphertext and shared secret is implementation specific. This document uses their names rather than prescribing tuple ordering. An implementation <bcp14>MUST</bcp14> distinguish the 32-octet shared secret from the 1088-octet ciphertext.</t>
    </section>
    <section anchor="recipient-processing">
      <name>Recipient Processing</name>
      <t>A recipient <bcp14>MUST</bcp14> perform the following steps, subject to bounded parsing and resource limits:</t>
      <ol>
        <li><t>Verify that the enclosing object is the permitted AuthEnvelopedData form, that the recipient set meets <xref target="multiple-recipients"/>, and that the content-encryption algorithm, GCM nonce length, and tag length satisfy <xref target="content-protection"/>.</t></li>
        <li><t>Select a KEMPSKRecipientInfo for an authorized local recipient credential. Check its oriType, DER encoding, version, algorithms, parameters, fixed lengths, and optional ukm bound. Locate exactly one active PSK using the authorized application, recipient, and pskid mapping.</t></li>
        <li><t>Perform ML-KEM-768 decapsulation using the selected private key and kemct, including all validation and implicit-rejection requirements of FIPS 203. If the API signals an error, reject the entry.</t></li>
        <li><t>Reconstruct KEMPSKOtherInfo from the actual fields of the selected entry and the enclosing content-encryption information. Derive the KEK using the recovered ss and selected external PSK.</t></li>
        <li><t>Unwrap encryptedKey using AES-256 Key Wrap. Reject an unwrap-integrity failure or a recovered CEK whose length is not 32 octets.</t></li>
        <li><t>Verify and decrypt the AES-256-GCM content with that CEK, the transmitted nonce, and the AAD encoding required by RFC 5083. Verify the authentication tag and all applicable authenticated attributes before releasing any plaintext or acting on it.</t></li>
        <li><t>Apply application-specific authorization, sender authentication, and replay policy. Erase transient secrets and tentative plaintext on failure. Erase ss, PRK, KEK, and the CEK when no longer needed on success.</t></li>
      </ol>
      <t>An implementation <bcp14>MUST NOT</bcp14> retry an entry with an empty PSK, a guessed PSK, or a KEM-only derivation after failure. It <bcp14>MUST NOT</bcp14> use a recovered CEK for another algorithm or content type. A tentative plaintext <bcp14>MUST NOT</bcp14> be streamed to an application before the authentication tag is verified.</t>
      <t>An application can be authorized under more than one recipient entry. An implementation <bcp14>MAY</bcp14> try another entry explicitly selected by authorized configuration, within resource limits, but <bcp14>MUST NOT</bcp14> search unrelated keys or relax the required mechanism. Each accepted path <bcp14>MUST</bcp14> independently satisfy this document.</t>
    </section>
    <section anchor="psk-management">
      <name>External PSK Provisioning and Lifecycle</name>
      <t>Each PSK <bcp14>MUST</bcp14> be a uniformly generated 32-octet secret obtained from a cryptographically secure random generator. A password, passphrase, public identifier, KEM shared secret, KEM private-key seed, or value derived solely from any of those <bcp14>MUST NOT</bcp14> be used as the PSK. Generation and provisioning <bcp14>MUST</bcp14> preserve independence from the KEM key pair and per-envelope encapsulation randomness.</t>
      <t>Provisioning of the PSK is outside this document. If confidentiality against an adversary recording traffic for future quantum decryption is required, provisioning <bcp14>MUST</bcp14> use a channel or out-of-band process that meets that requirement. Protecting the PSK only with a vulnerable classical public-key exchange can remove the intended independent protection.</t>
      <t>A local lookup key is the authorized application context, intended recipient credential or credential set, and pskid. That tuple <bcp14>MUST</bcp14> select exactly one PSK value. The same pskid <bcp14>MUST NOT</bcp14> identify multiple PSK generations within that scope. Implementations <bcp14>MUST NOT</bcp14> copy RFC 8696's optional try-several-PSKs behavior into this mechanism.</t>
      <t>On rotation, a new PSK <bcp14>MUST</bcp14> have a new pskid within its scope. Old identifiers can remain associated with a single retained key for an explicitly authorized archival period, but <bcp14>MUST NOT</bcp14> be reassigned to a new key. Removal of a key from active sending policy and retention for authorized old-message decryption are separate decisions.</t>
      <t>pskid <bcp14>SHOULD</bcp14> be an opaque identifier independent of the secret value. It <bcp14>MUST NOT</bcp14> expose the PSK, a reversible encoding of it, or an authorization credential. A received pskid <bcp14>MUST NOT</bcp14> create an authorization mapping or trigger unrestricted remote key retrieval.</t>
      <t>Pairwise PSKs scoped to the application and recipient are <bcp14>RECOMMENDED</bcp14>. A group PSK <bcp14>MAY</bcp14> be used when group membership, rotation, disclosure risk, and originator-authentication limits are acceptable to the deployment. Knowledge of a group PSK does not confer a unique sender identity.</t>
      <t>PSKs <bcp14>MUST</bcp14> be dedicated to this mechanism. They <bcp14>MUST NOT</bcp14> also be used directly as AES content keys, wrapping keys, unrelated protocol PSKs, or authentication passwords. Policy <bcp14>SHOULD</bcp14> also separate KEM keys used with and without an external PSK. If the same KEM key is authorized for both, the recipient <bcp14>MUST</bcp14> enforce the required mechanism using application policy, not just certificate keyUsage.</t>
    </section>
    <section anchor="multiple-recipients">
      <name>Multiple Recipients, Capabilities, and Downgrade Policy</name>
      <t>Every RecipientInfo in an envelope conforming to this document <bcp14>MUST</bcp14> be an OtherRecipientInfo with oriType id-ori-kemPSK. There <bcp14>MUST</bcp14> be at least one recipient. An originator <bcp14>MUST NOT</bcp14> wrap the same CEK in a KEM-only, PSK-only, classical, password-only, or otherwise weaker recipient path, inside this envelope or in another object.</t>
      <t>Multiple KEMPSKRecipientInfo entries are alternative decryption paths. Each path depends on its own KEM secret and associated PSK; they do not form an AND relationship between different recipients. Confidentiality of the common content depends on every authorized decryption path and on every recipient allowed to obtain the CEK. An application requiring a particular recipient set needs an independently authenticated policy for that set; the per-entry context does not authenticate the membership or completeness of recipientInfos.</t>
      <t>Sending the same plaintext in a separately weaker envelope can defeat the confidentiality objective even if a different CEK is used. Originators <bcp14>MUST NOT</bcp14> do so when policy requires the combined protection of this mechanism.</t>
      <t>This document defines no S/MIME capability syntax or negotiation exchange. Support for ML-KEM, RFC 8696, or RFC 9629 alone <bcp14>MUST NOT</bcp14> be interpreted as support for KEMPSKRecipientInfo. Originators <bcp14>MUST</bcp14> obtain recipient support and the required mechanism through authorized configuration or an independently authenticated application mechanism.</t>
      <t>A recipient <bcp14>MUST</bcp14> retain and enforce the configured requirement for KEM-with-PSK protection independently of the oriType received in an untrusted object. Failure, an unsupported identifier, a missing PSK, timeout, or a purported capability update <bcp14>MUST NOT</bcp14> cause automatic fallback to another recipient mechanism. A separately authorized legacy workflow is a different protection policy and <bcp14>MUST NOT</bcp14> be represented as conforming to this document.</t>
    </section>
    <section anchor="errors">
      <name>Failure Handling and Resource Limits</name>
      <t>External failure behavior <bcp14>MUST NOT</bcp14> distinguish secret-dependent decapsulation, PSK selection, key-unwrapping, or AEAD-authentication failures in a way that creates an oracle. A recipient <bcp14>SHOULD</bcp14> provide one generic envelope-decryption failure at an application boundary and rate-limit repeated failures. Local diagnostics <bcp14>MAY</bcp14> identify stages for authorized operators, but <bcp14>MUST NOT</bcp14> expose secrets or tentative plaintext.</t>
      <t>ML-KEM implicit rejection returns a pseudorandom secret for certain invalid ciphertexts. An implementation <bcp14>MUST NOT</bcp14> replace that behavior with an internal re-encryption-validity signal exposed to the application. Subsequent unwrap or AEAD failure <bcp14>MUST</bcp14> be handled under the same external failure policy.</t>
      <t>Untrusted identifiers <bcp14>MUST NOT</bcp14> cause an unbounded search through PSKs, recipient keys, certificates, or remote services. Implementations <bcp14>SHOULD</bcp14> bound recipient count, input size, ASN.1 depth, certificate-validation work, concurrent decapsulations, and total attempts per object. Bounds <bcp14>MUST</bcp14> allow the fixed sizes and operations the implementation claims to support.</t>
      <t>An object failing format, algorithm-policy, authorization, unwrap, or authentication checks <bcp14>MUST NOT</bcp14> install a credential, update trusted configuration, deliver content to a business workflow, or change key-retention policy. This document defines no new CMS error code or network error message.</t>
    </section>
    <section anchor="updates">
      <name>Updates to RFC 8696 and RFC 9629</name>
      <t>This document makes an additive update to <xref target="RFC8696"/>: KEMPSKRecipientInfo is an additional external-PSK mechanism for AuthEnvelopedData, alongside the existing keyTransPSK and keyAgreePSK mechanisms. It defines its own structure, combiner, PSK-lookup restrictions, and context. It does not add a value to the existing CMSORIforPSKOtherInfo.keyMgmtAlgType enumeration or change that structure's semantics.</t>
      <t>This document makes an additive update to <xref target="RFC9629"/> by defining a separate external-PSK KEM recipient mechanism using that RFC's KEM algorithm and recipient-identification conventions. For KEMPSKRecipientInfo, <xref target="derivation"/> supplies the derivation rules; the KEM-only rules for KEMRecipientInfo remain unchanged. No field is appended to an existing KEMRecipientInfo, and the new structure <bcp14>MUST NOT</bcp14> be encoded under id-ori-kem.</t>
      <t>The KEM key identifiers, encodings, and validation requirements of RFC 9935 are reused. The new structure is not the KEMRecipientInfo profiled by RFC 9936; this document specifies its own permitted KEM parameter set, combined KDF identifier, wrapping algorithm, and content profile. It does not change RFC 9936's mandatory KDF support or redefine its salt convention.</t>
      <t>The existing recipient structures and identifiers continue to be usable according to their defining specifications. An implementation that implements those structures alone is not thereby required to implement this optional extension.</t>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t>The security considerations of RFC 8696, RFC 9629, RFC 5083, RFC 5084, and the referenced primitive specifications apply, with the different two-secret derivation and PSK semantics explicitly specified in this document.</t>
      <section anchor="security-secret-compromise">
        <name>Independent Contributions and Compromise</name>
        <t>The intended protection against disclosure of a single contribution depends on independence. A PSK derived from the KEM private key, ss, or the same compromised provisioning artifact does not provide that independence. Separate administrative ownership can help reduce shared failure modes but is not itself a cryptographic guarantee.</t>
        <t>For an honestly generated stored envelope, knowledge of the PSK alone leaves the adversary needing the KEM shared secret; knowledge of ss alone leaves the adversary needing the PSK. These are conditional design goals under the assumptions in <xref target="scope"/>, not claims of additive security bits or a proof against all malicious-input strategies. A party knowing the PSK can construct a fresh encapsulation of its own and forge a new envelope, so the stored-message confidentiality objective is distinct from origin authentication.</t>
        <t>Disclosure of a recipient's decapsulation key and the relevant PSK can expose recorded envelopes. Rotation does not retroactively protect recorded traffic after disclosure of old secrets. This static-recipient mechanism does not provide forward secrecy against later compromise of both required secrets.</t>
        <t>A compromised CEK exposes its envelope regardless of the KEM or PSK. A compromised KEK exposes the CEK it wraps. An originator or authorized recipient can disclose plaintext. Neither the context binding nor the additional PSK prevents those consequences.</t>
      </section>
      <section anchor="security-binding">
        <name>Context and Algorithm Binding</name>
        <t>Context fields bind the selected recipient path, PSK identifier, KEM ciphertext, combiner, key size, wrapping algorithm, envelope type, and content-encryption algorithm. They are not separately transmitted as an assertion by a trusted party. An attacker can change them, but successful processing of a modified entry requires the corresponding derivation and authenticated-encryption checks.</t>
        <t>The recipient set as a whole, originatorInfo, and unauthenticated attributes are not included in this derivation context. Applications <bcp14>MUST NOT</bcp14> infer an authenticated sender or complete recipient list from them. Changes to authenticated attributes are detected by AEAD verification under RFC 5083; changes to unauthenticated attributes do not carry that guarantee.</t>
        <t>The new recipient and combiner identifiers prevent accidental interchange with the older derivation conventions. That separation requires correct dispatch and an enforced local mechanism requirement. It does not protect a deployment that voluntarily accepts a KEM-only copy of the same content.</t>
      </section>
      <section anchor="security-auth-replay">
        <name>Origin Authentication, Replay, and Key Confirmation</name>
        <t>Possession of the PSK does not identify one originator, particularly for group keys. KEM encapsulation uses a public key and does not identify its caller. Even with a pairwise PSK, the recipient can construct envelopes to itself. Applications needing verifiable sender identity need a distinct authentication design and, for post-quantum authentication, an appropriate signature and trust path.</t>
        <t>Neither AES-GCM nor a fresh encapsulation prevents replay of an unchanged valid envelope. An application that requires replay detection <bcp14>MUST</bcp14> authenticate an application identifier and freshness information and maintain the necessary replay state. This document defines no replay window or acknowledgement message.</t>
        <t>Successful unwrapping and tag verification provide the recipient with local evidence that a content key was recovered consistently. They do not tell the originator that a recipient received or accepted the message. No explicit recipient-to-originator key confirmation is provided.</t>
      </section>
      <section anchor="security-primitives">
        <name>Primitive Selection and Implementation</name>
        <t>ML-KEM-768 is defined in <xref target="FIPS203"/>. HKDF extraction and expansion are defined in RFC 5869. The finite sizes of the HMAC output, KEK, CEK, wrapping integrity check, and AEAD tag impose distinct limits. The 16-octet GCM tag is not a claim of 256-bit authentication security, and the 64-bit AES Key Wrap integrity value is not a general-purpose content authenticator.</t>
        <t>The PSK requirement is 256 bits of independently generated entropy, not merely a field of length 32 octets. A KDF cannot manufacture missing entropy. There is no password stretching or password-authenticated exchange in this mechanism, and an observable unwrap or tag result can permit testing guesses when the other contribution is known.</t>
        <t>Implementations need correct randomness, constant-time secret processing where applicable, algorithm-required key and ciphertext checks, bounded parsing, and secure destruction of transient material. Testing only the derivation equations does not establish side-channel resistance, adequate entropy, or security of the PSK provisioning channel.</t>
      </section>
    </section>
    <section anchor="privacy">
      <name>Privacy Considerations</name>
      <t>pskid, rid, KEM algorithm identifiers, KEM ciphertexts, and other recipient metadata are visible. Reusing a PSK identifier can link envelopes across time or reveal group membership. An opaque identifier does not hide the presence of a stable identifier.</t>
      <t>Applications <bcp14>SHOULD</bcp14> avoid embedding personal names, account identifiers, or organizational secrets in pskid or ukm. Rotating identifiers can reduce some linkage but does not hide recipient identifiers, message sizes, timing, or traffic patterns. This document provides no recipient anonymity.</t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>IANA is requested to assign the following identifiers in the existing S/MIME registries <xref target="IANA-SMIME"/>. Each reference is to this document. No numeric value is proposed or assumed in this revision.</t>
      <table anchor="iana-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.3</td><td>id-alg-kemPSK-hkdf-sha256</td><td>TBD2</td></tr>
          <tr><td>1.2.840.113549.1.9.16.0</td><td>id-mod-cms-kem-psk-2026</td><td>TBD3</td></tr>
        </tbody>
      </table>
      <t>The registries are respectively named "SMI Security for S/MIME Other Recipient Info Identifiers (1.2.840.113549.1.9.16.13)", "SMI Security for S/MIME Algorithms (1.2.840.113549.1.9.16.3)", and "SMI Security for S/MIME Module Identifier (1.2.840.113549.1.9.16.0)".</t>
      <t>TBD1, TBD2, and TBD3 <bcp14>MUST</bcp14> be replaced consistently in the ASN.1 and prose before publication as an RFC. The documentation-only values in <xref target="example-vector"/> are not requested IANA assignments and <bcp14>MUST NOT</bcp14> be registered or treated as production identifiers for this mechanism.</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="RFC5084" target="https://www.rfc-editor.org/info/rfc5084">
          <front>
            <title>Using AES-CCM and AES-GCM Authenticated Encryption in the Cryptographic Message Syntax (CMS)</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="November" year="2007"/>
          </front>
          <seriesInfo name="RFC" value="5084"/>
          <seriesInfo name="DOI" value="10.17487/RFC5084"/>
        </reference>
        <reference anchor="RFC9935" target="https://www.rfc-editor.org/info/rfc9935">
          <front>
            <title>Internet X.509 Public Key Infrastructure - Algorithm Identifiers for the Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM)</title>
            <author fullname="S. Turner" initials="S." surname="Turner"/>
            <author fullname="P. Kampanakis" initials="P." surname="Kampanakis"/>
            <author fullname="J. Massimo" initials="J." surname="Massimo"/>
            <author fullname="B. E. Westerbaan" initials="B. E." surname="Westerbaan"/>
            <date month="March" year="2026"/>
          </front>
          <seriesInfo name="RFC" value="9935"/>
          <seriesInfo name="DOI" value="10.17487/RFC9935"/>
        </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="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="RFC3565" target="https://www.rfc-editor.org/info/rfc3565">
          <front>
            <title>Use of the Advanced Encryption Standard (AES) Encryption Algorithm in Cryptographic Message Syntax (CMS)</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <date month="July" year="2003"/>
          </front>
          <seriesInfo name="RFC" value="3565"/>
          <seriesInfo name="DOI" value="10.17487/RFC3565"/>
        </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>
        <reference anchor="FIPS203" target="https://csrc.nist.gov/pubs/fips/203/final">
          <front>
            <title>Module-Lattice-Based Key-Encapsulation Mechanism Standard</title>
            <author><organization>National Institute of Standards and Technology</organization></author>
            <date year="2024" month="August"/>
          </front>
          <seriesInfo name="FIPS" value="203"/>
          <seriesInfo name="DOI" value="10.6028/NIST.FIPS.203"/>
        </reference>
        <reference anchor="X680" target="https://www.itu.int/rec/T-REC-X.680">
          <front>
            <title>Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation</title>
            <author><organization>ITU-T</organization></author>
            <date year="2021" month="February"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="X.680"/>
        </reference>
        <reference anchor="X690" target="https://www.itu.int/rec/T-REC-X.690">
          <front>
            <title>Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)</title>
            <author><organization>ITU-T</organization></author>
            <date year="2021" month="February"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="X.690"/>
        </reference>
      </references>
      <references anchor="informative-references">
        <name>Informative References</name>
        <reference anchor="RFC9936" target="https://www.rfc-editor.org/info/rfc9936">
          <front>
            <title>Use of ML-KEM in the Cryptographic Message Syntax (CMS)</title>
            <author fullname="J. Prat" initials="J." surname="Prat"/>
            <author fullname="M. Ounsworth" initials="M." surname="Ounsworth"/>
            <author fullname="D. Van Geest" initials="D." surname="Van Geest"/>
            <date month="March" year="2026"/>
          </front>
          <seriesInfo name="RFC" value="9936"/>
          <seriesInfo name="DOI" value="10.17487/RFC9936"/>
        </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="RFC9709" target="https://www.rfc-editor.org/info/rfc9709">
          <front>
            <title>Encryption Key Derivation in the Cryptographic Message Syntax (CMS) Using HKDF with SHA-256</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="January" year="2025"/>
          </front>
          <seriesInfo name="RFC" value="9709"/>
          <seriesInfo name="DOI" value="10.17487/RFC9709"/>
        </reference>
        <reference anchor="RFC5612" target="https://www.rfc-editor.org/info/rfc5612">
          <front>
            <title>Enterprise Number for Documentation Use</title>
            <author fullname="P. Eronen" initials="P." surname="Eronen"/>
            <author fullname="D. Harrington" initials="D." surname="Harrington"/>
            <date month="August" year="2009"/>
          </front>
          <seriesInfo name="RFC" value="5612"/>
          <seriesInfo name="DOI" value="10.17487/RFC5612"/>
        </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"/>. ASN.1 notation and DER follow <xref target="X680"/> and <xref target="X690"/>. The module includes the public context structure used only as a local input to HKDF. It does not include any transmitted PSK value.</t>
      <t>The identifiers contain allocation placeholders and are not compilable numeric assignments until those placeholders are replaced. An implementation can resolve them locally for controlled testing, but no test substitution is a protocol allocation.</t>
      <sourcecode type="asn.1" markers="true" name="CMS-KEM-PSK-2026.asn"><![CDATA[
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(TBD3) }

DEFINITIONS IMPLICIT TAGS ::=
BEGIN

IMPORTS
  OTHER-RECIPIENT, CMSVersion, RecipientIdentifier,
  EncryptedKey, KeyDerivationAlgorithmIdentifier,
  KeyEncryptionAlgorithmIdentifier, UserKeyingMaterial,
  ContentType, ContentEncryptionAlgorithmIdentifier
    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) }
  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) }
  KEY-DERIVATION
    FROM AlgorithmInformation-2009
      { iso(1) identified-organization(3) dod(6) internet(1)
        security(5) mechanisms(5) pkix(7) id-mod(0)
        id-mod-algorithmInformation-02(58) };

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

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

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

id-alg-kemPSK-hkdf-sha256 OBJECT IDENTIFIER ::= {
  id-alg TBD2 }

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

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

kda-kemPSK-hkdf-sha256 KEY-DERIVATION ::= {
  IDENTIFIER id-alg-kemPSK-hkdf-sha256
  PARAMS ARE absent }

KEMPSKKDFs KEY-DERIVATION ::= {
  kda-kemPSK-hkdf-sha256, ... }

KEMPSKIdentifier ::= OCTET STRING (SIZE (1..64))

KEMPSKRecipientInfo ::= SEQUENCE {
  version       CMSVersion,  -- MUST be 0
  pskid         KEMPSKIdentifier,
  rid           RecipientIdentifier,
  kem           KEMAlgorithmIdentifier,
  kemct         OCTET STRING,
  kdf           KeyDerivationAlgorithmIdentifier,
  kekLength     INTEGER (1..65535),
  ukm       [0] EXPLICIT UserKeyingMaterial OPTIONAL,
  wrap          KeyEncryptionAlgorithmIdentifier,
  encryptedKey  EncryptedKey }

KEMPSKOtherInfo ::= SEQUENCE {
  label                       UTF8String,
  oriType                     OBJECT IDENTIFIER,
  version                     CMSVersion,
  pskid                       KEMPSKIdentifier,
  rid                         RecipientIdentifier,
  kem                         KEMAlgorithmIdentifier,
  kemct                       OCTET STRING,
  kdf                         KeyDerivationAlgorithmIdentifier,
  kekLength                   INTEGER (1..65535),
  ukm                     [0] EXPLICIT UserKeyingMaterial OPTIONAL,
  wrap                        KeyEncryptionAlgorithmIdentifier,
  envelopeType                ContentType,
  contentType                 ContentType,
  contentEncryptionAlgorithm  ContentEncryptionAlgorithmIdentifier }

END
]]></sourcecode>
    </section>
    <section anchor="example-vector">
      <name>Documentation-Only Derivation Example</name>
      <t>The example checks the context encoding, two-secret derivation, key wrapping, and authenticated encryption. It does not contain a valid ML-KEM encapsulation, recipient certificate, or complete production CMS message. Its ss and kemct are synthetic inputs, so it <bcp14>MUST NOT</bcp14> be used as an ML-KEM conformance vector.</t>
      <t>To avoid assuming IANA assignments, the example substitutes id-ori-kemPSK with 1.3.6.1.4.1.32473.1 and id-alg-kemPSK-hkdf-sha256 with 1.3.6.1.4.1.32473.2. The enterprise number 32473 is reserved for documentation <xref target="RFC5612"/>. These values <bcp14>MUST NOT</bcp14> be used for live interoperability. Allocated identifiers will change the context and all dependent outputs.</t>
      <t>The synthetic kemct is 1088 octets, with octet at zero-based position i equal to i modulo 256. ukm is absent, rid is the subjectKeyIdentifier alternative, contentType is id-data, and the AAD is empty because authenticated attributes are absent in this example.</t>
      <artwork type="ascii-art"><![CDATA[
pskid = ASCII("example-psk-2026-01")
rid = subjectKeyIdentifier:
  101112131415161718191a1b1c1d1e1f20212223
ss:
  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
PSK:
  a0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf
CEK:
  404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f
GCM nonce:
  000102030405060708090a0b
Plaintext = ASCII("CMS KEM with external PSK example.")
AAD = empty
DER(KEMPSKOtherInfo) length = 1267 octets
SHA-256(DER(KEMPSKOtherInfo)):
  e4d9d1c6f53b9df158357ec64f782948f08c0c78fa58ab913c64dd9b81eaf578
PRK:
  0c95bd8bdd96004ec3f84f7bcc9526ee33491925dae778d32b6b81a42c38fe93
KEK:
  79bbf5ffc11b6d48703292225e9e3632839454bc507b1ad1af995604298efd02
encryptedKey (AES-256 Key Wrap):
  fa5a5ced4314eca09518ff160aaaa91a21b0e3f026c7f0b57a63a91b37f42c91
  0755acac02bc7a40
encryptedContent (GCM ciphertext, without tag):
  79483f583cc90980b57bf4aa9888b4cfe6b64368006cfd00a5008dee20dc1932
  255e
mac (GCM tag):
  d400395e39b2eca7231b3b069a371c65
]]></artwork>
    </section>
    <section anchor="evaluation">
      <name>Interoperability Evaluation Cases</name>
      <t>Independent implementations need to agree on the ASN.1 tagging, DER context, input order, fixed algorithm profile, and policy checks. The following cases are suggested for evaluation and do not assert completed multi-implementation testing.</t>
      <table>
        <name>Suggested Evaluation Cases</name>
        <thead><tr><th>Case</th><th>Expected outcome</th></tr></thead>
        <tbody>
          <tr><td>Valid ML-KEM-768 key and independently provisioned PSK</td><td>Decapsulation, derivation, unwrap, and AEAD verification succeed.</td></tr>
          <tr><td>Correct KEM key but wrong, missing, or ambiguous PSK</td><td>Reject without KEM-only fallback or trial of unrelated keys.</td></tr>
          <tr><td>Correct PSK but wrong decapsulation key</td><td>Reject without PSK-only fallback.</td></tr>
          <tr><td>Changed pskid, rid, kemct, kdf, ukm, wrap, or content nonce</td><td>Reject through policy, derivation, unwrap, or authentication checks.</td></tr>
          <tr><td>Absent ukm compared with present empty ukm</td><td>Derive different context encodings and different KEKs.</td></tr>
          <tr><td>NULL parameters for the KEM, combiner, or wrap identifier</td><td>Reject rather than normalize the invalid encoding.</td></tr>
          <tr><td>Unsupported ORI identifier, recipient version, or content algorithm</td><td>Reject; never reinterpret as an existing KEM-only structure.</td></tr>
          <tr><td>Mixed KEM-only and KEM-with-PSK recipient entries</td><td>Reject as outside the required protection policy.</td></tr>
          <tr><td>Modified GCM tag or ciphertext</td><td>Reject without releasing tentative plaintext.</td></tr>
          <tr><td>Repeated valid envelope</td><td>Cryptographic verification can succeed; application replay policy decides acceptance.</td></tr>
          <tr><td>PSK rotation with an old retained key</td><td>Use the unique old mapping only where archival policy permits it.</td></tr>
          <tr><td>Several valid combined recipients</td><td>Each authorized recipient independently recovers the same CEK.</td></tr>
        </tbody>
      </table>
    </section>
  </back>
</rfc>
