PGP Encryption: Complete Guide
15 min read
PGP (Pretty Good Privacy) is essential for secure communications on the dark web. This guide covers everything you need to know about generating keys, encrypting messages, verifying signatures, and using PGP safely.
What is PGP?
PGP is an encryption program that provides cryptographic privacy and authentication for data communication. It uses a combination of symmetric-key cryptography and public-key cryptography (asymmetric encryption) to secure messages.
How PGP Works
PGP uses a public-key cryptosystem:
- Public Key: Shared openly — used to encrypt messages sent to you
- Private Key: Kept secret — used to decrypt messages sent to you and to sign your messages
When someone wants to send you an encrypted message, they use your public key to encrypt it. Only your private key can decrypt it. Similarly, you use your private key to sign messages, and others use your public key to verify the signature.
Generating Your PGP Key Pair
Using GnuPG (GPG) on Linux/macOS
# Install GPG
# macOS: brew install gnupg
# Linux: sudo apt install gnupg (Debian/Ubuntu)
# Generate a new key pair
gpg --full-generate-key
# Follow the prompts:
# 1. Key type: RSA and RSA (default)
# 2. Key size: 4096 bits (recommended)
# 3. Key expiration: 0 = key does not expire
# 4. Enter your name (use an alias, not real name)
# 5. Enter your email (use a secure email, not personal)
# 6. Set a strong passphrase
Exporting Your Public Key
# List your keys
gpg --list-keys
# Export your public key (replace KEY_ID with your key ID)
gpg --armor --export KEY_ID > publickey.asc
Backing Up Your Private Key
# Export your private key (Important: keep this secure!)
gpg --armor --export-secret-keys KEY_ID > privatekey.asc
# Also export the trust database
gpg --export-ownertrust > trustdb.txt
Encrypting Messages
Encrypting a Message for Someone Else
# Import their public key first
gpg --import their_public_key.asc
# Encrypt a file
gpg --armor --encrypt --recipient [email protected] message.txt
# This creates message.txt.asc (encrypted)
Decrypting a Message Sent to You
# Decrypt a message
gpg --decrypt message.txt.asc > decrypted_message.txt
Signing Messages
Signing Your Own Messages
# Sign a message (clear text signature)
gpg --armor --clearsign message.txt
# This creates message.txt.asc with your signature
Verifying Signatures
# Verify a signed message
gpg --verify message.txt.asc
Using PGP on the Dark Web
PGP 2FA (Two-Factor Authentication)
Many darknet markets require PGP 2FA for account security. Here's how it works:
- Generate a PGP key pair
- Upload your public key to the market
- The market will encrypt a code with your public key
- Decrypt the code with your private key to log in
Best Practices for Dark Web PGP Use
- Don't share your private key — it's the secret that protects your identity
- Use a strong passphrase — at least 20 characters with mixed case, numbers, and symbols
- Back up your private key securely — store it encrypted on a USB drive or offline
- Use 4096-bit keys — provides strong security
- Don't use real identifying information — use aliases and secure email addresses
- Verify keys independently — cross-check public keys from multiple sources
PGP Tools
Command Line (GPG)
- GnuPG (GPG): The standard open-source PGP implementation
- Cross-platform (Linux, macOS, Windows)
- Most powerful and flexible option
Graphical Interfaces
- Kleopatra: Windows GUI for GPG (included with Gpg4win)
- GPG Suite: macOS GUI for GPG
- Thunderbird + Enigmail: Email encryption plugin
Browser Extensions
- Mailvelope: Browser extension for webmail PGP encryption
- FlowCrypt: Chrome extension for Gmail encryption
Common PGP Commands Reference
# Generate key
gpg --full-generate-key
# List public keys
gpg --list-keys
# List private keys
gpg --list-secret-keys
# Import public key
gpg --import keyfile.asc
# Export public key
gpg --armor --export KEY_ID
# Encrypt file
gpg --armor --encrypt -r recipient@email file.txt
# Decrypt file
gpg --decrypt file.txt.asc
# Sign file
gpg --armor --clearsign file.txt
# Verify signature
gpg --verify file.txt.asc
# Delete key
gpg --delete-key KEY_ID
Troubleshooting
"No secret key" Error
This means you're trying to decrypt or sign with a key that's not in your keyring. Import your private key:
gpg --import privatekey.asc
"Bad signature" Note
This indicates the signature doesn't match the message or the key. Don't trust the message — verify the key source.
Forgot Passphrase
There's no way to recover a lost passphrase. You'll need to generate a new key pair. This is why backing up is important.
Security Considerations
- Key Size: Use 4096-bit keys for maximum security
- Passphrase Strength: Use a passphrase you won't forget but can't be guessed
- Key Expiration: Consider setting keys to expire (1-2 years) and rotate them
- Revocation Certificates: Generate a revocation certificate in case you need to invalidate your key
- Hardware Security: For high-security needs, consider hardware tokens like YubiKey
Conclusion
PGP is an essential tool for secure communications on the dark web. Take the time to generate strong keys, back them up securely, and practice using PGP before you need it for sensitive communications.