PGP Key Pair Generator

Generate secure PGP (Pretty Good Privacy) key pairs for email encryption, digital signatures, and secure communication. Compatible with GPG and OpenPGP standards.

User Identity

Key Configuration

How to Use Your PGP Keys

1. Import Keys into GPG

Save your keys to files and import them into your GPG keyring:

$gpg --import public-key.asc
$gpg --import private-key.asc
$gpg --list-secret-keys --keyid-format LONG

2. Encrypt a Message

Encrypt a message for someone using their public key:

$echo 'Secret message' | gpg --encrypt --armor --recipient [email protected]
$gpg --encrypt --armor --recipient [email protected] message.txt

The encrypted output can be safely sent via email or any insecure channel.

3. Decrypt a Message

Decrypt messages sent to you:

$gpg --decrypt encrypted-message.asc
$echo '-----BEGIN PGP MESSAGE-----...' | gpg --decrypt

4. Sign a Message

Create a digital signature to verify message authenticity:

$gpg --clearsign message.txt
$echo 'Important message' | gpg --clearsign
$gpg --detach-sign --armor document.pdf

5. Verify Signatures

Verify the authenticity of signed messages:

$gpg --verify signed-message.asc
$gpg --verify document.pdf.asc document.pdf

6. Export and Share Keys

Share your public key with others:

$gpg --export --armor [email protected] > public-key.asc
$gpg --send-keys --keyserver keyserver.ubuntu.com YOUR_KEY_ID
$gpg --search-keys [email protected]

Email Client Integration Examples

Thunderbird Setup

  1. Install Thunderbird and set up your email account
  2. Go to Tools → Account Settings → End-to-End Encryption
  3. Click "Add Key" → "Import a personal key from file"
  4. Select your private key file and enter passphrase
  5. Enable "Digital signing" and "Require encryption" as needed

Mailvelope (Web)

  1. Install Mailvelope browser extension
  2. Open Mailvelope Options → Key Management
  3. Click "Import Keys" and paste your private key
  4. Add your email accounts to Mailvelope
  5. Compose encrypted emails directly in your webmail

Apple Mail (macOS)

  1. Import your key into GPG Suite for macOS
  2. Open Apple Mail preferences
  3. Go to Accounts → Select account → Advanced
  4. Enable "Encrypt outgoing mail" and "Sign outgoing mail"
  5. Mail will automatically use your PGP key

Outlook with Gpg4win

  1. Install Gpg4win (includes Kleopatra key manager)
  2. Import your key using Kleopatra
  3. Install GpgOL plugin for Outlook integration
  4. Restart Outlook and look for encryption options
  5. Use encrypt/sign buttons when composing emails

Real-World Use Cases & Examples

🏢 Business Communication

Secure client communications and confidential documents:

# Encrypt contract for client review
gpg --encrypt --armor --recipient [email protected] contract-v2.pdf
# Sign press release for authenticity
gpg --clearsign --local-user [email protected] press-release.txt

💻 Software Development

Sign git commits and release packages:

# Configure git to sign commits
git config --global user.signingkey YOUR_KEY_ID
git config --global commit.gpgsign true
# Sign a software release
gpg --detach-sign --armor myapp-v1.2.3.tar.gz

🏥 Healthcare & Legal

HIPAA-compliant communication and legal document verification:

# Encrypt patient records for transfer
gpg --cipher-algo AES256 --encrypt --recipient [email protected] patient-file.pdf
# Sign legal document with timestamp
gpg --clearsign --local-user [email protected] legal-brief.txt

🔒 Personal Privacy

Secure personal communications and file backup:

# Encrypt backup files
tar czf - important-docs/ | gpg --symmetric --cipher-algo AES256 > backup.tar.gz.gpg
# Secure email to family member
echo "Family news..." | gpg --encrypt --armor --recipient [email protected]

About PGP Encryption

Pretty Good Privacy (PGP) is a data encryption and decryption program that provides cryptographic privacy and authentication for data communication. PGP uses a combination of symmetric-key cryptography and public-key cryptography.

Key Features

  • • End-to-end encryption for emails
  • • Digital signatures for authenticity
  • • Key distribution and management
  • • Cross-platform compatibility
  • • Open source implementations (GPG)

Use Cases

  • • Secure email communication
  • • File encryption and signing
  • • Software distribution verification
  • • Secure messaging applications
  • • Document authentication

Algorithm Comparison

AlgorithmKey SizePerformanceSecurity LevelRecommended For
RSA 20482048 bitsFastGoodGeneral use, compatibility
RSA 40964096 bitsSlowerExcellentLong-term security
ECC P-256256 bitsVery FastGoodMobile, IoT devices
ECC P-384384 bitsFastExcellentHigh security applications

Frequently Asked Questions

What is the difference between RSA and ECC keys?

RSA keys are widely supported and use larger key sizes (2048-4096 bits). ECC keys are newer, more efficient, and provide equivalent security with smaller key sizes (256-384 bits). Choose RSA for maximum compatibility, ECC for better performance.

How do I use the generated PGP key?

Import your keys into GPG using gpg --import. For email, configure your email client (Thunderbird, Apple Mail) or use browser extensions like Mailvelope for webmail. Always keep your private key secure and never share it.

Should my PGP key expire?

Yes, setting an expiration date is recommended for security. You can always extend the expiration later if needed. If you lose access to your key, expiration prevents it from being used indefinitely. Choose 1-2 years for personal use, shorter for high-security contexts.

Is it safe to generate keys in a browser?

Our generator runs entirely in your browser using secure Web Crypto APIs, and keys never leave your device. However, for highest security, use offline tools like GPG on an air-gapped computer, especially for keys protecting sensitive data.

What should I do with the revocation certificate?

Store your revocation certificate in a safe place separate from your private key. If your private key is ever compromised or lost, you can use the revocation certificate to notify others that the key should no longer be trusted.

Can I use PGP for file encryption, not just email?

Absolutely! PGP can encrypt any type of file or data. Use gpg --encryptto encrypt files, documents, backups, or any sensitive data. Many backup tools and applications also support PGP encryption natively.

Security Notice

Your private key is generated entirely in your browser and never sent over the network. However, for maximum security when generating keys for real use, use offline tools like GPG on an air-gapped computer. Store your private key and revocation certificate securely - losing them means losing access to encrypted data.