New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
SecurityUpdated 4 Nov 2026

PGP and GPG Email Encryption: Setup in Thunderbird Step by Step

How OpenPGP email encryption works, how to create and back up a key with GnuPG or Thunderbird, exchange public keys, send signed and encrypted messages, and avoid the mistakes that leave mail readable.

LF
Written by Lena Fischer
European Deliverability and Privacy Liaison
Reviewed by Karan Malhotra
  • Published25 Feb 2023
  • Read time7 min
  • Length1,337 words
Share this guide

To use PGP email encryption in Thunderbird, you create an OpenPGP key pair in the account settings, back up the secret key and a revocation certificate, send your public key to the people you want to write to, import their public keys, and then turn on encryption or signing when you compose a message. Current Thunderbird versions include OpenPGP support natively, so you no longer need a separate add-on or a local GnuPG installation for ordinary use.

PGP, GPG and OpenPGP are related names. PGP is the original program, OpenPGP is the open standard, and GnuPG (command name gpg) is the best known free implementation. This guide explains the concepts, walks through the Thunderbird setup, shows the equivalent GnuPG commands and lists the mistakes that most often leave messages readable. Menu wording varies between Thunderbird releases, so confirm details in the current Thunderbird documentation.

What you needA key pair, the recipient's public key, and a client that supports OpenPGP such as Thunderbird
What it protectsThe message body and attachments, end to end, from everyone except the key holders
What it does not hideSender and recipient addresses, timing and, in many setups, the subject line
Back up firstYour secret key and a revocation certificate; losing the key means losing old mail

How PGP email encryption works

Each user has two linked keys. The public key can be shared freely and is used by others to encrypt messages to you and to verify your signatures. The secret (private) key stays with you, is protected by a passphrase, and is used to decrypt messages and to sign. Encryption is end to end: the message is encrypted on your device with the recipient's public key and can only be decrypted with their secret key, so mail servers in between handle only ciphertext. The message format for use in email is described in RFC 3156, and the key and message format itself in the OpenPGP standards.

This is different from transport encryption, which protects the connection between servers but leaves the message readable on each server it passes through. See what email SSL/TLS and STARTTLS do and the wider overview in email encryption: TLS, S/MIME and PGP.

Before you start

  • Install the current Thunderbird release and add the mail account you want to protect.
  • Choose a strong passphrase for the secret key and store it in a password manager.
  • Decide where the backup will live: an encrypted external drive or a password manager that accepts attachments.
  • Agree with your correspondents how you will verify each other's key fingerprints, such as by phone or in person.
  • If your organisation prefers certificates issued by a certificate authority, consider S/MIME instead, since it fits managed environments more easily.

Step 1: Create your key in Thunderbird

  1. Open Account Settings and choose End-to-End Encryption for the account.
  2. Select the option to add a key, then create a new OpenPGP key.
  3. Pick the key lifetime. A fixed expiry, for example one to three years, is good practice because it can be extended and limits damage if the key is lost.
  4. Choose the key type and size offered. Current versions offer RSA of at least 3072 bits and may offer elliptic curve keys. Follow the current default unless your correspondents need something else.
  5. Confirm and wait while Thunderbird generates the key, then protect it with a passphrase when prompted.

When the key is ready, the settings page shows its ID and fingerprint. Make a note of the fingerprint, because this is what others compare to be sure they have your real key.

Step 2: Back up the key and create a revocation certificate

A lost secret key means mail encrypted to it can never be read again. A leaked or lost key without a revocation certificate cannot be cleanly retired. Thunderbird lets you export the secret key from the OpenPGP Key Manager and protect the file with a passphrase. If you also use GnuPG, the equivalent commands are below.

# List your keys and note the key ID or fingerprint
gpg --list-secret-keys --keyid-format long

# Back up the secret key (store the file offline)
gpg --export-secret-keys --armor [email protected] > secret-key-backup.asc

# Create a revocation certificate and store it separately
gpg --gen-revoke --armor [email protected] > [email protected]

Keep the backup and the revocation certificate in different safe places. Anyone who obtains the revocation certificate can revoke your key, so treat it as sensitive too.

