]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
fscrypt-crypt-util: use an explicit --direct-key option
authorEric Biggers <ebiggers@google.com>
Sun, 13 Mar 2022 01:05:55 +0000 (17:05 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 10 Apr 2022 12:40:39 +0000 (20:40 +0800)
commitcd81e731261d0d062ad8ed8216deb51b110e4fd7
tree6239610391a125762ec4bc5a343ca45fcfbbfa59
parent407ef6b96cc84758cc9791fd87703f2414907861
fscrypt-crypt-util: use an explicit --direct-key option

Make fscrypt-crypt-util use an option --direct-key to specify the use of
the DIRECT_KEY method for key derivation and IV generation.  Previously,
this method was implicitly detected via --mode-num being given without
either --iv-ino-lblk-64 or --iv-ino-lblk-32, or --kdf=none being given
in combination with --file-nonce.

The benefit of this change is that it makes the various options to
fscrypt-crypt-util behave more consistently.  --direct-key,
--iv-ino-lblk-64, and --iv-ino-lblk-32 now all work similarly (they
select a key derivation and IV generation method); likewise, --mode-num,
--file-nonce, --inode-number, and --fs-uuid now all work similarly (they
provide information that key derivation and IV generation may need).

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/encrypt
src/fscrypt-crypt-util.c