What PGP Actually Is
- Encrypting data (emails, files, backups)
- Digitally signing data (proving authenticity and integrity)
- Managing keys (public/private keypairs)
- Asymmetric encryption (public/private keys) to exchange a session key
- Symmetric encryption (fast algorithms like AES) to encrypt the actual data
How PGP Works (Step-by-Step)
1. Keypair creation
You generate:
- A public key (shared with the world)
- A private key (kept secret)
- The sender encrypts the message using your public key
- Only your private key can decrypt it
- The sender signs the message with their private key
- Anyone can verify the signature using the sender’s public key
- Confidentiality (only the intended recipient can read it)
- Integrity (message wasn’t altered)
- Authentication (you know who sent it)
- Non‑repudiation (sender can’t deny sending it)
Unlike centralized systems (like SSL certificates), PGP uses a decentralized trust model:
- People sign each other’s public keys
- Trust spreads through a network of signatures
- You decide who you trust and to what degree
Enter GPG: The Free, Open‑Source PGP
Gnu Privacy Guard (GPG or GnuPG) is the free, open‑source implementation of the OpenPGP standard (RFC 4880). It’s the de facto standard today.
What GPG provides:
- Full PGP-compatible encryption and signing
- Key generation and management
- Support for modern algorithms (RSA, ECC, AES, SHA‑2, etc.)
- Integration with email clients (Thunderbird, Outlook via plugins)
- Command-line tools for scripting and automation
- Completely free
- Open-source and audited
- Cross-platform (Linux, macOS, Windows)
- Backed by decades of development
Encrypt a file
Code
gpg -e -r recipient@example.com file.txt
Decrypt a file
Code
gpg -d file.txt.gpg
Sign a file
Code
gpg --sign file.txt
Verify a signature
Code
gpg --verify file.txt.sig
Generate a keypair
Code
gpg --full-generate-key
These commands are just examples — GPG is extremely powerful and scriptable.
PGP vs GPG (Quick Comparison)
Why PGP/GPG Still Matters Today
Even with modern tools like Signal, TLS, and encrypted messaging apps, PGP/GPG remains essential for:
- Secure email
- Verifying software releases
- Signing Git commits
- Protecting backups
- Secure communication in organizations
- Identity verification in open-source communities

