ProtonMail allows users to send and receive PGP encrypted emails without any technical knowledge or software installation. Encryption, decryption, and key management in ProtonMail are invisible to the user. However, ProtonMail gives advanced users the opportunity to import, export, backup, generate, and delete their own keys. This article explains how to manage your PGP keys in ProtonMail.
Your PGP keys
You can manage your private keys by navigating to Settings while logged in at mail.protonmail.com and then clicking on the “Keys” section. This will open the following screen:
There are two categories of keys: email encryption keys and contact encryption keys. Each email address has its own set of keys, and there is one set of keys for contact encryption. To see all the keys for a certain address or for your contacts, click on the arrow to the left of the email or user.
ProtonMail allows you to import keys, generate keys, and export your public and private keys. Because your private keys can be used to decrypt your emails, it is very important that your private keys are not leaked and that you do not import keys that somebody else has access to.
Key export (backup)
The ProtonMail web interface allows you to export your keys. You may want to do this in order to backup your keys in case you lose your password and lose access to your messages. In this case, you can import your exported keys and restore your ability to access your messages.
To export the key of a certain address or contact, expand the detailed view of the address or user and click on “Export”.
You will be asked whether you want to export your public or private key. You can export your public key to distribute this to your contacts. Your contacts can use it to send you PGP messages and to verify PGP messages that you are sending. Public keys cannot be used to decrypt your messages and thus cannot be used as a backup.
When you export your private key you will be asked for your current password, which will be used to decrypt your private key. Then, you will be asked for a new password to encrypt your exported key with. Make sure you keep this password safe, as you will need it to use this key!
Key import allows you to add existing PGP keys to one of your ProtonMail addresses. If you were using PGP on a migrated domain before you came to ProtonMail, you can import your old PGP key to seamlessly migrate your PGP setup to ProtonMail without having to redistribute your keys to your recipients. In the case of password loss, you can also import a backup key in order to restore access to that key and its associated mail. Key import is not supported for contact keys.
There is a limit of 20 keys per address, so if you already have 20 keys you will need to delete one of the keys in your list in order to import another one.
To import a key for a certain address, simply click on the Import Key button and go through the dialog windows and select the key you want to import. If the key is encrypted you will be asked for the password.
If the key is a backup of an inactive key, the key will be activated. Otherwise, a new key will be added to your key set for that email address.
Note: Make sure that no one except you has access to the key you are trying to import. Never import a key generated by a third-party.
The new key is not used by default for encrypting new emails sent to you. To make the new key your default private key, you must set it as the primary key. We explain how to do this in the primary keys section below.
By default, ProtonMail will generate a set of keys when you create your account and anytime you create a new email address. When generating the key, you can choose between two different types of keys:
- RSA-2048 (High Security)
- RSA-4096 (Extreme Security)
Both of these keys will encrypt and sign your emails using RSA. RSA-2048 uses 2,048-bit keys, which are secure and relatively fast. We also allow you to use RSA-4096, which is the largest key size that is commonly used. This provides a security benefit but will cause decryption of your messages to be slower.
You can also generate additional keys after address creation, which is recommended if your existing keys have been leaked or have an undesirable key size.
Note that having multiple keys per address will slow down your login experience: each key has to be loaded and decrypted when you log in. There is a limit of 20 keys per address, so if you already have 20 keys, you will need to delete one of the keys in your list in order to generate more.
To reduce the number of keys in your account, you can also delete non-primary keys. This will speed up your loading times or free up space to be used for new keys.
You can delete a key by going into the key dropdown and clicking on DELETE. You will be asked if you want to export your key. We highly recommend you export your key, because once you delete this key you will not be able to access emails encrypted with this key. The only way to access these emails will be to import the exported key.
Key flags and settings
To request that your incoming emails are encrypted with your new key, you can make your new key the primary key. To do this, click on the arrow to the left of your new key and click on MAKE PRIMARY. Making a key primary will also cause all your signed messages sent from this address to be signed with this key.
If your contact has trusted your keys, setting a different key as the primary key will not force your contacts to encrypt emails addressed to you with this new primary key. To force contacts to use the new primary key, you will have to mark the old trusted key as obsolete. This will block any ProtonMail user from sending with this key.
You can mark a key as obsolete by opening the key dropdown and clicking on MARK OBSOLETE. You can only mark a non-primary key as obsolete. You can mark an obsolete key as non-obsolete by clicking on the cross next to the OBSOLETE status.
It is also possible to flag your key as compromised. Not only will this block ProtonMail users from sending to you using this key, but this will additionally cause all internal ProtonMail messages signed with that key to fail signature verification. Note that signature verification is only enabled on your contacts’ side if they have key trusting enabled.
You can mark your key as compromised by going into the key dropdown and clicking on MARK COMPROMISED. You can only mark a non-primary key as compromised. A compromised key is always seen as obsolete. You can mark a compromised key as non-compromised by clicking on the cross next to the COMPROMISED status.