Last updated

What is Mailvelope?

Mailvelope is a browser plugin for Chrome and Firefox that incorporates end-to-end encryption into the web experience of virtually any major email provider. With Mailvelope, you can generate encryption keys, encrypt and sign the content of emails you send, as well as a number of other operations.

Is Mailvelope right for me?

Since the 1990s, people have been using public key, or asymmetric, encryption to obscure the content of their emails from prying eyes. Its implementation began with Phil Zimmerman’s Pretty Good Privacy (PGP). Today, PGP is regularly referred to alongside a later, open source implementation, GNU Privacy Guard (GPG). These software suites are incredibly robust, yet notoriously difficult for many to learn and maintain.

With its seamless integration into a familiar browser experience, Mailvelope can be thought of as training wheels for those starting out with encrypted email. It is convenient and easy-to-pick-up, but not necessarily appropriate for advanced use cases, or when heightened security is required.

Like using a bucket to curb flooding in a sinking ocean liner, PGP cannot solve the larger problems that plague email's core infrastructure. Asymmetric encryption can only add a layer of protection on top of email — a communications protocol that is fundamentally ill-equipped to promote security and privacy.  Consequently, tools like Mailvelope, which serve as a bridge between PGP and your email client, are left to pick up the slack. 

Implementation has not beenand never will be — perfect, so brush up on mitigations for known flaws and consider alternatives for secure communications when appropriate. The recent Efail disclosure brings this point home. In it, researchers detail sweeping attacks built to exfiltrate decrypted message content and metadata from a mail client to a remote adversary. While Mailvelope users were not vulnerable to some of Efail’s nastiest exploits, an attacker can collect valuable message metadata (time and place of decryption, user IP address) by loading remote content into an encrypted email. Mailvelope developers have announced that they are working on a patch to add in remote content blocking functionality. As  high-risk Mailvelope users await this patch, they should only open encrypted emails from trust senders and, as always, follow best practices for hardening your browser, which we will detail in a latter section of this guide.  

Setting up Mailvelope

As soon as you install Mailvelope, you’ll notice a key and lock icon appears at the top of your browser. Clicking on the icon will bring you to your Mailvelope settings control center. The first time you access your Mailvelope settings, you’ll be presented with two options, either: 1. Generate a new public/private keypair; 2. Import an existing public/private keypair.


Setup.png


A keypair refers to the cornerstone of asymmetric encryption — the generation of an interdependent pair of keys used to encrypt and decrypt data. Contacts use your public key to encrypt content to you. In turn, you use your private key to decrypt the content that's been addressed to you. While many of your friends might hold on to a copy of your public key, your private key is for your eyes only.

If you want to continue using an existing keypair, select the latter option and import your public/private keypair as a file or text block. After importing, do take care to securely delete any superfluous copies of your keypair, and move a single copy to an encrypted storage device for cold storage.


ImportKey.png

Within the Import Keys tool, you can search for public keys from a variety of keyservers and import public or private keys as files or text blocks.


Generating keys with Mailvelope

First, go to Key Management in your control center. You’ll be brought to your keyring, where you’ll find the public keys of contacts you’ve imported in addition to any public/private keypairs you’ve generated. A single key icon next to an entry in your keyring indicates when it is a public key, while the image of two interlocking keys points to a public/private keypair.


Keyring.png

When you first configure Mailvelope, your keyring will look pretty empty. Once you’ve added your primary keypair, you can start adding the public keys of individuals you’d like to communicate with.


If you’d like to generate a new public/private keypair in Mailvelope, there are a number of considerations you should take into account during the generation process.

Under Key Management, go to Generate Key. If you plan on using a key with a public network of contacts, you’ll want to assign the Name and Email entries to known identities people will use to search for your key in public key directories called keyservers.


KeyGenerated.png


The default entries under Advanced are good as-is — RSA encryption at 4096 bits is the strongest option available. It’s up to you to determine whether or not you’d like to designate an expiry date for your key.

Most importantly, the passphrase you designate in the Password field should be unique, long, and randomly generated. Why? The strength of the encryption protecting your private key is a direct function of the strength of the passphrase used to secure it. If an adversary gets access to your private key, you can rest easier if your private key is secured behind a strong passphrase that could theoretically take centuries to crack.

Before hitting the Generate button at the bottom of the window, you’ll notice a checkbox giving you the option to upload your public key to Mailvelope's keyserver. If you select this option, people can begin to pull your public key down and start sending you encrypted emails within moments of generation. If you don’t choose this option, not to worry. You can always push your key to Mailvelope’s keyserver —or any other keyserver, for that matter — later.

If you do send upload your key to Mailvelope’s keyserver, you’ll be sent an email asking  to to verify your key. Why? You have to interact with Mailvelope to prove that you indeed own the email account associated with the key that you are trying to send up to its servers.

I'm all set! What's next?

Now that you've imported your primary key to your keyring in Mailvelope, you can start sending and receiving encrypted messages. Once you get more comfortable with Mailvelope's basic features, you might want to start playing with more advanced applications.

Custom Email Integration

Mailvelope can be configured to work with pretty much any major email provider so long as they offer a web interface. Using a custom email provider in your newsroom? Navigate to your Settings in the control console. Under Options, you’ll see List of Email Providers. This is the section you can use to add your custom email provider.


EmailProvider.png

