Datatypes

OpenPGP private key block

ID pgp_private_key_block

DatatypeNot PIIidentifierDraft

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

OpenPGP secret key in ASCII armor: Radix-64 text between the lines -----BEGIN PGP PRIVATE KEY BLOCK----- and -----END PGP PRIVATE KEY BLOCK-----, as defined in RFC 9580.

Categories
Secrets and credentials (passwords, keys, tokens), Cryptographic identifiers
Countries
Global (not tied to a country)
Languages
Common to most languages
Quality
78/100 · missing: second example, mapping (Wikidata, Schema.org, ...), translation
Metacrafter rules
no detection rule yet
Supported by tools
Amazon Macie, detect-secrets, Gitleaks, Nightfall AI, Semgrep

Regular expression

^-----BEGIN PGP PRIVATE KEY BLOCK-----[\s\S]+-----END PGP PRIVATE KEY BLOCK-----$

Python re syntax.

Examples

ValueDescription
-----BEGIN PGP PRIVATE KEY BLOCK----- EXAMPLE -----END PGP PRIVATE KEY BLOCK-----Armor lines around placeholder text, not a key
-----BEGIN PGP PUBLIC KEY BLOCK----- EXAMPLE -----END PGP PUBLIC KEY BLOCK----- invalidPublic key block

Sources

Use this record