Home
last modified time | relevance | path

Searched refs:hash_size (Results 1 – 20 of 20) sorted by relevance

/optee_os-3.20.0/core/crypto/
A Dsigned_hdr.c65 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 Dsm3-hash.c55 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 Ddsa.c100 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 Dhash.c61 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 Drsa.c500 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 Dsigned_hdr.h39 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 Dhash.c60 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 Drsa.c583 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 Dsecstor_ta_mgmt.c58 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 Dsign_encrypt.py362 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 Dprocessing_rsa.c64 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 Dpkcs11_helpers.h75 uint32_t *hash_size);
A Dprocessing_asymm.c463 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 Dprocessing_symm.c277 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 Dpkcs11_helpers.c656 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 Dree_fs_ta.c512 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 Dconstant_time.c469 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 Dssl_tls.c1903 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 Dboot.c447 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 Dtee_svc_cryp.c2884 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 …]

Completed in 41 milliseconds