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

Implement password management function #20

Open
neithernut opened this issue Aug 10, 2017 · 5 comments
Open

Implement password management function #20

neithernut opened this issue Aug 10, 2017 · 5 comments

Comments

@neithernut
Copy link
Owner

We currently don't react on password changes performed by users. After an user changes his/her password, the files and directories previously encrypted are still encrypted with the old keys.

We should implement the corresponding PAM password management functions and document the issue for users.

@jnvsor
Copy link
Contributor

jnvsor commented Dec 3, 2017

You can't change the encryption key on a folder with e4crypt set_policy - that makes sense because it would have to re-encrypt all the files.

I think we should go the ecryptfs route here, and store a secondary salt and key in a folder that's decrypted by the first salt and user password.

Then if you want to change the password or salt you can just reencrypt the secondary salt and key into a folder encrypted with the new password/salt and flip the folders and hey presto you've got password management without having to re-encrypt all the user's data.

@jnvsor
Copy link
Contributor

jnvsor commented Dec 3, 2017

My idea works - I've changed both password and salt and the wrapping works.

I just need to write the chauthtok hook and it's ready for a PR.

You can see my progress on this branch

@neithernut
Copy link
Owner Author

Nice. I'll have a closer look some time during the next week.

@neithernut
Copy link
Owner Author

One thing keeps bugging me, though: does it make sense to have a directory as an encrypted container for passwords and salts? Wouldn't an encrypted file make more sense?

@jnvsor
Copy link
Contributor

jnvsor commented Dec 3, 2017

Yeah, but I'd need to encrypt both the wrapped token and the wrapped salt so I'd need 2 files anyway. (Or fixed size salt/token) And I haven't looked into encryption (in C) much so I figured I'd reuse the ext4 encryption that's already working.

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