🔐 PGP Encrypt / Decrypt – Browser-Based OpenPGP Tool
PGP (Pretty Good Privacy) is the gold standard for end-to-end encrypted communication. This tool implements the OpenPGP standard (RFC 4880) entirely in your browser using the OpenPGP.js library — the same engine trusted by Proton Mail. No messages or keys are ever transmitted to a server.
🔑 How Asymmetric Encryption Works
PGP uses asymmetric (public-key) cryptography. Every user has two mathematically linked keys:
| Key | Purpose | Share? |
|---|---|---|
| Public Key | Encrypt messages for you; verify your signatures | ✅ Share publicly |
| Private Key | Decrypt messages sent to you; sign outgoing messages | 🔒 Keep secret |
Under the hood, PGP uses hybrid encryption: a random symmetric session key (AES-256) encrypts the actual message for speed, then the recipient's public key encrypts the session key. This combines the performance of symmetric encryption with the key-distribution convenience of asymmetric cryptography.
📋 Available Modes
Encrypt a plaintext message using a recipient's public key.
Decrypt a PGP message block using your private key and passphrase.
Encrypt the message AND attach your digital signature for authenticity.
Decrypt a signed message and confirm the sender's identity via their public key.
🛡️ Supported Algorithms
| Algorithm | Key Sizes | Usage |
|---|---|---|
RSA | 2048, 3072, 4096 bits | Encrypt, Decrypt, Sign, Verify |
ECDH (Curve25519) | 256-bit | Encrypt, Decrypt |
EdDSA (Ed25519) | 256-bit | Sign, Verify |
ECDSA (P-256/P-384) | 256–384-bit | Sign, Verify |
📝 Key Compatibility
This tool accepts ASCII-armored OpenPGP keys — the text blocks that begin with -----BEGIN PGP PUBLIC KEY BLOCK-----. These are generated by:
- GPG / GnuPG:
gpg --armor --export [email protected] - Kleopatra (Windows / macOS GUI for GPG)
- Proton Mail — exported from Settings → Account → Keys
- Keybase, Mailvelope, and other OpenPGP clients
✍️ Digital Signatures
When you sign a message with your private key, the recipient can use your public key to verify that:
- The message was authored by the holder of the private key (authentication)
- The message content has not been altered in transit (integrity)
Signatures use EdDSA (Ed25519) for ECC keys or RSA-PSS / RSA-PKCS#1 v1.5 for RSA keys, producing a compact fingerprint that is embedded in the encrypted PGP block.
🔍 Key Inspector
Paste any public or private key and the tool automatically extracts its metadata: algorithm, key size / curve, key fingerprint, creation date, expiry date, and all associated User IDs (name / email). Expired or revoked keys are flagged with a warning so you can take action before attempting to encrypt.
💡 Common Use Cases
- Secure email — encrypt sensitive emails before sending through unencrypted providers.
- Secret sharing — securely share passwords, API keys, or credentials with team members.
- Key pair verification — confirm that a public/private key pair matches before deploying them.
- Learning OpenPGP — understand how asymmetric encryption and digital signatures work in practice.
- GPG equivalent:
echo "message" | gpg --encrypt --armor -r [email protected]