Internet-Draft CMS KEM with External PSK December 2026
Liu, et al. Expires 5 June 2027 [Page]
Workgroup:
LAMPS
Internet-Draft:
draft-liu-lamps-cms-kem-psk-01
Updates:
8696 (if approved)
Published:
Intended Status:
Standards Track
Expires:
Authors:
P. Liu, Ed.
Pengcheng Laboratory
R. Yang, Ed.
Pengcheng Laboratory
X. Liu, Ed.
Pengcheng Laboratory
Y. Zhang, Ed.
Pengcheng Laboratory
W. Zhang, Ed.
Pengcheng Laboratory

Using Key Encapsulation Mechanisms with External Pre-Shared Keys in the Cryptographic Message Syntax (CMS)

Abstract

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.

Discussion Status

This note is to be removed before publishing as an RFC.

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.

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.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 5 June 2027.

▲

Table of Contents

1. Introduction

Using Pre-Shared Key (PSK) in CMS [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 [RFC9629] defines the corresponding KEM concepts and recipient-identification conventions.

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.

The new mechanism is usable with the CMS enveloped-data content type [RFC5652] and authenticated-enveloped-data content type [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.

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.

2. Conventions and Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

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.

3. keyKEMPSK Recipient Information

Per-recipient information is represented in KEMPSKRecipientInfo using the OtherRecipientInfo alternative of RecipientInfo. Its oriType MUST be id-ori-kemPSK and its oriValue MUST contain a KEMPSKRecipientInfo:

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 }

version MUST 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 MUST use only PSKs authorized for the applicable application and recipient context. As permitted by Section 2 of RFC 8696, a recipient MAY try multiple authorized PSKs with the same identifier. If no authorized PSK is found or none succeeds, processing of that entry fails.

The enclosing CMS version follows the content-type specification. Because this mechanism uses OtherRecipientInfo, EnvelopedData.version MUST be 3, except when originatorInfo requires version 4 under Section 6.1 of RFC 5652. AuthEnvelopedData.version MUST be 0 under Section 2.1 of RFC 5083. These values are distinct from KEMPSKRecipientInfo.version.

rid, kem, and kemct have the recipient-identification, KEM-algorithm, and ciphertext meanings specified in Section 3 of RFC 9629. The originator MUST validate the recipient credential and its authorization. Certificate processing follows [RFC5280] and the applicable KEM algorithm specification. Recipients MUST support issuerAndSerialNumber and subjectKeyIdentifier; originators MUST support at least one. When a certificate with keyUsage is used, keyEncipherment MUST be asserted and any further constraints of the KEM specification apply.

kdfAlgorithm identifies the KDF and any parameters used with Section 4. 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 MUST follow their defining specifications.

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.

The new structure MUST NOT be encoded under id-ori-kem or either PSK recipient identifier from RFC 8696. An unsupported recipient type, version, or algorithm MUST NOT be reinterpreted as KEM-only or another recipient mechanism.

4. Key Derivation

The KDF inputs and processing in Section 5 of RFC 8696 apply, with the following additional mechanism-specific values:

IKM
The shared secret ss output by KEM encapsulation or decapsulation.
info
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.
L
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.
OKM
The KEK used to encrypt or wrap the CEK.

This document extends the keyMgmtAlgType enumeration in Sections 5 and 6 of RFC 8696 with keyKEM(15). The updated structure is:

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

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. Appendix A provides the updated type in a new module; the original published module identifier is not reassigned.

The OtherInfo value is constructed locally by each party. It contains the secret PSK, not pskid, and MUST NOT be transmitted with the CMS message, placed in attributes, or logged as public metadata. It and its DER encoding MUST be protected as secret material.

When an HKDF identifier from [RFC8619] is used, AlgorithmIdentifier parameters MUST be absent. No salt is supplied; the default salt processing of [RFC5869] applies. The derivation is:

IKM  = ss
info = DER(CMSORIforPSKOtherInfo)
PRK  = HKDF-Extract(salt = empty, IKM = ss)
KEK  = HKDF-Expand(PRK, info, L)

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 MUST NOT replace ss as IKM or be used as an additional salt under these conventions. The complete KEK MUST be computed before any part is used.

5. Originator and Recipient Processing

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:

  1. Selects and validates the authorized KEM credential, PSK, and algorithm combination.

  2. Performs a fresh encapsulation to the recipient public key, obtaining ss and kemct.

  3. Constructs CMSORIforPSKOtherInfo, derives the KEK as specified in Section 4, and encrypts or wraps the CEK.

  4. Places the public parameters, identifiers, kemct, and encryptedKey in KEMPSKRecipientInfo.

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.

The recipient:

  1. 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 Section 3.

  2. Processes kemct according to the KEM specification and obtains ss.

  3. Reconstructs CMSORIforPSKOtherInfo, derives the KEK, and decrypts or unwraps encryptedKey to recover the CEK.

  4. Processes the content under the enclosing CMS specification, including all required authentication checks before releasing plaintext.

A failure MUST NOT cause substitution of an empty PSK, a PSK-only derivation, or KEM-only processing. The KEM's implicit-rejection and error-handling requirements MUST be followed; an implementation MUST NOT expose distinguishable external errors that create a decapsulation or key-recovery oracle.

6. Security Considerations

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 MUST satisfy the application's security requirements. In particular, KDF selection MUST 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.

The PSK MUST 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 MUST NOT be a password or be derived from the KEM private key or ss. Provisioning and rotation MUST preserve this independence. Applications define identifier scope, authorized PSK use, retention, and retirement; identifiers are public and can enable linkability.

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 MUST NOT be used as the KEK. Implementations MUST protect ss, the PSK, the secret OtherInfo encoding, and derived keys. Compromise of the CEK exposes the content regardless of this mechanism.

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.

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 MUST NOT treat successful key recovery as authentication of that metadata. Applications requiring those bindings MUST supply an appropriate authentication mechanism covering the required fields. AuthEnvelopedData does not authenticate the complete recipient list.

Each RecipientInfo provides an alternative route to the CEK. Where policy requires KEM-with-PSK protection, originators MUST NOT provide another route to the same CEK that fails that policy, and recipients MUST NOT fall back to such a route. Copies of the plaintext protected by weaker mechanisms can likewise defeat the intended confidentiality policy.

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 MUST provide those services. EnvelopedData alone supplies no content-integrity guarantee; applications requiring authenticated encryption can use AuthEnvelopedData with an appropriate algorithm.

7. IANA Considerations

IANA is requested to assign two object identifiers in the S/MIME registries [IANA-SMIME]:

Table 1: Requested Object Identifiers
Registry arc Description Value
1.2.840.113549.1.9.16.13 id-ori-kemPSK TBD1
1.2.840.113549.1.9.16.0 id-mod-cms-kem-psk-2026 TBD2

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.

8. References

8.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC5083]
Housley, R., "Cryptographic Message Syntax (CMS) Authenticated-Enveloped-Data Content Type", RFC 5083, DOI 10.17487/RFC5083, , <https://www.rfc-editor.org/info/rfc5083>.
[RFC5280]
Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, , <https://www.rfc-editor.org/info/rfc5280>.
[RFC5652]
Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, RFC 5652, DOI 10.17487/RFC5652, , <https://www.rfc-editor.org/info/rfc5652>.
[RFC5869]
Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)", RFC 5869, DOI 10.17487/RFC5869, , <https://www.rfc-editor.org/info/rfc5869>.
[RFC5912]
Hoffman, P. and J. Schaad, "New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, DOI 10.17487/RFC5912, , <https://www.rfc-editor.org/info/rfc5912>.
[RFC6268]
Schaad, J. and S. Turner, "Additional New ASN.1 Modules for the Cryptographic Message Syntax (CMS) and the Public Key Infrastructure Using X.509 (PKIX)", RFC 6268, DOI 10.17487/RFC6268, , <https://www.rfc-editor.org/info/rfc6268>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC8619]
Housley, R., "Algorithm Identifiers for the HMAC-based Extract-and-Expand Key Derivation Function (HKDF)", RFC 8619, DOI 10.17487/RFC8619, , <https://www.rfc-editor.org/info/rfc8619>.
[RFC8696]
Housley, R., "Using Pre-Shared Key (PSK) in the Cryptographic Message Syntax (CMS)", RFC 8696, DOI 10.17487/RFC8696, , <https://www.rfc-editor.org/info/rfc8696>.
[RFC9629]
Housley, R., Gray, J., and T. Okubo, "Using Key Encapsulation Mechanism (KEM) Algorithms in the Cryptographic Message Syntax (CMS)", RFC 9629, DOI 10.17487/RFC9629, , <https://www.rfc-editor.org/info/rfc9629>.

8.2. Informative References

[IANA-SMIME]
IANA, "Structure of Management Information (SMI) Numbers: S/MIME Registries", <https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml>.
[RFC3394]
Schaad, J. and R. Housley, "Advanced Encryption Standard (AES) Key Wrap Algorithm", RFC 3394, DOI 10.17487/RFC3394, , <https://www.rfc-editor.org/info/rfc3394>.

Appendix A. ASN.1 Module

This module follows the ASN.1 conventions of [RFC5912] and [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.

<CODE BEGINS> file "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

<CODE ENDS>

Appendix B. Derivation and Key-Wrap Example

This example illustrates HKDF-SHA-256 and AES-256 Key Wrap [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.

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.

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

Appendix C. Changes from Revision -00

This section is to be removed before publishing as an RFC.

Authors' Addresses

Penghui Liu (editor)
Pengcheng Laboratory
No.2 Xingke 1 Street
Shenzhen
518055
China
Rongwei Yang (editor)
Pengcheng Laboratory
No.2 Xingke 1 Street
Shenzhen
518055
China
Xiang Liu (editor)
Pengcheng Laboratory
No.2 Xingke 1 Street
Shenzhen
518055
China
Yu Zhang (editor)
Pengcheng Laboratory
No.2 Xingke 1 Street
Shenzhen
518055
China
Weizhe Zhang (editor)
Pengcheng Laboratory
No.2 Xingke 1 Street
Shenzhen
518055
China