/optee_os-3.20.0/core/crypto/ |
A D | signed_hdr.c | 65 size_t hash_size = 0; in shdr_verify_signature() local 78 res = tee_alg_get_digest_size(hash_algo, &hash_size); in shdr_verify_signature() 81 if (hash_size != shdr->hash_size) in shdr_verify_signature() 99 shdr->hash_size, SHDR_GET_HASH(shdr), shdr->hash_size, in shdr_verify_signature() 271 subkey = (void *)(img + shdr->hash_size); in shdr_load_pub_key() 282 crypto_hash_final(ctx, digest, shdr->hash_size) || in shdr_load_pub_key() 351 size_t hash_size = 0; in shdr_verify_signature2() local 364 if (tee_alg_get_digest_size(hash_algo, &hash_size) || in shdr_verify_signature2() 365 hash_size != shdr->hash_size) in shdr_verify_signature2() 372 key->pub_key.rsa, shdr->hash_size, in shdr_verify_signature2() [all …]
|
A D | sm3-hash.c | 55 size_t hash_size = TEE_SM3_HASH_SIZE; in op_sm3_hash_final() local 62 if (hash_size > len) in op_sm3_hash_final() 69 if (hash_size > len) in op_sm3_hash_final()
|
/optee_os-3.20.0/core/lib/libtomcrypt/ |
A D | dsa.c | 100 size_t hash_size; in crypto_acipher_dsa_sign() local 121 &hash_size); in crypto_acipher_dsa_sign() 124 if (mp_unsigned_bin_size(ltc_key.q) < hash_size) in crypto_acipher_dsa_sign() 125 hash_size = mp_unsigned_bin_size(ltc_key.q); in crypto_acipher_dsa_sign() 126 if (msg_len != hash_size) { in crypto_acipher_dsa_sign()
|
A D | hash.c | 61 size_t hash_size = hc->descr->hashsize; in ltc_hash_final() local 68 if (hash_size > len) { in ltc_hash_final() 69 if (hash_size > sizeof(block_digest)) in ltc_hash_final() 77 if (hash_size > len) in ltc_hash_final()
|
A D | rsa.c | 500 size_t hash_size, mod_size; in sw_crypto_acipher_rsassa_sign() local 549 &hash_size); in sw_crypto_acipher_rsassa_sign() 553 if (msg_len != hash_size) { in sw_crypto_acipher_rsassa_sign() 600 size_t hash_size; in sw_crypto_acipher_rsassa_verify() local 617 &hash_size); in sw_crypto_acipher_rsassa_verify() 621 if (msg_len != hash_size) { in sw_crypto_acipher_rsassa_verify()
|
/optee_os-3.20.0/core/include/ |
A D | signed_hdr.h | 39 uint16_t hash_size; member 57 if (ADD_OVERFLOW(s, shdr->hash_size, &s) || in shdr_get_size() 66 #define SHDR_GET_SIG(x) (SHDR_GET_HASH(x) + (x)->hash_size)
|
/optee_os-3.20.0/lib/libmbedtls/core/ |
A D | hash.c | 60 size_t hash_size = mbedtls_md_get_size(hc->md_ctx.md_info); in mbed_hash_final() local 67 if (hash_size > len) { in mbed_hash_final() 68 if (hash_size > sizeof(block_digest)) in mbed_hash_final() 78 if (hash_size > len) in mbed_hash_final()
|
A D | rsa.c | 583 size_t hash_size = 0; in sw_crypto_acipher_rsassa_sign() local 613 &hash_size); in sw_crypto_acipher_rsassa_sign() 617 if (msg_len != hash_size) { in sw_crypto_acipher_rsassa_sign() 679 size_t hash_size = 0; in sw_crypto_acipher_rsassa_verify() local 700 &hash_size); in sw_crypto_acipher_rsassa_verify() 704 if (msg_len != hash_size) { in sw_crypto_acipher_rsassa_verify()
|
/optee_os-3.20.0/core/pta/ |
A D | secstor_ta_mgmt.c | 58 if (shdr->hash_size > buf_size) in install_ta() 118 res = crypto_hash_final(hash_ctx, buf, shdr->hash_size); in install_ta() 121 if (consttime_memcmp(buf, SHDR_GET_HASH(shdr), shdr->hash_size)) { in install_ta()
|
/optee_os-3.20.0/scripts/ |
A D | sign_encrypt.py | 362 self.hash_size = self.chosen_hash.digest_size 478 [magic, img_type, img_size, algo_value, hash_size, 490 if hash_size != self.hash_size: 493 self.img_digest = self.inf[offs:offs + hash_size] 494 offs += hash_size 653 [magic, img_type, img_size, algo_value, hash_size, 680 print(' hash_size: {} bytes'.format(hash_size)) 687 if hash_size != self.hash_size: 690 img_digest = self.inf[offs:offs + hash_size] 693 offs += hash_size [all …]
|
/optee_os-3.20.0/ta/pkcs11/src/ |
A D | processing_rsa.c | 64 size_t hash_size = 0; in pkcs2tee_validate_rsa_pss() local 72 hash_size = TEE_ALG_GET_DIGEST_SIZE(TEE_ALG_SHA1); in pkcs2tee_validate_rsa_pss() 75 hash_size = TEE_ALG_GET_DIGEST_SIZE(TEE_ALG_SHA224); in pkcs2tee_validate_rsa_pss() 78 hash_size = TEE_ALG_GET_DIGEST_SIZE(TEE_ALG_SHA256); in pkcs2tee_validate_rsa_pss() 81 hash_size = TEE_ALG_GET_DIGEST_SIZE(TEE_ALG_SHA384); in pkcs2tee_validate_rsa_pss() 84 hash_size = TEE_ALG_GET_DIGEST_SIZE(TEE_ALG_SHA512); in pkcs2tee_validate_rsa_pss() 106 if (rsa_pss_ctx->salt_len > (k - 2 - hash_size)) in pkcs2tee_validate_rsa_pss()
|
A D | pkcs11_helpers.h | 75 uint32_t *hash_size);
|
A D | processing_asymm.c | 463 uint32_t hash_size = 0; in step_asymm_operation() local 654 hash_size = TEE_ALG_GET_DIGEST_SIZE(proc->tee_hash_algo); in step_asymm_operation() 655 hash_buf = TEE_Malloc(hash_size, 0); in step_asymm_operation() 661 &hash_size); in step_asymm_operation() 822 hash_buf, hash_size, in step_asymm_operation() 832 hash_buf, hash_size, in step_asymm_operation()
|
A D | processing_symm.c | 277 uint32_t hash_size = 0; in hash_secret_helper() local 284 hash_size = TEE_ALG_GET_DIGEST_SIZE(algo); in hash_secret_helper() 285 hash_ptr = TEE_Malloc(hash_size, 0); in hash_secret_helper() 291 &hash_size); in hash_secret_helper() 300 *object_size_bits = hash_size * 8; in hash_secret_helper()
|
A D | pkcs11_helpers.c | 656 uint32_t *hash_size) in pkcs2tee_load_hashed_attr() argument 674 res = TEE_DigestDoFinal(handle, a_ptr, a_size, hash_ptr, hash_size); in pkcs2tee_load_hashed_attr() 681 TEE_InitRefAttribute(tee_ref, tee_id, hash_ptr, *hash_size); in pkcs2tee_load_hashed_attr()
|
/optee_os-3.20.0/core/kernel/ |
A D | ree_fs_ta.c | 512 if (!tag || *tag_len < handle->shdr->hash_size) { in ree_fs_ta_get_tag() 513 *tag_len = handle->shdr->hash_size; in ree_fs_ta_get_tag() 516 *tag_len = handle->shdr->hash_size; in ree_fs_ta_get_tag() 518 memcpy(tag, SHDR_GET_HASH(handle->shdr), handle->shdr->hash_size); in ree_fs_ta_get_tag() 528 digest = malloc(h->shdr->hash_size); in check_digest() 531 res = crypto_hash_final(h->hash_ctx, digest, h->shdr->hash_size); in check_digest() 537 h->shdr->hash_size)) in check_digest()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | constant_time.c | 469 const size_t hash_size = mbedtls_md_get_size( ctx->md_info ); in mbedtls_ct_hmac() local 496 memset( output, '!', hash_size ); in mbedtls_ct_hmac() 504 mbedtls_ct_memcpy_if_eq( output, aux_out, hash_size, in mbedtls_ct_hmac() 517 MD_CHK( mbedtls_md_update( ctx, output, hash_size ) ); in mbedtls_ct_hmac()
|
A D | ssl_tls.c | 1903 size_t hash_size; in ssl_calc_verify_tls_sha256() local 1915 status = psa_hash_finish( &sha256_psa, hash, 32, &hash_size ); in ssl_calc_verify_tls_sha256() 1952 size_t hash_size; in ssl_calc_verify_tls_sha384() local 1964 status = psa_hash_finish( &sha384_psa, hash, 48, &hash_size ); in ssl_calc_verify_tls_sha384() 3285 size_t hash_size; in ssl_calc_finished_tls_sha256() local 3312 status = psa_hash_finish( &sha256_psa, padbuf, sizeof( padbuf ), &hash_size ); in ssl_calc_finished_tls_sha256() 3362 size_t hash_size; in ssl_calc_finished_tls_sha384() local 3389 status = psa_hash_finish( &sha384_psa, padbuf, sizeof( padbuf ), &hash_size ); in ssl_calc_finished_tls_sha384()
|
/optee_os-3.20.0/core/arch/arm/kernel/ |
A D | boot.c | 447 size_t hash_size = (pageable_size / SMALL_PAGE_SIZE) * in init_runtime() local 459 assert(hash_size == embdata->hashes_len); in init_runtime() 475 hashes = malloc(hash_size); in init_runtime() 477 IMSG("Pager is enabled. Hashes: %zu bytes", hash_size); in init_runtime() 479 asan_memcpy_unchecked(hashes, tmp_hashes, hash_size); in init_runtime()
|
/optee_os-3.20.0/core/tee/ |
A D | tee_svc_cryp.c | 2884 size_t hash_size = 0; in syscall_hash_final() local 2922 res = tee_alg_get_digest_size(cs->algo, &hash_size); in syscall_hash_final() 2925 if (hlen < hash_size) { in syscall_hash_final() 2936 res = crypto_hash_final(cs->ctx, hash, hash_size); in syscall_hash_final() 2945 if (hlen < hash_size) { in syscall_hash_final() 2956 res = crypto_mac_final(cs->ctx, hash, hash_size); in syscall_hash_final() 2965 res2 = put_user_u64(hash_len, hash_size); in syscall_hash_final() 4218 size_t hash_size = 0; in syscall_asymm_verify() local 4272 if (data_len != hash_size) { in syscall_asymm_verify() 4277 hash_size); in syscall_asymm_verify() [all …]
|