android_kernel_motorola_sm6375/fs/crypto
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers 5e19d3fa33 FROMLIST: fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl
Add an ioctl FS_IOC_GET_ENCRYPTION_NONCE which retrieves the nonce from
an encrypted file or directory.  The nonce is the 16-byte random value
stored in the inode's encryption xattr.  It is normally used together
with the master key to derive the inode's actual encryption key.

The nonces are needed by automated tests that verify the correctness of
the ciphertext on-disk.  Except for the IV_INO_LBLK_64 case, there's no
way to replicate a file's ciphertext without knowing that file's nonce.

The nonces aren't secret, and the existing ciphertext verification tests
in xfstests retrieve them from disk using debugfs or dump.f2fs.  But in
environments that lack these debugging tools, getting the nonces by
manually parsing the filesystem structure would be very hard.

To make this important type of testing much easier, let's just add an
ioctl that retrieves the nonce.

Bug: 151100202
Link: https://lore.kernel.org/r/[email protected]
Change-Id: Ieef2c57b9257ae38eb2e5c1a018ca6f325bb62dd
Signed-off-by: Eric Biggers <[email protected]>
2020-03-19 11:29:02 -07:00
..
bio.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4 2020-02-20 12:31:26 -08:00
crypto.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4 2020-02-20 12:31:26 -08:00
fname.c FROMLIST: fscrypt: Have filesystems handle their d_ops 2020-02-20 21:21:40 +00:00
fscrypt_private.h FROMLIST: fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl 2020-03-19 11:29:02 -07:00
hkdf.c fscrypt: constify struct fscrypt_hkdf parameter to fscrypt_hkdf_expand() 2020-02-12 19:35:18 -08:00
hooks.c FROMLIST: fscrypt: Have filesystems handle their d_ops 2020-02-20 21:21:40 +00:00
inline_crypt.c ANDROID: block: Prevent crypto fallback for wrapped keys 2020-02-25 19:27:51 +00:00
Kconfig Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4 2020-02-20 12:31:26 -08:00
keyring.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4 2020-02-20 12:31:26 -08:00
keysetup.c FROMLIST: fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl 2020-03-19 11:29:02 -07:00
keysetup_v1.c ANDROID: block: Prevent crypto fallback for wrapped keys 2020-02-25 19:27:51 +00:00
Makefile FROMLIST: fscrypt: add inline encryption support 2019-10-30 22:01:39 +00:00
policy.c FROMLIST: fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl 2020-03-19 11:29:02 -07:00