PGP Key Generator

RSA 2048/4096 PGP keys in-browser โ€” need encrypt/decrypt? PGP Tool โ†’
OpenPGP RFC 4880 RSA 2048-4096 Python Compiler No Data Stored
โœ๏ธ

Your Message

Type or paste your secret message

๐Ÿ’ก Only the recipient with the matching private key can decrypt this message
๐Ÿ”‘

Recipient's Public Key

Paste recipient's public key block

๐Ÿ“จ

Encrypted Message

Paste the PGP message block

โš ๏ธ Include the complete message including BEGIN/END markers
๐Ÿ”

Your Credentials

Your private key to decrypt

Private key passphrase

๐Ÿ”‘

Generate PGP Key Pair

Name or email address (e.g., [email protected])

Protects the private key (min 8 characters recommended)

๐Ÿ’ก Keys are generated server-side via CSRNG and never stored. Save the private key locally โ€” losing it means losing access.
๐Ÿ”

Decode PGP Packet Structure

Paste a public/private key, PGP message, or signature block. The server parses it per RFC 4880 and shows packet tags, algorithms, key sizes, and fingerprints.

๐Ÿ’ก Accepted blocks: PGP PUBLIC KEY BLOCK, PGP PRIVATE KEY BLOCK, PGP MESSAGE, PGP SIGNATURE.
๐Ÿ”‘

Generated Keys

RSA Key Generation
1
Prime Generation - Two large random primes (p, q)
2
Modulus - Compute n = p ร— q
3
Key Pair - Public (e, n) + Private (d, n)
4
OpenPGP Wrap - RFC 4880 armored format
5
Passphrase Lock - Private key encrypted with S2K

Enter identity, passphrase, select options, and click Generate.

Python Compiler

Cryptographic Key Generation Methodology

This tool generates PGP key pairs using the RSA (Rivest-Shamir-Adleman) public-key cryptosystem following the OpenPGP standard (RFC 4880) with Bouncy Castle cryptographic library.

RSA Key Generation Steps:

  1. Prime Generation: Two large random primes (p and q) generated using CSRNG
  2. Modulus Calculation: n = p ร— q (key size determines bit length)
  3. Totient Function: ฯ†(n) = (p-1)(q-1)
  4. Public Exponent: e = 65537, where gcd(e, ฯ†(n)) = 1
  5. Private Exponent: d โ‰ก eยน (mod ฯ†(n))
  6. Key Packaging: Formatted per OpenPGP standard (RFC 4880) in ASCII-armored output

Cipher Algorithm Comparison:

Algorithm Block Size Key Size Security
AES-256128 bits256 bitsHighest (recommended)
AES-192128 bits192 bitsHigh
AES-128128 bits128 bitsHigh
TWOFISH128 bits256 bitsHigh
BLOWFISH64 bits32-448 bitsMedium (legacy)
CAST564 bits128 bitsMedium
TRIPLE_DES64 bits168 bitsMedium (legacy)

Authorship & Expertise

  • Author: Anish Nath
  • Background: Security engineer, 15+ years in cryptographic implementations
  • Standards: RFC 4880, NIST SP 800-57, FIPS 140-2
  • Library: Bouncy Castle - peer-reviewed Java crypto provider

Trust & Privacy

  • No Data Retention: Keys never stored or logged
  • HTTPS Only: TLS 1.2+ encryption
  • CSRNG: /dev/urandom with hardware RNG support
  • Compatibility: GnuPG, OpenKeychain, Mailvelope, Thunderbird
Security Disclaimer: For maximum security with highly sensitive applications, consider using offline tools like GnuPG on air-gapped systems. Never share your private key or forget your passphrase - encrypted data cannot be recovered.

Frequently Asked Questions

RSA key size determines security strength and computational cost. 1024-bit keys are weak and vulnerable to modern attacks. 2048-bit keys are the current standard, providing strong security with reasonable performance. 4096-bit keys offer maximum security and future-proofing but require more resources. For new keys, use 2048-bit minimum, 4096-bit for long-term sensitive data.
Choose AES-256 for maximum security (256-bit key). AES-192 and AES-128 are also strong. TWOFISH is a good alternative with 256-bit security. BLOWFISH, CAST5, and TRIPLE_DES are legacy - use only for compatibility with older systems.
This tool has zero data retention - keys are never logged or stored. Generation uses CSRNG over HTTPS. For highly sensitive applications, consider offline tools like GnuPG on air-gapped computers.
Save your private key securely (never share it). Share your public key via keyservers (keys.openpgp.org). Test keys using the PGP Encrypt/Decrypt tool. Generate and store a revocation certificate. Verify fingerprints when exchanging keys.
Yes. Keys follow OpenPGP standard (RFC 4880) and are compatible with GnuPG, PGP Desktop, OpenKeychain, Mailvelope, and Thunderbird/Enigmail. Keys are in ASCII-armored format, universally supported.
Use the pgpy library. This tool includes a built-in Python compiler with key generation templates. Click Try It Live in the output panel to generate PGP keys with Python code directly in your browser.
Use at least 16 characters with mixed case, numbers, and symbols. If you forget your passphrase, encrypted data cannot be recovered - there is no backdoor or reset mechanism. Use the built-in passphrase generator for cryptographically secure random passphrases.

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site โ€” you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.

๐Ÿ“ง Email PGP Key Pair

Your PGP keys will be sent to this email address.