/hostap-3.6.0/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 | 554 Kx, Kx_len, pkex->z, curve->hash_len); in dpp_pkex_rx_exchange_req() 593 clear_len = 4 + 2 * curve->prime_len + 4 + curve->hash_len; in dpp_pkex_build_commit_reveal_req() 633 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_req() 634 wpabuf_put_data(clear, u, curve->hash_len - 1); in dpp_pkex_build_commit_reveal_req() 635 wpabuf_put_u8(clear, u[curve->hash_len - 1] ^ 0x01); in dpp_pkex_build_commit_reveal_req() 642 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_req() 643 wpabuf_put_data(clear, u, curve->hash_len); in dpp_pkex_build_commit_reveal_req() 666 if (aes_siv_encrypt(pkex->z, curve->hash_len, in dpp_pkex_build_commit_reveal_req() 854 if (dpp_hmac_vector(curve->hash_len, Jx, Jx_len, num_elem, addr, len, u) in dpp_pkex_rx_exchange_resp() 857 wpa_hexdump(MSG_DEBUG, "DPP: u", u, curve->hash_len); in dpp_pkex_rx_exchange_resp() [all …]
|
D | dpp_i.h | 84 int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len, 86 int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len, 92 int dpp_pbkdf2(size_t hash_len, const u8 *password, size_t password_len, 103 int dpp_derive_k1(const u8 *Mx, size_t Mx_len, u8 *k1, unsigned int hash_len); 104 int dpp_derive_k2(const u8 *Nx, size_t Nx_len, u8 *k2, unsigned int hash_len); 110 int dpp_derive_pmk(const u8 *Nx, size_t Nx_len, u8 *pmk, unsigned int hash_len); 128 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 …]
|
D | dpp.c | 690 clear_len += 4 + auth->curve->hash_len; in dpp_build_conf_req_attr() 744 wpabuf_put_le16(clear, auth->curve->hash_len); in dpp_build_conf_req_attr() 745 wpabuf_put_data(clear, auth_i, auth->curve->hash_len); in dpp_build_conf_req_attr() 764 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_build_conf_req_attr() 2015 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_build_conf_resp() 2091 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len, in dpp_conf_req_rx() 2156 if (rx_auth_i_len != auth->curve->hash_len || in dpp_conf_req_rx() 2157 os_memcmp(rx_auth_i, auth_i, auth->curve->hash_len) != 0) { in dpp_conf_req_rx() 2163 auth_i, auth->curve->hash_len); in dpp_conf_req_rx() 3108 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len, in dpp_conf_resp_rx() [all …]
|
D | dpp_reconfig.c | 414 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_reconfig_build_resp() 644 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_reconfig_build_conf() 791 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len, in dpp_reconfig_auth_resp_rx() 903 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len, in dpp_reconfig_auth_conf_rx()
|
/hostap-3.6.0/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()
|
/hostap-3.6.0/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 …]
|
D | ikev2_common.h | 255 size_t hash_len; member 261 size_t hash_len; member
|
D | eap_ikev2_common.c | 83 icv_len = integ->hash_len; in eap_ikev2_validate_icv()
|
/hostap-3.6.0/tests/ |
D | test-rsa-sig-ver.c | 128 size_t hash_len; in cavp_rsa_sig_ver() local 138 hash_len = 20; in cavp_rsa_sig_ver() 145 hash_len = 32; in cavp_rsa_sig_ver() 152 wpa_hexdump(MSG_INFO, "Hash(Msg)", hash, hash_len); in cavp_rsa_sig_ver() 163 hash, hash_len); in cavp_rsa_sig_ver()
|
/hostap-3.6.0/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()
|
D | x509v3.c | 1849 size_t hash_len; in x509_check_signature() local 2041 hash_len = 16; in x509_check_signature() 2043 hash, hash_len); in x509_check_signature() 2047 hash_len = 20; in x509_check_signature() 2049 hash, hash_len); in x509_check_signature() 2053 hash_len = 32; in x509_check_signature() 2055 hash, hash_len); in x509_check_signature() 2059 hash_len = 48; in x509_check_signature() 2061 hash, hash_len); in x509_check_signature() 2065 hash_len = 64; in x509_check_signature() [all …]
|
D | pkcs1.h | 27 const u8 *hash, size_t hash_len);
|
D | pkcs1.c | 203 const u8 *hash, size_t hash_len) in pkcs1_v15_sig_ver() argument 318 if (hdr.length != hash_len || in pkcs1_v15_sig_ver()
|
/hostap-3.6.0/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 …]
|
D | ikev2.c | 111 skeyseed, prf->hash_len); in ikev2_derive_keys() 634 if (auth_len != prf->hash_len || in ikev2_process_auth_secret() 640 auth_data, prf->hash_len); in ikev2_process_auth_secret() 1072 wpabuf_put(msg, prf->hash_len)) < 0) { in ikev2_build_auth()
|
D | eap_server_aka.c | 307 size_t hash_len; in eap_aka_verify_checkcode() local 322 hash_len = data->eap_method == EAP_TYPE_AKA_PRIME ? in eap_aka_verify_checkcode() 325 if (checkcode_len != hash_len) { in eap_aka_verify_checkcode() 340 if (os_memcmp_const(hash, checkcode, hash_len) != 0) { in eap_aka_verify_checkcode()
|
/hostap-3.6.0/src/wps/ |
D | wps_attr_build.c | 427 size_t hash_len; in wps_build_oob_dev_pw() local 434 hash_len = wpabuf_len(pubkey); in wps_build_oob_dev_pw() 435 if (sha256_vector(1, addr, &hash_len, pubkey_hash) < 0) in wps_build_oob_dev_pw()
|
/hostap-3.6.0/src/utils/ |
D | http-utils.h | 25 size_t hash_len; member
|
/hostap-3.6.0/src/eap_peer/ |
D | eap.c | 1833 size_t hash_len; in eap_peer_finish() local 1904 hash_len = 16; in eap_peer_finish() 1905 if (max_len < 1 + (int) hash_len) { in eap_peer_finish() 1920 end - ((const u8 *) hdr) - hash_len, hash) < 0) in eap_peer_finish() 1922 if (os_memcmp(end - hash_len, hash, hash_len) != 0) { in eap_peer_finish() 1928 end -= 1 + hash_len; in eap_peer_finish() 2129 size_t len = data->peer_cert.hash_len * 2 + 1; in eap_peer_sm_tls_event() 2134 data->peer_cert.hash_len); in eap_peer_sm_tls_event()
|
D | ikev2.c | 107 skeyseed, prf->hash_len); in ikev2_derive_keys() 568 if (auth_len != prf->hash_len || in ikev2_process_auth_secret() 574 auth_data, prf->hash_len); in ikev2_process_auth_secret() 1008 wpabuf_put(msg, prf->hash_len)) < 0) { in ikev2_build_auth()
|