7 ms·
E2EE on the web: is the web that bad?
- dariosalvi78 3y agoThere is still a reason for E2EE where you trust the source, but the source simply _doesn't want_ your data. Unfortunately data on a server is necessary in an infrastructure that has no guaranteed persistence (looking especially at you Safari), or when you want to switch client seamlessly (for example from your laptop to your phone).
- SomeoneFromCA 3y ago"Unlike web apps, desktop applications are often written in vulnerable memory-unsafe languages like C++." As if browsers (arguably the most attacked desktop applications) are not wriiten in C++.
- forty 3y agoIt's not only E2EE. Let's say you would rather not know your users passwords (which I think it commonly agreed upon good security hygiene, at least for storage, but it makes sense that you wouldn't want to have them at all on your servers). You are going to hash it client side with some password hash or even better using some aPAKE. Great, except it's all moot since your password handling code comes from your compromised server. I wish there were practical solutions to this problem.
- boomlinde 3y agoMutual authentication without sharing secrets is already supported at a protocol level in some sense, via client certificates. The relatively straight forward and intuitive nature of password authentication might explain why it hasn't caught on as a replacement.
- a-dub 3y agosigned code bundles with sts must-staple style semantics for preventing downgrades sounds reasonable. would probably also need some kind of protection in the browser runtime that prevents/limits scope of changes to execution that can be evoked via web resources outside of that bundle. kinda starts to point towards a move from traditional www domain/location security semantics to abstract identity based approaches.
- fatkam 3y agoE2EE can be done anywhere, but of course some entities like Google or Apple might try to spy locally.
- kibwen 3y agoIndeed, the article's assertion that "mobile is convincingly a more secure platform" falls over if you don't trust the gatekeepers holding the keys.
- Andrex 3y agoAnd even if you trust them, they could be compromised now or in the future: https://www.computerworld.com/article/3712380/russia-hacks-microsoft-its-worse-than-you-think.html https://www.computerworld.com/article/3712380/russia-hacks-m...
- tptacek 3y agoSo that's fine and all, but if you've lost that trust in the platform itself, you can't trust any E2EE; it's not as if browsers somehow fare better in that analysis; they are in fact strictly worse.
- fatkam 3y agobrowsers do add one more layer of trust when thinking about the OS, but any mobile app also does?
- lmm 3y agoBrowsers can run on platforms that don't have secret baseband firmware, obligatory auto-updates, etc. etc.. Obviously a layer on top of a specific platform can never have better security than that underlying platform, but you can run a browser on a better platform.
- mjevans 3y agoYes, https://news.ycombinator.com/item?id=39315585 https://news.ycombinator.com/item?id=39315585 " Why Bloat Is Still Software’s Biggest Vulnerability > A 2024 plea for lean software " The problem involves so many dependencies that it is impossible for an individual and maybe even megacorporations to fully audit the code base and prove the software behaves as intended. Everything these days is best effort. We _need_ a native interface that portable software can target, to at LEAST get to the level where 'If you trust the OS, then the rest of the software is known to behave as expected' is a statement that can be made to have a plausibly secure environment for End to End Encryption on anything. This __has__ to ship, in a DEFAULT install of Windows AND OSX AND mobile computing devices (so iOS and Android too). It absolutely has to be a baseline target, otherwise we'll never get past shipping the browser, again, out of band as yet another thing that must have it's entire monstrosity of libraries updated for every security patch.
- treyd 3y agoIt shouldn't even be as hard as it appears. If the business logic is designed as a generic library made to be portable to different platforms then you can call into it from a native application built using whatever the native UI toolkits and conventions for that platform are. Libtorrent is a shining example of this architecture. It runs everywhere, even on mobile platforms. Rust being more popular with makes this even more accessible than it used to be. There's even libraries like PyO3 to make writing bindings to other languages easier.
- bawolff 3y ago> The problem involves so many dependencies that it is impossible for an individual and maybe even megacorporations to fully audit the code base and prove the software behaves as intended. Everything these days is best effort. Everything has always been best effort, there was no point in time that formally verified software was mainstream. Even attempts at that have turned out broken later on (e.g. KRACK attack on wpa2) so its not a pancea. > We _need_ a native interface that portable software can target, to at LEAST get to the level where 'If you trust the OS, then the rest of the software is known to behave as expected' is a statement that can be made to have a plausibly secure environment for End to End Encryption on anything. This doesn't really make sense unless this portable interface contains the entire App. Like how do you imagine such a system would work? What would such an interface do or contain that would bring this dream even remotely close to reality?
- wmf 3y agoIt seems like "code from a zillion servers, retrieved over a zillion TLS connections" can be solved by serving the app from a single origin. You have to vendor your dependencies but that's probably wise anyway.
- michaelt 3y agoIsn't the whole point of using E2EE on Company A's messenger app that you distrust Company A? After all, they could easily serve up slightly different js when you log into their website; for all practical purposes it would be undetectable. Being reasonably confident that you're running the same code as everyone else seems pretty important to me - and that's not how the web works.
- wmf 3y agoThat's the ideal but browsers don't support that today. Trusting the client but not the server is weaker but still better than nothing.
- bawolff 3y ago> That's the ideal but browsers don't support that today. Which is why people say E2EE is unsuitable to the browser. Sure there exists other threats and other security issues in the browser, many of which can be addressed by various means, but that is a different thing than E2EE.
- hexo 3y agoYes, it's odd to me that everyone has to serve some random JS from some random ( to me very untrusted) third party cdn server. Why every single random site has to have like 8 different domains with random character variations and serve javascript from it. To me that seems completely bonkers, absolutely unstrustworthy and extremely lame, as if they have no actual money to do it like a normal person. Like FB serving stuff from facebook dor com but also from random, lame domain fbcdn AND also fbsbx (wtf is that???!?, i dont trust it at all). And thats on the "reasonable side", random wordpress site or eshop is a complete nightmare in this regard.
- bawolff 3y ago> Often, security experts argue that the web isn’t suited for E2EE applications because of the vast attack surface for code injection – abusable by the developer or by an external attacker. For many web applications, a web browser receives and runs code from a zillion servers, retrieved over a zillion TLS connections. This feels like the wrong argument. I don't think this has anything to do with suitability of end to end encryption. It is easily worked around with e.g. subresource integrity, or rolling your own signing scheme. The real problem with end to end security on the web is you don't have a trusted base. You have to bootstrap your application with some sort of trusted base. On a website you are redownloading the website everytime. The entire point of end to end encryption is that the service provider should not be able to intercept messages. The service provider is the attacker. This is impossible to prevent if you redownload the app everytime you open the page†. You have to build trust from some starting point. If you have some trusted bootstrap code you can build from there with signatures, but you can't build trust out of thin air running code directly supplied by the party you are trying to protect against. The problem isn't the zillion TLS servers. The problem is the first TLS server, which in the e2ee threat model we have to assume is evil. † i guess service workers can extend that to once every 24 hours. Still not super compelling.
- JoshTriplett 3y ago> It is easily worked around with e.g. subresource integrity, or rolling your own signing scheme. Or, you know, not loading resources from third parties in your secure web application.
- saurik 3y agoThis is where IPFS can shine, as (if you don't use the very-optional IPNS) you are browsing directly to a fixed hash that your browser could (it doesn't, but this is trivially fixable) verify; it thereby exists in a space between pre-downloaded and web-requested software (with different tradeoffs, some positive and some negative; but like, all three of these options have negatives).
- bawolff 3y agoYes, i agree, this is one of the most interesting aspects of content-addressable networks like IPFS.
- nightpool 3y agoDesktop applications are uniquely auditable by security professionals in a way that web sites inherently aren't. It's very, very hard to hide "send this unencrypted message to evilserver.com" in a desktop app in the same way it's possible to in a web app (because the web app could serve the evilserver.com code only to the targeted subject under surveillance and send only good code to the rest of the world). And mobile apps have the explicit review pipeline you mention. So web apps need some sort of "frozen, trustable, third-party reviewed" version to be able to match the security of desktop apps.
- solatic 3y agoThat's not really fair in the day and age of Electron apps. If the Electron app downloads JS code to run in its embedded browser / NodeJS runtime, then it's subject to similar attacks. Hypothetically, so too could any traditional desktop binary download and execute code. An audit will only reveal that such capability exists, not whether or not it is being abused. If that's genuinely part of your threat model, then you simply must run on-premises code only, backed up by robust network controls that allowlist very specific parts of the Internet.
- immibis 3y agoIndeed Microsoft Teams once contained a bug where specially-formed HTML messages could trigger arbitrary code execution when received. Any platform where the security model is two steps: 1. Check if the message contains any code. If so, reject it. 2. Scan the message for code and eval() it. is extremely susceptible to code execution bugs.
- nightpool 3y agoCorrect. I do not think applications with such a vulnerability should ever be used or marketed as "end-to-end encrypted", since that implies a promise that a malicious or suborned vendor could not be compromise your communications—which, in the case of remotely loaded code, is misleading. I think this is table stakes for any e2ee communication app (e.g. Signal can do this easily since Apple and Google and many third-parties audit their code) but if it conflicts with your current app design, you should be realistic about whether a true e2ee-required threat model can be accommodated by your app.
- shitter 3y agoIt seems like using a browser extension instead of a website gets you most of the way there: - Extensions are signed with a developer key - You can be pretty sure any code changes pushed out to one user are pushed out to everyone - You benefit from the Chrome Web Store review process (or whatever equivalent Apple and Mozilla do) - Extensions are permissioned and sandboxed
- Andrex 3y agoMore relevant to the article, Chrome extensions can't just "open a zillion connections." Included scripts must be unminified and external scripts are strictly declared ahead of time with more secure default permissions. I like that idea.
- shitter 3y agoIndeed, Manifest V3 disallows remotely hosted scripts entirely: https://developer.chrome.com/docs/extensions/develop/migrate/improve-security https://developer.chrome.com/docs/extensions/develop/migrate...
- deleted 3y ago[deleted]
- Groxx 3y agoI mean, kinda. It's little more than a consumer-grade padlock or maybe "do not cross" tape - there are countless ways around it, it mostly just encourages normal cases to be more static (which is a good thing! but very far from a security tool)
- buu700 3y agoIf we do care about the delta in security model between the web and other platforms, then we could build some kind of code bundling and signing mechanism for web applications, perhaps with some kind of transparency layer on top to make the code publicly auditable and make it harder to target specific users with malicious code. A bundling/signing/transparency solution for the web could probably be built out of some of a collection of mechanisms that already exist or have at least been explored. Related ideas include Subresource Integrity, Isolated Web Apps, Signed Exchanges and Web Packaging, Meta’s Code Verify extension, and source code and supply chain transparency proposals. Incidentally, I've actually just recently developed a solution to this exact problem: https://www.websign.app https://www.websign.app. WebSign started a while back as an internal framework used by the Cyph E2EE messenger (https://www.cyph.com https://www.cyph.com), and @eganist and I gave a talk that covered part of the TOFU architecture at Black Hat and DEF CON. Now there's a static web hosting service built around it for others to use, which takes care of bundling and code signing during deployment. If anyone here has a use case for it, we're looking for pilot customers now. Just shoot me an email at ryan@cyph.com.
- throwaway290 3y agoI thought it was vaguely interesting until where you write how blockchain-based DAO "will enhance the scalability and transparency" of your infrastructure...
- buu700 3y agoAppreciate the feedback on the messaging. I can see how mentioning that risks painting the whole thing with a brush that won't appeal to everyone. To be clear, what you quoted is an idea that has been requested by some potential customers — essentially decentralized and distributed code review/signing. It's not a feature of the current product, and likely won't be until someone pays for it, although I do think it would be cool. Either way, it's not something that would detract from the fundamental value proposition. It would be an optional add-on.
- throwaway290 3y ago
- mortallywounded 3y agoIsn't the main issue with e2ee on the web the fact that you're battling on three fronts? 1. You need to securely get the code and resources to the browser. A state level attacker can make this very hard. 2. You need to securely run the code on the client which may or may not include code from n-third parties. 3. You need to securely handle data and logic from the client which may or may not involve n-third parties. Phew. That's a heck of a challenge.
- tptacek 3y agoAn amateur attacker can make getting cryptographic code securely to a browser very hard. :)
- bawolff 3y ago> You need to securely get the code and resources to the browser. A state level attacker can make this very hard. Even worse, you need to securely get code to the browser without trusting yourself. The E2EE model assumes that you (the service provider/app maker) will turn evil at some future point. Code distribution is hard enough if you can trust yourself. Its basically impossible if the threat you are protecting against is your future self.
- ta2234234242 3y ago4. You need to not trust the cert authorities installed in a system.
- nektro 3y agoseeing "memory-unsafe languages" in an article is one way to get ppl to instantly click away
- mortallywounded 3y agoI'd say neither web or desktop are easy. Cryptocat was a great example. It started off as a web app and got a lot of heat. Was rewritten as a desktop app and still failed. https://en.wikipedia.org/wiki/Cryptocat#History https://en.wikipedia.org/wiki/Cryptocat#History
- shitter 3y agoThat's more to do with the E2EE implementation than how it was deployed... Cryptocat did a lot of things wrong other than using crypto in the browser.
- Retr0id 3y agoI think Code Verify (mentioned in the article) is the right approach https://engineering.fb.com/2022/03/10/security/code-verify/ https://engineering.fb.com/2022/03/10/security/code-verify/ Although it's all open source, if you install the published version of their extension, iiuc, it will only work with certain facebook sites out of the box. There should be an easier way to enroll new sites - I'm thinking TOFU with fingerprinting.