Home
last modified time | relevance | path

Searched refs:hash_alg (Results 1 – 25 of 27) sorted by relevance

12

/mbedtls-3.5.0/library/
Dssl_tls13_keys.c146 psa_algorithm_t hash_alg, in mbedtls_ssl_tls13_hkdf_expand_label() argument
176 if (!PSA_ALG_IS_HASH(hash_alg)) { in mbedtls_ssl_tls13_hkdf_expand_label()
186 status = psa_key_derivation_setup(&operation, PSA_ALG_HKDF_EXPAND(hash_alg)); in mbedtls_ssl_tls13_hkdf_expand_label()
227 psa_algorithm_t hash_alg, in ssl_tls13_make_traffic_key() argument
235 hash_alg, in ssl_tls13_make_traffic_key()
245 hash_alg, in ssl_tls13_make_traffic_key()
270 psa_algorithm_t hash_alg, in mbedtls_ssl_tls13_make_traffic_keys() argument
279 hash_alg, client_secret, secret_len, in mbedtls_ssl_tls13_make_traffic_keys()
287 hash_alg, server_secret, secret_len, in mbedtls_ssl_tls13_make_traffic_keys()
301 psa_algorithm_t hash_alg, in mbedtls_ssl_tls13_derive_secret() argument
[all …]
Dssl_tls13_keys.h124 psa_algorithm_t hash_alg,
163 psa_algorithm_t hash_alg,
210 psa_algorithm_t hash_alg,
261 psa_algorithm_t hash_alg,
307 psa_algorithm_t hash_alg,
358 psa_algorithm_t hash_alg,
389 psa_algorithm_t hash_alg,
463 psa_algorithm_t hash_alg,
493 const psa_algorithm_t hash_alg,
Dpsa_crypto_mac.c46 psa_algorithm_t hash_alg) in psa_hmac_setup_internal() argument
50 size_t hash_size = PSA_HASH_LENGTH(hash_alg); in psa_hmac_setup_internal()
51 size_t block_size = PSA_HASH_BLOCK_LENGTH(hash_alg); in psa_hmac_setup_internal()
54 hmac->alg = hash_alg; in psa_hmac_setup_internal()
73 status = psa_hash_compute(hash_alg, key, key_length, in psa_hmac_setup_internal()
101 status = psa_hash_setup(&hmac->hash_ctx, hash_alg); in psa_hmac_setup_internal()
128 psa_algorithm_t hash_alg = hmac->alg; in psa_hmac_finish_internal() local
130 size_t block_size = PSA_HASH_BLOCK_LENGTH(hash_alg); in psa_hmac_finish_internal()
139 status = psa_hash_setup(&hmac->hash_ctx, hash_alg); in psa_hmac_finish_internal()
Dssl_tls13_client.c704 psa_algorithm_t *hash_alg, in ssl_tls13_ticket_get_identity() argument
714 *hash_alg = ssl_tls13_get_ciphersuite_hash_alg(session->ciphersuite); in ssl_tls13_ticket_get_identity()
722 psa_algorithm_t *hash_alg, in ssl_tls13_ticket_get_psk() argument
733 *hash_alg = ssl_tls13_get_ciphersuite_hash_alg(session->ciphersuite); in ssl_tls13_ticket_get_psk()
743 psa_algorithm_t *hash_alg, in ssl_tls13_psk_get_identity() argument
752 *hash_alg = PSA_ALG_SHA_256; in ssl_tls13_psk_get_identity()
760 psa_algorithm_t *hash_alg, in ssl_tls13_psk_get_psk() argument
769 *hash_alg = PSA_ALG_SHA_256; in ssl_tls13_psk_get_psk()
826 psa_algorithm_t hash_alg, in ssl_tls13_write_binder() argument
838 binder_len = PSA_HASH_LENGTH(hash_alg); in ssl_tls13_write_binder()
[all …]
Dconstant_time.c539 psa_algorithm_t hash_alg = PSA_ALG_HMAC_GET_HASH(mac_alg); in mbedtls_ct_hmac() local
540 const size_t block_size = PSA_HASH_BLOCK_LENGTH(hash_alg); in mbedtls_ct_hmac()
542 const size_t hash_size = PSA_HASH_LENGTH(hash_alg); in mbedtls_ct_hmac()
576 PSA_CHK(psa_hash_setup(&operation, hash_alg)); in mbedtls_ct_hmac()
615 PSA_CHK(psa_hash_setup(&operation, hash_alg)); in mbedtls_ct_hmac()
Dpsa_crypto_rsa.c320 psa_algorithm_t hash_alg = PSA_ALG_SIGN_GET_HASH(alg); in psa_rsa_decode_md_type() local
321 *md_alg = mbedtls_hash_info_md_from_psa(hash_alg); in psa_rsa_decode_md_type()
529 psa_algorithm_t hash_alg = PSA_ALG_RSA_OAEP_GET_HASH(alg); in psa_rsa_oaep_set_padding_mode() local
530 mbedtls_md_type_t md_alg = mbedtls_hash_info_md_from_psa(hash_alg); in psa_rsa_oaep_set_padding_mode()
Dpsa_crypto.c134 int psa_can_do_hash(psa_algorithm_t hash_alg) in psa_can_do_hash() argument
136 (void) hash_alg; in psa_can_do_hash()
3593 psa_algorithm_t hash_alg = PSA_ALG_SIGN_GET_HASH(alg); local
3594 operation->md_alg = mbedtls_hash_info_md_from_psa(hash_alg);
5025 psa_algorithm_t hash_alg, argument
5036 operation->mac_size = PSA_HASH_LENGTH(hash_alg);
5041 PSA_ALG_HMAC(hash_alg));
5159 psa_algorithm_t hash_alg = PSA_ALG_HKDF_GET_HASH(kdf_alg); local
5160 uint8_t hash_length = PSA_HASH_LENGTH(hash_alg);
5206 hash_alg,
[all …]
Dssl_tls13_generic.c174 psa_algorithm_t hash_alg = PSA_ALG_NONE; in ssl_tls13_parse_certificate_verify() local
220 hash_alg = mbedtls_hash_info_psa_from_md(md_alg); in ssl_tls13_parse_certificate_verify()
221 if (hash_alg == 0) { in ssl_tls13_parse_certificate_verify()
241 status = psa_hash_compute(hash_alg, in ssl_tls13_parse_certificate_verify()
257 rsassa_pss_options.expected_salt_len = PSA_HASH_LENGTH(hash_alg); in ssl_tls13_parse_certificate_verify()
Dx509write_csr.c252 psa_algorithm_t hash_alg = mbedtls_hash_info_psa_from_md(ctx->md_alg); in x509write_csr_der_internal() local
319 if (psa_hash_compute(hash_alg, in x509write_csr_der_internal()
Dpsa_crypto_ecp.c368 psa_algorithm_t hash_alg = PSA_ALG_SIGN_GET_HASH(alg); in mbedtls_psa_ecdsa_sign_hash() local
369 mbedtls_md_type_t md_alg = mbedtls_hash_info_md_from_psa(hash_alg); in mbedtls_psa_ecdsa_sign_hash()
Dpsa_crypto_core.h39 int psa_can_do_hash(psa_algorithm_t hash_alg);
Dx509_crt.c1995 psa_algorithm_t hash_alg = mbedtls_hash_info_psa_from_md(child->sig_md); in x509_crt_check_signature() local
1998 status = psa_hash_compute(hash_alg, in x509_crt_check_signature()
Dssl_tls.c6423 mbedtls_md_type_t hash_alg = handshake->ciphersuite_info->mac; in ssl_compute_master() local
6429 if (hash_alg == MBEDTLS_MD_SHA384) { in ssl_compute_master()
8777 psa_algorithm_t hash_alg = mbedtls_hash_info_psa_from_md(md_alg); in mbedtls_ssl_get_key_exchange_md_tls1_2() local
8782 hash_alg)) != PSA_SUCCESS) { in mbedtls_ssl_get_key_exchange_md_tls1_2()
/mbedtls-3.5.0/include/psa/
Dcrypto_values.h989 #define PSA_ALG_HMAC(hash_alg) \ argument
990 (PSA_ALG_HMAC_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
1402 #define PSA_ALG_RSA_PKCS1V15_SIGN(hash_alg) \ argument
1403 (PSA_ALG_RSA_PKCS1V15_SIGN_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
1436 #define PSA_ALG_RSA_PSS(hash_alg) \ argument
1437 (PSA_ALG_RSA_PSS_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
1454 #define PSA_ALG_RSA_PSS_ANY_SALT(hash_alg) \ argument
1455 (PSA_ALG_RSA_PSS_ANY_SALT_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
1525 #define PSA_ALG_ECDSA(hash_alg) \ argument
1526 (PSA_ALG_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
[all …]
Dcrypto_extra.h381 #define PSA_ALG_DSA(hash_alg) \ argument
382 (PSA_ALG_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
399 #define PSA_ALG_DETERMINISTIC_DSA(hash_alg) \ argument
400 (PSA_ALG_DETERMINISTIC_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
/mbedtls-3.5.0/tests/suites/
Dtest_suite_psa_crypto_storage_format.function164 psa_algorithm_t hash_alg =
190 (hash_alg == PSA_ALG_MD5 ||
191 hash_alg == PSA_ALG_RIPEMD160 ||
192 hash_alg == PSA_ALG_SHA_1)) {
197 (hash_alg == PSA_ALG_RIPEMD160 || hash_alg == PSA_ALG_SHA_384)) {
202 (hash_alg == PSA_ALG_RIPEMD160 || hash_alg == PSA_ALG_SHA_384)) {
211 if (is_builtin_calling_md(alg) && !has_builtin_hash(hash_alg)) {
218 (void) hash_alg;
Dtest_suite_ssl.function1648 void ssl_tls13_hkdf_expand_label(int hash_alg,
1676 (psa_algorithm_t) hash_alg,
1690 void ssl_tls13_traffic_key_generation(int hash_alg,
1714 (psa_algorithm_t) hash_alg,
1743 void ssl_tls13_derive_secret(int hash_alg,
1772 (psa_algorithm_t) hash_alg,
1787 void ssl_tls13_derive_early_secrets(int hash_alg,
1796 psa_algorithm_t alg = (psa_algorithm_t) hash_alg;
1820 void ssl_tls13_derive_handshake_secrets(int hash_alg,
1829 psa_algorithm_t alg = (psa_algorithm_t) hash_alg;
[all …]
Dtest_suite_psa_crypto_pake.function558 psa_algorithm_t hash_alg = hash_arg;
589 psa_pake_cs_set_hash(&cipher_suite, hash_alg);
736 psa_algorithm_t hash_alg = hash_arg;
752 psa_pake_cs_set_hash(&cipher_suite, hash_alg);
795 psa_algorithm_t hash_alg = hash_arg;
815 psa_pake_cs_set_hash(&cipher_suite, hash_alg);
Dtest_suite_psa_crypto_metadata.function380 psa_algorithm_t hash_alg = PSA_ALG_HMAC_GET_HASH(alg);
385 TEST_ASSERT(PSA_ALG_IS_HASH(hash_alg));
386 TEST_EQUAL(PSA_ALG_HMAC(hash_alg), alg);
396 TEST_EQUAL(PSA_ALG_HMAC_GET_HASH(truncated_alg), hash_alg);
/mbedtls-3.5.0/tests/src/
Dpsa_exercise_key.c303 psa_algorithm_t hash_alg = PSA_ALG_SIGN_GET_HASH(alg); in exercise_signature_key() local
306 if (PSA_ALG_IS_SIGN_HASH(alg) && hash_alg == PSA_ALG_ANY_HASH) { in exercise_signature_key()
308 hash_alg = KNOWN_SUPPORTED_HASH_ALG; in exercise_signature_key()
309 alg ^= PSA_ALG_ANY_HASH ^ hash_alg; in exercise_signature_key()
318 if (hash_alg != 0) { in exercise_signature_key()
319 payload_length = PSA_HASH_LENGTH(hash_alg); in exercise_signature_key()
629 psa_algorithm_t hash_alg = PSA_ALG_HKDF_GET_HASH(kdf_alg); in exercise_key_agreement_key() local
631 if (PSA_BITS_TO_BYTES(key_bits) != PSA_HASH_LENGTH(hash_alg)) { in exercise_key_agreement_key()
/mbedtls-3.5.0/programs/psa/
Dpsa_constant_names_generated.c57 static const char *psa_hash_algorithm_name(psa_algorithm_t hash_alg) in psa_hash_algorithm_name() argument
59 switch (hash_alg) { in psa_hash_algorithm_name()
Dpsa_constant_names.c81 static const char *psa_hash_algorithm_name(psa_algorithm_t hash_alg);
/mbedtls-3.5.0/tests/scripts/
Dgenerate_psa_tests.py545 hash_alg = m.group(1)
546 hash_length = crypto_knowledge.Algorithm.hash_length(hash_alg)
/mbedtls-3.5.0/docs/architecture/psa-migration/
Dmd-cipher-dispatch.md376 int psa_can_do_hash(psa_algorithm_t hash_alg);
379 The job of this private function is to return 1 if `hash_alg` can be performed through PSA now, and…
/mbedtls-3.5.0/tests/
Dssl-opt.sh523 for hash_alg in SHA_1 SHA_224 SHA_256 SHA_384 SHA_512; do
524 if check_for_hash_alg "$hash_alg"; then
525 hash_alg_variable=HAS_ALG_${hash_alg}

12