I have an idea for a web app that I'd like to discuss. I like it a lot but chances are that I missed some evident security hole. Or, maybe it just sucks.
The idea is a web-based secure text notes manager, with the following features:
- because it's web, it can be accessed from anywhere;
- importing/exporting encrypted notes;
- the only thing stored on server are encrypted notes (no user accounts! more below);
- local version (use on your own server);
- password is never stored anywhere (not as a hash or anything).
Here is how it works:
The server keeps a database of notes, where each note has:
- author's email;
- encrypted content;
- metadata (modified time, etc).
When a user opens the web app for the first time, it asks for email.
(Oops, new users aren't allowed to post images! Please follow this link for a screenshot: dl.dropbox.com/u/456669/Screenshots/3EqQx.png )
If this email has not been used on this device before, a message with validation link is sent. (Link, of course, expires very soon).
dl.dropbox.com/u/456669/Screenshots/VJXPN.png
After validation, the device+email combination is saved into a cookie. Encrypted notes are loaded from server.
After that, all job is done with Javascript, no server interaction.
The app asks for password.
dl.dropbox.com/u/456669/Screenshots/O4iOp.png
Notes are decrypted with password. Then, there goes the actual user interface for managing notes (it will be super nice, but that's not the topic of the discussion).
When saving changes for a note, it's encrypted with entered password (which is stored in Javascript variable, or in paranoid mode, asked again). The encrypted note is synced with server.
Why I like the idea
I get access to my secure notes from anywhere (home, work, guests, travel).
I can be sure no one can access my notes. If someone enters my email, I receive a validation email, which I decline.
If my email is hacked, and a hacker accesses my notes, he still needs password to decrypt them.
Password is only used to decrypt notes. In other words, wrong password simply means messy notes on screen.
Open source means I can install it on my home server, and do not trust a 3rd-party service.
Not perfect
While I was writing that, a problem occured to me. Because the app cannot check if a password is correct (that's the idea!), there needs to be some way to prevent user from entering wrong password, getting "messy" notes, and then saving them on server. Hmm!...
Anyway, thanks for reading, and thanks in advance for your thoughts and feedback!