* [PATCH] fscrypt.rst: update definition of struct fscrypt_context_v2
@ 2023-12-06 0:19 Eric Biggers
0 siblings, 0 replies; only message in thread
From: Eric Biggers @ 2023-12-06 0:19 UTC (permalink / raw)
To: linux-fscrypt
From: Eric Biggers <ebiggers@google.com>
Get the copy of the fscrypt_context_v2 definition in the documentation
in sync with the actual definition, which was changed recently by
commit 5b1188847180 ("fscrypt: support crypto data unit size less than
filesystem block size").
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
Documentation/filesystems/fscrypt.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems/fscrypt.rst
index 1b84f818e574e..8d38b47b7b83c 100644
--- a/Documentation/filesystems/fscrypt.rst
+++ b/Documentation/filesystems/fscrypt.rst
@@ -1375,21 +1375,22 @@ directory.) These structs are defined as follows::
u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE];
u8 nonce[FSCRYPT_FILE_NONCE_SIZE];
};
#define FSCRYPT_KEY_IDENTIFIER_SIZE 16
struct fscrypt_context_v2 {
u8 version;
u8 contents_encryption_mode;
u8 filenames_encryption_mode;
u8 flags;
- u8 __reserved[4];
+ u8 log2_data_unit_size;
+ u8 __reserved[3];
u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE];
u8 nonce[FSCRYPT_FILE_NONCE_SIZE];
};
The context structs contain the same information as the corresponding
policy structs (see `Setting an encryption policy`_), except that the
context structs also contain a nonce. The nonce is randomly generated
by the kernel and is used as KDF input or as a tweak to cause
different files to be encrypted differently; see `Per-file encryption
keys`_ and `DIRECT_KEY policies`_.
base-commit: bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-06 0:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06 0:19 [PATCH] fscrypt.rst: update definition of struct fscrypt_context_v2 Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox