I’m trying to create a web app that involves sharing of user-generated content, but one of the goals is that the service host operator should be blind to the content. Only authorized users should be able to see the content shared with them. This implies the content must be encrypted at rest, and users must hold custody of their private signing key.
I figure the situation requires an open source browser extension to hold onto a user’s keys and decrypt content for them. The web app would still be able to browse all of the site’s metadata, but any plaintext content must be siloed in the extension. The reason for using an extension is that the source code would be open source and independently verifiable, while building the same functionality into the web app would require trusting the host to serve the code you expect.
Do you think that’s a reasonable tradeoff or is this asking too much from users?
The other option would be just requiring users to download an open source app for content viewing.
EDIT: Perhaps an important followup: are you OK placing trust in the host to never access your confidential data if it means you don’t have to install additional client software or worry about verifying that client software’s authenticity?
You’re saying you don’t want users to have to trust the website code that the server offers. So why would the user trust the extension instead?
Maybe because you can’t make sure the server uses the code it advertises without modification (The source code could be open and safe, but how can you make sure the website is actually using that?), while the extension is open source and could be downloaded directly from Github by the user. And if enough websites start using this system, it could gradually stop being an extra extension for that one website.
You’d have the server provide the code to your browser, and do the encryption/decryption client-side.
I would not install an arbitrary browser extension from Github. That’s just bad security hygiene. Extensions have way too many privileges, there’s not enough mechanisms to ensure that an extension is used only on the site that it’s intended for, and there’s no safe way to maintain updates. Heck, even extensions distributed on browser’s official marketplaces have been shown to be ridden with malware.
If you’re going to distribute code to run client-side for encryption/decryption, you may as well consider WASM. At least that’s sandboxed…
Yes, OP has a problem with this part. You’d have to trust the website to serve you the clean client side JS each time you use it. The proposal requires you to check the source code (which is plain un-minified JS) of the extension to make sure it’s doing what’s advertised when you download it the first time and with each update, instead of having to check the client side (obfuscated / minified) JS of every website each time you use it.
That’s true, but auditing that one extension (even on every update), which may be used by other websites in the future, giving it more attention and audits, is a lot easier than checking the client side JS of every website.