Star64_linux/Documentation/filesystems
Eric Biggers e3b1078bed fscrypt: add support for IV_INO_LBLK_32 policies
The eMMC inline crypto standard will only specify 32 DUN bits (a.k.a. IV
bits), unlike UFS's 64.  IV_INO_LBLK_64 is therefore not applicable, but
an encryption format which uses one key per policy and permits the
moving of encrypted file contents (as f2fs's garbage collector requires)
is still desirable.

To support such hardware, add a new encryption format IV_INO_LBLK_32
that makes the best use of the 32 bits: the IV is set to
'SipHash-2-4(inode_number) + file_logical_block_number mod 2^32', where
the SipHash key is derived from the fscrypt master key.  We hash only
the inode number and not also the block number, because we need to
maintain contiguity of DUNs to merge bios.

Unlike with IV_INO_LBLK_64, with this format IV reuse is possible; this
is unavoidable given the size of the DUN.  This means this format should
only be used where the requirements of the first paragraph apply.
However, the hash spreads out the IVs in the whole usable range, and the
use of a keyed hash makes it difficult for an attacker to determine
which files use which IVs.

Besides the above differences, this flag works like IV_INO_LBLK_64 in
that on ext4 it is only allowed if the stable_inodes feature has been
enabled to prevent inode numbers and the filesystem UUID from changing.

Link: https://lore.kernel.org/r/20200515204141.251098-1-ebiggers@kernel.org
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Paul Crowley <paulcrowley@google.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-05-19 09:34:18 -07:00
..
caching
cifs
configfs
ext4
nfs
9p.rst
adfs.rst
affs.rst
afs.rst
api-summary.rst
autofs-mount-control.rst
autofs.rst
automount-support.txt
befs.rst
bfs.rst
btrfs.rst
ceph.rst
coda.txt
cramfs.rst
dax.txt
debugfs.rst
devpts.txt
directory-locking.rst
dlmfs.rst
dnotify.txt
ecryptfs.rst
efivarfs.rst
erofs.rst
ext2.rst
ext3.rst
f2fs.rst fscrypt: support test_dummy_encryption=v2 2020-05-18 20:21:48 -07:00
fiemap.txt
files.txt
fscrypt.rst fscrypt: add support for IV_INO_LBLK_32 policies 2020-05-19 09:34:18 -07:00
fsverity.rst
fuse-io.txt
fuse.rst
gfs2-glocks.txt
gfs2-uevents.rst
gfs2.rst
hfs.rst
hfsplus.rst
hpfs.rst
index.rst
inotify.rst
isofs.rst
journalling.rst
locking.rst
locks.txt
mandatory-locking.txt
mount_api.txt
nilfs2.rst
ntfs.rst
ocfs2-online-filecheck.rst
ocfs2.rst
omfs.rst
orangefs.rst
overlayfs.rst
path-lookup.rst
path-lookup.txt
porting.rst
proc.rst
qnx6.rst
quota.txt
ramfs-rootfs-initramfs.rst
relay.rst
romfs.rst
seq_file.txt
sharedsubtree.txt
splice.rst
spufs.txt
squashfs.rst
sysfs-pci.txt
sysfs-tagging.txt
sysfs.rst
sysv-fs.rst
tmpfs.rst
ubifs-authentication.rst
ubifs.rst
udf.rst
vfat.rst
vfs.rst
virtiofs.rst
xfs-delayed-logging-design.txt
xfs-self-describing-metadata.txt
zonefs.rst