🔐 What is PGP?
PGP (Pretty Good Privacy) is encryption software that uses two keys:
- Public Key: Share with others - they encrypt messages for you
- Private Key: Keep secret - you decrypt messages meant for you
Why DrugHub Requires PGP
- Mandatory PGP Login: Proves you control the private key
- Address Encryption: Shipping addresses must be encrypted
- Secure Communication: Messages with vendors are encrypted
- Signature Verification: Verify you're talking to real admins/vendors
📥 Installing PGP Software
Windows: Kleopatra (Gpg4win)
- Download from official site: gpg4win.org
- Run installer, select "Kleopatra" component
- Complete installation
- Launch Kleopatra from Start Menu
macOS: GPG Suite
- Download from: gpgtools.org
- Run installer package
- Complete installation
- Launch GPG Keychain
Linux: GnuPG (Usually Pre-installed)
# Check if installed
gpg --version
# Install if needed
sudo apt-get install gnupg2
sudo apt-get install kleopatra # GUI
🔑 Generating Your PGP Key Pair
Using Kleopatra (Windows/Linux GUI)
- Open Kleopatra
- Click "New Key Pair" → "Create a personal OpenPGP key pair"
- Fill out form:
- Name: Use pseudonym (e.g., "DrugHubUser2025")
- Email: Fake email or leave blank (e.g., "user@localhost")
- Click "Advanced Settings"
- Set:
- Key Material: RSA
- Key Size: 4096 bits (REQUIRED by DrugHub)
- Valid until: Never expires OR 2+ years
- Click "OK" then "Create"
- Enter strong passphrase (20+ characters, store in password manager)
- Wait for key generation (may take 1-2 minutes)
Using Command Line (Linux)
gpg --full-generate-key
# Select: (1) RSA and RSA
# Key size: 4096
# Expiration: 0 (never) or 2y
# Name: DrugHubUser2025
# Email: user@localhost
# Enter strong passphrase
- Minimum 20 characters
- Mix uppercase, lowercase, numbers, symbols
- NOT related to personal information
- Store in KeePassXC or similar
- If lost, you lose access to account permanently
📤 Exporting Your Keys
Export Public Key (Share with Others)
Kleopatra:
- Right-click your key → "Export"
- OR: Right-click → "Copy" → "Copy Public Key"
- Paste into DrugHub registration form
Command Line:
# List keys to get Key ID
gpg --list-keys
# Export public key
gpg --armor --export YOUR_KEY_ID
Backup Private Key (CRITICAL)
Kleopatra:
- Right-click your key → "Export Secret Keys"
- Save to encrypted USB drive or secure location
- NEVER upload to cloud or email
Command Line:
gpg --armor --export-secret-keys YOUR_KEY_ID > private-key-backup.asc
Storage Recommendations:
- Store on encrypted USB drive
- Use VeraCrypt encrypted container
- Multiple offline backups in separate locations
- Never store on cloud (Dropbox, Google Drive, etc.)
🔒 Encrypting Messages
Encrypting for Others (e.g., Shipping Address for Vendor)
Step 1: Import Recipient's Public Key
Copy vendor's public key from their profile → Kleopatra → "Import" → Paste
Step 2: Encrypt Your Message
Kleopatra:
- Click "Notepad" icon (Encrypt/Decrypt Notepad)
- Type your message (shipping address, etc.)
- Click "Encrypt"
- Select recipient's public key
- Copy encrypted message (starts with
-----BEGIN PGP MESSAGE-----) - Paste into DrugHub order form
Command Line:
# Encrypt file
gpg --encrypt --armor --recipient VENDOR_KEY_ID message.txt
# Or encrypt text directly
echo "Your message here" | gpg --encrypt --armor --recipient VENDOR_KEY_ID
Example Encrypted Shipping Address
-----BEGIN PGP MESSAGE-----
hQIMA+9K7xK3VqPeAQ/+MmxKz7TZG4RI8...(encrypted data)...vC2
=abCD
-----END PGP MESSAGE-----
🔓 Decrypting Messages
Decrypting PGP Login Challenge
When you login to DrugHub, you'll receive an encrypted challenge. Here's how to decrypt it:
Kleopatra:
- Copy the entire encrypted message from DrugHub (including headers)
- Open Kleopatra → Click "Decrypt/Verify"
- Paste the encrypted message
- Enter your PGP passphrase
- Copy the decrypted code (usually 6-8 characters)
- Paste code back into DrugHub login page
Command Line:
# Decrypt from clipboard
gpg --decrypt
(paste encrypted message, press Ctrl+D)
✍️ Signing & Verifying Messages
Why Signatures Matter
Signatures prove a message came from the key owner. Always verify admin/vendor signatures to prevent phishing.
Verifying a Signature
Kleopatra:
- Copy signed message
- Click "Decrypt/Verify"
- Paste message
- Check result: ✓ Valid signature from [Name]
Signing Your Messages
Kleopatra:
- Open notepad, type message
- Click "Sign"
- Select your key
- Enter passphrase
- Copy signed message
📱 Two-Factor Authentication (2FA)
Setup 2FA on DrugHub
- Login to DrugHub
- Navigate to: Settings → Security → Two-Factor Authentication
- Click "Enable 2FA"
- Scan QR code with authenticator app:
- Recommended: Authy, Aegis (Android), Raivo (iOS)
- Avoid: Google Authenticator (no backups)
- Enter 6-digit code to verify
- SAVE BACKUP CODES - Store in password manager
Using 2FA for Login
- Enter username and password
- Decrypt PGP challenge
- Enter 2FA code from authenticator app
- Successfully logged in
🔧 Common PGP Issues
❌ "Invalid PGP Key" on Registration
Cause: Key not 4096-bit or incomplete paste
Solution:
- Verify key is exactly 4096 bits (check advanced settings)
- Ensure entire key including headers copied:
-----BEGIN PGP PUBLIC KEY BLOCK-----to-----END PGP PUBLIC KEY BLOCK----- - Remove extra spaces/line breaks
❌ Can't Decrypt Login Challenge
Causes:
- Wrong private key selected (if you have multiple)
- Incorrect passphrase
- Incomplete encrypted message copied
Solution:
- Verify you're using the same key pair as registration
- Copy entire encrypted block including headers
- Double-check passphrase in password manager
❌ "No secret key" Error
Cause: Private key not imported or missing
Solution:
- Import your private key backup
- Verify key ownership with:
gpg --list-secret-keys
🎯 PGP Best Practices
- ✅ Use 4096-bit RSA keys minimum
- ✅ Create strong 20+ character passphrase
- ✅ Backup private key to multiple offline locations
- ✅ Enable 2FA on DrugHub account
- ✅ Save 2FA backup codes
- ✅ Verify signatures on admin/vendor messages
- ✅ Use different PGP key for DrugHub (don't reuse personal keys)
- ✅ Test encryption/decryption before first order
- ❌ Never share private key
- ❌ Never upload private key to cloud
- ❌ Never email private key
- ❌ Never reuse PGP key from clearnet identity
📚 Advanced PGP Concepts for DrugHub Users
Understanding Key Fingerprints
Every PGP key has a unique fingerprint - a 40-character hexadecimal string that acts as the key's digital identity. On DrugHub Market, fingerprints are critical for verifying vendor and admin authenticity. When you receive a message claiming to be from DrugHub support or a vendor, always compare the signing key's fingerprint against their publicly listed fingerprint on the marketplace.
How to view a key fingerprint in Kleopatra:
- Right-click the key in your keyring
- Select "Details" or "Certificate Details"
- Find the "Fingerprint" field
- Compare character-by-character with the official fingerprint
Example fingerprint format:
4A8B 2C7D 9E1F 3G5H 6J8K 0L2M 3N5P 7Q9R 1S3T 5U7V
Key Trust Levels and the Web of Trust
PGP uses a decentralized trust model called the "Web of Trust." While DrugHub doesn't require you to build an extensive trust network, understanding these concepts helps you evaluate key authenticity:
- Unknown Trust: You haven't verified this key belongs to who it claims
- Marginal Trust: You have some confidence but not full certainty
- Full Trust: You have personally verified this key belongs to the claimed owner
- Ultimate Trust: Your own keys (you trust yourself completely)
For DrugHub operations, treat vendor keys as "Marginal Trust" unless you've verified them through multiple channels (Dread posts, forum signatures, official market listing).
Subkeys and Key Management
Advanced users can create subkeys for different purposes. Your master key pair consists of a primary key used for certification (signing other keys) and subkeys for encryption and signing messages. This separation provides security benefits - if a subkey is compromised, you can revoke it without losing your entire identity.
DrugHub recommendation: For most users, the default key generation creates appropriate subkeys automatically. Only modify subkey settings if you understand the implications fully.
🏗️ PGP Security Architecture on DrugHub
How DrugHub Implements PGP Authentication
DrugHub Market uses PGP for mandatory two-factor authentication during login. This implementation differs from simple password-based systems and provides cryptographic proof that you control the private key associated with your account. The process works as follows:
- Registration: You submit your 4096-bit RSA public key during account creation
- Key Storage: DrugHub stores only your public key (never your private key)
- Login Challenge: When you attempt login, DrugHub encrypts a random challenge code using your public key
- Decryption Proof: Only someone with the corresponding private key can decrypt this challenge
- Verification: Entering the correct decrypted code proves you control the private key
This system prevents several attack vectors common on other marketplaces:
- Phishing resistance: Even if you enter credentials on a fake site, they cannot decrypt your PGP challenge
- Database breach protection: Stolen password hashes are useless without your private key
- Session hijacking prevention: Active sessions require ongoing key possession verification
Encrypted Communication Channels
All sensitive information on DrugHub should be PGP encrypted, including:
- Shipping addresses: Always encrypt with vendor's public key before submission
- Personal information: Never send unencrypted details in messages
- Order notes: Sensitive instructions should be encrypted
- Dispute evidence: Encrypt attachments when privacy is critical
Message Integrity and Non-Repudiation
PGP signatures provide two critical security properties for DrugHub communications:
Integrity: If a signed message is altered in any way, the signature verification fails. This prevents man-in-the-middle attacks where someone intercepts and modifies messages between you and vendors.
Non-repudiation: A valid signature cryptographically proves the message came from the key owner. Vendors cannot deny sending a message they signed, and you cannot deny signing messages with your key. This is essential for dispute resolution.
🛡️ Operational Security with PGP
Secure Key Storage Strategies
Your PGP private key is the most sensitive piece of data in your DrugHub operations. Proper storage prevents account takeover and protects your transaction history:
Hardware Security Keys
For maximum security, consider storing your PGP key on a hardware security device like YubiKey or Nitrokey. These devices:
- Never expose your private key to the computer
- Perform cryptographic operations on-device
- Require physical presence for signing/decryption
- Protect against malware-based key theft
Air-Gapped Systems
Advanced users may maintain their private key on a computer that never connects to the internet. Messages are transferred via USB for decryption. While complex, this approach provides strong isolation from network-based attacks.
Encrypted Containers
At minimum, store your key backup in an encrypted container:
- VeraCrypt: Create encrypted volume on USB drive
- LUKS: Linux unified key setup for full disk encryption
- BitLocker: Windows built-in encryption (use with TPM)
Key Rotation and Expiration
Security best practices recommend periodic key rotation. However, on DrugHub this presents challenges since your account is tied to your key. Consider these approaches:
- Long-term key with strong security: Use a key that never expires, but protect it extremely well
- Periodic account migration: Create new account with new key every 1-2 years
- Subkey rotation: If using subkeys, rotate encryption subkey while maintaining master key
Emergency Procedures
Plan for potential security incidents:
If You Suspect Key Compromise:
- Immediately login to DrugHub and change all security settings
- Withdraw any funds to a secure wallet
- Contact DrugHub support to flag your account
- Generate new key pair on a clean system
- Create new DrugHub account with new key
- Revoke the compromised key (generate revocation certificate beforehand)
💬 PGP for Vendor Communication
Encrypting Shipping Addresses
One of the most critical uses of PGP on DrugHub is encrypting your shipping address. This ensures that only the intended vendor can read your delivery details:
- Navigate to the vendor's profile page on DrugHub
- Locate and copy their PGP public key
- Import the key into Kleopatra or your PGP software
- Verify the key fingerprint matches what's displayed on their profile
- Compose your address in a text file or Kleopatra's notepad
- Encrypt the text using the vendor's public key
- Paste the encrypted message into DrugHub's order form
Example encrypted shipping address format:
-----BEGIN PGP MESSAGE-----
hQIMA+9K7xK3VqPeAQ/+N2FbzP3vG8... (encrypted data)
=XXXX
-----END PGP MESSAGE-----
Verifying Vendor Identity
Before placing orders, especially with new vendors, verify their PGP key authenticity:
- Check if the vendor has posted their key on Dread or other forums
- Compare fingerprints across multiple sources
- Look for signed messages from the vendor proving key ownership
- Be suspicious if a vendor's key suddenly changes without announcement
Secure Message Templates
For efficiency, create message templates that you encrypt before each use:
--- SHIPPING INFO ---
Name: [Full Name]
Street: [Street Address]
City: [City]
State/Province: [State]
Postal Code: [ZIP/Postal]
Country: [Country]
Phone (optional): [Phone]
Special Instructions: [Notes]
---
❓ Frequently Asked Questions
Q: Why does DrugHub require 4096-bit keys specifically?
A: 4096-bit RSA keys provide security margins well into the 2030s against known attack methods. While 2048-bit keys remain technically secure, DrugHub enforces 4096-bit to ensure long-term protection of user accounts and encrypted communications.
Q: Can I use elliptic curve keys instead of RSA?
A: Currently, DrugHub requires RSA keys. While Ed25519 and other elliptic curve algorithms offer equivalent security with smaller key sizes, RSA remains the standard for maximum compatibility. Future updates may support additional algorithms.
Q: How do I know if my PGP software is secure?
A: Use only well-audited, open-source implementations: GnuPG (command line), Kleopatra (Gpg4win GUI), or GPG Suite (macOS). Avoid online PGP tools or browser extensions - these can leak your private key.
Q: What happens if I lose my PGP passphrase?
A: Without your passphrase, your private key is unusable. This means you cannot login to DrugHub or decrypt any messages. There is no recovery - you must create a new DrugHub account with a new key pair. Store your passphrase in a password manager.
Q: Should I sign my messages to vendors?
A: Signing is optional but recommended for important communications. It proves the message came from you and wasn't modified. For routine orders, encryption alone is sufficient.
Q: How long does PGP encryption add to the ordering process?
A: Once you're familiar with your PGP software, encrypting a shipping address takes under 30 seconds. The security benefits far outweigh this minimal time investment.