Reputation: 46987
I'm developing a journal web app and am trying to tackle what I foresee as the biggest problem - trusting me not to read other people's entries. The solution I have so far is:
While the trust is then on me to not record the keys (I hope to distribute a single-user version later on which will feature the same code) I can't help thinking there is either a more common way to do this or to a flaw in this thinking somewhere (I am not very knowledgeable on security or encryption other some probably flaky understanding of md5/sha1/blowfish). Is this the best way to go about this?
Upvotes: 0
Views: 144
Reputation: 269667
This is one of the rare cases where performing encryption and decryption client-side (via JavaScript) might make sense.
Encryption with a user key will protect journal data "at rest." But if I'm really paranoid, I won't trust you not to snoop on my journal entries "in flight," before they are encrypted and stored at the server. Client-side encryption eliminates that worry.
There are several JavaScript encryption libraries available. I recommend looking at JavaScrypt.
Upvotes: 3