| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | hkdf.c | 44 size_t hash_len; in mbedtls_hkdf_extract() local 50 hash_len = mbedtls_md_get_size(md); in mbedtls_hkdf_extract() 52 if (hash_len == 0) { in mbedtls_hkdf_extract() 57 salt_len = hash_len; in mbedtls_hkdf_extract() 67 size_t hash_len; in mbedtls_hkdf_expand() local 80 hash_len = mbedtls_md_get_size(md); in mbedtls_hkdf_expand() 82 if (prk_len < hash_len || hash_len == 0) { in mbedtls_hkdf_expand() 91 n = okm_len / hash_len; in mbedtls_hkdf_expand() 93 if (okm_len % hash_len != 0) { in mbedtls_hkdf_expand() 111 memset(t, 0, hash_len); in mbedtls_hkdf_expand() [all …]
|
| H A D | ssl_tls13_keys.c | 430 size_t const hash_len = PSA_HASH_LENGTH(hash_alg); in mbedtls_ssl_tls13_derive_early_secrets() local 455 early_secret, hash_len, in mbedtls_ssl_tls13_derive_early_secrets() 460 hash_len); in mbedtls_ssl_tls13_derive_early_secrets() 468 early_secret, hash_len, in mbedtls_ssl_tls13_derive_early_secrets() 473 hash_len); in mbedtls_ssl_tls13_derive_early_secrets() 488 size_t const hash_len = PSA_HASH_LENGTH(hash_alg); in mbedtls_ssl_tls13_derive_handshake_secrets() local 517 handshake_secret, hash_len, in mbedtls_ssl_tls13_derive_handshake_secrets() 522 hash_len); in mbedtls_ssl_tls13_derive_handshake_secrets() 534 handshake_secret, hash_len, in mbedtls_ssl_tls13_derive_handshake_secrets() 539 hash_len); in mbedtls_ssl_tls13_derive_handshake_secrets() [all …]
|
| H A D | pk_wrap.c | 66 const unsigned char *hash, size_t hash_len, in rsa_verify_wrap() argument 81 if (md_alg == MBEDTLS_MD_NONE && UINT_MAX < hash_len) { in rsa_verify_wrap() 113 status = psa_verify_hash(key_id, psa_alg_md, hash, hash_len, in rsa_verify_wrap() 131 const unsigned char *hash, size_t hash_len, in rsa_verify_wrap() argument 139 if (md_alg == MBEDTLS_MD_NONE && UINT_MAX < hash_len) { in rsa_verify_wrap() 149 (unsigned int) hash_len, in rsa_verify_wrap() 170 const unsigned char *hash, size_t hash_len, in mbedtls_pk_psa_rsa_sign_ext() argument 210 status = psa_sign_hash(key_id, alg, hash, hash_len, in mbedtls_pk_psa_rsa_sign_ext() 231 const unsigned char *hash, size_t hash_len, in rsa_sign_wrap() argument 250 return mbedtls_pk_psa_rsa_sign_ext(psa_alg, pk->pk_ctx, hash, hash_len, in rsa_sign_wrap() [all …]
|
| H A D | pk_wrap.h | 37 const unsigned char *hash, size_t hash_len, 42 const unsigned char *hash, size_t hash_len, 50 const unsigned char *hash, size_t hash_len, 56 const unsigned char *hash, size_t hash_len, 131 const unsigned char *hash, size_t hash_len,
|
| H A D | pk.c | 993 static inline int pk_hashlen_helper(mbedtls_md_type_t md_alg, size_t *hash_len) in pk_hashlen_helper() argument 995 if (*hash_len != 0) { in pk_hashlen_helper() 999 *hash_len = mbedtls_md_get_size_from_type(md_alg); in pk_hashlen_helper() 1001 if (*hash_len == 0) { in pk_hashlen_helper() 1040 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify_restartable() argument 1044 if ((md_alg != MBEDTLS_MD_NONE || hash_len != 0) && hash == NULL) { in mbedtls_pk_verify_restartable() 1049 pk_hashlen_helper(md_alg, &hash_len) != 0) { in mbedtls_pk_verify_restartable() 1065 md_alg, hash, hash_len, sig, sig_len, rs_ctx->rs_ctx); in mbedtls_pk_verify_restartable() 1081 return ctx->pk_info->verify_func(ctx, md_alg, hash, hash_len, in mbedtls_pk_verify_restartable() 1089 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify() argument [all …]
|
| H A D | x509write_csr.c | 151 size_t hash_len; in x509write_csr_der_internal() local 224 &hash_len) != PSA_SUCCESS) { in x509write_csr_der_internal()
|
| H A D | ssl_tls13_generic.c | 1423 size_t hash_len; in mbedtls_ssl_reset_transcript_for_hrr() local 1432 &hash_len); in mbedtls_ssl_reset_transcript_for_hrr() 1441 hash_transcript[3] = (unsigned char) hash_len; in mbedtls_ssl_reset_transcript_for_hrr() 1443 hash_len += 4; in mbedtls_ssl_reset_transcript_for_hrr() 1446 hash_transcript, hash_len); in mbedtls_ssl_reset_transcript_for_hrr() 1454 ret = ssl->handshake->update_checksum(ssl, hash_transcript, hash_len); in mbedtls_ssl_reset_transcript_for_hrr()
|
| H A D | x509_crt.c | 2128 size_t hash_len; in x509_crt_check_signature() local 2133 hash_len = mbedtls_md_get_size(md_info); in x509_crt_check_signature() 2148 &hash_len); in x509_crt_check_signature() 2162 child->sig_md, hash, hash_len, in x509_crt_check_signature() 2170 child->sig_md, hash, hash_len, in x509_crt_check_signature()
|
| H A D | ssl_tls.c | 8364 unsigned int hash_len; in mbedtls_ssl_write_finished() local 8382 hash_len = 12; in mbedtls_ssl_write_finished() 8385 ssl->verify_data_len = hash_len; in mbedtls_ssl_write_finished() 8386 memcpy(ssl->own_verify_data, ssl->out_msg + 4, hash_len); in mbedtls_ssl_write_finished() 8389 ssl->out_msglen = 4 + hash_len; in mbedtls_ssl_write_finished() 8479 unsigned int hash_len = 12; in mbedtls_ssl_parse_finished() local 8510 if (ssl->in_hslen != mbedtls_ssl_hs_hdr_len(ssl) + hash_len) { in mbedtls_ssl_parse_finished() 8519 buf, hash_len) != 0) { in mbedtls_ssl_parse_finished() 8528 ssl->verify_data_len = hash_len; in mbedtls_ssl_parse_finished() 8529 memcpy(ssl->peer_verify_data, buf, hash_len); in mbedtls_ssl_parse_finished() [all …]
|
| /optee_os/core/tee/ |
| H A D | tee_cryp_hkdf.c | 70 size_t tn_len, hash_len, i, n, where; in hkdf_expand() local 76 res = tee_alg_get_digest_size(hash_algo, &hash_len); in hkdf_expand() 80 if (!okm || prk_len < hash_len) { in hkdf_expand() 93 n = okm_len / hash_len; in hkdf_expand() 94 if ((okm_len % hash_len) != 0) in hkdf_expand() 134 memcpy(okm + where, tn, (i < n) ? hash_len : (okm_len - where)); in hkdf_expand() 135 where += hash_len; in hkdf_expand() 136 tn_len = hash_len; in hkdf_expand()
|
| H A D | tee_cryp_pbkdf2.c | 15 size_t hash_len; member 56 res = crypto_mac_update(h->ctx, u, h->hash_len); in pbkdf2_f() 84 res = tee_alg_get_digest_size(hmac_parms.algo, &hmac_parms.hash_len); in tee_cryp_pbkdf2() 98 l = derived_key_len / hmac_parms.hash_len; in tee_cryp_pbkdf2() 99 r = derived_key_len % hmac_parms.hash_len; in tee_cryp_pbkdf2() 102 res = pbkdf2_f(out, hmac_parms.hash_len, i, &hmac_parms, in tee_cryp_pbkdf2() 106 out += hmac_parms.hash_len; in tee_cryp_pbkdf2()
|
| H A D | tee_cryp_concat_kdf.c | 20 size_t hash_len, i, n, sz; in tee_cryp_concat_kdf() local 31 res = tee_alg_get_digest_size(hash_algo, &hash_len); in tee_cryp_concat_kdf() 35 n = derived_key_len / hash_len; in tee_cryp_concat_kdf() 36 sz = hash_len; in tee_cryp_concat_kdf() 61 sz = derived_key_len % hash_len; in tee_cryp_concat_kdf()
|
| H A D | tee_svc_cryp.c | 3074 size_t chunk_size, void *hash, uint64_t *hash_len) in syscall_hash_final() argument 3097 res = get_user_u64_as_size_t(&hlen, hash_len); in syscall_hash_final() 3189 res2 = put_user_u64(hash_len, hash_size); in syscall_hash_final()
|
| /optee_os/core/drivers/crypto/versal/include/ |
| H A D | ipi.h | 21 uint32_t hash_len; member 29 uint32_t hash_len; member 37 uint32_t hash_len; member
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | pk.h | 752 const unsigned char *hash, size_t hash_len, 777 const unsigned char *hash, size_t hash_len, 814 const unsigned char *hash, size_t hash_len, 850 const unsigned char *hash, size_t hash_len, 886 const unsigned char *hash, size_t hash_len, 922 const unsigned char *hash, size_t hash_len,
|
| H A D | ssl.h | 1068 size_t hash_len);
|
| /optee_os/ta/remoteproc/src/ |
| H A D | remoteproc_core.c | 159 size_t hash_len; member 205 .hash_len = TEE_SHA256_HASH_SIZE, 210 .hash_len = TEE_SHA256_HASH_SIZE, 310 uint8_t *hash, uint32_t hash_len) in remoteproc_pta_verify() argument 344 params[2].memref.size = hash_len; in remoteproc_pta_verify() 397 size_t hash_len = 0; in remoteproc_verify_signature() local 413 hash_len = algo->hash_len; in remoteproc_verify_signature() 414 hash = TEE_Malloc(hash_len, TEE_MALLOC_FILL_ZERO); in remoteproc_verify_signature() 424 hash, &hash_len); in remoteproc_verify_signature() 436 res = remoteproc_pta_verify(ctx, algo, hash, hash_len); in remoteproc_verify_signature()
|
| /optee_os/core/drivers/crypto/hisilicon/ |
| H A D | sec_pbkdf2.c | 150 size_t hash_len = 0; in sec_pbkdf2_dk_iteration_check() local 167 ret = tee_alg_get_digest_size(alg, &hash_len); in sec_pbkdf2_dk_iteration_check() 168 if (ret || hash_len == 0) { in sec_pbkdf2_dk_iteration_check() 173 t_num = ROUNDUP_DIV(dk_len, hash_len); in sec_pbkdf2_dk_iteration_check()
|
| /optee_os/core/include/tee/ |
| H A D | tee_svc_cryp.h | 46 size_t chunk_size, void *hash, uint64_t *hash_len);
|
| /optee_os/core/drivers/crypto/versal/ |
| H A D | ecc.c | 204 cmd->hash_len = p.len; in verify() 292 cmd->hash_len = p.len; in sign()
|
| /optee_os/lib/libutee/include/ |
| H A D | utee_syscalls.h | 95 size_t chunk_size, void *hash, uint64_t *hash_len);
|