4 ms·
So are you saying this is a good thing? You think I should highlight this?
by gigamick 5y ago
So are you saying this is a good thing? You think I should highlight this?
- woodruffw 5y agoIt's a very good thing that it isn't susceptible to that particular weakness, as that would have been a disastrous one. But there are a lot of things that are left to be desired about this setup: 1. Message secrecy and the soundness of the encrypt-then-MAC protection seem to be partially, if not completely, dependent on the `APP_KEY` that you generated and are currently running the service with. For all anyone knows, that `APP_KEY` is all zeroes or comes from a bad RNG source. A better scheme wouldn't introduce a fundamental dependency on untrusted server randomness. 2. Message deletion is unsound: I have no proof that a note being "deleted" means that it's actually purged from your storage. I'm decently sure proving that is actually impossible in the general case, which is another reason why it's dangerous to have the note's encryption handled on the server side. 3. The "password" functionality seems to just be a string comparison against a DB-stored password. It's not mixed into the secret material for encryption at all. It's hashed at least, which is good, but it doesn't look like it's salted, which is bad.