Datatypes

X.509 certificate private key

ID x509_private_key

DatatypeNot PIIDraft

This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).

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.

Categories
Secrets and credentials (passwords, keys, tokens), Cryptographic identifiers
Countries
Global (not tied to a country)
Languages
Common to most languages
Microsoft Purview
Azure subscription management certificate, X.509 certificate private key, All Credential Types, All credentials
Quality
75/100 · missing: examples, negative example, translation
Metacrafter rules
no detection rule yet
Supported by tools
Amazon Macie, detect-secrets, Gitleaks, Microsoft Purview Data Loss Prevention, Nightfall AI, Semgrep, TruffleHog

Regular expression

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

Python re syntax.

Sources

Use this record