Most major email providers are already available in Mailvelope. Adding new providers is simple.


For example, if you’re using a custom Outlook domain, add "*.outlook.office365.com" to your list of providers. The next time you refresh the page on your Outlook client, Mailvelope integrations will be accessible on your webmail. (If you do get bounced around on more than one email domain, you may have to add both domain options.) Feel free to prune superfluous options from your Providers section.

Encrypted attachments

Mailvelope does not automatically encrypt your attachments. You will have to have to encrypt attachments before sending within the Encryption section of your settings console. You’ll have the option to download an encrypted copy of the file, which you can then attach to an encrypted message. You’ll be asked to select the public key of the attachment’s intended recipient(s), so confirm you have all the public keys you’ll need in your keyring before navigating to the Encryption section. (Take note: PGP solutions for email will encrypt the body of a message, but never the subject line).


Attachments.png

The Encryption tool within Mailvelope allows you to encrypt and decrypt files, as well as encrypted text blocks.


Exporting your public key

Some common reasons you may want to export your public key are:

  • Sharing your public key directly with new contacts
  • Uploading your public key to a keyserver

ExportingPub.png

Your public key block will always begin with “-----BEGIN PGP PUBLIC KEY BLOCK-----” . The default file name will always end with “_pub.asc”.


Go to Key Management and click into your key to view your Key Details. Under the Export option, select the green button labeled Public. You can then export your public key as a text block or file, and begin sharing with your contacts or on a public keyserver.

Exporting your private key

In some cases, you may want to export your public key:

  • Distributing a shared private key to team members
  • Migrating a private key from Mailvelope to another GPG/PGP utility (such as GPGTools, Kleopatra, Keybase, or a smartcard)
  • Moving a backup of a private key to long-term storage

ExportingPri.png

Your private key block will always begin with “-----BEGIN PGP PRIVATE KEY BLOCK-----” . The default file name will always end with “_priv.asc”.


Go to Key Management and click into your key to view your Key Details. You'll see two orange export buttons. Private will export just your private key, while All will export your public/private keypair. Export as a PGP key block or armored (.asc) file to encrypted, external storage. Lock it up in a safe location.

You may come across a situation where you’ll have to share a keypair with collaborators, such as a shared inbox receiving messages encrypted to a single public key. Once the keypair in question is generated, you’ll have to distribute the keypair to your collaborators so that they can import it to their respective keyrings. Export the keypair as a text block or .asc file, then determine a secure distribution strategy — perhaps by physically stewarding the keypair on an encrypted USB or sending over an encrypted, ephemeral channel.

To reach out to our trainers about more sophisticated distribution strategies for heightened threat models, send us a contact request.

Mailvelope best practices 

Maintaining the sanctity and security of your encryption keys is no small feat. Take heed of the following considerations surrounding browser security, account security, keyservers, and data protection.

General browser security

Despite its convenience, placing your encryption key in-browser can be a risky decision. To mitigate some of these risks, enforce strict browser security with the following recommendations:

  • Restrict your Mailvelope activity to a single space dedicated only to encrypting and decrypting email. This can be set up in both Firefox and Chrome. In Chrome, for example, you can easily enforce these settings by using the People feature. As Settings and Extensions Data is specific to the Person, you can set up a new Person in your Chrome settings, outfit them with strong security settings, and pivot to that Person whenever you’d like to use Mailvelope.
  • You do not want a load of extensions cluttering your browser. We do recommend the use of a small collection of extensions — a reputable ad blocker, Privacy Badger, and HTTPS Everywhere — to protect you as you surf the web, and defend against maliciously-crafted sites from slurping up your keys. 
  • In your browser settings, disable Javascript by default (you can give exceptions to your webmail domain, etc.) as it is sometimes an attack vector. In addition, block Third Party Cookies, and flag a Do Not Track request. 
  • It is good to regularly clear your browsing history and cookies. Please do note, however, that clearing cookies will sign you out of active sessions in many services.

Hardening your browser settings is not the end-all-be-all for surfing the web securely, but will hit much of the low-hanging fruit concerning browser-based PGP solutions.

General account security

You’re going to be using Mailvelope protect the content of your emails. Do yourself a favor and take this opportunity to lock down your email account to prevent compromise. As is the case with all your online accounts, use a strong, unique passphrase and enable two-factor authentication with a mobile application like Authenticator or FreeOTP, or a hardware token like a Yubikey.

You can find detailed email best practices and anti-phishing tips in our training guide.

Keyservers

Keyservers are not without their caveats. People can vandalize keys, or sign false values attributed to the wrong individual — changes that can stay publicly accessible in perpetuity. As a result, be careful when accepting other people’s keys. Before initiating contact with a source, take public key fingerprint verification to a trusted channel.


KeyDetails.png

You can find the 40-digit key fingerprint in Key Details by double-clicking on any key in your keyring.


Endpoint data protection

Make sure you enable full disk encryption on your computer, as any copy of your private key will live within your hard drive as a file. If you are using backup software that copies files on your hard drive to a third-party service, make sure your backups are encrypted so that the third party can’t decrypt them and see your files— including your PGP private key.

Enable FDE on MacOSX with FileVault, Windows with BitLocker or Veracrypt, and Linux by setting up an LVM with LUKS encryption at initial setup. 

Photo by gajman. CC-BY-2.0