函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\encrypted-keys\encrypted.c Create Date:2022-07-27 20:07:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:derived_key_decrypt

函数原型:static int derived_key_decrypt(struct encrypted_key_payload *epayload, const u8 *derived_key, unsigned int derived_keylen)

返回类型:int

参数:

类型参数名称
struct encrypted_key_payload *epayload
const u8 *derived_key
unsigned intderived_keylen
574  pad等于开辟内存
575  如果非pad则返回:负ENOMEM
578  encrypted_datalen等于undup - round up to the next specified multiple*@x: the value to up*@y: multiple to round up to* Rounds @x up to next multiple of @y. If @y will always be a power* of 2, consider using the faster round_up().( decrypted data length , blksize)
579  req等于init_skcipher_req(derived_key, derived_keylen)
580  ret等于错误
581  如果是错误则转到:out
583  dump_encrypted_data(epayload, encrypted_datalen)
585  初始化散列表
586  初始化散列表
587  设置sg数据入口
588  设置sg数据入口
590  设置sg数据入口
592  memcpy(iv, datablob: iv , iv的长度)
593  skcipher_request_set_crypt() - set data buffers*@req: request handle*@src: source scatter / gather list*@dst: destination scatter / gather list*@cryptlen: number of bytes to process from @src*@iv: IV for the cipher operation which must comply with the IV
594  ret等于rypto_skcipher_decrypt() - decrypt ciphertext*@req: reference to the skcipher_request handle that holds all information* needed to perform the cipher operation* Decrypt ciphertext data using the skcipher_request handle
595  tfm等于rypto_skcipher_reqtfm() - obtain cipher handle from request*@req: skcipher_request out of which the cipher handle is to be obtained* Return the crypto_skcipher handle when furnishing an skcipher_request* data structure.* Return: crypto_skcipher handle
596  skcipher_request_free() - zeroize and free request data structure*@req: request data structure cipher handle to be freed
597  rypto_free_skcipher() - zeroize and free cipher handle*@tfm: cipher handle to be freed
598  如果ret小于0则转到:out
600  dump_decrypted_data(epayload)
601  out :
602  释放内存
603  返回:ret
调用者
名称描述
encrypted_key_decrypt