mirror of
https://github.com/anonaddy/anonaddy.git
synced 2026-04-25 14:15:53 +03:00
[GH-ISSUE #163] [Feature request] "E2E" encryption of key user data fields #727
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/anonaddy#727
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xanoni on GitHub (Jun 1, 2021).
Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/163
It would be great if the user could define a symmetric, client-side encryption key that the browser would then use to en-/decrypt certain user-provided data fields. I'm thinking about data that the server never needs to see to operate, such as the user-provided alias descriptions.
Even more advanced would be an asymmetric encryption scheme, in which the server could persist certain analytical information after encrypting it with the user's public key. Things that are generated on the server, but that only the user/browser needs to be able to see. E.g., timestamp of last email received by alias.
The above would allow for more logging and potentially better user experience without sacrificing security and privacy. I'm aware that a full implementation of this would be a lot of effort (look at ProtonMail), but wanted to get the discussion started. I think a proof of concept (e.g., symmetric encryption of alias descriptions) could be relatively easy to do.
@willbrowningme commented on GitHub (Jun 3, 2021):
This is a good idea and something that would be nice to add.
I think adding client-side encryption similar to what BitWarden uses - https://bitwarden.com/help/crypto.html might take a bit of work to integrate into the existing setup though.
Also with BitWarden the server receives the master password hash whereas with AnonAddy the password in hashed on the server and then compared to the database password hash. So in order for it to be fully "zero-knowledge" passwords would need to be salted and hashed on the client side instead which I think would be quite complicated to migrate to.
This is an interesting article going into more detail on BitWarden's crypto and how it could be improved - https://dchest.com/2020/05/25/improving-storage-of-password-encrypted-secrets-in-end-to-end-encrypted-apps/
@xanoni commented on GitHub (Jun 3, 2021):
EDIT: Just looked at your link. Good points, but obviously it's still much better than no encryption, and you could always use a second password.
The complexity depends on the use case. If you find use cases where you can keep everything on the client side (and then just upload the encrypted content to the server), then you don't have much complexity. You could achieve the same with a browser extension that's totally independent of AnonAddy. (And indeed there are some that automatically encrypt strings in HTML forms when you hit submit and decrypt automatically when you come back to look at the content).
The question is, how do you avoid having 2 separate passwords for people who think that this is not good UX (I'd be fine with it). I remember that ProtonMail had 2 passwords in the past (one for login and one for local data decryption), but they designed an approach to hide the encryption key behind the login key.
Source: https://protonmail.com/blog/encrypted_email_authentication/
Example use case:
Today:
User enters alias description ==> browser encrypts information with symmetric password known to user ==> browser sends encrypted data to server ==> server persists data
Later today:
User goes to AnonAddy website ==> server sends encrypted alias description to user ==> browser decrypts string with symmetric password and displays it
@willbrowningme commented on GitHub (Jun 8, 2021):
Yes, I agree and understand your points. I'll have to do more digging to see if there would be an easy way to do this but can't promise I'll have time to work on it any time soon.
There is already encryption for recipient emails, descriptions etc. in the database but it is server-side encryption and not client-side. But it is still an extra layer of protection in the event of a database leak.
@xanoni commented on GitHub (Jun 8, 2021):
I understand how much work this is and I don't think this is urgently needed, assuming AnonAddy doesn't start tracking more user data and storing it centrally. I just wanted to start a discussion thread, so people can get this into the backs of their minds for when the right time comes.