diff options
author | Eric Biggers <ebiggers@google.com> | 2019-08-04 19:35:45 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-08-12 19:06:00 -0700 |
commit | 0109ce76dd6e9e69559e56ea9f10d1e12ca4a50b (patch) | |
tree | 504055ee412377cd59284a1da771f7e085085bbe /fs/crypto/fscrypt_private.h | |
parent | 3ec4f2a62927c72607db633f55b0489e3d5b8e48 (diff) | |
download | linux-stable-0109ce76dd6e9e69559e56ea9f10d1e12ca4a50b.tar.gz linux-stable-0109ce76dd6e9e69559e56ea9f10d1e12ca4a50b.tar.bz2 linux-stable-0109ce76dd6e9e69559e56ea9f10d1e12ca4a50b.zip |
fscrypt: move v1 policy key setup to keysetup_v1.c
In preparation for introducing v2 encryption policies which will find
and derive encryption keys differently from the current v1 encryption
policies, move the v1 policy-specific key setup code from keyinfo.c into
keysetup_v1.c.
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/crypto/fscrypt_private.h')
-rw-r--r-- | fs/crypto/fscrypt_private.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h index 56bac5c7ef40..387b44b255f6 100644 --- a/fs/crypto/fscrypt_private.h +++ b/fs/crypto/fscrypt_private.h @@ -173,4 +173,21 @@ fscrypt_mode_supports_direct_key(const struct fscrypt_mode *mode) return mode->ivsize >= offsetofend(union fscrypt_iv, nonce); } +extern struct crypto_skcipher * +fscrypt_allocate_skcipher(struct fscrypt_mode *mode, const u8 *raw_key, + const struct inode *inode); + +extern int fscrypt_set_derived_key(struct fscrypt_info *ci, + const u8 *derived_key); + +/* keysetup_v1.c */ + +extern void fscrypt_put_direct_key(struct fscrypt_direct_key *dk); + +extern int fscrypt_setup_v1_file_key(struct fscrypt_info *ci, + const u8 *raw_master_key); + +extern int fscrypt_setup_v1_file_key_via_subscribed_keyrings( + struct fscrypt_info *ci); + #endif /* _FSCRYPT_PRIVATE_H */ |