Home
last modified time | relevance | path

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

/optee_os/core/crypto/
A Dsigned_hdr.c52 size_t hash_size; in shdr_verify_signature() local
61 &hash_size); in shdr_verify_signature()
64 if (hash_size != shdr->hash_size) in shdr_verify_signature()
79 res = crypto_acipher_rsassa_verify(shdr->algo, &key, shdr->hash_size, in shdr_verify_signature()
80 SHDR_GET_HASH(shdr), shdr->hash_size, in shdr_verify_signature()
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/out/arm/export-ta_arm64/host_include/
A Dsigned_hdr.h38 uint16_t hash_size; member
56 if (ADD_OVERFLOW(s, shdr->hash_size, &s) || in shdr_get_size()
65 #define SHDR_GET_SIG(x) (SHDR_GET_HASH(x) + (x)->hash_size)
/optee_os/core/include/
A Dsigned_hdr.h38 uint16_t hash_size; member
56 if (ADD_OVERFLOW(s, shdr->hash_size, &s) || in shdr_get_size()
65 #define SHDR_GET_SIG(x) (SHDR_GET_HASH(x) + (x)->hash_size)
/optee_os/out/arm/export-ta_arm32/host_include/
A Dsigned_hdr.h38 uint16_t hash_size; member
56 if (ADD_OVERFLOW(s, shdr->hash_size, &s) || in shdr_get_size()
65 #define SHDR_GET_SIG(x) (SHDR_GET_HASH(x) + (x)->hash_size)
/optee_os/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.c60 size_t hash_size = hc->descr->hashsize; in ltc_hash_final() local
67 if (hash_size > len) { in ltc_hash_final()
68 if (hash_size > sizeof(block_digest)) in ltc_hash_final()
76 if (hash_size > len) in ltc_hash_final()
A Drsa.c438 size_t hash_size, mod_size; in crypto_acipher_rsassa_sign() local
487 &hash_size); in crypto_acipher_rsassa_sign()
491 if (msg_len != hash_size) { in crypto_acipher_rsassa_sign()
531 size_t hash_size; in crypto_acipher_rsassa_verify() local
541 &hash_size); in crypto_acipher_rsassa_verify()
545 if (msg_len != hash_size) { in crypto_acipher_rsassa_verify()
/optee_os/lib/libmbedtls/core/
A Dhash.c59 size_t hash_size = mbedtls_md_get_size(hc->md_ctx.md_info); in mbed_hash_final() local
66 if (hash_size > len) { in mbed_hash_final()
67 if (hash_size > sizeof(block_digest)) in mbed_hash_final()
77 if (hash_size > len) in mbed_hash_final()
A Drsa.c518 size_t hash_size = 0; in crypto_acipher_rsassa_sign() local
548 &hash_size); in crypto_acipher_rsassa_sign()
552 if (msg_len != hash_size) { in crypto_acipher_rsassa_sign()
606 size_t hash_size = 0; in crypto_acipher_rsassa_verify() local
619 &hash_size); in crypto_acipher_rsassa_verify()
623 if (msg_len != hash_size) { in crypto_acipher_rsassa_verify()
/optee_os/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 Dprocessing_asymm.c419 uint32_t hash_size = 0; in step_asymm_operation() local
566 hash_size = TEE_ALG_GET_DIGEST_SIZE(proc->tee_hash_algo); in step_asymm_operation()
567 hash_buf = TEE_Malloc(hash_size, 0); in step_asymm_operation()
573 &hash_size); in step_asymm_operation()
733 hash_buf, hash_size, in step_asymm_operation()
743 hash_buf, hash_size, in step_asymm_operation()
A Dpkcs11_helpers.h75 uint32_t *hash_size);
A Dprocessing_symm.c279 uint32_t hash_size = 0; in hash_secret_helper() local
286 hash_size = TEE_ALG_GET_DIGEST_SIZE(algo); in hash_secret_helper()
287 hash_ptr = TEE_Malloc(hash_size, 0); in hash_secret_helper()
293 &hash_size); in hash_secret_helper()
302 *object_size_bits = hash_size * 8; in hash_secret_helper()
A Dpkcs11_helpers.c653 uint32_t *hash_size) in pkcs2tee_load_hashed_attr() argument
671 res = TEE_DigestDoFinal(handle, a_ptr, a_size, hash_ptr, hash_size); in pkcs2tee_load_hashed_attr()
678 TEE_InitRefAttribute(tee_ref, tee_id, hash_ptr, *hash_size); in pkcs2tee_load_hashed_attr()
/optee_os/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/core/kernel/
A Dree_fs_ta.c310 if (!tag || *tag_len < handle->shdr->hash_size) { in ree_fs_ta_get_tag()
311 *tag_len = handle->shdr->hash_size; in ree_fs_ta_get_tag()
314 *tag_len = handle->shdr->hash_size; in ree_fs_ta_get_tag()
316 memcpy(tag, SHDR_GET_HASH(handle->shdr), handle->shdr->hash_size); in ree_fs_ta_get_tag()
326 digest = malloc(h->shdr->hash_size); 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()
/optee_os/core/arch/arm/kernel/
A Dboot.c402 size_t hash_size = (pageable_size / SMALL_PAGE_SIZE) * in init_runtime() local
414 assert(hash_size == embdata->hashes_len); in init_runtime()
430 hashes = malloc(hash_size); in init_runtime()
432 IMSG("Pager is enabled. Hashes: %zu bytes", hash_size); in init_runtime()
434 asan_memcpy_unchecked(hashes, tmp_hashes, hash_size); in init_runtime()
/optee_os/core/tee/
A Dtee_svc_cryp.c2448 size_t hash_size = 0; in syscall_hash_final() local
2483 res = tee_alg_get_digest_size(cs->algo, &hash_size); in syscall_hash_final()
2486 if (hlen < hash_size) { in syscall_hash_final()
2497 res = crypto_hash_final(cs->ctx, hash, hash_size); in syscall_hash_final()
2506 if (hlen < hash_size) { in syscall_hash_final()
2517 res = crypto_mac_final(cs->ctx, hash, hash_size); in syscall_hash_final()
2526 res2 = put_user_u64(hash_len, hash_size); in syscall_hash_final()
3710 size_t hash_size = 0; in syscall_asymm_verify() local
3761 if (data_len != hash_size) { in syscall_asymm_verify()
3766 hash_size); in syscall_asymm_verify()
[all …]
/optee_os/lib/libmbedtls/mbedtls/library/
A Dssl_tls.c1826 size_t hash_size; in ssl_calc_verify_tls_sha256() local
1838 status = psa_hash_finish( &sha256_psa, hash, 32, &hash_size ); in ssl_calc_verify_tls_sha256()
1875 size_t hash_size; in ssl_calc_verify_tls_sha384() local
1887 status = psa_hash_finish( &sha384_psa, hash, 48, &hash_size ); in ssl_calc_verify_tls_sha384()
3199 size_t hash_size; in ssl_calc_finished_tls_sha256() local
3226 status = psa_hash_finish( &sha256_psa, padbuf, sizeof( padbuf ), &hash_size ); in ssl_calc_finished_tls_sha256()
3276 size_t hash_size; in ssl_calc_finished_tls_sha384() local
3303 status = psa_hash_finish( &sha384_psa, padbuf, sizeof( padbuf ), &hash_size ); in ssl_calc_finished_tls_sha384()
A Dssl_msg.c1208 const size_t hash_size = mbedtls_md_get_size( ctx->md_info ); in mbedtls_ssl_cf_hmac() local
1237 mbedtls_ssl_cf_memcpy_if_eq( output, aux_out, hash_size, in mbedtls_ssl_cf_hmac()
1250 MD_CHK( mbedtls_md_update( ctx, output, hash_size ) ); in mbedtls_ssl_cf_hmac()

Completed in 62 milliseconds