/third_party/mbedtls/library/ |
D | hkdf.c | 88 size_t hash_len; in mbedtls_hkdf_extract() local 95 hash_len = mbedtls_md_get_size( md ); in mbedtls_hkdf_extract() 97 if( hash_len == 0 ) in mbedtls_hkdf_extract() 103 salt_len = hash_len; in mbedtls_hkdf_extract() 113 size_t hash_len; in mbedtls_hkdf_expand() local 127 hash_len = mbedtls_md_get_size( md ); in mbedtls_hkdf_expand() 129 if( prk_len < hash_len || hash_len == 0 ) in mbedtls_hkdf_expand() 140 n = okm_len / hash_len; in mbedtls_hkdf_expand() 142 if( (okm_len % hash_len) != 0 ) in mbedtls_hkdf_expand() 204 num_to_copy = i != n ? hash_len : okm_len - where; in mbedtls_hkdf_expand() [all …]
|
D | pk_wrap.c | 98 const unsigned char *hash, size_t hash_len, in rsa_verify_wrap() argument 106 if( md_alg == MBEDTLS_MD_NONE && UINT_MAX < hash_len ) in rsa_verify_wrap() 115 (unsigned int) hash_len, hash, sig ) ) != 0 ) in rsa_verify_wrap() 130 const unsigned char *hash, size_t hash_len, in rsa_sign_wrap() argument 137 if( md_alg == MBEDTLS_MD_NONE && UINT_MAX < hash_len ) in rsa_sign_wrap() 144 md_alg, (unsigned int) hash_len, hash, sig ) ); in rsa_sign_wrap() 254 const unsigned char *hash, size_t hash_len, 258 const unsigned char *hash, size_t hash_len, 263 const unsigned char *hash, size_t hash_len, in eckey_verify_wrap() argument 272 ret = ecdsa_verify_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len ); in eckey_verify_wrap() [all …]
|
D | pk.c | 224 static inline int pk_hashlen_helper( mbedtls_md_type_t md_alg, size_t *hash_len ) in pk_hashlen_helper() argument 228 if( *hash_len != 0 && md_alg == MBEDTLS_MD_NONE ) in pk_hashlen_helper() 234 if ( *hash_len != 0 && *hash_len < mbedtls_md_get_size( md_info ) ) in pk_hashlen_helper() 237 *hash_len = mbedtls_md_get_size( md_info ); in pk_hashlen_helper() 270 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify_restartable() argument 275 PK_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE && hash_len == 0 ) || in mbedtls_pk_verify_restartable() 280 pk_hashlen_helper( md_alg, &hash_len ) != 0 ) in mbedtls_pk_verify_restartable() 295 md_alg, hash, hash_len, sig, sig_len, rs_ctx->rs_ctx ); in mbedtls_pk_verify_restartable() 309 return( ctx->pk_info->verify_func( ctx->pk_ctx, md_alg, hash, hash_len, in mbedtls_pk_verify_restartable() 317 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify() argument [all …]
|
/third_party/uboot/u-boot-2020.01/lib/libavb/ |
D | avb_crypto.c | 311 {.padding = NULL, .padding_len = 0, .hash_len = 0}, 315 .hash_len = AVB_SHA256_DIGEST_SIZE}, 319 .hash_len = AVB_SHA256_DIGEST_SIZE}, 323 .hash_len = AVB_SHA256_DIGEST_SIZE}, 327 .hash_len = AVB_SHA512_DIGEST_SIZE}, 331 .hash_len = AVB_SHA512_DIGEST_SIZE}, 335 .hash_len = AVB_SHA512_DIGEST_SIZE},
|
/third_party/uboot/u-boot-2020.01/lib/rsa/ |
D | rsa-verify.c | 62 const uint8_t *hash, int hash_len) in padding_pkcs_15_verify() argument 113 int hash_len = checksum->checksum_len; in mask_generation_function1() local 122 tmp = malloc(hash_len); in mask_generation_function1() 141 while ((i_output < output_len) && (i < hash_len)) { in mask_generation_function1() 158 uint8_t *hash, int hash_len, in compute_hash_prime() argument 168 region[1].size = hash_len; in compute_hash_prime() 184 const uint8_t *hash, int hash_len) in padding_pss_verify() argument 187 int masked_db_len = msg_len - hash_len - 1; in padding_pss_verify() 189 int h_len = hash_len; in padding_pss_verify() 193 int db_len = masked_db_len, salt_len = msg_len - hash_len - 2; in padding_pss_verify() [all …]
|
/third_party/uboot/u-boot-2020.01/include/u-boot/ |
D | rsa.h | 103 const uint8_t *hash, int hash_len); 108 const uint8_t *hash, int hash_len); 120 const uint8_t *hash, int hash_len) in padding_pkcs_15_verify() argument 128 const uint8_t *hash, int hash_len) in padding_pss_verify() argument
|
/third_party/mbedtls/include/mbedtls/ |
D | pk_internal.h | 77 const unsigned char *hash, size_t hash_len, 82 const unsigned char *hash, size_t hash_len, 90 const unsigned char *hash, size_t hash_len, 96 const unsigned char *hash, size_t hash_len,
|
D | pk.h | 357 const unsigned char *hash, size_t hash_len, 382 const unsigned char *hash, size_t hash_len, 417 const unsigned char *hash, size_t hash_len, 450 const unsigned char *hash, size_t hash_len, 483 const unsigned char *hash, size_t hash_len,
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_common/ |
D | ikev2_common.c | 118 size_t hash_len; in ikev2_prf_plus() local 128 hash_len = prf->hash_len; in ikev2_prf_plus() 131 len[0] = hash_len; in ikev2_prf_plus() 150 clen = hash_len; in ikev2_prf_plus() 402 sign_len = wpabuf_len(sign_msg) + nonce_len + prf->hash_len; in ikev2_derive_auth_data() 411 os_memcpy(pos, hash, prf->hash_len); in ikev2_derive_auth_data() 416 ikev2_prf_hash(prf->id, hash, prf->hash_len, 1, in ikev2_derive_auth_data() 461 if (encrypted_len < iv_len + 1 + integ_alg->hash_len) { in ikev2_decrypt_payload() 470 integ = end - integ_alg->hash_len; in ikev2_decrypt_payload() 483 if (os_memcmp_const(integ, hash, integ_alg->hash_len) != 0) { in ikev2_decrypt_payload() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_common/ |
D | ikev2_common.c | 118 size_t hash_len; in ikev2_prf_plus() local 128 hash_len = prf->hash_len; in ikev2_prf_plus() 131 len[0] = hash_len; in ikev2_prf_plus() 150 clen = hash_len; in ikev2_prf_plus() 402 sign_len = wpabuf_len(sign_msg) + nonce_len + prf->hash_len; in ikev2_derive_auth_data() 411 os_memcpy(pos, hash, prf->hash_len); in ikev2_derive_auth_data() 416 ikev2_prf_hash(prf->id, hash, prf->hash_len, 1, in ikev2_derive_auth_data() 461 if (encrypted_len < iv_len + 1 + integ_alg->hash_len) { in ikev2_decrypt_payload() 470 integ = end - integ_alg->hash_len; in ikev2_decrypt_payload() 483 if (os_memcmp_const(integ, hash, integ_alg->hash_len) != 0) { in ikev2_decrypt_payload() [all …]
|
/third_party/boringssl/src/ssl/ |
D | ssl_transcript.cc | 195 size_t hash_len; in UpdateForHelloRetryRequest() local 196 if (!GetHash(old_hash, &hash_len)) { in UpdateForHelloRetryRequest() 200 static_cast<uint8_t>(hash_len)}; in UpdateForHelloRetryRequest() 203 !Update(MakeConstSpan(old_hash, hash_len))) { in UpdateForHelloRetryRequest()
|
D | tls13_enc.cc | 426 unsigned hash_len; in tls13_export_keying_material() local 428 if (!EVP_Digest(context.data(), context.size(), hash_buf, &hash_len, digest, in tls13_export_keying_material() 435 auto hash = MakeConstSpan(hash_buf, hash_len); in tls13_export_keying_material() 501 size_t hash_len = EVP_MD_size(digest); in tls13_write_psk_binder() local 510 1 /* length prefix */ + hash_len) || in tls13_write_psk_binder() 516 verify_data_len != hash_len) { in tls13_write_psk_binder()
|
/third_party/mbedtls/tests/suites/ |
D | test_suite_hkdf.data | 1 HKDF extract fails with hash_len of 0 7 HKDF expand fails with hash_len of 0 10 HKDF expand fails with prk_len < hash_len 13 HKDF expand fails with okm_len / hash_len > 255
|
D | test_suite_hkdf.function | 103 void test_hkdf_extract_ret( int hash_len, int ret ) 114 fake_md_info.size = hash_len; 130 void test_hkdf_expand_ret( int hash_len, int prk_len, int okm_len, int ret ) 141 fake_md_info.size = hash_len;
|
D | test_suite_pkcs1_v21.function | 198 size_t hash_len; 217 hash_len = 0; 222 hash_len = message_str->len; 226 msg_digest_id, hash_len, hash_result, 230 msg_digest_id, hash_len, hash_result,
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/common/ |
D | dpp.c | 395 if (curve->hash_len == 32) in dpp_hash_vector() 397 if (curve->hash_len == 48) in dpp_hash_vector() 399 if (curve->hash_len == 64) in dpp_hash_vector() 405 static int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len, in dpp_hkdf_expand() argument 408 if (hash_len == 32) in dpp_hkdf_expand() 412 if (hash_len == 48) in dpp_hkdf_expand() 416 if (hash_len == 64) in dpp_hkdf_expand() 424 static int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len, in dpp_hmac_vector() argument 428 if (hash_len == 32) in dpp_hmac_vector() 431 if (hash_len == 48) in dpp_hmac_vector() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/common/ |
D | dpp.c | 395 if (curve->hash_len == 32) in dpp_hash_vector() 397 if (curve->hash_len == 48) in dpp_hash_vector() 399 if (curve->hash_len == 64) in dpp_hash_vector() 405 static int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len, in dpp_hkdf_expand() argument 408 if (hash_len == 32) in dpp_hkdf_expand() 412 if (hash_len == 48) in dpp_hkdf_expand() 416 if (hash_len == 64) in dpp_hkdf_expand() 424 static int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len, in dpp_hmac_vector() argument 428 if (hash_len == 32) in dpp_hmac_vector() 431 if (hash_len == 48) in dpp_hmac_vector() [all …]
|
/third_party/uboot/u-boot-2020.01/product/hiupdate/verify/ |
D | verify_sign.c | 28 unsigned char *hash, unsigned int hash_len) in calc_image_hash() argument 32 if (!data || !hash || (data_len == 0) || (hash_len < HASH_LEN)) { in calc_image_hash()
|
D | verify_sign.h | 25 unsigned char *hash, unsigned int hash_len);
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/tls/ |
D | tlsv1_client_ocsp.c | 124 unsigned int hash_len; in tls_process_ocsp_single_response() local 181 hash_len = ocsp_hash_data(&alg.oid, issuer->subject_dn, in tls_process_ocsp_single_response() 183 if (hash_len == 0 || name_hash_len != hash_len || in tls_process_ocsp_single_response() 184 os_memcmp(name_hash, hash, hash_len) != 0) { in tls_process_ocsp_single_response() 187 hash, hash_len); in tls_process_ocsp_single_response() 205 hash_len = ocsp_hash_data(&alg.oid, issuer->public_key, in tls_process_ocsp_single_response() 207 if (hash_len == 0 || key_hash_len != hash_len || in tls_process_ocsp_single_response() 208 os_memcmp(key_hash, hash, hash_len) != 0) { in tls_process_ocsp_single_response() 211 hash, hash_len); in tls_process_ocsp_single_response()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/tls/ |
D | tlsv1_client_ocsp.c | 124 unsigned int hash_len; in tls_process_ocsp_single_response() local 181 hash_len = ocsp_hash_data(&alg.oid, issuer->subject_dn, in tls_process_ocsp_single_response() 183 if (hash_len == 0 || name_hash_len != hash_len || in tls_process_ocsp_single_response() 184 os_memcmp(name_hash, hash, hash_len) != 0) { in tls_process_ocsp_single_response() 187 hash, hash_len); in tls_process_ocsp_single_response() 205 hash_len = ocsp_hash_data(&alg.oid, issuer->public_key, in tls_process_ocsp_single_response() 207 if (hash_len == 0 || key_hash_len != hash_len || in tls_process_ocsp_single_response() 208 os_memcmp(key_hash, hash, hash_len) != 0) { in tls_process_ocsp_single_response() 211 hash, hash_len); in tls_process_ocsp_single_response()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_server/ |
D | eap_server.c | 703 size_t hash_len; in erp_send_finish_reauth() local 709 hash_len = 32; in erp_send_finish_reauth() 712 hash_len = 16; in erp_send_finish_reauth() 718 hash_len = 0; in erp_send_finish_reauth() 721 if (hash_len) in erp_send_finish_reauth() 722 plen += 1 + hash_len; in erp_send_finish_reauth() 741 wpabuf_put_data(msg, hash, hash_len); in erp_send_finish_reauth() 800 size_t hash_len; in SM_STATE() local 904 hash_len = 32; in SM_STATE() 912 hash_len = 16; in SM_STATE() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_server/ |
D | eap_server.c | 703 size_t hash_len; in erp_send_finish_reauth() local 709 hash_len = 32; in erp_send_finish_reauth() 712 hash_len = 16; in erp_send_finish_reauth() 718 hash_len = 0; in erp_send_finish_reauth() 721 if (hash_len) in erp_send_finish_reauth() 722 plen += 1 + hash_len; in erp_send_finish_reauth() 741 wpabuf_put_data(msg, hash, hash_len); in erp_send_finish_reauth() 800 size_t hash_len; in SM_STATE() local 904 hash_len = 32; in SM_STATE() 912 hash_len = 16; in SM_STATE() [all …]
|
/third_party/openssl/crypto/ct/ |
D | ct_sct_ctx.c | 195 size_t *hash_len) in ct_public_key_hash() argument 203 if (*hash != NULL && *hash_len >= SHA256_DIGEST_LENGTH) { in ct_public_key_hash() 222 *hash_len = SHA256_DIGEST_LENGTH; in ct_public_key_hash()
|
/third_party/boringssl/src/crypto/evp/ |
D | p_rsa.c | 271 const size_t hash_len = EVP_MD_size(rctx->md); in pkey_rsa_verify_recover() local 278 kDummyHash, hash_len)) { in pkey_rsa_verify_recover() 288 CRYPTO_memcmp(rctx->tbuf, asn1_prefix, asn1_prefix_len - hash_len) != 0) { in pkey_rsa_verify_recover() 301 OPENSSL_memcpy(out, rctx->tbuf + rslen - hash_len, hash_len); in pkey_rsa_verify_recover() 303 *out_len = hash_len; in pkey_rsa_verify_recover()
|