diff options
author | Michael Halcrow <mhalcrow@google.com> | 2015-04-12 00:56:17 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-04-12 00:56:17 -0400 |
commit | d5d0e8c7203a41c01ba05f4e053e16a94ce3c2e1 (patch) | |
tree | 0d14b2319e623a924126ca4cd7da5cca09030f34 /fs/ext4/ext4_crypto.h | |
parent | c9c7429c2e486f375bddd0c338cc3ad366123717 (diff) |
ext4 crypto: filename encryption facilities
Signed-off-by: Uday Savagaonkar <savagaon@google.com>
Signed-off-by: Ildar Muslukhov <ildarm@google.com>
Signed-off-by: Michael Halcrow <mhalcrow@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4_crypto.h')
-rw-r--r-- | fs/ext4/ext4_crypto.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/ext4/ext4_crypto.h b/fs/ext4/ext4_crypto.h index 6a7c0c06b2be..f7d46e8dc9d3 100644 --- a/fs/ext4/ext4_crypto.h +++ b/fs/ext4/ext4_crypto.h @@ -104,4 +104,24 @@ static inline int ext4_encryption_key_size(int mode) return 0; } +#define EXT4_FNAME_NUM_SCATTER_ENTRIES 4 +#define EXT4_CRYPTO_BLOCK_SIZE 16 +#define EXT4_FNAME_CRYPTO_DIGEST_SIZE 32 + +struct ext4_str { + unsigned char *name; + u32 len; +}; + +struct ext4_fname_crypto_ctx { + u32 lim; + char tmp_buf[EXT4_CRYPTO_BLOCK_SIZE]; + struct crypto_ablkcipher *ctfm; + struct crypto_hash *htfm; + struct page *workpage; + struct ext4_encryption_key key; + unsigned has_valid_key : 1; + unsigned ctfm_key_is_ready : 1; +}; + #endif /* _EXT4_CRYPTO_H */ |