I am wanting to develop a web service (classic client/server) where the server is not trusted, so is kept (cryptographically) ignorant about the actual content/messages.
Obviously, if you don't trust the server, then you shouldn't trust any client that server hands you. So our client would have "no moving parts" - that is, one composed entirely of static files (no PHP/Ruby/whatever, no database), just a bundle of JS/HTML/CSS to be distributed separately.
A client like this could run locally on people's computers, or as a GitHub page, or via any webserver. The idea is that more people are capable of extracting a ZIP onto their computer (or using simple FTP) than would ever be likely to host their own server or configuring a database appropriately.
I'm not trying to guard against being individually targeted - I'm trying to guard against a single centralised point of attack, so every client would have to be compromised individually to get the messages for a particular user/group.
What would be the security implications/drawbacks of a setup like this?
Clarification: the method by which the ZIP of the client is obtained is not the issue I'm interested in. Technologies already exist for that (public-key signatures of hashes, et cetera). The issue of "How do I make sure I have a good copy of the client" is completely equivalent to "How do I make sure I have a good copy of my browser/Cygwin/antivirus" - I'm not interested in any concerns about this that could also be applied to installing FireFox, for instance.
What I'm interested in is any security issues with the setup, assuming that a verified version of the client is available.
P.S. - I'm aware that JavaScript crypto is frowned upon (example article here). However, the criticisms seem to be:
- You rely on obtaining a secure client from the untrusted server
- JavaScript code can't be sure that the VM running it is secure
#1 is exactly what I'm trying to tackle here, and for #2: if your browser's JavaScript VM is dodgy, then all websites are unsafe, as well as your credit-card details.