GnuPG
$ gpg Foundation High Riskgpg remains deeply embedded in Linux package verification, commit signing, and legacy OpenPGP workflows. However, its stateful ~/.gnupg/ keybox, background gpg-agent, and GUI/TTY pinentry prompts frequently hang headless agents unless --batch --yes --pinentry-mode loopback is enforced.
brew install gnupg Cryptographic keyrings and signature checks belong strictly to local gpg invocations; never proxy private PGP operations over MCP.
Agent-Readiness Checklist
Local Probe EvidenceCaptured --help excerpt
gpg (GnuPG) 2.5.21
libgcrypt 1.12.2
Copyright (C) 2026 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /Users/pcyan/.gnupg
Supported algorithms:
Pubkey: RSA, Kyber, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
Syntax: gpg [options] [files]
Sign, check, encrypt or decrypt
Default operation depends on the input data
Commands:
-s, --sign make a signature
--clear-sign make a clear text signature
-b, --detach-sign make a detached signature
-e, --encrypt encrypt data
-c, --symmetric encryption only with symmetric cipher
-d, --decrypt decrypt data (default)
--verify verify a signature
-k, --list-keys list keys
--list-signatures list keys and signatures
--check-signatures list and check key signatures
--fingerprint list keys and fingerprints
-K, --list-secret-keys list secret keys
--generate-key generate a new key pair
--quick-generate-key quickly generate a new key pair
--quick-add-uid quickly add a new user-id
--quick-revoke-uid quickly revoke a user-id
--quick-set-expire quickly set a new expiration date
--full-generate-key full featured key pair generation
--generate-revocation generate a revocation certificate
--delete-keys remove keys from the public keyring
--delete-secret-keys remove keys from the secret keyring
--quick-sign-key quickly sign a key
--quick-lsign-key quickly sign a key locally
--quick-tsign-key quickly sign a key with a trust signature
--quick-revoke-sig quickly revoke a key signature
--sign-key sign a key
--lsign-key sign a key locally
--edit-key sign or edit a key
--change-passphrase change a passphrase
--export FCRS-1.0 6-Dimension Breakdown
Lacks --json (uses --with-colons) and routinely hangs headless shells on pinentry dialogs unless --batch and gpg-agent config are tuned.
- Requires
--batchand--with-colons; prone topinentryhangs
Stateful ~/.gnupg keyring combines public verification with high-risk private key export/deletion and decryption.
- Single keyring manages both public verify and destructive secret key ops
Widely packaged on Linux and via brew install gnupg, though gpg-agent socket/pinentry behavior varies by OS.
- Cross-platform packages with OS-specific
pinentryquirks
Essential for verifying signed releases and legacy PGP blobs, but age and cosign are far cleaner for new workflows.
- Standard OpenPGP interoperability; heavy ergonomics
Long-standing foundational GNU/GnuPG project under GPL-3.0.
- Decades-long upstream maintenance
Extensive reference manual and man pages, though notoriously dense.
- Detailed documentation at gnupg.org/documentation
Security, Auth & Guardrails
Stores public/private keyrings, trustdb, and agent sockets inside ~/.gnupg/ with passphrases cached in gpg-agent.
100% free and open-source (GPL-3.0).
# GnuPG (gpg) Agent Rules - ALWAYS pass `--batch` (and `--pinentry-mode loopback` if non-interactive passphrase is needed) so `pinentry` never hangs waiting for a GUI/TTY prompt. - Never run `--export-secret-keys`, `--delete-secret-keys`, or decrypt secrets directly to stdout.
Agent-Ready Command Recipes
Safe Read-Only Queries
gpg --batch --with-colons --list-keys
Outputs stable colon-delimited key records without launching interactive prompts.
gpg --batch --verify release.tar.gz.asc release.tar.gz
Verifies archive authenticity against imported public keys read-only.
Strengths for Agents
- + Industry standard for verifying detached
.asc/.sigopen-source release signatures. - +
--with-colonsprovides stable, versioned machine-parseable keyring records.
Caveats & Pitfalls
- ! Interactive
pinentrydialogs frequently block or crash in headless agent terminals. - ! Complex stateful
~/.gnupg/directory andgpg-agentside-effects make automation brittle compared toage.