Take the 2-minute tour ×

I'd want to build a secure file storage web application.

Currently ordinary password authentication is used for login. After login this password is used for encryption and decryption of user files at server side. Thus only this user has access to them.

But user can't be sure that:

  • a man at server side isn't able to decrypt them
  • files are actually encrypted.

Is there a way to store user files securely and solve those problems?

Note that users should be able to access files not only from one computer.

share|improve this question
What you are asking for is called a 'Trust No One' (TNO) or 'Zero Trust' architecture. In the USA TNO is required for web applications in the health care space. In a TNO system it will not be possible for the operator of the server to recover the password of the clients, because only the client can have the encryption keys. –  Jim In Texas Jul 5 '12 at 19:22
Spideroak have a very good overview of their TNO/ZT/Zero Knowledge system at spideroak.com/engineering_matters –  scuzzy-delta Jul 6 '12 at 0:59

1 Answer 1

up vote 6 down vote accepted

If you want to make sure that the server isn't able to decrypt the file, you must not reveal the password to the server. Therefore

  • the encryption password must not be used for server-side authentication;
  • the data must be encrypted on the client side.

You can build complex architectures, but fundamentally, if you don't trust the server, don't give it your password.

An simple web application (server-side PHP plus client-side JavaScript) that does this is ZeroBin. I recommend reading this write-up on Ars Technica about a site based on Zerobin. ZeroBin does not perform any authentication, which may or may not be what you want — this is just an (open source) example to illustrate the principle.

In order to have confidence that ZeroBin does not reveal your data to the server, you need to review the JavaScript code that is executed in the browser, and convince yourself that it performs as advertised.

Alternatively, if you want to perform the encryption server-side, you need to assure yourself that the server is secure enough for your needs. That means you need to trust (or have some third party (that you trust) verify through an audit) that:

  • The server does not store or leak passwords.
  • The server code behaves as advertised; in particular, it only stores encrypted data and promptly erases any temporary copies of plaintext.
  • The data in transit is properly protected.
  • The server is physically secure, so that no intruder can access your data or your password while it is in use.
  • People with legitimate access to the server (e.g. system administrators) are trustworthy.
  • This state of things will remain true as long as you use the service.
share|improve this answer

Your Answer


