函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__ekey_init

函数原型:static void __ekey_init(struct encrypted_key_payload *epayload, const char *format, const char *master_desc, const char *datalen)

返回类型:void

参数:

类型参数名称
struct encrypted_key_payload *epayload
const char *format
const char *master_desc
const char *datalen
730  format_len等于如果非formatstrlen - Find the length of a string*@s: The string to be sized否则strlen - Find the length of a string*@s: The string to be sized
731  datablob: format 等于 payload data + datablob + hmac payload data length
732  datablob: master key name 等于 datablob: format format_len加1
733  datablob: decrypted key length 等于 datablob: master key name strlen - Find the length of a string*@s: The string to be sized加1
734  datablob: iv 等于 datablob: decrypted key length strlen - Find the length of a string*@s: The string to be sized加1
735  datablob: encrypted data 等于 datablob: iv ivsize加1
736  decrypted data 等于 payload data + datablob + hmac
738  如果非formatmemcpy( datablob: format , key_format_default, format_len)
740  否则
741  如果非字符串比较 decrypted data 等于ecryptfs_get_auth_tok_key((structecryptfs_auth_tok * ) payload data + datablob + hmac )
745  memcpy( datablob: format , format, format_len)
748  memcpy( datablob: master key name , master_desc, strlen - Find the length of a string*@s: The string to be sized)
749  memcpy( datablob: decrypted key length , datalen, strlen - Find the length of a string*@s: The string to be sized)
调用者
名称描述
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.
encrypted_updaterypted_update - update the master key description* Change the master key description for an existing encrypted key.* The next read will return an encrypted datablob using the new* master key description.* On success, return 0. Otherwise return errno.