Encrypting cookies and cache

2,353 views
Skip to first unread message

Anonymous User

unread,
Jan 19, 2018, 11:38:49 PM1/19/18
to Security-dev
Since cookies are responsible for website sign-ins, and cache is a saved copy of the websites you have been visiting, I am wondering if there would be any chance that Chrome could start encrypting (if it doesn't already) cookies and cache locally with the Windows Data Protection API.

Eric Lawrence

unread,
Jan 20, 2018, 9:43:12 AM1/20/18
to Anonymous User, Security-dev
On Windows, Chrome encrypts some local data using DPAPI; that includes the passwords database and, if I recall correctly, cookies but not the cache.

However, it's worth noting that encryption using DPAPI is only useful against a small set of threats, because any process logged into Windows as the current user can decrypt the data as DPAPI uses a symmetric key that is stored in the current user account. (Hence, DPAPI does not protect against malware.)

If you're concerned about an attacker gaining physical access to your device (e.g. you lost it or it was stolen) then you should definitely consider enabling the Full Disk Encryption option (aka Bitlocker) available in modern versions of Windows.

Anonymous User

unread,
Jan 21, 2018, 10:01:32 PM1/21/18
to Security-dev, 93m4q...@gmail.com
What about other user data, such as bookmarks, extensions, browsing history, maybe download history, hosted app data, and media licenses?

Eric Lawrence

unread,
Jan 22, 2018, 11:36:30 AM1/22/18
to Anonymous User, Security-dev
For the most part, the Chrome browser does not encrypt files on the user's disk; users whose threat models include attackers gaining physical access to the device should enable the Full Disk Encryption option in their operating system. (Chromebooks do this on your behalf, for instance).

In general, having applications encrypt their own files doesn't make a lot of sense, because the decryption key is (necessarily) available to the application. That means that in an attacker in a position to steal the encrypted files is also usually in a position to steal the decryption key.

-Eric

93m4q...@gmail.com

unread,
Jan 22, 2018, 9:33:19 PM1/22/18
to Eric Lawrence, Security-dev
So if you're saying that it's pointless to encrypt user data with DPAPI, wouldn't that mean it also isn't sufficient for encrypting sensitive passwords and credit card numbers?

Is there any chance Chrome might start encrypting other user data (i.e. should I file a bug)?

Chris Palmer

unread,
Jan 22, 2018, 9:41:50 PM1/22/18
to 93m4q...@gmail.com, Eric Lawrence, Security-dev
If you're concerned about forensic attackers (and you should be, even if only due to device theft or loss), you should use full disk encryption.

If you're worried about local malware running at high privilege, it's too late.

If you're worried about opportunistic attackers taking over your local, logged-in session, log out or use the lock screen.

93m4q...@gmail.com

unread,
Jan 23, 2018, 9:22:13 PM1/23/18
to Chris Palmer, Eric Lawrence, Security-dev
If you're concerned about forensic attackers (and you should be, even if only due to device theft or loss), you should use full disk encryption.

I could use full disk encryption, but that doesn't mean Chrome shouldn't encrypt bookmarks, browsing history, and other user data.

If you're worried about local malware running at high privilege, it's too late.

What about local malware running in another standard account, but not at a high privilege?

If you're worried about opportunistic attackers taking over your local, logged-in session, log out or use the lock screen.

That is what I tell others when they leave their computers unattended, but that doesn't mean that Chrome shouldn't encrypt bookmarks, browsing history, and other user data.

Eric Lawrence

unread,
Jan 24, 2018, 1:49:57 PM1/24/18
to Anonymous User, Security-dev
If you're concerned about forensic attackers (and you should be, even if only due to device theft or loss), you should use full disk encryption.

I could use full disk encryption, but that doesn't mean Chrome shouldn't encrypt bookmarks, browsing history, and other user data.

Encryption is used to protect data from being revealed to an attacker. The value of encryption is predicated upon the encryption key not being readily available to the attacker. If Chrome were to encrypt "bookmarks, browsing history, and other data", Chrome would necessarily need to have access to the decryption key. That means that, in the majority of cases in a realistic threat model, the attacker would also have access to the decryption key, rendering the proposed encryption worthless. See also https://chromium.googlesource.com/chromium/src/+/lkcr/docs/security/faq.md#Why-arent-compromised_infected-machines-in-Chromes-threat-model

If you're worried about local malware running at high privilege, it's too late.

What about local malware running in another standard account, but not at a high privilege?

Your operating system's access control features should prevent malware running in another user account from stealing a different user's data. 

If the operating system's access control features are ineffective in this task, that shortcoming means that an attacker could also likely steal the decryption key, rendering encryption worthless.

Anonymous User

unread,
Jan 26, 2018, 12:43:11 AM1/26/18
to Security-dev, 93m4q...@gmail.com
If DPAPI is pointless, then how is it any different from complete lack of encryption in the case of the password manager?

Torne (Richard Coles)

unread,
Jan 26, 2018, 10:52:38 AM1/26/18
to Anonymous User, Security-dev
Just my opinion here; I don't know the history of this feature in the project:

The attack which DPAPI defends against is "someone has taken the hard drive out of your computer and dumped a copy of it" (it's not a defence against processes running on the computer for the reasons other people have explained here). It's not as good a defence as full disk encryption, and there's some performance impact to using it to store data (having to call into the OS to ask it to encrypt/decrypt things is never going to be free). Using this for all data would probably mean considering that performance impact carefully, and whether paying that cost is worth the security benefit to users who don't use full disk encryption - but that benefit is very small, because there's a ton of other data on a computer that doesn't use full disk encryption which is probably just as sensitive as their web browser cache, and so users who are really concerned about this definitely should use FDE instead of expecting all the software they use to encrypt things separately. However, the password store is used infrequently and updated even less frequently, so the performance impact isn't really a problem, so encrypting the password store isn't such a bad tradeoff.

Many *users* consider their stored passwords to be specifically important (even if they aren't aware that their saved cookies are almost as big a security risk), and so not encrypting them causes a lot of (probably misplaced) concern in those users - encrypting them makes those users at least feel a bit better, I guess? So, you could probably say that encrypting the password store is at least partly security theatre. The past concern by users about passwords being directly viewable in the browser (which was addressed in many cases by requiring the sync password) is similar - the users here are probably worrying about the wrong problem, but if a fairly straightforward step helps them feel better and has few downsides then it might be worth considering.

Andrei Alexandru

unread,
Jul 15, 2022, 4:30:02 PM7/15/22
to Security-dev, to...@chromium.org, Security-dev, 93m4q...@gmail.com
why chrome is not simply using a master password for each session so  user data created with chrome stays always encripted? 
Reply all
Reply to author
Forward
0 new messages