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

# OpenPGP private key block (`pgp_private_key_block`)

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

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.

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

## Detection

Regular expression (Python `re`):

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

## Examples

- `-----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-----` (invalid example) — Public key block

## Supported by tools

- `amazonmacie`
- `detectsecrets`
- `gitleaks`
- `nightfall`
- `semgrep`

## Sources

- doc: <https://www.rfc-editor.org/rfc/rfc9580#section-6.2>
- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>

## Quality

Score 78/100. Missing: second example, mapping (Wikidata, Schema.org, ...), translation.

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