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

Feature request: add key file support #288

Closed
heinrich-ulbricht opened this issue Dec 19, 2018 · 4 comments
Closed

Feature request: add key file support #288

heinrich-ulbricht opened this issue Dec 19, 2018 · 4 comments

Comments

@heinrich-ulbricht
Copy link

Coming from e.g. TrueCrypt one might be used to using one or multiple key files to encrypt a vault. Those key files plus the password would then be needed for mounting. It would be nice to have key file support in gocryptfs.

(The passfile parameter currently seems too restricted in its semantics and furthermore can only be specified once.)

@heinrich-ulbricht
Copy link
Author

heinrich-ulbricht commented Dec 19, 2018

(A similar idea with proposed algorithm was #78 but in a more specific context and with only one key file.)

@rfjakob
Copy link
Owner

rfjakob commented Dec 19, 2018

What you could currently do is to store the gocryptfs.conf outside the encrypted directory. When mounting, you pass the path via "-config", which is effectively like a (single) keyfile.

@slackner
Copy link
Contributor

Another option/workaround for current versions would be to use the -extpass parameter in combination with a small script that feeds all the input files and other key material into sha256sum or similar. Something like this should work for multiple keyfiles:

keyfiles.sh (use chmod +x):

#!/bin/bash
cat "$@" | sha256sum | cut -f1 -d' '

usage:

gocryptfs -init -extpass "./keyfiles.sh a.txt b.txt" directory

This is only a bit limited due to the fact that -extpass currently does not understand quotes. I'll open another bug report for that.

@marek22k
Copy link

The issue has been closed, but I can't figure out how to specify a (binary) keyfile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants