Lurker News
Back to discussion

Comment by devinsit

devinsit1 reply#
That's the thing, the key isn't controlled by me. The key is derived from your account password. If you want some more technical details, feel free to check out https://ufincs.com/policies/security. tl;dr Yes, that browser API is called WebCrypto.

As for storage, all data is kept in-browser in local storage (specifically, IndexedDB), until it gets saved to our database. And before it leaves the browser to be saved in our database, it gets encrypted using the user's key.
Finally, if you only ever use the 'no account' option (https://ufincs.com/noaccount), then all your data is only ever stored in-browser; it never gets saved to our database because you don't even have an account to save it to! Feel free to monitor the network requests to prove it for yourself (or even turn off your network connection).
Hopefully that makes things more clear.

Someone1 reply#
So, when you change your password, all data flows back to your browser to be decrypted, then gets re-encrypted, and sent back?
devinsit1 reply#
Hmm, that's a good question to add to the Security doc!

Not quite. See, we make use of a scheme called envelope encryption. That means we have two separate keys: one to encrypt your data (the 'data encryption key' or DEK) and one to encrypt the DEK (the 'key encryption key' or KEK). We use the KEK to encrypt your DEK to get something called the 'EDEK' (or 'encrypted data encryption key'). The EDEK is what we store in our database.
Something that never changes after you sign up is your DEK. This is completely random and not dependent on your password.
What is dependent on your password is your KEK. So when you change your password, all that actually changes is your KEK. With your new KEK, we just re-encrypt your DEK to get a new EDEK, and we store that new EDEK in our database. Again, the Security doc (https://ufincs.com/policies/security) outlines the basic process.
So no, all your data isn't passed back to the browser to be decrypted and re-encrypted when you change your password, but thanks for the question!

Someone2 replies#
“With your new KEK, we just re-encrypt your DEK”

⇒ when users change their password, you have access to the DEK (you decrypt it and then encrypt it with the new KEK)
“one to encrypt your data (the 'data encryption key' or DEK)”
⇒ when users change their password, you could decrypt their data.
I think this boils down to “you don’t store user passwords, but when users change their password, they must trust you to not look at your data or store the KEK”.
Where’s my error?

Continue this thread — 2 replies