Generate full 40‑character hex fingerprint and Key ID from any OpenPGP public key. 100% client‑side, no server upload. In‑depth guide included.
An OpenPGP fingerprint is a cryptographic hash (usually SHA‑1 for v4 keys, SHA‑256 for v5 keys) that uniquely identifies a PGP public key [citation:8]. It is the most reliable way to verify that a key belongs to a specific person or entity, much more reliable than a Key ID.
Unlike SSH, where the fingerprint is simply the hash of the entire public key file (including comments), the PGP fingerprint is calculated from specific binary data inside the OpenPGP packet [citation:3].
For a version 4 (v4) key (most common today):
For version 5 (v5) keys (introduced in RFC 4880bis, using SHA‑256), the process is similar, but the prefix changes to 0x9A, and the hash is 32 bytes (64 hex characters). Currently, v5 keys are rare; most keys are v4.
The GnuPG source code (openpgp-fpr.c) implements these algorithms exactly [citation:8]. The tool below simulates this process; for production use, always rely on GnuPG itself.
| Algorithm | Key size / curve | Security | Performance | OpenPGP support |
|---|---|---|---|---|
| RSA | 2048‑4096 bits | High (2048 bits ~112‑bit security, 4096 ~128‑bit) | Slower (especially signing) | Universal |
| Ed25519 | 256 bits | Very high (∼128‑bit security, side‑channel resistant) | Very fast | GnuPG 2.1+, OpenPGP draft |
| ECDSA / ECDH | NIST P‑256, P‑384, P‑521 | High | Fast | Widely supported |
| DSA | 1024‑3072 bits | Legacy (≤1024 deprecated) | Slow | Discouraged |
Recommendation: For new keys, use Ed25519 (signing) + Curve25519 (encryption) – modern, fast, and secure [citation:6]. RSA 4096 is still a safe choice for broad compatibility.
gpg --fingerprint [email protected] displays the fingerprint.
gpg --list-keys and gpg --fingerprint.
OpenPGP fingerprints are resistant to preimage attacks – given a fingerprint, it‘s infeasible to create a key that hashes to that value. However, collision attacks on SHA‑1 (the hash used for v4 fingerprints) are theoretically possible but require massive computational resources. For extremely high‑security environments, consider moving to v5 keys (SHA‑256). Most users can rely on v4 fingerprints with confidence [citation:3].
pub rsa4096 2023-01-01 [SC]
1234 5678 90AB CDEF 1234 5678 90AB CDEF 1234 5678
uid [ultimate] Alice
sub rsa4096 2023-01-01 [E]
The long hex string is the full 40‑character fingerprint, grouped in blocks of four for readability [citation:2].
This guide contains over 1400 words of in‑depth information to help you master PGP key fingerprints.
gpg --fingerprint [email protected] – show fingerprintgpg --list-keys --fingerprint – all keys with fingerprintsgpg --export --armor [email protected] > pub.asc – export public keygpg --import pub.asc – import a keygpg --keyserver keys.openpgp.org --send-keys KEYID – publish