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

PKCS#9 OID Constants

PKCS#9 attribute OIDs are available from two locations:

  • synta.pkcs9 — a dedicated module with the full PKCS#9 arc (13 constants)
  • synta.oids — the top-level OID catalog (9 of the most common constants)

From synta.oids

import synta.oids as oids

oids.PKCS9_EMAIL_ADDRESS        # 1.2.840.113549.1.9.1  — emailAddress
oids.PKCS9_CONTENT_TYPE         # 1.2.840.113549.1.9.3  — id-contentType
oids.PKCS9_MESSAGE_DIGEST       # 1.2.840.113549.1.9.4  — id-messageDigest
oids.PKCS9_SIGNING_TIME         # 1.2.840.113549.1.9.5  — id-signingTime
oids.PKCS9_COUNTERSIGNATURE     # 1.2.840.113549.1.9.6  — id-countersignature
oids.PKCS9_CHALLENGE_PASSWORD   # 1.2.840.113549.1.9.7  — id-challengePassword
oids.PKCS9_EXTENSION_REQUEST    # 1.2.840.113549.1.9.14 — id-extensionRequest
oids.PKCS9_FRIENDLY_NAME        # 1.2.840.113549.1.9.20 — id-friendlyName
oids.PKCS9_LOCAL_KEY_ID         # 1.2.840.113549.1.9.21 — id-localKeyId

From synta.pkcs9

synta.pkcs9 adds four more constants not in synta.oids:

import synta.pkcs9 as pkcs9

pkcs9.ID_PKCS_9                 # 1.2.840.113549.1.9    — id-pkcs-9 arc
pkcs9.ID_EMAIL_ADDRESS          # 1.2.840.113549.1.9.1  — emailAddress
pkcs9.ID_UNSTRUCTURED_NAME      # 1.2.840.113549.1.9.2  — unstructuredName
pkcs9.ID_CONTENT_TYPE           # 1.2.840.113549.1.9.3  — id-contentType
pkcs9.ID_MESSAGE_DIGEST         # 1.2.840.113549.1.9.4  — id-messageDigest
pkcs9.ID_SIGNING_TIME           # 1.2.840.113549.1.9.5  — id-signingTime
pkcs9.ID_COUNTERSIGNATURE       # 1.2.840.113549.1.9.6  — id-countersignature
pkcs9.ID_CHALLENGE_PASSWORD     # 1.2.840.113549.1.9.7  — id-challengePassword
pkcs9.ID_UNSTRUCTURED_ADDRESS   # 1.2.840.113549.1.9.8  — unstructuredAddress
pkcs9.ID_EXTENSION_REQUEST      # 1.2.840.113549.1.9.14 — id-extensionRequest
pkcs9.ID_SMIME                  # 1.2.840.113549.1.9.16 — id-smime arc
pkcs9.ID_FRIENDLY_NAME          # 1.2.840.113549.1.9.20 — id-friendlyName
pkcs9.ID_LOCAL_KEY_ID           # 1.2.840.113549.1.9.21 — id-localKeyId

Usage context

OIDTypical context
ID_CONTENT_TYPECMS SignedData signed attribute (RFC 5652 §11)
ID_MESSAGE_DIGESTCMS SignedData signed attribute (RFC 5652 §11)
ID_SIGNING_TIMECMS SignedData signed attribute (RFC 5652 §11)
ID_COUNTERSIGNATURECMS SignedData unsigned attribute
ID_EXTENSION_REQUESTPKCS#10 CSR attribute (RFC 2986 §5.4.2)
ID_CHALLENGE_PASSWORDPKCS#10 CSR attribute (RFC 2986 §5.4.1)
ID_FRIENDLY_NAMEPKCS#12 bag attribute (RFC 7292 §4.2)
ID_LOCAL_KEY_IDPKCS#12 bag attribute (RFC 7292 §4.2)

See also PKCS#9 Module for the protocol-level documentation and Well-known OIDs for the full OID catalog.