函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:rypted_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.

函数原型:static int encrypted_init(struct encrypted_key_payload *epayload, const char *key_desc, const char *format, const char *master_desc, const char *datalen, const char *hex_encoded_iv)

返回类型:int

参数:

类型参数名称
struct encrypted_key_payload *epayload
const char *key_desc
const char *format
const char *master_desc
const char *datalen
const char *hex_encoded_iv
763  ret等于0
765  如果format且非字符串比较
766  ret等于valid_ecryptfs_desc - verify the description of a new/loaded encrypted key* The description of a encrypted key with format 'ecryptfs' must contain* exactly 16 hexadecimal characters.
767  如果ret小于0则返回:ret
770  ecryptfs_fill_auth_tok((structecryptfs_auth_tok * ) payload data + datablob + hmac , key_desc)
774  __ekey_init(epayload, format, master_desc, datalen)
775  如果非hex_encoded_iv
776  get_random_bytes( datablob: iv , ivsize)
778  get_random_bytes( decrypted data , decrypted data length )
780  否则ret等于encrypted_key_decrypt(epayload, format, hex_encoded_iv)
782  返回:ret
调用者
名称描述
encrypted_instantiaterypted_instantiate - instantiate an encrypted key* Decrypt an existing encrypted datablob or create a new encrypted key* based on a kernel random number.* On success, return 0. Otherwise return errno.