koverstreet / bcachefs-tools

http://bcachefs.org
GNU General Public License v2.0
120 stars 89 forks source link

Add keyfile option to mount #241

Closed RlndVt closed 6 months ago

RlndVt commented 6 months ago

As discussed in #211; add a optional flag to specify a key file

Explicity specify '-k' for key_location

Tag @oz123

RlndVt commented 6 months ago

@koverstreet Added signed-of-by

RlndVt commented 6 months ago

I also think the code needs some nomenclature clean-up: key & password are used interchangeably and I think some cohesion would be benificial.

My suggestion would be to use key for the on disk master key, and the fs encryption/decryption; and password for the unlocking of the master key. That would result in the flow:

Password -> unlocks -> key -> decrypts -> filesystem.

If you agree I'll add/redo some work to align with this idea.