4 ms·
You can't roll your own TLS replacement using Javascript, because you need some way to deliver that Javascript to the browser in the first place. If you don't u
by s_tec 7y ago
You can't roll your own TLS replacement using Javascript, because you need some way to deliver that Javascript to the browser in the first place. If you don't use TLS for that, you're doomed. Sure.
On the other hand, that's a pretty narrow definition of "Javascript Cryptography". The article overlooks a bunch of other useful cryptographic things you can do in the browser, like end-to-end encrypted messaging. You can't lose a giant database of customer data if you don't have a giant database of customer data sitting around. Javascript can encrypt stuff before it even leaves the browser.
If you build your service this way, an attacker would have to carry out an active attack that injects bad code into your Javascript bundle. That's much harder than stealing a database, and even if it works, it can only compromises the users who log in during the breach.
So, no, the right kind of Javascript Cryptography is actually quite beneficial.
- iudqnolq 7y agoYou're skipping over the part about users having to recheck what you serve them every request to see you haven't added a backdoor. Not sure how much security people being able to look at and pin versions with traditional software they build adds, but probably nonzero.
- s_tec 7y agoRight, and the only solution is to audit and compile all the code running on your computer, including firmware. Otherwise, you have no idea what your computer is really running. In the real world, most people run pre-built software, which is worse than this ideal. I agree that browser Javascript is worse still, but it's still better than sending secrets to a centralized server somewhere. Security is a spectrum, not a binary on/off thing like this article tries to paint it. Things can still be helpful, even if they aren't perfect.
- iudqnolq 7y agoI agree completely. I didn't intend to say you were wrong, just that you didn't mention an important consideration.