Privacy and Security

PGP for Beginners: Encrypt, Sign and Verify Messages

A plain introduction to PGP: public and private keys, fingerprints, encrypting and signing messages and files, and verifying downloads.

Saizul Amin
Saizul Amin2 Nov 2026 · 3 min read
PGP for Beginners: Encrypt, Sign and Verify Messages

PGP for Beginners: Encrypt, Sign and Verify Messages

PGP has protected sensitive messages since 1991. Journalists publish PGP keys so sources can contact them safely, software projects sign their releases with PGP, and many security teams require it for vulnerability reports. Its reputation for complexity puts people off, but the core ideas are simple. The PGP tool handles the mechanics in your browser. This guide explains the concepts.

Two keys

PGP uses public-key cryptography. You create a key pair:

  • The public key is shared openly. Others use it to encrypt messages that only you can read and to check your signatures.
  • The private key stays secret and is protected by a passphrase. It decrypts messages sent to you and creates your signatures.

Mathematically, what one key locks, only the other can unlock. That solves the old problem of sharing a secret password before you can talk privately.

Fingerprints and trust

Anyone can create a key with your name on it. The defence is the fingerprint: a 40-character code unique to each key. Before relying on someone's key, compare the fingerprint with them through another channel, such as a phone call, a video chat, their business card or a page on their official website. This step is what makes PGP secure against impersonation.

Encrypting

To send a private message, you encrypt it with the recipient's public key. If several people need to read it, encrypt to all of them, and add yourself if you want to read your sent copy later. Any file can be encrypted the same way. If the other person has no key, you can encrypt with a shared password instead and give them the password by phone.

Signing

A signature proves who wrote a message and that nobody changed it. You sign with your private key; anyone with your public key can verify. Signatures come in two forms:

  • Clear-signed text keeps the message readable, with a signature block attached.
  • Detached signatures are separate .asc files, used for software downloads and documents.

The best practice for private messages is to sign and encrypt, so the recipient knows the message is both confidential and genuinely from you.

Verifying downloads

Many open-source projects publish a signature next to each download. Import the project's public key, check its fingerprint against the project's website, then verify the signature of the file you downloaded. A valid signature means the file is exactly what the developers released.

Choosing a key type

Modern Curve25519 keys are small and fast and supported by current versions of GnuPG and most apps. RSA 4096 keys work with very old software. Set an expiry date, such as two years; you can extend it later, and an expiry protects you if you lose the private key.

Common mistakes

  • Sharing the private key instead of the public one. Only the public key should ever leave your device.
  • Skipping fingerprint checks.
  • Weak passphrases on the private key.
  • Expecting PGP to hide everything: email subject lines, sender and recipients are not encrypted.
  • Losing the private key: keep an offline backup, or you lose access to everything encrypted for you.

A first exchange, step by step

Imagine you want to receive a confidential document from a client. You generate a key pair and send them your public key by email, then read your fingerprint to them on a call. They import the key, encrypt the document for you and send the .gpg file by email. You decrypt it with your passphrase. If they also sign it with their key, and you have checked their fingerprint, you know exactly who sent it and that it was not altered on the way. After the first exchange, everything else is routine.

Summary

Share your public key, protect your private key, verify fingerprints, and sign as well as encrypt. With those habits PGP gives strong, standard end-to-end encryption that works with GnuPG, Thunderbird and many other tools. Try it in the browser with the PGP tool.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages