Skip to content
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

A better encryption key scheme #1006

Closed
buck54321 opened this issue Mar 8, 2021 · 2 comments
Closed

A better encryption key scheme #1006

buck54321 opened this issue Mar 8, 2021 · 2 comments
Assignees
Milestone

Comments

@buck54321
Copy link
Member

Our current encryption scheme is pretty rudimentary. We have a single encryption key based on the user's password and some randomness. Everything encrypted is therefore only decryptable using the user's password. This means that any time the user changes their password, every encrypted item in the database must be re-encrypted.

Instead, we should have an inner key, generated once during initialization and never changed, which itself is encrypted by an outer key identical to our current key. Then, when the user changes their password, we must only re-encrypt the inner key instead of everything encrypted in the database.

@chappjc
Copy link
Member

chappjc commented Mar 8, 2021

Agreed on this. Was just commenting in matrix that it would even be possible to rework #978 to migrate the current password-derived key to become the inner key, and a new outer key defined from the new app pass specified on pass change. But I'm inclined to say 978 can go ahead as is, by re-encrypting every item in the database instead.

@buck54321 buck54321 self-assigned this Mar 10, 2021
@chappjc
Copy link
Member

chappjc commented Aug 26, 2021

Resolved by #1015

@chappjc chappjc closed this as completed Aug 26, 2021
@chappjc chappjc added this to the 0.3 milestone Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants