How Firefox Sync keeps your secrets if TLS fails

Ryan Kelly
Mozilla Tech
Published in
2 min readFeb 25, 2017

Yesterday it was revealed that a bug in Cloudflare could cause requests secured with Transport Layer Security (TLS) to leak confidential information. Many websites depend on TLS to secure private request data like cookies and authentication tokens, making the potential impact of such a bug quite severe.

It’s important to note that Firefox Sync was not affected by this incident, as Mozilla does not use Cloudflare on any services that handle user data.

However, this is also a timely reminder that bugs happen, and that software can fail in unexpected ways. So it’s worth considering: if our systems were to be affected by a similar bug that leaked confidential data transmitted over TLS, would your Firefox Sync data remain safe?

The answer is yes, your secrets would remain secret, thanks to additional layers of security built into the system.

The security model of Firefox Sync ensures that your sync data is encrypted before it ever leaves your machine, and that the password to unlock this encryption is never transmitted to the server. Not even Mozilla can access your sync data, so while we transmit it all over TLS for additional security, we do not depend on the confidentiality of TLS to keep your data safe.

How? We use the account password to build an additional layer of security and encryption on top of what’s provided by TLS. This part gets a little technical, and if you are interested in learning more please visit the detailed protocol documentation, but as a high-level summary:

  • When you enter your Firefox Account password, we first strengthen it by applying some cryptographic hashing, and then derive two separate keys: an authentication key, and an encryption key.
  • The authentication key is transmitted to the server to prove that you own the account. A bug in TLS might cause this key to be leaked, and someone who intercepts this key could use it to authenticate to your account. But they cannot use it to access your sync data, because:
  • The encryption key is used to encrypt your sync data before it leaves your machine. Since this key is never transmitted to the server, it cannot be leaked by a bug in TLS like the one that affected Cloudflare.

The stronger your password, the more protection this scheme can offer - so choose a strong and unique password for your Firefox Account, and rest assured that Firefox has your back with multiple layers of security to protect your sync data.

--

--

Ryan Kelly
Mozilla Tech

Engineering Lead for @Firefox Accounts at @Mozilla