Step 3: Share your public key and import others

Others need your public key before they can write to you. In Thunderbird's Key Manager you can export your public key to a file, send it as an attachment, or publish it to a keyserver. Always verify an incoming key by comparing the fingerprint over a different channel before trusting it, because a key sent by email can be substituted.

# Export your public key to a file
gpg --export --armor [email protected] > you-public.asc

# Show the fingerprint to read out or compare
gpg --fingerprint [email protected]

# Import a colleague's public key
gpg --import colleague-public.asc

In Thunderbird, use the Key Manager to import the key file, then open its properties and accept it once you have verified the fingerprint. Thunderbird uses acceptance levels such as unverified and verified, and it only encrypts to a key you have accepted. Keep in mind that a keyserver entry is not proof of identity.

Step 4: Send an encrypted or signed message

  1. Compose a new message to a recipient whose public key you have imported.
  2. Open the security options in the compose window and enable encryption. Enable digital signing as well if you want the recipient to verify it came from you.
  3. Review the recipient indicators. If any recipient lacks an accepted key, Thunderbird will warn you and will not encrypt to everyone.
  4. Send the message. Replies from the recipient arrive encrypted if they have your public key.

A signature alone proves that the message was not altered and came from the key holder. It does not hide the contents. Sign messages that others must be able to verify, and encrypt messages that must stay private.

Limits you should understand

ItemIs it protected?Notes
Message bodyYes, when encryptedOnly for recipients whose keys were used
AttachmentsYes, when encryptedAttach inside the encrypted message, not as separate files
Sender and recipient addressesNoMail servers need them for routing
Subject lineOften notNewer Thunderbird versions can protect subjects; confirm the recipient's client supports it
Message metadata and timingNoVisible to servers and network observers
Previous plaintext copiesNoSent copies, drafts and server-side search indexes may hold plaintext
Webmail usersDependsBrowser extensions and webmail integrations vary; check what is supported

PGP protects content, not identity or the fact that you communicated. Pair it with good account security. See email account security best practices.

Troubleshooting

ProblemLikely causeFix
Cannot enable encryption for a recipientNo accepted public key for that addressImport and accept their key; check the address matches the key's user ID
Recipient cannot read the messageThey lack your public key or use a client without OpenPGPSend your public key; confirm their client supports it
Message shows as unverifiedSignature key not yet accepted or message modifiedVerify the fingerprint and accept the key
Key expiredExpiry date reachedExtend the expiry in the Key Manager and re-share the public key
Cannot decrypt old mailSecret key lost or wrong key selectedRestore the backup; check that the key passphrase is correct
Decryption works on one device onlySecret key not copied to the other deviceExport and import the secret key securely; avoid sending it by email

Good habits and next steps

  • Rotate or extend keys before they expire and publish updates.
  • Revoke and replace the key if you suspect compromise, and tell your contacts.
  • Do not paste decrypted text into a tool or service you do not trust.
  • Keep the operating system and Thunderbird up to date.
  • For team use, document how keys are generated, verified and revoked.

Encryption is only one layer. If your concern is messages that are forged in your name, see email spoofing for authentication controls that complement signatures.

Send reliably as well as privately. Use authenticated delivery with TLS for the mail you send from applications.

Explore the SMTP relay

References and further reading

Frequently asked questions

Is PGP the same as GPG?

PGP is the original program, OpenPGP is the standard, and GPG is GnuPG, the free implementation. Keys made by one generally work with the others.

Do I need GnuPG to use OpenPGP in Thunderbird?

No. Current Thunderbird versions include OpenPGP support natively, though GnuPG remains useful for command line work and smartcards.

Does PGP encrypt the subject line?

Not by default in most setups. Some newer clients can protect it, but you should assume the subject and addresses are visible.

What if I lose my private key?

You cannot read mail encrypted to it. Restore it from your backup, and use your revocation certificate if the key is lost or exposed.

Can I encrypt to someone who has no key?

No. The recipient needs a key pair first, and you need their verified public key.

Topics#PGP#GPG#OpenPGP#encryption#Thunderbird
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales