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

Encrypt filenames only / use nullCipher for data #481

Closed
benrubson opened this issue Mar 15, 2018 · 3 comments · Fixed by #487
Closed

Encrypt filenames only / use nullCipher for data #481

benrubson opened this issue Mar 15, 2018 · 3 comments · Fixed by #487

Comments

@benrubson
Copy link
Contributor

Hi,

Would be nice to be able to encrypt filenames only.
Useful if files' content is already encrypted (whatever the method is), but goal is also to have filenames encrypted.
EncFS should then be able to use nullCipher for data itself.

Thank you 👍

Ben

@benrubson
Copy link
Contributor Author

As a quick test I replaced :
fsConfig->cipher = cipher;

with :
static Interface NullInterface("nullCipher", 1, 0, 0);
fsConfig->cipher = Cipher::New(NullInterface, 4096);

here :
https://github.com/vgough/encfs/blob/v1.9.4/encfs/FileUtils.cpp#L1650

It works.

In the code, the cipherAlg used for the key is automatically used for data.
I think we would have to create a fileAlg, as for the existing nameAlg.

@rfjakob
Copy link
Collaborator

rfjakob commented Mar 15, 2018

Hmm, sounds like a good way to shoot yourself in the foot. Directory looks encrypted, but actually is not

@benrubson
Copy link
Contributor Author

This would be an option for advertised users.
I have some use cases where data is already encrypted, thus I would only need to encrypt filenames.
No need to loose CPU time to re-encrypt data.
Others may certainly encounter such a use case.

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

Successfully merging a pull request may close this issue.

2 participants