Join our Newsletter — 33% off our NHI Course
Foundations & NHI Taxonomy

GPG Key

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Foundations & NHI Taxonomy

A key pair managed by GnuPG, an OpenPGP implementation, used to sign and encrypt data such as emails, software packages and Git commits. Theft of a private key lets an attacker sign malicious releases as the owner. Defenders protect private keys with passphrases or hardware tokens, verify fingerprints before trusting public keys, and revoke compromised keys promptly.

What a GPG key does

A GPG key is a cryptographic key pair managed by GnuPG for signing and encrypting data. The private half proves authorship or authorises decryption, while the public half lets others verify signatures or encrypt to the owner. In practice, the key becomes a trust anchor for emails, software releases and commit histories.

Because GPG keys are used to establish trust, they are not just another file. A weak passphrase, poor storage choice or careless export can undermine the assurance the key is meant to provide. For that reason, organisations usually treat private-key custody as a security control, not a convenience feature.

Why GPG keys matter in software trust

In software supply chains, a GPG key can authenticate package metadata, release artifacts or repository content. That makes the key part of the trust boundary, because anyone who can sign with the private key can create material that looks legitimately issued by the owner. The Code Signing Security Guide covers the same trust problem from the release-signing side, including key protection, revocation and response after theft.

This is why public-key verification alone is not enough. Teams also need fingerprint verification, trusted distribution paths for public keys and clear rules for when a key is accepted, replaced or revoked. If the trust process is weak, attackers do not need to break the cryptography, they only need to abuse the workflow around it.

How GPG key compromise is usually handled

GPG key management is really key lifecycle management. The private key should be protected at rest, backed by a strong passphrase or hardware token where possible, and rotated or revoked when exposure is suspected. NHIMG’s Signing keys and certificates in breaches guide is useful background on how stolen signing material is handled in real breaches, including rotation and trust recovery.

Recovery is not just about generating a new key pair. Organisations also need to replace or reissue signed artifacts, publish revocation information, and notify users how to distinguish old trust anchors from current ones. If a key was embedded in automation or a build pipeline, those integrations must be updated as part of the recovery effort.

Operational controls around verification and revocation

The practical controls around GPG keys are straightforward but easy to get wrong. Verify the full fingerprint, not a short key ID, before trusting a public key. Restrict who can export or import private keys. Prefer scoped trust for package repositories and signing workflows rather than a single broadly trusted key used everywhere.

For Linux package ecosystems, repository trust controls are especially important. The Linux Package Signing and Repository Trust Guide explains how signing keys, repository metadata and scoped trust settings fit together. That model helps reduce the blast radius when one key, repository or mirror is compromised.

Practical uses beyond email

Although people often associate GPG with email encryption, its real-world use is broader. It is commonly used to sign software packages, release checksums and Git commits, where the goal is integrity and provenance rather than confidentiality alone. The same key pair can support multiple trust workflows, but that also increases the consequence of compromise.

That broader use is why key hygiene matters over the full lifecycle. Teams should know which systems, repositories and release processes rely on a specific key, because losing track of that dependency makes revocation and replacement much harder when an incident occurs. For a broader view of GPG custody in tooling, Passbolt Security is a useful adjacent resource on key custody and recovery patterns.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5, NIST SP 800-57 and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementGPG key lifecycle depends on secure issuance, protection and revocation of authenticators.
SC-12 — Cryptographic Key Establishment and ManagementThe term directly concerns management of signing and encryption keys.
Recommendation — Manage GPG private-key lifecycle with protected storage, rotation and revocation procedures. Apply key-management controls to protect private GPG keys and govern trust material.
NIST SP 800-57Key ManagementGPG keys are cryptographic keys whose lifecycle and cryptoperiod must be governed.
Recommendation — Define key generation, protection, rotation and revocation policy for GPG keys.
CIS Controls v8CIS-3 — Data ProtectionGPG keys protect sensitive data and signed artifacts through cryptographic controls.
Recommendation — Protect sensitive files and release artifacts with controlled cryptographic signing and encryption.
ISO/IEC 27001:2022A.8.24 — Use of cryptographyGPG keys are cryptographic material used to sign and encrypt information.
Recommendation — Set cryptographic handling rules for GPG keys, including storage, use and retirement.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org