Hi, what is the best way to get the master key into a text file on a terminal after a volume has been mounted? Thank you!
Currently no way to do that. The master key was only meant to be shown to the user and I tried to make sure it does not end up in log files etc.
What is your use case?
Well, I worked on a text terminal until I got more file descriptors. :) Without piping, there was no way to print the master key.
Also, in the future I may keep a copy of the key centrally to make it easier and safer to change passwords. There is a possibility it will be encrypted with something other than the password. Thank you!
I have added this functionality to gocryptfs-xray. Example:
$ ./gocryptfs-xray -dumpmasterkey a/gocryptfs.conf
Password: ****
f327fe03b846d6ad11db4b8eab3344b052f82604db1262c90e3ae544cd8a28e7
Piping the password:
$ cat pwd.txt | ./gocryptfs-xray -dumpmasterkey a/gocryptfs.conf 2> /dev/null
Reading password from stdin
f327fe03b846d6ad11db4b8eab3344b052f82604db1262c90e3ae544cd8a28e7
Most helpful comment
I have added this functionality to gocryptfs-xray. Example:
Piping the password: