How to download your public and private keys
Proton Mail(new window) uses PGP for end-to-end encryption. All users have two encryption keys, one public and one private. The public key can be shared with anyone and is used by your contacts to encrypt their messages to you. The private key is secret (you should never share it) and is used to decrypt incoming messages.
This article shows you how to generate, delete, download, and manage your keys. You can download your public and private keys from Proton Mail to send PGP-encrypted emails to non-Proton Mail users or to use your keys in another PGP client.
Note: This is an advanced feature for technical users.
Learn how to upload PGP keys to Proton Mail(new window)
Generating keys
By default, Proton Mail generates a set of keys when you create an account and any time you create a new email address. When generating a key, you can choose between two different key types:
- ECC Curve25519 (fastest, most modern)
- RSA 4096-bit (slower, but increased compatibility with legacy software)
Selecting ECC Curve25519 encrypts and signs your emails using elliptic curve cryptography (ECC)(new window). It is fast, secure, and resistant to timing attacks. Proton Mail now uses ECC Curve25519 by default.
RSA is an older encryption standard that we implement at its strongest possible setting (4096-bit). It is secure and offers increased compatibility with legacy software than the ECC algorithm, but is also slower.
Generating additional keys after address creation is recommended if your existing keys have been leaked or have an undesirable key size.
Note: Having multiple keys per email address increases your login time, since each key has to be loaded and decrypted. You can only generate up to 20 keys per email address.
Deleting keys
You can delete non-primary keys to speed up loading times or free up space for new keys.
You can delete a key by clicking on the key dropdown menu and selecting Delete. Before deleting your key, we highly recommend you export it since your emails cannot be decrypted without it. The only way to decrypt your emails is to import the exported key.
How to download your public key
There are two different ways to download your public key depending on how many you have and which one you need.
1. Log in to the web app at mail.proton.me(new window), click Settings → All settings → Encryption and keys, and scroll down to Email encryption keys.
2. Choose the address for which you want to download the public key from the dropdown menu if it is not already selected.
3. Click Export to automatically export your Primary public key. Or, if you have multiple active public keys, you can click export next to the key you wish to download in the list below. Once you click Export, the file will automatically download in your browser.
4. You can also download your own public key or the key of a friend by using this link:
https://mail-api.proton.me/pks/lookup?op=get&search=user.email@proton.me(new window)
For the link to work, you need to replace [user.email@proton.me] with the Proton Mail email address of the appropriate account. You can also quickly share your key with friends by sending them that link with your email address in place of [user.email@proton.me].
Once you have placed your Proton Mail address in the link, you can send it to your friend, and with one click they can download your public key.
Comparing exported keys with keys from the server
In October 2022, Proton started certifying Proton user’s public keys by adding a certification signature (for more details, you can read about why we created ProtonCA).
This certification signature is present on all public keys you download directly (using their PKS link) from any Proton public key distribution server.
However, this certification signature is not included when you export your public key using the Export button in Proton’s settings.
If you download your public key directly from the server and export from Proton’s settings, your two public key files will appear different even though they both contain the same public keys.
You can verify that both of these exported keys contain the same information for yourself by inspecting them using third-party tools.
You can install GnuPG (https://gnupg.org/download/(new window)) and use the following command:gpg --list-packets <public-key-file>
or
You can go to https://dump.sequoia-pgp.org(new window), copy and paste your public key file into the field, and click Decode!
Be sure you only do this with your public key.
How to download your private key
1. Log in to the web app at mail.proton.me(new window), click Settings → Go to settings → Encryption and keys, and scroll down to Email encryption keys.
2. Choose the address for which you want to download the private key from the dropdown menu if it is not already selected.
3. Click on the dropdown menu labeled Export and select Export private key to download your primary private key. Or select Export private key from the dropdown menu of a specific key if you have multiple key pairs.
4. A pop-up window will ask you to confirm that you wish to download your private key. You will then be asked to create a new password, which is used to secure your private key once it has been downloaded.
Click Export when you are ready.
Make sure you keep this password safe, as you will need it to use this key!
After signing in again using your Proton Mail password, your key will be downloaded as a .asc file.
Key flags and settings
Primary keys
To encrypt your incoming emails with your new key, you can mark it as a primary key. Click on the key dropdown menu and select Make primary. Once you’ve set a primary key, all of your signed messages sent from this email address will be signed with this key.
Obsolete keys
If a contact has trusted your keys(new window), setting a different key as the primary key does not ensure that your contact will encrypt emails addressed to you using the new primary key. To force contacts to use the new primary key, you must mark the old key as obsolete. This blocks all Proton Mail users from sending with this key.
To mark a key obsolete, click on the key dropdown and select Mark obsolete. You can only mark a non-primary key as obsolete. You can also reverse this process by clicking on the key dropdown menu and selecting Mark not obsolete.
Compromised keys
You can flag a key as compromised. This blocks all Proton Mail users from sending emails to you using this key, and causes all emails signed with that key to fail signature verification. Note that signature verification is only possible if your contact has key trusting enabled(new window).
You can mark a key as compromised by clicking on the key dropdown menu and selecting Mark compromised. You can only mark a non-primary key as compromised. A compromised key is also marked obsolete. You can reverse this process by clicking on the key dropdown menu and selecting Mark not compromised.
Inactive keys
If you forget your Proton Mail password and reset it, you will lose access to your private keys. These keys will be inactive, and you will not be able to encrypt or decrypt messages with them. However, you can reactivate inactive private keys if you still remember your old password or you have a recovery phrase or a recovery file.