The synta.cms submodule provides Python bindings for the Cryptographic Message Syntax
(RFC 5652) and CMS-KEM (RFC 9629). It exposes parsers and builders for all major CMS
content types.
Class RFC Description
ContentInfoRFC 5652 §3 Outer CMS envelope; entry point for all content types
SignedDataRFC 5652 §5 Encapsulates signed content plus signer information
SignerInfoRFC 5652 §5.3 Per-signer structure within SignedData
EnvelopedDataRFC 5652 §6 Encrypted content with key transport per recipient
EnvelopedDataBuilderRFC 5652 §6 Fluent builder for EnvelopedData
EncryptedDataRFC 5652 §8 Symmetric encryption (shared key, no recipient info)
DigestedDataRFC 5652 §7 Hash-protected content
AuthenticatedDataRFC 5652 §9 MAC-authenticated content
IssuerAndSerialNumberRFC 5652 §10.2.4 Certificate identifier
KEMRecipientInfoRFC 9629 §5 Quantum-safe KEM recipient structure
CMSORIforKEMOtherInfoRFC 9629 §5.3 KDF input structure for KEM-based key derivation
from synta.cms import (
ContentInfo,
SignedData, SignerInfo,
EnvelopedData, EnvelopedDataBuilder,
EncryptedData,
DigestedData,
AuthenticatedData,
IssuerAndSerialNumber,
KEMRecipientInfo, CMSORIforKEMOtherInfo,
# OID constants:
ID_DATA, ID_SIGNED_DATA, ID_ENVELOPED_DATA,
ID_DIGESTED_DATA, ID_ENCRYPTED_DATA, ID_CT_AUTH_DATA,
ID_AES128_CBC, ID_AES192_CBC, ID_AES256_CBC,
ID_RSAES_OAEP, ID_RSA_ENCRYPTION,
ID_ORI, ID_ORI_KEM,
)
Constant OID Name
ID_DATA1.2.840.113549.1.7.1id-data
ID_SIGNED_DATA1.2.840.113549.1.7.2id-signedData
ID_ENVELOPED_DATA1.2.840.113549.1.7.3id-envelopedData
ID_DIGESTED_DATA1.2.840.113549.1.7.5id-digestedData
ID_ENCRYPTED_DATA1.2.840.113549.1.7.6id-encryptedData
ID_CT_AUTH_DATA1.2.840.113549.1.9.16.1.2id-ct-authData
Constant OID Key length
ID_AES128_CBC2.16.840.1.101.3.4.1.216 bytes
ID_AES192_CBC2.16.840.1.101.3.4.1.2224 bytes
ID_AES256_CBC2.16.840.1.101.3.4.1.4232 bytes
Constant OID Notes
ID_RSAES_OAEP1.2.840.113549.1.1.7RSA-OAEP with SHA-256 (recommended)
ID_RSA_ENCRYPTION1.2.840.113549.1.1.1RSA PKCS#1 v1.5 (legacy)
Constant OID Description
ID_ORI1.2.840.113549.1.9.16.13Root arc for OtherRecipientInfo alternatives
ID_ORI_KEM1.2.840.113549.1.9.16.13.3Identifies a KEMRecipientInfo