函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\keysetup.c Create Date:2022-07-29 10:57:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Create a symmetric cipher object for the given encryption mode and key

函数原型:struct crypto_skcipher *fscrypt_allocate_skcipher(struct fscrypt_mode *mode, const u8 *raw_key, const struct inode *inode)

返回类型:struct crypto_skcipher

参数:

类型参数名称
struct fscrypt_mode *mode
const u8 *raw_key
const struct inode *inode
72  tfm等于rypto_alloc_skcipher() - allocate symmetric key cipher handle*@alg_name: is the cra_name / name or cra_driver_name / driver name of the* skcipher cipher*@type: specifies the type of the cipher*@mask: specifies the mask for the cipher
73  如果是错误
74  如果错误恒等于负ENOENT
75  fscrypt_warn(inode, "Missing crypto API support for %s (API name: \"%s\")", friendly_name, cipher_str)
78  返回:错误号
80  fscrypt_err(inode, "Error allocating '%s' transform: %ld", cipher_str, 错误)
82  返回:tfm
84  如果非xchg( & logged_impl_name, 1)则
91  打印信息("fscrypt: %s using implementation \"%s\"\n", friendly_name, cra_driver_name)
95  crypto_skcipher_set_flags(tfm, CRYPTO_TFM_REQ_FORBID_WEAK_KEYS)
96  err等于rypto_skcipher_setkey() - set key for cipher*@tfm: cipher handle*@key: buffer holding the key*@keylen: length of the key in bytes* The caller provided key is set for the skcipher referenced by the cipher* handle.
97  如果err则转到:err_free_tfm
100  返回:tfm
102  err_free_tfm :
103  rypto_free_skcipher() - zeroize and free cipher handle*@tfm: cipher handle to be freed
104  返回:错误号
调用者
名称描述
fscrypt_set_derived_keyGiven the per-file key, set up the file's crypto transform object
setup_per_mode_key
fscrypt_get_direct_keyPrepare to encrypt directly using the master key in the given mode