Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CMS OID Constants

All OID constants in synta.cms are ObjectIdentifier instances (frozen, hashable).

Content-type OIDs (RFC 5652 §14)

ConstantOIDName
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

Content-encryption algorithm OIDs (RFC 3565)

Passed as algorithm_oid to EncryptedData.create; also returned by the content_encryption_algorithm_oid property.

ConstantOIDKey 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

Key-transport algorithm OIDs (RFC 8017)

Passed as key_wrap_oid to EnvelopedDataBuilder.

ConstantOIDNotes
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)

CMS-KEM OtherRecipientInfo OIDs (RFC 9629 §6.2)

ConstantOIDDescription
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

Import

from synta.cms import (
    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,
)

ML-KEM OID constants (ID_ML_KEM_512, ID_ML_KEM_768, ID_ML_KEM_1024) are in synta.kem; see CMS-KEM.

See also Well-known OIDs for the full synta.oids catalog which includes the CMS content-type OIDs as CMS_DATA, CMS_SIGNED_DATA, etc.