fscrypt-crypt-util: add utility for reproducing fscrypt encrypted data

Add a utility program that can reproduce encrypted contents and
filenames.  It implements all encryption algorithms currently supported
by fscrypt (a.k.a. ext4, f2fs, and ubifs encryption), and it generates
IVs in the same way.  The program takes the algorithm and master key on
the command line, and encrypts stdin to stdout.

A file nonce may also be passed on the command line, and the program
will "tweak" the encryption using this nonce in the same way the kernel
does -- either by deriving a subkey, or by including the nonce in the
IVs.  The block size and padding amount may also be specified.

No dependencies are added, as all algorithms implemented from scratch.

Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
Eric Biggers
2019-05-24 15:04:20 -07:00
committed by Eryu Guan
parent 881eccda82
commit f68bd53129
3 changed files with 1636 additions and 1 deletions
+1
View File
@@ -73,6 +73,7 @@
/src/fill
/src/fill2
/src/fs_perms
/src/fscrypt-crypt-util
/src/fssum
/src/fstest
/src/fsync-err