/optee_os/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 | crypto.c | 92 TEE_Result crypto_hash_final(void *ctx, uint8_t *digest, size_t len) in crypto_hash_final() argument 94 return hash_ops(ctx)->final(ctx, digest, len); in crypto_hash_final() 327 TEE_Result crypto_mac_final(void *ctx, uint8_t *digest, size_t digest_len) in crypto_mac_final() argument 329 return mac_ops(ctx)->final(ctx, digest, digest_len); in crypto_mac_final()
|
/optee_os/core/lib/libtomcrypt/ |
A D | hash.c | 56 static TEE_Result ltc_hash_final(struct crypto_hash_ctx *ctx, uint8_t *digest, in ltc_hash_final() argument 72 tmp_digest = digest; in ltc_hash_final() 77 memcpy(digest, tmp_digest, len); in ltc_hash_final() 175 uint8_t digest[TEE_SHA256_HASH_SIZE]; in hash_sha256_check() local 181 if (sha256_done(&hs, digest) != CRYPT_OK) in hash_sha256_check() 183 if (consttime_memcmp(digest, hash, sizeof(digest)) != 0) in hash_sha256_check() 190 TEE_Result hash_sha512_256_compute(uint8_t *digest, const uint8_t *data, in hash_sha512_256_compute() argument 199 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/core/lib/libtomcrypt/src/mac/hmac/ |
A D | hmac_test.c | 57 unsigned char digest[MAXBLOCKSIZE]; in hmac_test() 150 unsigned char digest[MAXBLOCKSIZE]; in hmac_test() 601 outlen = sizeof(digest); in hmac_test() 602 …ry(hash, cases[i].key, cases[i].keylen, cases[i].data, cases[i].datalen, digest, &outlen)) != CRYP… in hmac_test() 609 …if(compare_testvector(digest, outlen, cases[i].digest, (size_t)hash_descriptor[hash]->hashsize, ca… in hmac_test()
|
/optee_os/lib/libmbedtls/core/ |
A D | hash.c | 55 static TEE_Result mbed_hash_final(struct crypto_hash_ctx *ctx, uint8_t *digest, in mbed_hash_final() argument 71 tmp_digest = digest; in mbed_hash_final() 78 memcpy(digest, tmp_digest, len); in mbed_hash_final() 184 uint8_t digest[TEE_SHA256_HASH_SIZE] = { 0 }; in hash_sha256_check() local 190 mbedtls_sha256_finish(&hs, digest); in hash_sha256_check() 193 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/scripts/ |
A D | dump_ta_header.py | 37 digest = f.read(digest_len) 38 dump('Digest: ', digest)
|
A D | sign_encrypt.py | 352 digest = img[start:end] 375 digest, 385 digest, 403 if digest != h.finalize():
|
/optee_os/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()
|
A D | fs_htree.c | 401 uint8_t *digest) in calc_node_hash() argument 435 return crypto_hash_final(ctx, digest, TEE_FS_HTREE_HASH_SIZE); in calc_node_hash() 567 uint8_t digest[TEE_FS_HTREE_HASH_SIZE]; in verify_node() local 570 res = calc_node_hash(node, NULL, ctx, digest); in verify_node() 572 res = calc_node_hash(node, &targ->ht->imeta.meta, ctx, digest); in verify_node() 574 consttime_memcmp(digest, node->node.hash, sizeof(digest))) in verify_node()
|
/optee_os/core/drivers/crypto/caam/hash/ |
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()
|
A D | local.h | 62 TEE_Result caam_hash_hmac_final(struct hashctx *ctx, uint8_t *digest,
|
A D | caam_hash_mac.c | 232 static TEE_Result do_hmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in do_hmac_final() argument 237 return caam_hash_hmac_final(mac->ctx, digest, len); in do_hmac_final()
|
/optee_os/core/kernel/ |
A D | ree_fs_ta.c | 323 void *digest = NULL; in check_digest() local 326 digest = malloc(h->shdr->hash_size); in check_digest() 327 if (!digest) in check_digest() 329 res = crypto_hash_final(h->hash_ctx, digest, h->shdr->hash_size); in check_digest() 334 if (memcmp(digest, SHDR_GET_HASH(h->shdr), h->shdr->hash_size)) in check_digest() 337 free(digest); in check_digest()
|
/optee_os/core/lib/libtomcrypt/src/pk/dsa/ |
A D | dsa_generate_pqg.c | 34 unsigned char *wbuf, *sbuf, digest[MAXBLOCKSIZE]; in _dsa_make_params() local 133 if ((err = hash_memory(hash, sbuf, seedbytes, digest, &i)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params() 134 if ((err = mp_read_unsigned_bin(U, digest, outbytes)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
|
/optee_os/out/arm/export-ta_arm32/scripts/ |
A D | sign_encrypt.py | 352 digest = img[start:end] 375 digest, 385 digest, 403 if digest != h.finalize():
|
/optee_os/out/arm/export-ta_arm64/scripts/ |
A D | sign_encrypt.py | 352 digest = img[start:end] 375 digest, 385 digest, 403 if digest != h.finalize():
|
/optee_os/core/include/tee/ |
A D | tee_cryp_utl.h | 14 size_t datalen, uint8_t *digest,
|
/optee_os/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()
|
/optee_os/core/include/crypto/ |
A D | crypto.h | 33 TEE_Result crypto_hash_final(void *ctx, uint8_t *digest, size_t len); 55 TEE_Result crypto_mac_final(void *ctx, uint8_t *digest, size_t digest_len); 294 TEE_Result hash_sha512_256_compute(uint8_t *digest, const uint8_t *data,
|