b2KIT

PGP Encrypt / Decrypt Messages

Encrypt messages with a PGP public key and decrypt with the private key. Supports ASCII-armored input and output.

Tested tool guide Tested browser tools Checked August 16, 2026

What PGP Encrypt / Decrypt Messages does and how it behaves

PGP (Pretty Good Privacy) encrypts a message so only the holder of the matching private key can read it. Paste the recipient's public key and your plaintext, and the tool returns an ASCII-armored PGP message: base64 text wrapped in -----BEGIN PGP MESSAGE----- and -----END PGP MESSAGE----- markers, safe to send by email, chat, or a bug tracker. To decrypt, paste an armored message and the matching private key, supplying the passphrase if the key is protected. Everything runs in the browser; keys and plaintext are never uploaded. The most common failure: encrypting to the wrong public key, then discovering the message can only be opened by someone else.

How the result is produced

1

Hybrid encryption

Encryption is hybrid. A fresh random session key is generated for the message, the plaintext is encrypted with that symmetric key, and the session key itself is then wrapped with the recipient's public key using its RSA or ECC algorithm. The binary packet is base64-encoded and framed in ASCII armor with begin/end markers and the format's closing CRC24 checksum line, so the result survives copy-paste through email and chat.

2

Decryption

Decryption reverses the process. The armored block is parsed back to binary packets, the session key is unwrapped using the private key, and the message body is decrypted with it. If the private key is passphrase-protected, the passphrase is required. A key that does not match the public key used at encryption, a wrong passphrase, or a truncated armor block all end the same way: no plaintext.

Good uses

  • Send a secret to someone who has published a public key: paste their key, enter the plaintext, and send the armored output by email or chat instead of the readable message.
  • Prove your own keypair works before relying on it: encrypt a test note to your own public key, then decrypt it with your own private key and passphrase.
  • Open a message someone encrypted to your public key: paste the armored block you received together with your private key to recover the plaintext.

Limits and checks

  • The armor must be complete. Decryption needs the whole block, including the -----END PGP MESSAGE----- line and the '=xxxx' checksum line after it; copying only the base64 interior, or letting a mail client rewrap the lines, is the usual way a pasted message fails to decrypt.
  • Encryption does not identify the sender. Anyone holding the recipient's public key can create a message that decrypts successfully, so a successful decryption does not mean the message came from the person it claims. Proving who wrote it requires a signature, which this tool does not create or verify.
  • Encrypting the same message twice never produces the same armored output: each run uses a fresh random session key. Different ciphertext for identical input is normal, so outputs cannot be compared to check correctness. To verify, decrypt the copy you actually send rather than the one you just generated.

Common questions

I encrypted a message but my own private key will not decrypt it. What went wrong?

Almost certainly you encrypted with the wrong public key, most commonly your own. A message can only be decrypted with the private key that matches the public key used at encryption time; if you encrypted to someone else's key, only they can open it. To test your setup, encrypt to your own public key, then decrypt with your own private key.

Is it safe to paste my private key into a web page?

The page runs entirely in the browser: the key and the message are processed locally and never uploaded to a server. Pasting a private key into any web page still carries risk: clipboard history and browser history can retain it, and a compromised browser could read it. If a pasted key may have been exposed, treat it as compromised: stop using it and create a new keypair.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools