/optee_os-3.20.0/core/drivers/crypto/aspeed/ |
A D | hace_ast2600.c | 53 uint8_t *digest; member 106 digest_phys = virt_to_phys(hctx->digest); in ast2600_hace_process() 143 memcpy(hctx->digest, iv_sha1, sizeof(iv_sha1)); in ast2600_hace_init() 146 memcpy(hctx->digest, iv_sha256, sizeof(iv_sha256)); in ast2600_hace_init() 149 memcpy(hctx->digest, iv_sha384, sizeof(iv_sha384)); in ast2600_hace_init() 152 memcpy(hctx->digest, iv_sha512, sizeof(iv_sha512)); in ast2600_hace_init() 217 uint8_t *digest, size_t len) in ast2600_hace_final() argument 286 memcpy(digest, hctx->digest, length); in ast2600_hace_final() 298 free(hctx->digest); in ast2600_hace_free() 324 memcpy(dst_hctx->digest, src_hctx->digest, HASH_DGT_BUFSZ); in ast2600_hace_copy_state() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/ |
A D | hash.c | 57 static TEE_Result ltc_hash_final(struct crypto_hash_ctx *ctx, uint8_t *digest, in ltc_hash_final() argument 73 tmp_digest = digest; in ltc_hash_final() 78 memcpy(digest, tmp_digest, len); in ltc_hash_final() 176 uint8_t digest[TEE_SHA256_HASH_SIZE]; in hash_sha256_check() local 182 if (sha256_done(&hs, digest) != CRYPT_OK) in hash_sha256_check() 184 if (consttime_memcmp(digest, hash, sizeof(digest)) != 0) in hash_sha256_check() 191 TEE_Result hash_sha512_256_compute(uint8_t *digest, const uint8_t *data, in hash_sha512_256_compute() argument 200 if (sha512_256_done(&hs, digest) != CRYPT_OK) in hash_sha512_256_compute()
|
A D | cmac.c | 52 static TEE_Result ltc_omac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in ltc_omac_final() argument 57 if (omac_done(&to_omac_ctx(ctx)->state, digest, &l) == CRYPT_OK) in ltc_omac_final()
|
A D | hmac.c | 51 static TEE_Result ltc_hmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in ltc_hmac_final() argument 56 if (hmac_done(&to_hmac_ctx(ctx)->state, digest, &l) == CRYPT_OK) in ltc_hmac_final()
|
/optee_os-3.20.0/core/crypto/ |
A D | cbc-mac.c | 26 uint8_t digest[CBCMAC_MAX_BLOCK_LEN]; member 48 memset(mc->digest, 0, sizeof(mc->digest)); in crypto_cbc_mac_init() 76 mc->digest); in crypto_cbc_mac_update() 97 out = mc->digest; in crypto_cbc_mac_update() 111 memcpy(mc->digest, out_tmp + out_len - mc->block_len, in crypto_cbc_mac_update() 128 uint8_t *digest, size_t digest_len) in crypto_cbc_mac_final() argument 149 memcpy(digest, mc->digest, MIN(digest_len, mc->block_len)); in crypto_cbc_mac_final() 175 memcpy(dst->digest, src->digest, sizeof(dst->digest)); in crypto_cbc_mac_copy_state()
|
A D | sm3-hash.c | 51 uint8_t *digest, in op_sm3_hash_final() argument 65 tmp_digest = digest; in op_sm3_hash_final() 70 memcpy(digest, tmp_digest, len); in op_sm3_hash_final()
|
A D | sm3-hmac.c | 51 static TEE_Result op_sm3_hmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in op_sm3_hmac_final() argument 65 tmp_digest = digest; in op_sm3_hmac_final() 70 memcpy(digest, tmp_digest, len); in op_sm3_hmac_final()
|
A D | signed_hdr.c | 192 uint8_t digest[TEE_SHA1_HASH_SIZE]; in calc_next_uuid() member 218 crypto_hash_final(ctx, tmp->digest, sizeof(tmp->digest))) in calc_next_uuid() 221 tee_uuid_from_octets(&tmp->uuid, tmp->digest); in calc_next_uuid() 253 void *digest = NULL; in shdr_load_pub_key() local 272 digest = img; in shdr_load_pub_key() 282 crypto_hash_final(ctx, digest, shdr->hash_size) || in shdr_load_pub_key() 283 memcmp(digest, SHDR_GET_HASH(shdr), shdr->hash_size)) { in shdr_load_pub_key()
|
/optee_os-3.20.0/core/kernel/ |
A D | tcg.c | 38 uint8_t *digest = (uint8_t *)&digest_list->digests[i].digest; in tcg_pcr_extend() local 40 if (pcr_provider->pcr_extend(pcr_index, alg, digest, in tcg_pcr_extend() 60 len += offsetof(struct tpmt_ha, digest); in tcg_event_final_size() 91 for (i = 0; i < sizeof(event_header->digest); i++) { in tcg_parse_event_log_header() 92 if (event_header->digest[i]) in tcg_parse_event_log_header() 268 uint8_t *digest = (uint8_t *)&digest_list->digests[i].digest; in tcg_parse_event() local 280 pos += offsetof(struct tpmt_ha, digest); in tcg_parse_event() 281 memcpy(digest, (void *)((uintptr_t)event + pos), in tcg_parse_event() 389 uint8_t *digest = in tcg_process_fw_eventlog() local 390 (uint8_t *)&digest_list->digests[i].digest; in tcg_process_fw_eventlog() [all …]
|
A D | ree_fs_ta.c | 525 void *digest = NULL; in check_digest() local 528 digest = malloc(h->shdr->hash_size); in check_digest() 529 if (!digest) in check_digest() 531 res = crypto_hash_final(h->hash_ctx, digest, h->shdr->hash_size); in check_digest() 536 if (FTMN_CALLEE_DONE_MEMCMP(memcmp, digest, SHDR_GET_HASH(h->shdr), in check_digest() 540 free(digest); in check_digest()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/hmac/ |
A D | hmac_test.c | 50 unsigned char digest[MAXBLOCKSIZE]; in hmac_test() 143 unsigned char digest[MAXBLOCKSIZE]; in hmac_test() 594 outlen = sizeof(digest); in hmac_test() 595 …ry(hash, cases[i].key, cases[i].keylen, cases[i].data, cases[i].datalen, digest, &outlen)) != CRYP… in hmac_test() 602 …if(compare_testvector(digest, outlen, cases[i].digest, (size_t)hash_descriptor[hash]->hashsize, ca… in hmac_test()
|
/optee_os-3.20.0/lib/libmbedtls/core/ |
A D | hash.c | 56 static TEE_Result mbed_hash_final(struct crypto_hash_ctx *ctx, uint8_t *digest, in mbed_hash_final() argument 72 tmp_digest = digest; in mbed_hash_final() 79 memcpy(digest, tmp_digest, len); in mbed_hash_final() 185 uint8_t digest[TEE_SHA256_HASH_SIZE] = { 0 }; in hash_sha256_check() local 191 mbedtls_sha256_finish(&hs, digest); in hash_sha256_check() 194 if (consttime_memcmp(digest, hash, sizeof(digest))) in hash_sha256_check()
|
A D | hmac.c | 51 static TEE_Result mbed_hmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in mbed_hmac_final() argument 67 tmp_digest = digest; in mbed_hmac_final() 74 memcpy(digest, tmp_digest, len); in mbed_hmac_final()
|
A D | cmac.c | 72 uint8_t *digest, size_t len) in mbed_cmac_final() argument 90 tmp_digest = digest; in mbed_cmac_final() 96 memcpy(digest, tmp_digest, len); in mbed_cmac_final()
|
/optee_os-3.20.0/core/drivers/tpm2/ |
A D | tpm2_tcg.c | 29 void *digest, uint32_t digest_len) in tpm2_tcg_pcr_extend() argument 31 if (tpm2_pcr_extend(pcr_idx, alg, digest, digest_len)) in tpm2_tcg_pcr_extend()
|
A D | tpm2_cmd.c | 205 enum tpm2_result tpm2_pcr_read(uint8_t pcr_idx, uint16_t alg, void *digest, in tpm2_pcr_read() argument 221 struct tpm2b_digest *dgst = resp_dgst->digest; in tpm2_pcr_read() 223 if (!digest || !digest_len) in tpm2_pcr_read() 302 dgst = resp_dgst->digest; in tpm2_pcr_read() 315 memcpy(digest, dgst->buffer, alg_len); in tpm2_pcr_read() 356 enum tpm2_result tpm2_pcr_extend(uint8_t pcr_idx, uint16_t alg, void *digest, in tpm2_pcr_extend() argument 368 if (!digest) in tpm2_pcr_extend() 409 tpm2_cmd_add(buf, buf_len, digest, digest_len); in tpm2_pcr_extend()
|
/optee_os-3.20.0/core/include/ |
A D | tpm2.h | 89 union tpmu_ha digest; member 107 struct tpm2b_digest digest[8]; member 204 enum tpm2_result tpm2_pcr_read(uint8_t pcr_idx, uint16_t alg, void *digest, 217 enum tpm2_result tpm2_pcr_extend(uint8_t pcr_idx, uint16_t alg, void *digest,
|
/optee_os-3.20.0/core/include/kernel/ |
A D | tcg.h | 29 uint8_t digest[TPM2_SHA1_DIGEST_SIZE]; member 124 TEE_Result (*pcr_extend)(uint8_t pcr_idx, uint16_t alg, void *digest,
|
/optee_os-3.20.0/core/include/tee/ |
A D | tee_cryp_utl.h | 14 size_t datalen, uint8_t *digest,
|
/optee_os-3.20.0/core/tee/ |
A D | tee_cryp_utl.c | 33 size_t datalen, uint8_t *digest, in tee_hash_createdigest() argument 53 res = crypto_hash_final(ctx, digest, digestlen); in tee_hash_createdigest()
|
/optee_os-3.20.0/core/drivers/crypto/caam/hash/ |
A D | local.h | 62 TEE_Result caam_hash_hmac_final(struct hashctx *ctx, uint8_t *digest,
|
A D | caam_hash.c | 188 static TEE_Result do_hash_final(struct crypto_hash_ctx *ctx, uint8_t *digest, in do_hash_final() argument 193 return caam_hash_hmac_final(hash->ctx, digest, len); in do_hash_final() 571 TEE_Result caam_hash_hmac_final(struct hashctx *ctx, uint8_t *digest, in caam_hash_hmac_final() argument 583 if (!digest || !len || !ctx) in caam_hash_hmac_final() 591 ret = caam_dmaobj_output_sgtbuf(&dig, digest, len, alg->size_digest); in caam_hash_hmac_final() 658 HASH_DUMPBUF("Digest", digest, (size_t)alg->size_digest); in caam_hash_hmac_final()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dsa/ |
A D | dsa_generate_pqg.c | 27 unsigned char *wbuf, *sbuf, digest[MAXBLOCKSIZE]; in s_dsa_make_params() local 126 if ((err = hash_memory(hash, sbuf, seedbytes, digest, &i)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params() 127 if ((err = mp_read_unsigned_bin(U, digest, outbytes)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
|
/optee_os-3.20.0/core/pta/ |
A D | attestation.c | 426 static TEE_Result digest_nonce_and_hash(uint8_t *digest, uint8_t *nonce, in digest_nonce_and_hash() argument 444 res = crypto_hash_final(ctx, digest, TEE_SHA256_HASH_SIZE); in digest_nonce_and_hash() 451 const uint8_t *digest) in sign_digest() argument 456 digest, TEE_SHA256_HASH_SIZE, in sign_digest() 469 uint8_t digest[TEE_SHA256_HASH_SIZE] = { }; in sign_buffer() local 472 res = digest_nonce_and_hash(digest, nonce, nonce_sz, buf); in sign_buffer() 476 buf_sz - TEE_SHA256_HASH_SIZE, digest); in sign_buffer()
|
/optee_os-3.20.0/core/drivers/imx/dcp/ |
A D | dcp.c | 584 TEE_Result dcp_sha_do_final(struct dcp_hash_data *hashdata, uint8_t *digest, in dcp_sha_do_final() argument 592 if (!hashdata || !digest) in dcp_sha_do_final() 612 memcpy(digest, sha1_null_msg, payload_size); in dcp_sha_do_final() 614 memcpy(digest, sha256_null_msg, payload_size); in dcp_sha_do_final() 639 dcp_reverse(payload.data, digest, payload_size); in dcp_sha_do_final()
|