---
id: "x509_private_key"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets", "cryptography"]
langs: ["common"]
quality: 75
url: "http://registry.apicrafter.io/datatype/x509_private_key"
---

# X.509 certificate private key (`x509_private_key`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Private key of an X.509 certificate, usually written as a PEM block that starts with -----BEGIN PRIVATE KEY----- (or RSA PRIVATE KEY, EC PRIVATE KEY) or embedded in a Base64 PKCS #12 file.

- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets), Cryptographic identifiers (cryptography)
- Countries: global
- Languages: Common to most languages (common)

## Detection

Regular expression (Python `re`):

```
^-----BEGIN (?:RSA |EC |DSA |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END (?:RSA |EC |DSA |ENCRYPTED )?PRIVATE KEY-----$
```

## Mappings

- purview: `Azure subscription management certificate`, `X.509 certificate private key`, `All Credential Types`, `All credentials`

## Supported by tools

- `amazonmacie`
- `detectsecrets`
- `gitleaks`
- `microsoftpurview`
- `nightfall`
- `semgrep`
- `trufflehog`

## Sources

- doc: <https://learn.microsoft.com/en-us/purview/sit-defn-x-509-certificate-private-key>
- doc: <https://www.rfc-editor.org/rfc/rfc7468>

## Quality

Score 75/100. Missing: examples, negative example, translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/x509_private_key.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/x509_private_key.yaml>
