函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:calc_hmac

函数原型:static int calc_hmac(u8 *digest, const u8 *key, unsigned int keylen, const u8 *buf, unsigned int buflen)

返回类型:int

参数:

类型参数名称
u8 *digest
const u8 *key
unsigned intkeylen
const u8 *buf
unsigned intbuflen
345  tfm等于crypto_alloc_shash(hmac_alg, 0, 0)
346  如果是错误
347  打印错误信息("encrypted_key: can't alloc %s transform: %ld\n", hmac_alg, 错误)
349  返回:错误
352  err等于rypto_shash_setkey() - set key for message digest*@tfm: cipher handle*@key: buffer holding the key*@keylen: length of the key in bytes* The caller provided key is set for the keyed message digest cipher
353  如果非errerr等于calc_hash(tfm, digest, buf, buflen)
355  归零并释放信息消化处理
356  返回:err
调用者
名称描述
datablob_hmac_append
datablob_hmac_verifyverify HMAC before decrypting encrypted key