PGP in practice: encrypted email and files

PGP has encrypted email and files for decades, and is notorious for its complexity. This guide explains how it works, when it's worth using, and when something else is better.

PGP in practice: encrypted email and files

PGP in practice: encrypted email and files

PGP has encrypted email and files for decades, and is notorious for its complexity. This guide explains how it works, when it’s worth using, and when something else is better.

Who this guide is for: Journalists, lawyers, activists, and anyone who needs to encrypt files or use PGP for email. For everyday private messaging, Signal is usually the better choice.

What you gain, and what it costs

You gain an open standard for encrypted files, signed software downloads, and email in environments where modern chat tools are not the right fit. PGP remains relevant because a lot of technical, archival, and journalistic workflows still depend on it.

The cost is complexity. Generating keys, verifying fingerprints, exchanging public keys, making backups, and storing revocation certificates is more error-prone than almost anything in modern messaging apps. That makes PGP powerful, but rarely simple.

When this is overkill

For daily messages, family conversations, team chat, and quick coordination, PGP is usually the wrong tool. Use it when you genuinely need email or file encryption inside a PGP-compatible workflow. For ordinary communication, Signal or Molly is almost always the better answer.


What PGP does

PGP stands for Pretty Good Privacy. The open standard that grew out of it is called OpenPGP, and GnuPG (also known as GPG) is a complete, free implementation of that standard.

PGP does two things:

1. Encrypt You can encrypt a file or message so that only the recipient can read it — even if it’s intercepted.

2. Sign You can digitally sign that a message came from you. The recipient can verify this.


How it works: public and private keys

PGP uses asymmetric cryptography — two keys that are mathematically linked:

  • Public key — share with everyone. Anyone can use it to encrypt messages to you.
  • Private key — keep secret. Only you can decrypt messages encrypted with your public key.

The analogy: your public key is an open padlock. Anyone can lock something with it. Only you have the key to open it.

Encryption works like this:

  1. You get the recipient’s public key
  2. You encrypt the message with their public key
  3. They decrypt it with their private key
  4. Nobody else can read the message, you included, unless it was also encrypted to your own key (Thunderbird does that for email, so you can read your sent mail; in Kleopatra it is the Encrypt for me option)

Signing works in reverse:

  1. You sign a message with your private key
  2. The recipient verifies the signature with your public key
  3. They know the message is from you and hasn’t been altered

When do you use PGP?

Honest answer: for most people, PGP is not the right tool.

Use PGP for:

  • Encrypted email (when email is truly necessary)
  • Encrypting files for long-term storage
  • Verifying software downloads (many open-source projects sign releases with PGP)
  • Source communication for journalists or activists

Use Signal instead for:

  • Daily encrypted communication
  • Real-time messaging
  • People without a technical background

Signal’s encryption is stronger than PGP for messages. It offers forward secrecy — if a key is ever compromised, earlier messages remain encrypted. PGP email doesn’t offer this by default.

→ PGP is powerful for files and email. For messaging: use Signal.


Before you start

You don’t need a terminal for any of this. The guide uses two free, open-source programs:

  • Thunderbird for email (Windows, macOS, Linux). Its OpenPGP support is built in. The steps follow Thunderbird 160.0.
  • Kleopatra for files and for managing keys (Windows and Linux). It is a graphical front end for GnuPG. The steps follow the Kleopatra that ships with Gpg4win 5.1.1 on Windows; Linux distributions ship versions with the same menu items (KDE 24.12 to 26.08).

On macOS, use Thunderbird for email; for files, see “Installation”. The examples use you@example.org for your own address and contact@example.org for the person you write to.

Use one key pair everywhere. Thunderbird keeps its own key store, separate from Kleopatra’s (GnuPG’s). Create your key in one of them, make the backup, and import that backup in the other.

