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:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:derived_key_decrypt

Proto:static int derived_key_decrypt(struct encrypted_key_payload *epayload, const u8 *derived_key, unsigned int derived_keylen)

Type:int

Parameter:

TypeParameterName
struct encrypted_key_payload *epayload
const u8 *derived_key
unsigned intderived_keylen
574  pad = Allocation memory
575  If Not pad Then Return -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 = PTR_ERR(req)
581  If IS_ERR(req) Then Go to out
583  dump_encrypted_data(epayload, encrypted_datalen)
585  sg_init_table - Initialize SG table*@sgl: The SG table*@nents: Number of entries in table* Notes:* If this is part of a chained sg table, sg_mark_end() should be* used only on the last table part.
586  sg_init_table - Initialize SG table*@sgl: The SG table*@nents: Number of entries in table* Notes:* If this is part of a chained sg table, sg_mark_end() should be* used only on the last table part.
587  sg_set_buf - Set sg entry to point at given data*@sg: SG entry*@buf: Data*@buflen: Data length
588  sg_set_buf - Set sg entry to point at given data*@sg: SG entry*@buf: Data*@buflen: Data length
590  sg_set_buf - Set sg entry to point at given data*@sg: SG entry*@buf: Data*@buflen: Data length
592  memcpy(iv, datablob: iv , size of 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  If ret < 0 Then Go to out
600  dump_decrypted_data(epayload)
601  out :
602  kfree(pad)
603  Return ret
Caller
NameDescribe
encrypted_key_decrypt