synta 0.1.12

ASN.1 parser, decoder, and encoder library with DER/BER support and C FFI
Documentation
# 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`

```python
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`:

```python
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

| OID | Typical context |
|---|---|
| `ID_CONTENT_TYPE` | CMS `SignedData` signed attribute (RFC 5652 §11) |
| `ID_MESSAGE_DIGEST` | CMS `SignedData` signed attribute (RFC 5652 §11) |
| `ID_SIGNING_TIME` | CMS `SignedData` signed attribute (RFC 5652 §11) |
| `ID_COUNTERSIGNATURE` | CMS `SignedData` unsigned attribute |
| `ID_EXTENSION_REQUEST` | PKCS#10 CSR attribute (RFC 2986 §5.4.2) |
| `ID_CHALLENGE_PASSWORD` | PKCS#10 CSR attribute (RFC 2986 §5.4.1) |
| `ID_FRIENDLY_NAME` | PKCS#12 bag attribute (RFC 7292 §4.2) |
| `ID_LOCAL_KEY_ID` | PKCS#12 bag attribute (RFC 7292 §4.2) |

See also [Well-known OIDs](oids.md) for the full OID catalog.