I've recently been doing some research on Host-Proof Hosting, specifically in a web app environment. It seems like a pretty rock solid method of security, but I'm certainly not a security expert and would like to get some other opinions.

Aside from obvious client-side vulnerabilities (key loggers, physical observation, etc.), what are the vulnerabilities in Host-Proof Hosting?

As a note, the web app that I'm researching for uses SSL for all connections, so a basic man-in-the-middle attack wouldn't count here (although, I don't know that it would matter much).


If your goal is to mitigate the risks of compromise of the server's database or data store, then encrypting the data on the client side (before it ever reaches the server) can be useful.

  • If a copy of the server's database falls into enemy hands, probably the enemy won't be able to decrypt all of it (the best the enemy can do is password cracking, which may reveal some of the data but not all).

  • If an enemy compromises the server, the enemy won't learn too much about previously stored data (the enemy can get a copy of the server's database, but this won't reveal too much about previously stored data). However the enemy can still spy on all subsequent data, by putting a backdoor in the Javascript that is sent to clients.

If your goal is to protect against a malicious server, or to ensure that if someone compromises the server they cannot do any harm, then "host-proof hosting" (encrypting the data on the client side) cannot live up to those goals. It cannot prevent a compromised server from sending backdoored Javascript code to the client. If the Javascript is backdoored, then you cannot rely upon it to encrypt your data properly.

See also Javascript Cryptography Considered Harmful and the questions that @Andrey Botalov linked to, for futher information.

  • That 'Javascript Cryptography Considered Harmful' is a good read, though he seems to contradict himself by only pointing out flaws and not providing solutions. What is the solution then - I don't want to store keys on a server, to avoid access if there is a breach, so how can I keep my user's data safe? – jwegner Jul 20 '12 at 14:56
  • 1
    "he seems to contradict himself by only pointing out flaws and not providing solutions" - That's not contradicting himself! – D.W. Jul 22 '12 at 22:40
  • he says in his list paragraph "It's one thing to point at the flaws that make it hard to do cryptography in Javascript and propose ways to solve them; it's quite a different thing to simply wish them away." I'd like to see proposals for ways to fix things, rather than just pointing out the problems. – jwegner Jul 23 '12 at 13:37
  • @jwegner- some of the problems are fundamental and do not have any obvious solution. For instance, there is the chicken-and-egg problem: if you don't trust the server, you can't trust that it will send you good Javascript (as opposed to bad, malicious Javascript that steals all of your secrets). If you want to design a secure system, an important part of that is to understand those fundamental challenges, because they may constrain what problems are solvable and what are not. In your question you assume "host-proof hosting" is a good way to get security, but I'm not sure that's true. – D.W. Jul 23 '12 at 17:07
  • Not saying that Javascript Cryptography is secure but just to have another perspective and food for thought: Thoughts on Critiques of JavaScript Cryptography – TheRookierLearner Nov 30 '13 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.