Security

How to set up a secure email exchange with a PGP protocol?

Setting up encrypted email with PGP, two ways: Mailvelope for Gmail and Thunderbird with OpenPGP, from installing the software to creating and sharing keys.

· 9 min read · level: beginner

PGP (Pretty Good Privacy) is a security protocol that makes it possible to encrypt exchanges by encrypting sensitive data or files. This kind of protocol can therefore be useful in cases such as confidential email exchanges, for example.

Method 1 PGP encryption with Mailvelope for Gmail

1. Install the Mailvelope extension

Depending on what you use, install the extension on Chrome, Firefox, etc.

Illustration 1 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

2. Add the public key to your key library

You will notice that this time, if you open the file with the public key, the Mailvelope logo will appear.

Illustration 2 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Click to import the key; you will reach the recipient's PGP key, then confirm.

Illustration 3 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Step 6: Receive a public key and send an encrypted email

1. Create your own key on Mailvelope

Press "+ Generate" and fill in the various fields.

Illustration 4 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

2. Send an encrypted email

Press the Mailvelope logo in Gmail to write a new email.

Illustration 5 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Choose the recipient among the keys created and send the email.

Illustration 6 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Enter the password of the key to send the email.

Illustration 7 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

If you run into a problem with the Gmail API permissions, go to Mailvelope to enable the Gmail API integration:

Illustration 8 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Here is what the recipient should receive:

Illustration 9 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Method 1: PGP encryption with Thunderbird

This software will allow us to manage our emails and will make it easier for us to set up the PGP protocol.

1. Download Thunderbird Find the software here.

Illustration 10 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

2. Start the installation

Choose the "Standard" installation type

Illustration 11 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Then click on "Install"

Illustration 12 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Step 2: Configure Thunderbird

1. Configure an already existing email address

Illustration 13 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

2. IMAP configuration

Choose the IMAP option, then press "Done".

Illustration 14 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

3. Finalize the configuration

Click on "Finish".

Illustration 15 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Step 3: Configure OpenPGP on Thunderbird and create a key

1. Set up a personal key pair

Go to the "Account Settings"

Illustration 16 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Then go to "End-to-end encryption"

Illustration 17 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Create a new key

Illustration 18 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?
  • If you already have a personal OpenPGP key pair from another piece of software: check the option "Import an existing PGP key"
  • Otherwise, check the option "Create a new OpenPGP key"
Illustration 19 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Finish configuring your key according to your preferences

Illustration 20 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

2. Set the key

Once the key is created, still in the account settings, set the one you want to actively use for your email account.

Illustration 21 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

There you go: once your keys are created, you are now ready to set up a secure email exchange through the use of a PGP protocol with OpenPGP.

Step 4: Send your public key

1. Go to the security settings

Illustration 22 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

2. Go to the OpenPGP section, then check "Attach my public key" and send the email

Illustration 23 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

Here is what your recipient will receive

Illustration 24 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

They will then have access to your public key by opening the file as shown below:

Illustration 25 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

BONUS:

1) Export your secret key from Thunderbird

Go to the "Account Settings", then to "End-to-end encryption".

Expand the key information in order to save your secret key to a file.

Illustration 26 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

(the email used in the example was changed here for the purpose of the illustration)

Choose a password (remember it carefully) and click "OK" to start the export.

Illustration 27 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

2) Import an external key into Mailvelope

Now, go back to Mailvelope and import your key

Illustration 28 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

By dragging the file and clicking "Import keys"

Illustration 29 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?

There you go, you have managed to import your secret key.

Illustration 30 — Comment mettre en place un échange de mail sécurisé avec un protocole PGP ?