Already have a setup? Keys you made earlier with GnuPG on the same computer show up in Kleopatra straight away, because Kleopatra uses GnuPG’s key store: skip “Creating your key pair”, but do make the backup and the revocation certificate. To move an existing key into Thunderbird: in Kleopatra, File → Backup Secret Keys…, then in Thunderbird Add Key… → Import an existing OpenPGP Key (see “Creating your key pair”). Starting from scratch: follow the sections in order, and make the backup and revocation certificate before you publish your key.


Installation

Thunderbird (email)

Download Thunderbird from thunderbird.net and add your email account. OpenPGP is part of Thunderbird since version 78; there is nothing extra to install.

Kleopatra on Windows

Download Gpg4win, the official GnuPG distribution for Windows. Version 5.1.1 (23 September 2026) contains GnuPG 2.5.24, Kleopatra and GpgOL, the add-in for Outlook. Kleopatra shows a Dutch interface on a Dutch Windows; the Dutch translation is part of the installer. Check the installer before you run it, as Gpg4win describes: Windows should name g10 Code GmbH as the publisher in its permission prompt.

Kleopatra on Linux

Install the package kleopatra from your distribution’s software centre or package manager. The name is the same on Debian, Ubuntu and Fedora (Debian 13 ships Kleopatra 24.12, Ubuntu 26.04 25.12, Fedora 44 26.08).

macOS

For email, use Thunderbird with the steps below.

For files and key management, the usual graphical tool is GPG Suite, with GPG Keychain (key manager) and GPG Services (encrypt, decrypt, sign and verify files through a macOS menu, according to GPGTools). GPG Keychain and GPG Services are free; only GPG Mail, the plug-in for Apple Mail, needs a paid support plan (a yearly subscription from GPG Mail 8 on, 30-day free trial). Note: on 6 November 2026 the only download on gpgtools.org was a beta for the newest macOS (Golden Gate), and GPG Mail 8 is in beta with features GPGTools itself calls essential still missing. The current GPG Suite source isn’t public yet, so this guide doesn’t give GPG Keychain steps; follow GPGTools’ own instructions.


Creating your key pair

In Thunderbird

  1. Go to ☰ → Account Settings → End-To-End Encryption (under your account).
  2. Click Add Key… → Create a new OpenPGP Key → Continue.
  3. Key expiry: Thunderbird suggests Key expires in 3 years. An expiry date is safer than Key does not expire. You can extend it later with Change Expiration Date next to your key; then share your public key again, or your contacts keep seeing the old date.
  4. Advanced settings: Thunderbird preselects RSA with 3072 bits. You can choose 4096 bits or ECC (Elliptic Curve).
  5. Click Generate key and confirm. The new key is selected for your account automatically.

Thunderbird doesn’t ask for a passphrase for the new key: by default your secret keys are protected by Thunderbird’s Primary Password, but only if you have set one. Set it in Thunderbird’s settings under Privacy & Security → Use Primary Password.

In Kleopatra

  1. File → New OpenPGP Key Pair…
  2. Fill in Name and Email address. Together they form your user ID, which becomes publicly linked to your key.
  3. Tick Protect the generated key with a passphrase. and choose a strong passphrase when asked.
  4. Under Advanced options you can change the key type and the date in Valid until. Kleopatra suggests a date three years ahead, unless your organisation has set something else. You can extend it later with Certificates → Change End of Validity Period…; then share your public key again.
  5. Click OK. Kleopatra shows the fingerprint of your new key when it’s done.

GnuPG, which Kleopatra uses, also stores a revocation certificate for the new key automatically. Still make your own copy (see the next section).


Backup and revocation certificate (before you publish)

Your private key is irreplaceable: if you lose it, you can no longer read messages that were encrypted to you. A revocation certificate lets you declare your key invalid later, also if you have lost the key itself. Make both now, before you share your key.

In Thunderbird

Open ☰ → Account Settings → End-To-End Encryption → OpenPGP Key Manager and select your own key.

  • File → Backup Secret Key(s) To File. Thunderbird asks for a separate password that protects the backup file. Without that password the backup can’t be restored, so store it safely.
  • File → Save Revocation Certificate To File. (Thunderbird also kept a copy in its profile folder when it created the key, named 0x<key ID>_rev.asc.)

In Kleopatra

  • File → Backup Secret Keys… saves your private key to a file, protected by your key’s passphrase: you need that passphrase to restore it. File → Print Secret Key… prints it on paper instead.
  • Certificates → Details → Generate Revocation Certificate.

Store the backup and the revocation certificate offline, for example on an encrypted USB stick, and separately from each other: anyone with the revocation certificate can declare your key invalid. A password manager such as KeePassXC can hold the passphrase and the backup password.


Sharing your public key

keys.openpgp.org

keys.openpgp.org is a keyserver that only publishes the name and email address in your key after you confirm the address by email. The technical part of the key (without name and email) is published and can be found by fingerprint. GnuPG’s own manual warns that keys sent to a keyserver can never be deleted, so only publish a key you intend to keep using. On keys.openpgp.org you can remove your name and email later on its manage page; the technical part stays available.

  • Thunderbird: in the OpenPGP Key Manager, select your key → Keyserver → Publish. Thunderbird sends it to keys.openpgp.org (the first keyserver in its default list) and asks for the confirmation email for each address in the key. Click the link in that email.
  • Kleopatra: select your key → File → Export… and save the .asc file. Upload that file on the upload page of keys.openpgp.org; the server then offers to send the confirmation link. Kleopatra’s File → Publish on Server… also uploads, but according to keys.openpgp.org identity information can’t be verified that way, so your key wouldn’t be findable by email address.

Directly

  • Thunderbird: in End-To-End Encryption, next to your key, More → Send Public Key Via Email. By default Thunderbird also puts your public key in the headers of the mail you send (Autocrypt; a setting in End-To-End Encryption).
  • Kleopatra: the .asc file from File → Export… can be emailed or put on your website.

Importing and checking someone else’s key

Never blindly trust a key, also not one from a keyserver. Check its fingerprint, a unique string of characters belonging to the key: compare it with the owner through another channel (phone call, in person).

In Thunderbird

  1. In the OpenPGP Key Manager: Keyserver → Discover Keys Online and enter the email address, or File → Import Public Key(s) From File for a key you received as a file. When you write to someone whose key is missing, the Key Assistant in the compose window (Resolve…) offers the same two routes.
  2. Select the key → View → Key Properties. Compare the Fingerprint with the owner.
  3. On the Your Acceptance tab choose Yes, I’ve verified in person this key has the correct fingerprint. and click OK.

keys.openpgp.org only returns a key for an exact address whose owner has confirmed it.

In Kleopatra

  1. File → Import… for a key file. Or search keys.openpgp.org in your browser, download the key and import it. File → Lookup on Server… searches directly, once a keyserver is set: in Kleopatra’s settings (Settings menu), page Directory Services, tick Use OpenPGP keyserver and enter hkps://keys.openpgp.org in OpenPGP keyserver:. Gpg4win 5.1.1 doesn’t set one, and GnuPG has had no default keyserver since version 2.5.3.
  2. Select the key → Certificates → Certify… Compare the Fingerprint shown with the owner.
  3. Make sure Certify for everyone to see (exportable) is unticked (it is the first time; after that Kleopatra remembers your last choice), so the check stays on your own computer, and click Certify. Kleopatra uses your own key for this.

Encrypted email in Thunderbird

  1. Write a new message. In the toolbar, switch on Encrypt. Thunderbird signs encrypted mail too, unless you switch off Sign; a signature shows the recipient the message came from your key. It also encrypts the subject by default (Encrypt Subject).
  2. If a recipient’s key is missing or not yet accepted, Thunderbird says so; click Resolve… to open the Key Assistant and import or accept the key (see the previous section).
  3. Encrypted mail you receive is decrypted when you open it, and Thunderbird shows whether a signature is valid.

Limitations:

  • The content and, by default, the subject are encrypted
  • Metadata (who sends to whom, when) stays visible to your email provider
  • Both parties must support OpenPGP

Privacy-friendly email providers

PGP doesn’t solve the metadata problem, and a provider can’t either: it has to route your mail and must answer legally binding orders from its own country. What you can choose is a provider built around privacy:

  • Proton Mail — PGP built in (also with contacts outside Proton who use PGP), Swiss company under Swiss law
  • Tuta (formerly Tutanota) — own encryption, does not use PGP
  • Posteo — German, 1 euro a month, no tracking according to Posteo; OpenPGP with your own key, plus a Posteo public key directory

Files in Kleopatra

Thunderbird only encrypts email; for files, use Kleopatra.

Encrypting and signing

  1. File → Sign/Encrypt… and choose the file.
  2. Choose what you want:
    • Encrypt for others: the people who may open the file (their key must be imported and checked).
    • Encrypt for me: so you can open the file yourself later.
    • Sign as: your own key, to sign the file.
    • Encrypt with password: no key pair needed. Anyone you share the password with can read the file; useful for your own backups.
  3. Click the button at the bottom (Sign / Encrypt, Encrypt or Sign, depending on your choices).

Decrypting and verifying

File → Decrypt/Verify… and choose the encrypted or signed file. Kleopatra asks for your passphrase if needed and shows whether a signature is valid and which key made it.

Verifying software releases

Many open-source projects sign their releases, Tor Browser and GnuPG itself among them. Import the project’s key (see their website), check its fingerprint against the one the project publishes, then use File → Decrypt/Verify… on the signature file (.sig or .asc) in the same folder as the download. This confirms the file came from the project and hasn’t been modified.


If your key is lost or compromised

  1. Revoke the key. Thunderbird: OpenPGP Key Manager → select the key → Edit → Revoke Key. Kleopatra: Certificates → Revoke Certificate… Both need your private key. Lost the private key? First make sure your public key is in the program (import it from a file or a keyserver; without it the import fails), then import the revocation certificate you saved: in Thunderbird with File → Import Revocation(s) From File, in Kleopatra with File → Import…
  2. Publish the revoked key and send it to your contacts. With your private key: the same way as before (Thunderbird Keyserver → Publish, or export and upload on keys.openpgp.org). Without it, Thunderbird switches Publish off: use File → Export Public Key(s) To File (Kleopatra: File → Export…) and upload that file on keys.openpgp.org. Thunderbird itself says to share the public key again so others know you revoked it.

The web of trust

PGP has no central authority. Trust works via a web of trust: when you sign someone’s key, you’re telling others that you’ve verified it.

In practice: if you meet someone in person, you can compare each other’s fingerprints and certify each other’s keys. A certification you publish (in Kleopatra: Certify for everyone to see (exportable)) can build trust in the network, though keys.openpgp.org doesn’t distribute certifications by default; the local check from “Importing and checking someone else’s key” only helps you.


Limitations of PGP

Being honest about what PGP doesn’t do:

No forward secrecy If your private key is ever compromised, all encrypted messages ever sent to you can be decrypted — if the attacker has been storing them. Signal uses per-message keys that are discarded after use. PGP doesn’t.

Metadata is visible Your email provider sees who communicates with whom, how often, and when. Only the content is encrypted.

Complexity = mistakes PGP is hard to use correctly. People forget to encrypt, use the wrong key, or don’t properly secure their private key. One mistake can undo the protection.

Few people use it PGP email only works if both parties support it. In practice, the audience is small.


When PGP is the right choice

Despite the limitations, there are situations where PGP is the best option:

  • Long-term encrypted file storage — backups, archives, sensitive documents
  • Email when there’s no alternative — contact with organisations that don’t use Signal
  • Software verification — confirm what you download
  • Journalistic source contact — SecureDrop uses PGP

For everything else: use Signal.


Next step

Go further

Reviews