Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\encrypted-keys\encrypted.c Create Date:2022-07-28 18:33:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__ekey_init

Proto:static void __ekey_init(struct encrypted_key_payload *epayload, const char *format, const char *master_desc, const char *datalen)

Type:void

Parameter:

TypeParameterName
struct encrypted_key_payload *epayload
const char *format
const char *master_desc
const char *datalen
730  format_len = If Not format Then strlen - Find the length of a string*@s: The string to be sized Else 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  If Not format Then memcpy( datablob: format , key_format_default, format_len)
740  Else
741  If Not strcmp(format, key_format_ecryptfs) Then 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)
Caller
NameDescribe
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.