函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:encrypted_key_decrypt

函数原型:static int encrypted_key_decrypt(struct encrypted_key_payload *epayload, const char *format, const char *hex_encoded_iv)

返回类型:int

参数:

类型参数名称
struct encrypted_key_payload *epayload
const char *format
const char *hex_encoded_iv
680  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)
681  asciilen等于ivsize加1加encrypted_datalenHASH_SIZE的和乘2
682  如果strlen - Find the length of a string*@s: The string to be sized不等于asciilen则返回:负EINVAL
685  hex_encoded_data等于hex_encoded_iv加2乘ivsize加2
686  ret等于 二进制表示ASCII码的十六进制字符串
687  如果ret小于0则返回:负EINVAL
689  ret等于 二进制表示ASCII码的十六进制字符串
691  如果ret小于0则返回:负EINVAL
694  hmac等于 datablob: format length of datablob
695  ret等于 二进制表示ASCII码的十六进制字符串
697  如果ret小于0则返回:负EINVAL
700  mkey等于request_master_key(epayload, & master_key, & master_keylen)
701  如果是错误则返回:错误
704  ret等于verify HMAC before decrypting encrypted key
705  如果ret小于0则
706  打印错误信息("encrypted_key: bad hmac (%d)\n", ret)
707  转到:out
710  ret等于Derive authentication/encryption key from trusted key
711  如果ret小于0则转到:out
714  ret等于derived_key_decrypt(epayload, derived_key, sizeofderived_key)
715  如果ret小于0则打印错误信息("encrypted_key: failed to decrypt key (%d)\n", ret)
717  out :
718  lease a read lock
719  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
720  memzero_explicit - Fill a region of memory (e
721  返回:ret
调用者
名称描述
encrypted_initrypted_init - initialize an encrypted key* For a new key, use a random number for both the iv and data* itself. For an old key, decrypt the hex encoded data.