Hashes/Crypto

PGP/GPG Encrypt/Decrypt

Generate PGP keys, encrypt and decrypt messages (OpenPGP, RFC 4880) via the openpgp.js library.


                        

                        

PGP/OpenPGP (RFC 4880) uses a key pair — public and private — for end-to-end message encryption and digital signatures. This tool generates keys and encrypts/decrypts messages using the openpgp.js library, right in your browser.

How to use it

Common uses

Things to keep in mind

A public key can be shared freely — it's exactly what others need to encrypt a message for you; a private key must never be shared with anyone.

Losing a private key with no backup means old messages can never be decrypted again — that's why creating a revocation certificate right after generating a key is worth doing immediately.

Article about this tool: PGP: how public-key and private-key encryption works

Frequently asked questions

What's the difference between encrypting and signing with PGP?

Encrypting scrambles a message so only the intended recipient's private key can read it, using their public key. Signing does the opposite — it uses your private key to prove the message came from you and wasn't altered, verifiable by anyone with your public key.

Do I need to trust this tool with my private key?

All key generation, encryption, decryption, and signing happen entirely in your browser — your private key is never sent to a server. Still, treat any private key you paste here with the same care as anywhere else.

What's the difference between RSA and ECC keys here?

RSA is the older, more widely supported option, typically requiring longer keys (2048+ bits) for equivalent security. ECC (elliptic curve) achieves similar security with much shorter keys, making it faster, though slightly less universally supported by older software.

What is the Web of Trust and how does it differ from X.509?

Unlike X.509, where trust is guaranteed by a centralized certificate authority, PGP relies on a "Web of Trust": users sign each other's public keys themselves, confirming they've personally verified who a key belongs to. Trust in an unfamiliar key arises through a chain of signatures from people you already trust.

What happens if I lose my private key?

Without your private key, you can't decrypt messages encrypted for you or sign anything in your name — the key can't be recovered without a backup. That's why creating a revocation certificate right after generating a key is an important practice.

Articles: Hashes/Crypto

Hash Generator: how MD5, SHA-1, and SHA-256 differ from each other

Why MD5 is still used to verify file integrity, but not for passwords.

Checksum Verifier: how to check that a file isn't corrupted

Why a matching checksum confirms a file's integrity, but not who created it.

HMAC: how a keyed hash differs from a regular hash

Why a plain SHA-256 doesn't protect against message tampering, but HMAC does.

Bcrypt: why passwords are hashed slowly, not quickly

Why fast SHA-256 is a bad choice for passwords, and slow bcrypt is the right one.

UUID: how identifiers that almost never repeat are generated

Why UUID v4 can be generated independently on millions of machines without collision risk.

Password Generator: what actually makes a password strong

Why a long dictionary-word password is stronger than a short one with symbols and digits.

AES: how symmetric encryption works

Why the same key both encrypts and decrypts data in AES, and how that differs from asymmetric encryption.

Argon2: why this algorithm won the password hashing competition

How Argon2 defends better against GPU-based attacks than older password hashing algorithms.

Scrypt: why the algorithm needs so much memory

Why scrypt deliberately demands a lot of memory to make cracking on ASIC devices harder.

TOTP: how one-time codes in authenticator apps work

Why the code in Google Authenticator works offline and syncs with the server only via time.

PBKDF2: the oldest key-stretching standard

Why the recommended PBKDF2 iteration count keeps growing every year.

X.509: what's inside an SSL certificate

What exactly the browser checks in a site's certificate before showing the green padlock.