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

# OpenPGP key ID (`pgp_key_id`)

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

Short identifier of an OpenPGP key, 64 bits written as 16 hexadecimal digits, often after 0x (gpg --keyid-format long): the low-order 64 bits of the fingerprint for version 4 keys and the high-order 64 bits for version 6 keys (RFC 9580). Key IDs can collide; the older 8-digit short key IDs are easy to forge and are not covered.

- Personal data (PII): no
- Categories: Cryptographic identifiers (cryptography)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:0x)?[0-9A-Fa-f]{16}$
```

## Examples

- `8CFDE12197965A9A` — Key ID of the sample version 4 key of RFC 9580 (the issuer in appendix A.2)
- `0x8CFDE12197965A9A` — The same key ID with the 0x prefix
- `CB186C4F0609A697` — Key ID of the sample version 6 key of RFC 9580
- `97965A9A` (invalid example) — Short 8-digit key ID

## Sources

- doc: <https://www.rfc-editor.org/rfc/rfc9580#section-5.5.4>

## Quality

Score 75/100. Missing: mapping (Wikidata, Schema.org, ...), translation, detector coverage.

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