/mbedtls-latest/library/ |
D | ecjpake.c | 39 static int mbedtls_ecjpake_compute_hash(mbedtls_md_type_t md_type, in mbedtls_ecjpake_compute_hash() argument 43 return mbedtls_md(mbedtls_md_info_from_type(md_type), in mbedtls_ecjpake_compute_hash() 52 ctx->md_type = MBEDTLS_MD_NONE; in mbedtls_ecjpake_init() 76 ctx->md_type = MBEDTLS_MD_NONE; in mbedtls_ecjpake_free() 112 ctx->md_type = hash; in mbedtls_ecjpake_setup() 144 if (ctx->md_type == MBEDTLS_MD_NONE || in mbedtls_ecjpake_check() 192 static int ecjpake_hash(const mbedtls_md_type_t md_type, in ecjpake_hash() argument 228 MBEDTLS_MPI_CHK(mbedtls_ecjpake_compute_hash(md_type, in ecjpake_hash() 233 mbedtls_md_get_size_from_type(md_type))); in ecjpake_hash() 243 static int ecjpake_zkp_read(const mbedtls_md_type_t md_type, in ecjpake_zkp_read() argument [all …]
|
D | pkcs12.c | 76 static int pkcs12_pbe_derive_key_iv(mbedtls_asn1_buf *pbe_params, mbedtls_md_type_t md_type, in pkcs12_pbe_derive_key_iv() argument 103 salt.p, salt.len, md_type, in pkcs12_pbe_derive_key_iv() 113 salt.p, salt.len, md_type, in pkcs12_pbe_derive_key_iv() 124 mbedtls_cipher_type_t cipher_type, mbedtls_md_type_t md_type, 133 mbedtls_cipher_type_t cipher_type, mbedtls_md_type_t md_type, in mbedtls_pkcs12_pbe() argument 144 return mbedtls_pkcs12_pbe_ext(pbe_params, mode, cipher_type, md_type, in mbedtls_pkcs12_pbe() 151 mbedtls_cipher_type_t cipher_type, mbedtls_md_type_t md_type, in mbedtls_pkcs12_pbe_ext() argument 191 if ((ret = pkcs12_pbe_derive_key_iv(pbe_params, md_type, pwd, pwdlen, in mbedtls_pkcs12_pbe_ext() 268 static int calculate_hashes(mbedtls_md_type_t md_type, int iterations, in calculate_hashes() argument 277 md_info = mbedtls_md_info_from_type(md_type); in calculate_hashes() [all …]
|
D | ssl_tls13_keys.c | 788 mbedtls_md_type_t const md_type = (mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac; in mbedtls_ssl_tls13_calculate_verify_data() local 809 ret = mbedtls_ssl_get_handshake_transcript(ssl, md_type, in mbedtls_ssl_tls13_calculate_verify_data() 1138 mbedtls_md_type_t md_type; in ssl_tls13_generate_early_key() local 1159 md_type = (mbedtls_md_type_t) ciphersuite_info->mac; in ssl_tls13_generate_early_key() 1164 ret = mbedtls_ssl_get_handshake_transcript(ssl, md_type, in ssl_tls13_generate_early_key() 1339 mbedtls_md_type_t md_type; in ssl_tls13_generate_handshake_keys() local 1361 md_type = (mbedtls_md_type_t) ciphersuite_info->mac; in ssl_tls13_generate_handshake_keys() 1366 ret = mbedtls_ssl_get_handshake_transcript(ssl, md_type, in ssl_tls13_generate_handshake_keys() 1589 mbedtls_md_type_t md_type; in ssl_tls13_generate_application_keys() local 1608 md_type = (mbedtls_md_type_t) handshake->ciphersuite_info->mac; in ssl_tls13_generate_application_keys() [all …]
|
D | pkcs5.c | 42 int *keylen, mbedtls_md_type_t *md_type) in pkcs5_parse_pbkdf2_params() argument 92 if (mbedtls_oid_get_md_hmac(&prf_alg_oid, md_type) != 0) { in pkcs5_parse_pbkdf2_params() 139 mbedtls_md_type_t md_type = MBEDTLS_MD_SHA1; in mbedtls_pkcs5_pbes2_ext() local 173 &md_type)) != 0) { in mbedtls_pkcs5_pbes2_ext() 219 if ((ret = mbedtls_pkcs5_pbkdf2_hmac_ext(md_type, pwd, pwdlen, salt.p, in mbedtls_pkcs5_pbes2_ext()
|
D | md.c | 139 const mbedtls_md_info_t *mbedtls_md_info_from_type(mbedtls_md_type_t md_type) in mbedtls_md_info_from_type() argument 141 switch (md_type) { in mbedtls_md_info_from_type() 837 mbedtls_md_type_t md_type; member 890 return mbedtls_md_info_from_type(entry->md_type); in mbedtls_md_info_from_string() 900 while (entry->md_type != MBEDTLS_MD_NONE && in mbedtls_md_get_name() 901 entry->md_type != md_info->type) { in mbedtls_md_get_name()
|
D | pk.c | 385 mbedtls_md_type_t md_type = (mbedtls_md_type_t) mbedtls_rsa_get_md_alg(rsa); in psa_algorithm_for_rsa() local 386 return PSA_ALG_RSA_OAEP(mbedtls_md_psa_alg_from_type(md_type)); in psa_algorithm_for_rsa() 917 mbedtls_md_type_t md_type = MBEDTLS_MD_NONE; in copy_from_psa() local 919 md_type = mbedtls_md_type_from_psa_alg(alg_type); in copy_from_psa() 923 ret = mbedtls_rsa_set_padding(mbedtls_pk_rsa(*pk), MBEDTLS_RSA_PKCS_V21, md_type); in copy_from_psa() 926 ret = mbedtls_rsa_set_padding(mbedtls_pk_rsa(*pk), MBEDTLS_RSA_PKCS_V15, md_type); in copy_from_psa()
|
D | ssl_tls.c | 6711 static int tls_prf_generic(mbedtls_md_type_t md_type, in tls_prf_generic() argument 6723 if (md_type == MBEDTLS_MD_SHA384) { in tls_prf_generic() 6791 static int tls_prf_generic(mbedtls_md_type_t md_type, in tls_prf_generic() argument 6808 if ((md_info = mbedtls_md_info_from_type(md_type)) == NULL) { in tls_prf_generic()
|
/mbedtls-latest/tests/suites/ |
D | test_suite_md.function | 161 void md_info(int md_type, char *md_name, int md_size) 172 md_info = mbedtls_md_info_from_type(md_type); 178 TEST_EQUAL(mbedtls_md_get_type(md_info), (mbedtls_md_type_t) md_type); 185 if (*md_type_ptr == md_type) { 195 void md_text(int md_type, char *text_src_string, data_t *hash) 204 md_info = mbedtls_md_info_from_type(md_type); 217 void md_hex(int md_type, data_t *src_str, data_t *hash) 224 md_info = mbedtls_md_info_from_type(md_type); 238 void md_text_multi(int md_type, char *text_src_string, 256 md_info = mbedtls_md_info_from_type(md_type); [all …]
|
D | test_suite_x509write.function | 147 void x509_csr_check(char *key_file, char *cert_req_check_file, int md_type, 215 mbedtls_x509write_csr_set_md_alg(&req, md_type); 286 void x509_csr_check_opaque(char *key_file, int md_type, int key_usage, 315 mbedtls_x509write_csr_set_md_alg(&req, md_type); 348 int md_type, int key_usage, int set_key_usage, 480 mbedtls_x509write_crt_set_md_alg(&crt, md_type);
|
D | test_suite_pkcs12.function | 18 void pkcs12_derive_key(int md_type, int key_size_arg, 55 md_type,
|
D | test_suite_random.function | 73 void random_twice_with_hmac_drbg(int md_type) 79 const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type(md_type);
|
D | test_suite_ecjpake.function | 152 corrupt_ctx.md_type = MBEDTLS_MD_NONE;
|
D | test_suite_pk.function | 2174 void pk_rsa_v21_get_psa_attributes(int md_type, int from_pair, 2190 TEST_EQUAL(mbedtls_rsa_set_padding(rsa, MBEDTLS_RSA_PKCS_V21, md_type), 0);
|
/mbedtls-latest/include/mbedtls/ |
D | md.h | 149 const mbedtls_md_info_t *mbedtls_md_info_from_type(mbedtls_md_type_t md_type); 246 static inline unsigned char mbedtls_md_get_size_from_type(mbedtls_md_type_t md_type) in mbedtls_md_get_size_from_type() argument 248 return mbedtls_md_get_size(mbedtls_md_info_from_type(md_type)); in mbedtls_md_get_size_from_type()
|
D | psa_util.h | 121 static inline psa_algorithm_t mbedtls_md_psa_alg_from_type(mbedtls_md_type_t md_type) in mbedtls_md_psa_alg_from_type() argument 123 return PSA_ALG_CATEGORY_HASH | (psa_algorithm_t) md_type; in mbedtls_md_psa_alg_from_type()
|
D | pkcs12.h | 91 mbedtls_md_type_t md_type, 140 mbedtls_cipher_type_t cipher_type, mbedtls_md_type_t md_type,
|
D | pkcs5.h | 149 int mbedtls_pkcs5_pbkdf2_hmac_ext(mbedtls_md_type_t md_type,
|
D | ecjpake.h | 61 mbedtls_md_type_t MBEDTLS_PRIVATE(md_type); /**< Hash to use */
|
/mbedtls-latest/programs/ssl/ |
D | ssl_test_lib.c | 117 const mbedtls_md_type_t md_type = MBEDTLS_MD_SHA256; in rng_seed() local 119 const mbedtls_md_type_t md_type = MBEDTLS_MD_SHA512; in rng_seed() local 124 mbedtls_md_info_from_type(md_type), in rng_seed()
|