Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 40 GitHub source documents. All source documents are searchable here.
Last updated: October 7, 2025
This content is meant to be consumed by AI agents via MCP. Click here to get the MCP configuration.
Note: In rare cases it may contain LLM hallucinations.
For authoritative documentation, please consult the official GLEIF vLEI trainings and the ToIP Glossary.
GNU Privacy Guard (GnuPG or GPG) is a complete and free implementation of the OpenPGP standard as defined in RFC 4880. Originally developed by Werner Koch in 1999 as a free-software replacement for Symantec's PGP (Pretty Good Privacy) cryptographic software suite, GPG provides cryptographic privacy and authentication capabilities for securing data communications.
Programming Language: GPG is primarily implemented in C, with bindings available for numerous programming languages including Python (python-gnupg), Java (Bouncy Castle), and others.
Purpose and Scope: GPG serves as a comprehensive cryptographic toolkit for:
Relationship to Protocol Specifications: GPG implements the OpenPGP standard, which defines message formats, key formats, and cryptographic operations for public-key cryptography. Modern versions of PGP are interoperable with GnuPG and other OpenPGP-compliant systems, creating a standardized ecosystem for encrypted communications.
Key Generation: Use strong entropy sources and appropriate key lengths (minimum 2048-bit RSA, preferably 4096-bit or ECC equivalents). Generate keys on secure, offline systems when possible.
Passphrase Protection: Use long, random passphrases for private key encryption. Consider using hardware security modules or smart cards for high-security applications.
Key Backup: Generate and securely store revocation certificates before keys are compromised. Maintain encrypted backups of private keys in secure locations.
Regular Updates: Keep GPG software updated to address security vulnerabilities and support modern cryptographic algorithms.
Email Encryption: Integrate GPG with email clients using plugins like Enigmail (Thunderbird) or GPGTools (macOS). Configure automatic encryption for sensitive communications.
File Encryption: Use GPG for encrypting sensitive files before cloud storage or transmission. Consider using GPG in automated backup scripts.
Code Signing: Configure development tools to automatically sign commits and releases with GPG keys. Establish organizational policies for code signing requirements.
Key Distribution: Publish public keys to multiple key servers for redundancy. Consider using DNS-based key distribution (OPENPGPKEY records) for organizational keys.
Trust Management: Establish clear policies for key signing and trust levels within organizations. Document trust relationships and verification procedures.
Revocation Planning: Create and securely store revocation certificates during key generation. Establish procedures for distributing revocation certificates if keys are compromised.
No Forward Secrecy: GPG does not provide forward secrecy - compromised private keys expose all past encrypted messages. Consider using protocols like Signal or OTR for communications requiring forward secrecy.
Metadata Leakage: GPG encrypts content but not metadata. Use additional tools (Tor, VPNs) when metadata protection is required.
Scalability: The web of trust model doesn't scale well to large organizations. Consider hierarchical trust models or integration with organizational PKI for enterprise deployments.
GPG provides fundamental cryptographic primitives that form the basis of secure communications:
Asymmetric Encryption: GPG uses public-key cryptography where each user possesses a key pair consisting of a public key (shared openly) and a private key (kept secret). Messages encrypted with a public key can only be decrypted by the corresponding private key, enabling secure communication without prior key exchange.
Digital Signatures: GPG creates non-repudiable digital signatures that prove message authenticity and integrity. The sender signs a message with their private key, and recipients verify the signature using the sender's public key. This provides cryptographic proof that:
Symmetric Encryption: For efficiency, GPG uses hybrid encryption where the actual message is encrypted with a fast symmetric cipher (like AES), and only the symmetric key is encrypted with the slower asymmetric algorithm. This combines the security of public-key cryptography with the performance of symmetric encryption.
GPG implements a comprehensive key management system:
Key Generation: GPG can generate various types of key pairs including RSA, DSA, ElGamal, and elliptic curve cryptography (ECC) keys. Key generation involves creating cryptographically strong random numbers using system entropy sources.
Key Storage: Private keys are stored in encrypted keyrings protected by passphrases. GPG uses key stretching techniques to make brute-force attacks on passphrases computationally expensive.
Key Distribution: Public keys can be distributed through:
Key Revocation: GPG supports key revocation certificates that can be generated in advance and used to invalidate compromised keys, even if the private key is lost.
Unlike hierarchical PKI systems that rely on certificate authorities, GPG implements a decentralized web of trust model:
Trust Relationships: Users sign each other's public keys to indicate they have verified the key owner's identity. These signatures create a network of trust relationships.
Trust Levels: GPG allows users to assign trust levels to keys:
Trust Propagation: GPG calculates key validity by following chains of trust signatures. A key may be considered valid if it has signatures from multiple marginally trusted keys or from a single fully trusted key.
Decentralized Architecture: The web of trust eliminates single points of failure inherent in centralized CA systems. As noted in the source documents, "many independent webs of trust" can coexist, with users participating in multiple networks through their identity certificates.
GPG's adherence to the OpenPGP standard (RFC 4880) ensures broad interoperability:
Cross-Platform Compatibility: GPG runs on virtually all operating systems including Linux, Windows, macOS, BSD variants, and mobile platforms.
Application Integration: GPG integrates with:
Protocol Compatibility: Modern PGP implementations from various vendors are interoperable with GnuPG, allowing encrypted communication across different software ecosystems.
GPG employs a modular architecture separating concerns:
Core Engine: The gpg binary provides core cryptographic operations and key management.
Agent System: gpg-agent handles private key operations and passphrase caching, improving security by isolating sensitive operations and reducing passphrase entry frequency.
Smart Card Support: scdaemon enables integration with hardware security tokens and smart cards for enhanced key protection.
Key Server Interface: dirmngr manages connections to key servers and certificate revocation lists.
Memory Protection: GPG employs secure memory allocation techniques to prevent sensitive data from being swapped to disk or exposed through memory dumps.
Passphrase Security: Private keys are encrypted using strong symmetric ciphers with key derivation functions that make brute-force attacks computationally expensive.
Hardware Integration: GPG supports hardware security modules (HSMs) and smart cards for storing private keys in tamper-resistant hardware.
Privilege Separation: The agent architecture separates privileged operations from user-facing components, reducing attack surface.
While GPG predates KERI (Key Event Receipt Infrastructure) by decades, understanding GPG provides important context for modern decentralized identity systems:
Self-Certifying Identifiers: GPG's key fingerprints serve as self-certifying identifiers - cryptographic hashes of public keys that uniquely identify key owners without requiring external authorities. This concept is foundational to KERI's autonomic identifiers (AIDs).
Decentralized Trust: GPG's web of trust model pioneered decentralized trust establishment, influencing modern approaches to distributed identity verification. KERI extends this concept with witness pools and watcher networks.
Key Rotation Challenges: GPG's approach to key rotation involves generating new keys and having them signed by the old keys, but this creates challenges when old keys are compromised. KERI's pre-rotation mechanism addresses this limitation by cryptographically committing to next keys before current keys are exposed.
Event Logs vs. Key Servers: GPG relies on key servers for key distribution, while KERI uses Key Event Logs (KELs) as verifiable data structures that provide complete key state history.
Trust Models: GPG's web of trust requires manual trust decisions and signature verification, while KERI's witness-based model provides automated verification through cryptographic proofs.
Portability: GPG keys are tied to specific implementations and key servers, while KERI's transferable identifiers enable true portability across platforms and infrastructures.
Email Encryption: GPG remains the dominant solution for email encryption (PGP/MIME, inline PGP), while KERI focuses on identifier management and credential issuance.
File Encryption: GPG excels at encrypting files and documents for storage or transmission, complementing KERI's role in establishing cryptographic roots of trust.
Code Signing: GPG is widely used for signing software releases and Git commits, providing integrity verification that could be enhanced by KERI-based identity verification.
GPG was created in 1999 by Werner Koch as a free-software alternative to PGP, which had become proprietary. The project was initially funded by the German government and has since received support from various organizations including the Linux Foundation.
Phil Zimmermann's Legacy: The original PGP was created by Phil Zimmermann in 1991, and as noted in source documents, Zimmermann "first introduced" the web of trust concept "in 1992 in the manual for PGP." This pioneering work established decentralized trust models that continue to influence modern cryptographic systems.
Standardization: The OpenPGP standard (RFC 4880) was published in 2007, formalizing the message formats and cryptographic operations used by GPG and other implementations.
Despite being over two decades old, GPG remains relevant:
Widespread Adoption: GPG is used by journalists, activists, developers, and security professionals worldwide for secure communications.
Integration Ecosystem: Thousands of applications integrate GPG for encryption and signing capabilities.
Standards Foundation: The OpenPGP standard continues to evolve, with ongoing work on post-quantum cryptography and modern cipher suites.
Educational Value: Understanding GPG provides essential knowledge about public-key cryptography, digital signatures, and decentralized trust models that underpin modern identity systems like KERI.
Complexity: GPG's command-line interface and conceptual model present steep learning curves for non-technical users.
Key Management Burden: Users must manually manage keys, verify fingerprints, and maintain trust relationships.
Revocation Challenges: Revoking compromised keys requires distributing revocation certificates, which may not reach all parties.
Metadata Exposure: GPG encrypts message content but not metadata (sender, recipient, timestamps), potentially revealing communication patterns.
Key Compromise: If a private key is compromised, all past messages encrypted to that key are vulnerable (no forward secrecy).
Implementation Vulnerabilities: Like all complex cryptographic software, GPG has had security vulnerabilities requiring patches and updates.
No Built-in Key Rotation: GPG lacks automated key rotation mechanisms, requiring manual processes that are error-prone.
Centralized Key Servers: While the web of trust is decentralized, key distribution often relies on centralized key servers that can be compromised or censored.
Limited Scalability: The web of trust model doesn't scale well to large organizations or global systems, as trust relationships must be manually established.
GNU Privacy Guard represents a foundational implementation of public-key cryptography that has enabled secure communications for millions of users over more than two decades. While modern systems like KERI address many of GPG's architectural limitations through innovations like pre-rotation, verifiable data structures, and witness-based validation, GPG's core concepts—self-certifying identifiers, decentralized trust, and cryptographic authentication—remain fundamental to understanding contemporary decentralized identity systems.
For developers working with KERI and related protocols, familiarity with GPG provides valuable context for understanding the evolution of cryptographic identity systems and the design decisions that led to KERI's architecture. GPG's strengths in encryption and signing operations complement KERI's focus on identifier management and key event verification, suggesting potential integration opportunities in comprehensive security architectures.
KERI Integration: While GPG and KERI serve different purposes, they can be complementary. GPG provides encryption and signing for data, while KERI provides verifiable identifier management and key event logs. Consider using KERI for identifier establishment and GPG for actual encryption operations.
Hardware Security: Integrate GPG with hardware security modules (Yubikeys, Nitrokeys) for enhanced private key protection, similar to how KERI can leverage secure enclaves and TPMs.
Modern Alternatives: For new systems, consider whether modern alternatives (Age encryption, Signify, or KERI-based solutions) better meet requirements. GPG remains valuable for interoperability with existing PGP infrastructure.