Utilia

PGP Key Generator and Encryption

Generate OpenPGP keys (Curve25519 or RSA 4096), encrypt, decrypt, sign and verify PGP messages in your browser. Keys and messages never leave your device.

Keys, messages and passphrases stay in your browser: this tool runs OpenPGP locally and never sends anything. Close the page when you are done.

Action

How to use the PGP key generator

  1. Under Generate keys, enter a Name and/or an Email, choose a Passphrase (protects the private key) and type it again in Confirm the passphrase.
  2. Pick a Key type: ECC Curve25519 (recommended), RSA 3072 bits or RSA 4096 bits, then click Generate key pair. RSA keys take a few seconds.
  3. Check the User ID, Key ID and Fingerprint, then use Download public key (.asc), Download private key (.asc) and Download revocation certificate. Nothing is stored: save the files before leaving the page.
  4. To send a secret message, open Encrypt, paste the Recipient public key(s) (several blocks are allowed), type the Message and click Encrypt. Tick Also sign with my private key to prove that you wrote it.
  5. To read a message sent to you, open Decrypt, paste the Encrypted message, Your private key and its passphrase, and click Decrypt. Add the Sender public key to check its signature.
  6. Sign creates a cleartext signature that anyone can read; Verify checks it against the Signer public key.

A freshly generated key pair is also filled into the other tabs, so you can try the whole cycle at once.

How PGP encryption works

PGP (standardised as OpenPGP in RFC 4880 and its update RFC 9580) uses a pair of keys. The public key can be shared with anyone: it encrypts messages to you and verifies your signatures. The private key stays with you: it decrypts those messages and creates signatures. Each message is actually encrypted with a random session key (AES), and only that small session key is encrypted with the recipients’ public keys, which is why one message can be addressed to several people.

The fingerprint is a hash of the public key. Compare it with your correspondent over another channel (in person, by phone) before trusting a key you received by email: this is what protects you against a swapped key. The Key ID is simply the last 16 hexadecimal characters of the fingerprint.

Which key type should I choose?

  • ECC Curve25519 creates an Ed25519 signing key with a Curve25519 (X25519) encryption subkey. Keys are small, fast and as strong as RSA 3072. This version 4 format is supported by GnuPG 2.2 and later, Thunderbird, Proton Mail and the other current OpenPGP clients.
  • RSA 3072 / 4096 is the choice for very old software that does not know elliptic curves. 4096 bits brings a small margin over 3072 at the cost of larger keys and slower operations.

Security tips and limits

  • The tool runs the open-source OpenPGP.js library inside your browser. Keys, messages and passphrases are never uploaded, and the library is only loaded when you click a button.
  • Choose a long passphrase: the private key file is encrypted with it, and it is your last line of defence if the file is copied.
  • Keep the revocation certificate offline. If your private key is lost or stolen, importing it tells other people that the key must no longer be used.
  • A browser page is convenient but not a hardened environment: for long-term, high-value keys, generate them offline with GnuPG on a trusted computer.
  • This tool handles text messages. It does not manage a keyring, key servers, expiry dates or file encryption.

Frequently asked questions

Are my private key and messages sent to a server?

No. Everything, including key generation, runs locally with JavaScript in your browser. You can even disconnect from the Internet after the page has loaded and the library has been used once.

Can I use the keys with GnuPG or Thunderbird?

Yes. The downloaded .asc files are standard ASCII-armored OpenPGP keys. Import them with gpg --import file.asc or through the OpenPGP key manager of Thunderbird.

What happens if I forget the passphrase?

The private key cannot be unlocked and messages encrypted to it cannot be read any more. There is no recovery: publish your revocation certificate and create a new key.

Why does the decrypted message say the signature was not checked?

The message is signed, but the tool needs the sender’s public key to verify it. Paste it in Sender public key and decrypt again.

What is the difference between signing and encrypting?

Encryption hides the content so that only the recipients can read it. A signature leaves the text readable but proves who wrote it and that it was not modified. Encrypt can do both at once.