81 karma · joined December 27, 2019
https://github.com/crypto-browserify/diffie-hellman/blob/mas...
All you need is your password to sign in.
I was only describing the hypothetical approach we're planning to implement for someone who forgets their password.
And yes, if I'm understanding right, I think those threat risks are very different. One is trusting your device which you yourself have control over, the other is trusting a cloud-based service provided by Apple, which you do not have control over. Not everyone uses Apple products either :)
Edit: But alas, it's a user's choice how they want to save their password. If Apple provides a static key over this service and users really want this option, it's definitely worth exploring further :)
You can't sign in with just the temporary password. You need the key as well.
Using google or Apple like that would destroy the end-to-end encryption scheme
Only that particular password reset mechanism I described benefits from local storage. It's difficult to explain in one comment. We'll have clearer diagrams and explanations soon :)
The memory option does exactly what you said, derives the encryption key dynamically from the password in memory.
It's actually a bit more complex in how it works under the hood (i.e. the above isn't exactly how it works), happy to get deeper into the details :)
Note this option is provided in the form of the rememberMe parameter here: https://userbase.com/docs/sdk/sign-in/
Your Q&A scheme is also definitely a plausible backup option! Thanks for the suggestion!
My interest in this project was born out of wanting to do something similar for my own application. Didn't see any good options at the time and now there is one!
Long answer: Based off my understanding, we do implement something analogous to SRP with some minor differences.
We'll have supporting documents explaining our approach complete with diagrams soon. But for right now, this is close to what the architecture looks like for clarity:
https://user-images.githubusercontent.com/26468430/69532862-...
In order to be fully authenticated, the client must first prove they know the password token. The server then sends the client the password encrypted seed, then the client proves they can decrypt that seed (using Diffie-Hellman). So functionally the client is proving it knows both derivatives of the password to the server.
Note there are 2 major differences between that image and what's currently in the code:
1. We also do a single SHA-256 hash of the password token before storing it on the server (prevents someone with access to only the server's data from passing round 1 of our authentication flow)
2. The optionals are not optional anymore, what I described above is how it’s working today.
Disclaimer: there are a lot of missing pieces in the above description. So if it feels like there are gaps, that's why. It's difficult to explain the full scheme in a single comment like this.
Our approach is pretty similar to Firefox's described here: https://hacks.mozilla.org/2018/11/firefox-sync-privacy/
And the existence of password managers disproves your claim regardless. It adds more friction to my life to use a password manager versus an insecure password.
We're hitting a very particular tradeoff with this product, one which is largely untapped. We'll see which way the chips fall :)
I said we'd store the user's key in local storage referring to the user's randomly generated key our client uses to encrypt data before sending to the server.
Passwords are never stored in plaintext anywhere. We don't even send passwords to the server in plaintext -- we hash passwords client-side.
But yes, even storing the key in plaintext in local storage has undesirable properties, which is why it's opt in. But an app that encrypts data with a key stored in local storage has a significantly higher level of privacy than an app that sends all data in plaintext to the server for storage.
However, your customers also don't want to hear that you were hacked and all their sensitive data is now in someone else's hands. We offer easy-to-use protection from that increasingly common scenario.
You (and your customers) also presumably don't want you to break privacy law regulations storing data. We offer a super simple service that helps you there.
Time will tell what the people want! :)
That's my idealistic way of looking at it. Practically speaking, the burden on developers to adhere to GDPR and other data privacy laws is quite high. You can use this service to store sensitive user data and relax :)
Compared to Parse, we offer a simple SaaS product.
Compared to Firebase, we have a much simpler pricing structure.
Considering how early on we are, we also have the benefit of being much simpler to start using (fewer features/options to wrap your head around and configure) :)
Yes, this is a thorny issue.
We chose to offer a service that keeps user data end-to-end encrypted by default. With that choice comes this tradeoff. And it’s a tradeoff similarly offered by practically every other end-to-end encrypted service I’m aware of.
That being said, we have plans to alleviate the weight of this tradeoff, and we’ve already written nearly all of the code. That code is pending a security review and further refinement.
The high level summary of it right now is: 1. you as the developer can opt to keep the user’s key stored in plaintext in local storage (via a single parameter passed to our signIn() method) 2. if a user forgets their password, they can get a temporary password emailed to them, then use it to sign back in 3. the user can then change their password normally