函数逻辑报告 |
Source Code:security\keys\trusted-keys\trusted_tpm1.c |
Create Date:2022-07-27 20:04:27 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:verify the AUTH2_COMMAND (unseal) result from TPM
函数原型:static int TSS_checkhmac2(unsigned char *buffer, const uint32_t command, const unsigned char *ononce, const unsigned char *key1, unsigned int keylen1, const unsigned char *key2, unsigned int keylen2, ...)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned char * | buffer | |
const uint32_t | command | |
const unsigned char * | ononce | |
const unsigned char * | key1 | |
unsigned int | keylen1 | |
const unsigned char * | key2 | |
unsigned int | keylen2 |
289 | bufsize等于LOAD32(buffer, TPM_SIZE_OFFSET) |
292 | result等于LOAD32N(buffer, TPM_RETURN_OFFSET) |
294 | 如果tag恒等于TPM_TAG_RSP_COMMAND则返回:0 |
296 | 如果tag不等于TPM_TAG_RSP_AUTH2_COMMAND则返回:负EINVAL |
301 | continueflag1等于authdata1减1 |
302 | continueflag2等于authdata2减1 |
306 | sdesc等于init_sdesc(hashalg) |
307 | 如果是错误则 |
324 | 循环 |
339 | ret等于TSS_rawhmac(testhmac1, key1, keylen1, SHA1_DIGEST_SIZE, paramdigest, TPM_NONCE_SIZE, enonce1, TPM_NONCE_SIZE, ononce, 1, continueflag1, 0, 0) |
344 | 如果内存比较则 |
348 | ret等于TSS_rawhmac(testhmac2, key2, keylen2, SHA1_DIGEST_SIZE, paramdigest, TPM_NONCE_SIZE, enonce2, TPM_NONCE_SIZE, ononce, 1, continueflag2, 0, 0) |
355 | out : |
357 | 返回:ret |
名称 | 描述 |
---|---|
tpm_unseal | se the AUTH2_COMMAND form of unseal, to authorize both key and blob |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |