Zero-knowledge web application
From Seo Wiki - Search Engine Optimization and Programming Languages
|This article is an orphan, as few or no other articles link to it. Please introduce links to this page from related articles; suggestions are available. (February 2009)|
|This article may contain original research. Please improve it by verifying the claims made and adding references. Statements consisting only of original research may be removed. More details may be available on the talk page. (February 2008)|
| This article does not cite any references or sources.
Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (October 2007)
|This article has been nominated to be checked for its neutrality. Discussion of this nomination can be found on the talk page. (July 2008)|
Zero-knowledge web applications are a special kind of online services that were defined and introduced by the development team at Clipperz in 2006. They dubbed their online password manager the first zero-knowledge web application, a web service that knows nothing about its users and their data.
Zero-knowledge web applications aim to leverage the Internet to manage personal data, especially sensitive one, without disclosing any information to the server providing the service. The basic idea is to deliver a 'no trust needed web service, where users have the ability to inspect and verify anything running in their browser. Zero-knowledge web applications drift the attention away from trusting the provider and let users focus on trusting the application.
The new paradigm for developing web applications is based on a small set of rules and principles, the so-called zero-knowledge methodology.
In order to avoid storing readable data on the server a zero-knowledge web application should encrypt and decrypt the data inside the browser. A neat idea, not new though. Richard Schwartz and others introduced the above concept under the name of host-proof hosting in the first half of 2005. Here is their definition from the AjaxPatterns wiki
Host sensitive data in encrypted form, so that clients can only access and manipulate it by providing a passphrase which is never transmitted to the server. The server is limited to persisting and retrieving whatever encrypted data the browser sends it, and never actually accesses the sensitive data in its plain form. It. All encryption and decryption takes place inside the browser itself.
A zero-knowledge application should be trusted for itself and not because of the reputation of its developers. Therefore full access to the source code of the application is required. This does not imply that a zero-knowledge application should be free or open source. As an example, Clipperz is released under a reference licence meant to allow security code reviews but prohibiting copying and forking.
Developers of zero-knowledge web applications must provide the same exact files that are loaded into the browser when accessing the application. Usually these files are quite difficult, almost impossible, to work with: spaces and comments have been removed, variables have been renamed. To make life easier to code reviewers, it's recommended to maintain the source files in their original form and provide instructions on how to derive the compressed and optimized versions.
Performing a code security review it's a complex matter, and it's quite likely that most users will rely on reviews performed by others. However any zero-knowledge web application should provide an easy way to verify that the application downloaded by the browser is the same application built from the code available for inspection.
Prevent code changes
Download before login
Avoid code injection
- Never, ever, use the "eval" function on data loaded from the server
The eval function offers great flexibility since it's able to "run" any string. But if a web application allows to use it to process data provided by the server, then any kind of code could be easily injected, thus hijacking the original application.
- Limit the use of the "document.write" function
Keep its use to the bare minimum, allowing for closer inspection when it is really necessary to use it.
- Never, ever, load any html content from the server
Loading html chuncks from the server is another easy way to subvert the behavior of the application. Just imagine what would happen if the server could push this little html snippet:
The scary part, is that this token could be hidden anywhere, even attached to a legitimate response. For this reasons, all the html elements used by a zero-knowledge application must be loaded together with the source code before the sign-in phase.
There are countless design decisions that could disclose information to the server. Sometimes data leaks are easy to detect, sometimes very subtle and dangerous. A zero-knowledge application should pay maximum attention to work with as little information as possible. It’s easy to fall for a new fancy feature that can destroy the whole security architecture.
As an example, consider the protocol behind user authentication. The following paragraph clearly explains why a zero-knowledge application should adopt the SRP protocol or an equivalent verifier-based protocol.
While any reasonably secure authentication protocol is expected not to leak any information about the password to eavesdroppers, protocols classified as zero-knowledge do not even leak any information about the password to the legitimate host (except the fact that the party at the other end really does know it). This subset of verifier-based protocols is strong indeed, since the host never stores plaintext-equivalent information and is never given any such information during the course of authentication. (from http://srp.stanford.edu)
SRP is complex and slower than traditional methods, but it's perfect to achieve zero-knowledge! Moreover it can be deployed without revealing to the host both the password and the username. As a consequence of the "learn nothing" mantra, every zero-knowledge application should be completely anonymous, or at least it should make it impossible to relate the real name or email of a user to his data.