We’re excited to announce that Email Content Search on mobile, a long-awaited feature, is now rolling out to all users. You can search for any word that you remember from an email, even in the encrypted body, and get the results you are looking for. Every word of your Proton emails is searchable and still private.

We’ve also added additional touches to make it easier for you to find the emails you are looking for. Now, by the search bar, you can quickly access the emails that you’ve searched and found in the past, so that you have an automatic shortcut to emails that you keep coming back to. This feature will be rolled out to all mobile users by the end of December, with fresh updates to the existing content search experience on web following shortly after.

Proton Mail QR code for download

Not on Proton Mail yet? Create a free account.

How email search normally works

For those who are curious to learn more about the engineering challenges of this feature, the reason Email Content Search took longer for Proton to develop than it would for other email providers is because traditional email searching is not compatible with end-to-end and zero-access encryption.

In order to allow users to search emails quickly, an email provider has to build an “inverted index” for each user.

If an index is a lookup table that lists all the keywords found in each email, an inverted index is a similar table, which allows you to lookup all the emails, given a certain keyword (see example below). Once you type a few words into the search bar, your email provider then uses this inverted index to quickly give you the list of emails which contain the words you searched.

Regular Index

EmailKeyword
Email #1“Hi”, “my”, “name”…
Email #2“Dear”, “Eric”, “Norbert”…
Email #3“Please”, “RSVP” ….

Inverted Index

KeywordMatching emails
“Flight”Email #1, Email #2, Email #4
“Booking”Email #2, Email #3, Email #10
“Confirmation”Email #1, Email #8, Email #9

Here’s an example where if you searched “flight confirmation”, your search results would give you Email #1 as a top result because it contains both terms (and then maybe Email #2, #4, #8, #9 lower down on the list, depending on how search is designed).

Building an index for search is a simple engineering task for an email provider like Gmail or Microsoft Outlook, who can readily access every word of your emails on their servers. It just requires going through all of your email data, and reading each word as emails come in. While a less private, traditional big-tech email provider can search every word of your emails rapidly on their servers, being able to read every word of your emails comes at a price to you; what happens to your data is out of your control. Your email provider may create a profile of who you are, send you personalized targeted ads, train AI models with your information, and share your data with third parties. They know a lot about you, yet you don’t know how your own data is used.

Why this doesn’t work at Proton

At Proton, this is not the case. We build technology with the fundamental belief that you should own your data. We cannot access the content of your emails, which is where the vast majority of your data goes and what you are likely to remember and later search. We can access email senders and subjects, as a part of PGP (“Pretty Good Privacy”) protocol, which is why historically we were able to more easily support searching on those fields. The content of your emails though, can only be decrypted on your device.

It would not be possible for Proton to build server-side email indices, with each keyword in each user’s email, because we cannot index what we cannot see. To illustrate the problem more precisely, imagine Proton trying to build a table, like the one above, on encrypted data, which is your email content. Visualize encrypted data like random blobs of incomprehensible text; this is what your email content looks like to us. First, we would not be able to fill out the keyword column on the left, since we would not be able to figure out what your emails’ keywords are. Then, we also would not be able to create the list of emails on the right, because we would not be able to find the keywords within those emails.

How we rebuilt search on your device

The engineering solution that we ultimately landed on to support private email content search, was to build the index where your data is decrypted: directly on your device.

When you activate content search, your device performs a brief set up to get your index built privately. All your historical emails are downloaded to your device, decrypted, and stripped down to keywords. The inverted index is then built, encrypted, and stored securely, again, still on your device. The next time you search for a word in the body of an email, your device performs a search on that local index, and gives you what you are looking for. The results from the search of your email content doesn’t come from our servers, it comes from your device.

search inline

What to expect during setup

Once you turn on Email Content Search, you’re good to go. Future emails will be automatically indexed and privately searchable. If for any reason you ever want to remove your index, you are in control. Just delete it in settings — but remember you’ll have to set it up again, if you change your mind.

The initial downloading and indexing process might take a little bit of time depending on various factors, like the size of your mailbox, your Wi-Fi connection, and battery. But most people should be able to set their index up in the background easily, within a few minutes. If you have a decade of emails on your Proton account, it will take slightly longer, but leaving the app open in the foreground and putting your phone to charge while letting it work should help speed up the process. The local index will also take up a small amount of storage on your device — about 50MB for tens of thousands of emails, comparable to 10 to 15 high resolution photos.

Privacy without the tradeoff

While we recognize that this search set up might feel a little new to users who are coming from less private email providers, we hope this information is helpful in understanding why and how our engineering team finds workarounds for conventional technical approaches to ensure that your data belongs to you. At Proton, we believe that you don’t have to choose between technological function and privacy. You should be able to have both, even if it requires a little more work and time for us to make that possible.

Proton Mail QR code for download

Not on Proton Mail yet? Create a free account.