Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

GnuPG

$ gpg Foundation High Risk
GnuPG Project · Security & Secrets · GPL-3.0 · macos / linux / windows

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

FCRS-1.0 Score
70 /100
Usable w/ Caveats
High Confidence
Zero-Friction Install
brew install gnupg
CLI vs MCP Decision CLI Only

Cryptographic keyrings and signature checks belong strictly to local gpg invocations; never proxy private PGP operations over MCP.

Agent-Readiness Checklist

Local Probe Evidence
— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md
Version
gpg (GnuPG) 2.5.21
Startup
679 ms
Exit Codes (help / invalid)
0 / 2
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --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

Agent-Readiness 14 / 25

Lacks --json (uses --with-colons) and routinely hangs headless shells on pinentry dialogs unless --batch and gpg-agent config are tuned.

  • Requires --batch and --with-colons; prone to pinentry hangs
Trust & Safety 16 / 25

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
Setup & Portability 12 / 15

Widely packaged on Linux and via brew install gnupg, though gpg-agent socket/pinentry behavior varies by OS.

  • Cross-platform packages with OS-specific pinentry quirks
Utility & Efficiency 11 / 15

Essential for verifying signed releases and legacy PGP blobs, but age and cosign are far cleaner for new workflows.

  • Standard OpenPGP interoperability; heavy ergonomics
Maintenance & Lineage 9 / 10

Long-standing foundational GNU/GnuPG project under GPL-3.0.

  • Decades-long upstream maintenance
Docs & Verifiability 8 / 10

Extensive reference manual and man pages, though notoriously dense.

  • Detailed documentation at gnupg.org/documentation

Security, Auth & Guardrails

Auth Modes
Config File OS Keychain
Credential Storage

Stores public/private keyrings, trustdb, and agent sockets inside ~/.gnupg/ with passphrases cached in gpg-agent.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

100% free and open-source (GPL-3.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List public keys in machine-parseable colon format
gpg --batch --with-colons --list-keys

Outputs stable colon-delimited key records without launching interactive prompts.

Verify a detached release signature
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/.sig open-source release signatures.
  • + --with-colons provides stable, versioned machine-parseable keyring records.

Caveats & Pitfalls

  • ! Interactive pinentry dialogs frequently block or crash in headless agent terminals.
  • ! Complex stateful ~/.gnupg/ directory and gpg-agent side-effects make automation brittle compared to age.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI