-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage encryption #75
Comments
Throwing ideas into air Module interface: type Keyring interface {
UnlockPrivateKey(username string, secretKey []byte) PrivateKey
GetPublicKey(username string) PublicKey
} May be implemented by the underlying mail storage or external storage (simple keyring file?). We can store the "encrypted" flag using IMAP keywords (custom flags). Like Regarding [2] - https://github.com/danielhavir/go-hpke Originally posted by @foxcpp in #10 (comment) |
Explaining reasoning even further:
It can derive symmetric key using algorithm different from the one used for authentication. And this key is never stored anywhere. |
This is the kind of problem that cryptdb was designed to solve. Unfortunately not sure if there's a working implementation for sqlite but it seems like the right idea. |
Closed in favor of #10. Implementing a standard data encryption protocol that would allow user clients to decrypt messages is a way better approach in my opinion. It is possible to add an optional feature of server storing the private key and doing so on user behalf, creating a flexible server-side message encryption solution. |
I guess it might make sense to implement server-side encryption for mail storage to protect past messages in case of database compromise. PGP is a ready-to-use public key[1] infrastructure[2], though we might want to use keys generated by the server for each user to avoid all trust issues.
The symmetric key used to protect private key can be derived from user password using the computation-intensive hash algorithm such as bcrypt.
[1] Public key encryption is necessary to ensure that we can deliver new messages without knowledge of the decryption key.
[2] Tho I think we might want to pick something simpler for this purpose, ideas?
There are also some problems that need to be solved:
Originally posted by @foxcpp in #10 (comment)
The text was updated successfully, but these errors were encountered: