/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/common/ |
D | dpp_crypto.c | 103 if (curve->hash_len == 32) in dpp_hash_vector() 105 if (curve->hash_len == 48) in dpp_hash_vector() 107 if (curve->hash_len == 64) in dpp_hash_vector() 113 int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len, in dpp_hkdf_expand() argument 116 if (hash_len == 32) in dpp_hkdf_expand() 120 if (hash_len == 48) in dpp_hkdf_expand() 124 if (hash_len == 64) in dpp_hkdf_expand() 132 int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len, in dpp_hmac_vector() argument 136 if (hash_len == 32) in dpp_hmac_vector() 139 if (hash_len == 48) in dpp_hmac_vector() [all …]
|
D | sae.c | 533 static int hkdf_extract(size_t hash_len, const u8 *salt, size_t salt_len, in hkdf_extract() argument 537 if (hash_len == 32) in hkdf_extract() 541 if (hash_len == 48) in hkdf_extract() 546 if (hash_len == 64) in hkdf_extract() 554 static int hkdf_expand(size_t hash_len, const u8 *prk, size_t prk_len, in hkdf_expand() argument 559 if (hash_len == 32) in hkdf_expand() 564 if (hash_len == 48) in hkdf_expand() 570 if (hash_len == 64) in hkdf_expand() 822 static int sae_pwd_seed(size_t hash_len, const u8 *ssid, size_t ssid_len, in sae_pwd_seed() argument 844 if (hkdf_extract(hash_len, ssid, ssid_len, num_elem, addr, len, in sae_pwd_seed() [all …]
|
D | dpp_backup.c | 215 size_t hash_len) in dpp_build_pbkdf2_alg_id() argument 234 if (hash_len == 32) in dpp_build_pbkdf2_alg_id() 236 else if (hash_len == 48) in dpp_build_pbkdf2_alg_id() 238 else if (hash_len == 64) in dpp_build_pbkdf2_alg_id() 250 asn1_put_integer(params, hash_len); /* keyLength */ in dpp_build_pbkdf2_alg_id() 264 dpp_build_pw_recipient_info(struct dpp_authentication *auth, size_t hash_len, in dpp_build_pw_recipient_info() argument 279 key_len = auth->curve->hash_len; in dpp_build_pw_recipient_info() 287 if (dpp_pbkdf2(hash_len, key, key_len, wpabuf_head(salt), 64, 1000, in dpp_build_pw_recipient_info() 288 kek, hash_len)) { in dpp_build_pw_recipient_info() 293 kek, hash_len); in dpp_build_pw_recipient_info() [all …]
|
D | sae_pk.c | 529 int sae_hash(size_t hash_len, const u8 *data, size_t len, u8 *hash) in sae_hash() argument 531 if (hash_len == 32) in sae_hash() 534 if (hash_len == 48) in sae_hash() 538 if (hash_len == 64) in sae_hash() 545 static int sae_pk_hash_sig_data(struct sae_data *sae, size_t hash_len, in sae_pk_hash_sig_data() argument 587 if (sae_hash(hash_len, wpabuf_head(sig_data), wpabuf_len(sig_data), in sae_pk_hash_sig_data() 591 hash, hash_len); in sae_pk_hash_sig_data() 609 size_t hash_len; in sae_write_confirm_pk() local 643 hash_len = sae_group_2_hash_len(pk->group); in sae_write_confirm_pk() 644 if (sae_pk_hash_sig_data(sae, hash_len, true, wpabuf_head(pk->m), in sae_write_confirm_pk() [all …]
|
D | dpp_pkex.c | 552 Kx, Kx_len, pkex->z, curve->hash_len); in dpp_pkex_rx_exchange_req() 591 clear_len = 4 + 2 * curve->prime_len + 4 + curve->hash_len; in dpp_pkex_build_commit_reveal_req() 631 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_req() 632 wpabuf_put_data(clear, u, curve->hash_len - 1); in dpp_pkex_build_commit_reveal_req() 633 wpabuf_put_u8(clear, u[curve->hash_len - 1] ^ 0x01); in dpp_pkex_build_commit_reveal_req() 640 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_req() 641 wpabuf_put_data(clear, u, curve->hash_len); in dpp_pkex_build_commit_reveal_req() 664 if (aes_siv_encrypt(pkex->z, curve->hash_len, in dpp_pkex_build_commit_reveal_req() 851 if (dpp_hmac_vector(curve->hash_len, Jx, Jx_len, num_elem, addr, len, u) in dpp_pkex_rx_exchange_resp() 854 wpa_hexdump(MSG_DEBUG, "DPP: u", u, curve->hash_len); in dpp_pkex_rx_exchange_resp() [all …]
|
D | dpp_i.h | 82 int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len, 84 int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len, 90 int dpp_pbkdf2(size_t hash_len, const u8 *password, size_t password_len, 101 int dpp_derive_k1(const u8 *Mx, size_t Mx_len, u8 *k1, unsigned int hash_len); 102 int dpp_derive_k2(const u8 *Nx, size_t Nx_len, u8 *k2, unsigned int hash_len); 108 int dpp_derive_pmk(const u8 *Nx, size_t Nx_len, u8 *pmk, unsigned int hash_len); 126 u8 *z, unsigned int hash_len);
|
D | dpp_auth.c | 205 if (aes_siv_encrypt(auth->k1, auth->curve->hash_len, clear, siv_len, in dpp_auth_build_req() 391 if (aes_siv_encrypt(siv_key, auth->curve->hash_len, clear, siv_len, in dpp_auth_build_resp() 492 auth->curve->hash_len) < 0) in dpp_auth_build_resp_ok() 506 WPA_PUT_LE16(&r_auth[2], auth->curve->hash_len); in dpp_auth_build_resp_ok() 512 r_auth[4 + auth->curve->hash_len / 2] ^= 0x01; in dpp_auth_build_resp_ok() 515 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_auth_build_resp_ok() 516 r_auth, 4 + auth->curve->hash_len, in dpp_auth_build_resp_ok() 519 wrapped_r_auth_len = 4 + auth->curve->hash_len + AES_BLOCK_SIZE; in dpp_auth_build_resp_ok() 791 auth->curve->hash_len) < 0) in dpp_auth_req_rx() 806 if (aes_siv_decrypt(auth->k1, auth->curve->hash_len, in dpp_auth_req_rx() [all …]
|
/third_party/mbedtls/library/ |
D | hkdf.c | 58 size_t hash_len; in mbedtls_hkdf_extract() local 65 hash_len = mbedtls_md_get_size( md ); in mbedtls_hkdf_extract() 67 if( hash_len == 0 ) in mbedtls_hkdf_extract() 73 salt_len = hash_len; in mbedtls_hkdf_extract() 83 size_t hash_len; in mbedtls_hkdf_expand() local 97 hash_len = mbedtls_md_get_size( md ); in mbedtls_hkdf_expand() 99 if( prk_len < hash_len || hash_len == 0 ) in mbedtls_hkdf_expand() 110 n = okm_len / hash_len; in mbedtls_hkdf_expand() 112 if( okm_len % hash_len != 0 ) in mbedtls_hkdf_expand() 133 memset( t, 0, hash_len ); in mbedtls_hkdf_expand() [all …]
|
D | pk_wrap.c | 78 const unsigned char *hash, size_t hash_len, in rsa_verify_wrap() argument 86 if( md_alg == MBEDTLS_MD_NONE && UINT_MAX < hash_len ) in rsa_verify_wrap() 94 (unsigned int) hash_len, in rsa_verify_wrap() 110 const unsigned char *hash, size_t hash_len, in rsa_sign_wrap() argument 117 if( md_alg == MBEDTLS_MD_NONE && UINT_MAX < hash_len ) in rsa_sign_wrap() 126 md_alg, (unsigned int) hash_len, in rsa_sign_wrap() 247 const unsigned char *hash, size_t hash_len, 251 const unsigned char *hash, size_t hash_len, 256 const unsigned char *hash, size_t hash_len, in eckey_verify_wrap() argument 265 ret = ecdsa_verify_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len ); in eckey_verify_wrap() [all …]
|
D | pk.c | 234 static inline int pk_hashlen_helper( mbedtls_md_type_t md_alg, size_t *hash_len ) in pk_hashlen_helper() argument 238 if( *hash_len != 0 ) in pk_hashlen_helper() 244 *hash_len = mbedtls_md_get_size( md_info ); in pk_hashlen_helper() 277 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify_restartable() argument 282 PK_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE && hash_len == 0 ) || in mbedtls_pk_verify_restartable() 287 pk_hashlen_helper( md_alg, &hash_len ) != 0 ) in mbedtls_pk_verify_restartable() 302 md_alg, hash, hash_len, sig, sig_len, rs_ctx->rs_ctx ); in mbedtls_pk_verify_restartable() 316 return( ctx->pk_info->verify_func( ctx->pk_ctx, md_alg, hash, hash_len, in mbedtls_pk_verify_restartable() 324 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify() argument 327 return( mbedtls_pk_verify_restartable( ctx, md_alg, hash, hash_len, in mbedtls_pk_verify() [all …]
|
D | pk_wrap.h | 46 const unsigned char *hash, size_t hash_len, 51 const unsigned char *hash, size_t hash_len, 59 const unsigned char *hash, size_t hash_len, 65 const unsigned char *hash, size_t hash_len,
|
/third_party/rust/crates/aho-corasick/src/packed/ |
D | rabinkarp.rs | 48 hash_len: usize, field 71 let hash_len = patterns.minimum_len(); in new() localVariable 72 assert!(hash_len >= 1); in new() 75 for _ in 1..hash_len { in new() 81 hash_len, in new() 86 let hash = rk.hash(&pat.bytes()[..rk.hash_len]); in new() 108 if at + self.hash_len > haystack.len() { in find_at() 111 let mut hash = self.hash(&haystack[at..at + self.hash_len]); in find_at() 121 if at + self.hash_len >= haystack.len() { in find_at() 127 haystack[at + self.hash_len], in find_at() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/hostapd/ |
D | sae_pk_gen.c | 33 size_t hash_len; in main() local 81 hash_len = 32; in main() 84 hash_len = 48; in main() 87 hash_len = 64; in main() 110 if (sae_hash(hash_len, data, data_len, hash) < 0) { in main() 129 wpa_snprintf_hex(hash_hex, sizeof(hash_hex), hash, hash_len) < 0) in main() 149 for (j = 0; j < 8 * (int) hash_len / 20; j++) { in main() 152 sae_pk_buf_shift_left_19(hash + sec, hash_len - sec); in main() 166 pw_base_bin, hash_len - sec) >= 0) in main() 177 for (j = 4; j <= ((int) hash_len * 8 + 5 - 8 * sec) / 19; j++) { in main()
|
/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/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/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 175 hash_len = ocsp_hash_data(&alg.oid, issuer->subject_dn, in tls_process_ocsp_single_response() 177 if (hash_len == 0 || name_hash_len != hash_len || in tls_process_ocsp_single_response() 178 os_memcmp(name_hash, hash, hash_len) != 0) { in tls_process_ocsp_single_response() 181 hash, hash_len); in tls_process_ocsp_single_response() 197 hash_len = ocsp_hash_data(&alg.oid, issuer->public_key, in tls_process_ocsp_single_response() 199 if (hash_len == 0 || key_hash_len != hash_len || in tls_process_ocsp_single_response() 200 os_memcmp(key_hash, hash, hash_len) != 0) { in tls_process_ocsp_single_response() 203 hash, hash_len); in tls_process_ocsp_single_response()
|
/third_party/mbedtls/include/mbedtls/ |
D | pk.h | 442 const unsigned char *hash, size_t hash_len, 467 const unsigned char *hash, size_t hash_len, 502 const unsigned char *hash, size_t hash_len, 534 const unsigned char *hash, size_t hash_len, 569 const unsigned char *hash, size_t 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/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_pk.function | 439 size_t hash_len; 458 hash_len = mbedtls_md_get_size( md_info ); 463 hash_len = message_str->len; 479 digest, hash_result, hash_len, 626 size_t hash_len = sizeof( hash ); 650 hash, hash_len, 660 hash, hash_len, sig, sig_len ) == verify_ret ); 666 hash, hash_len, sig, sig_len ) != 0 ); 671 hash, hash_len, sig, sig_len ) != 0 ); 675 TEST_ASSERT( mbedtls_pk_sign( &pk, MBEDTLS_MD_SHA256, hash, hash_len, [all …]
|
D | test_suite_pkcs1_v21.function | 236 size_t hash_len; 260 hash_len = mbedtls_md_get_size( md_info ); 265 hash_len = message_str->len; 269 hash_len, hash_result, 272 TEST_ASSERT( mbedtls_rsa_rsassa_pss_verify_ext( &ctx, msg_digest_id, hash_len,
|
/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/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_server/ |
D | eap_server.c | 710 size_t hash_len; in erp_send_finish_reauth() local 716 hash_len = 32; in erp_send_finish_reauth() 719 hash_len = 16; in erp_send_finish_reauth() 725 hash_len = 0; in erp_send_finish_reauth() 728 if (hash_len) in erp_send_finish_reauth() 729 plen += 1 + hash_len; in erp_send_finish_reauth() 749 wpabuf_put_data(msg, hash, hash_len); in erp_send_finish_reauth() 808 size_t hash_len; in SM_STATE() local 913 hash_len = 32; in SM_STATE() 921 hash_len = 16; in SM_STATE() [all …]
|