/freebsd/contrib/wpa/src/crypto/ |
H A D | sha256-kdf.c | 36 u8 T[SHA256_MAC_LEN]; in hmac_sha256_kdf() 43 len[0] = SHA256_MAC_LEN; in hmac_sha256_kdf() 62 if (clen > SHA256_MAC_LEN) in hmac_sha256_kdf() 63 clen = SHA256_MAC_LEN; in hmac_sha256_kdf() 72 forced_memzero(T, SHA256_MAC_LEN); in hmac_sha256_kdf() 80 forced_memzero(T, SHA256_MAC_LEN); in hmac_sha256_kdf() 85 forced_memzero(T, SHA256_MAC_LEN); in hmac_sha256_kdf()
|
H A D | sha256-tlsprf.c | 33 u8 A[SHA256_MAC_LEN]; in tls_prf_sha256() 34 u8 P[SHA256_MAC_LEN]; in tls_prf_sha256() 40 len[0] = SHA256_MAC_LEN; in tls_prf_sha256() 60 hmac_sha256(secret, secret_len, A, SHA256_MAC_LEN, A) < 0) in tls_prf_sha256() 64 if (clen > SHA256_MAC_LEN) in tls_prf_sha256() 65 clen = SHA256_MAC_LEN; in tls_prf_sha256()
|
H A D | sha256-prf.c | 60 u8 hash[SHA256_MAC_LEN]; in sha256_prf_bits() 80 if (plen >= SHA256_MAC_LEN) { in sha256_prf_bits() 84 pos += SHA256_MAC_LEN; in sha256_prf_bits()
|
H A D | sha256.h | 12 #define SHA256_MAC_LEN 32 macro
|
H A D | sha256.c | 88 _len[1] = SHA256_MAC_LEN; in hmac_sha256_vector()
|
H A D | crypto_linux.c | 151 mac, SHA256_MAC_LEN); in sha256_vector() 205 addr, len, mac, SHA256_MAC_LEN); in hmac_sha256_vector() 268 ctx->mac_len = SHA256_MAC_LEN; in crypto_hash_init() 272 ctx->mac_len = SHA256_MAC_LEN; in crypto_hash_init()
|
/freebsd/contrib/wpa/src/ap/ |
H A D | comeback_token.c | 23 u8 hash[SHA256_MAC_LEN]; in comeback_token_hash() 37 u8 mac[SHA256_MAC_LEN]; in check_comeback_token() 43 if (token_len != SHA256_MAC_LEN || in check_comeback_token() 61 os_memcmp_const(token + 2, &mac[2], SHA256_MAC_LEN - 2) != 0) in check_comeback_token() 98 buf = wpabuf_alloc(sizeof(le16) + 3 + SHA256_MAC_LEN); in auth_build_token_req() 108 wpabuf_put_u8(buf, 1 + SHA256_MAC_LEN); in auth_build_token_req() 124 token = wpabuf_put(buf, SHA256_MAC_LEN); in auth_build_token_req()
|
H A D | dpp_hostapd.c | 1052 if (!r_bootstrap || r_bootstrap_len != SHA256_MAC_LEN) { in hostapd_dpp_rx_auth_req() 1062 if (!i_bootstrap || i_bootstrap_len != SHA256_MAC_LEN) { in hostapd_dpp_rx_auth_req() 1098 SHA256_MAC_LEN) != 0) { in hostapd_dpp_rx_auth_req() 1549 SHA256_MAC_LEN) == 0) { in hostapd_dpp_remove_pb_hash() 1683 if (!r_bootstrap || r_bootstrap_len != SHA256_MAC_LEN) { in hostapd_dpp_rx_presence_announcement() 1778 if (!csign_hash || csign_hash_len != SHA256_MAC_LEN) { in hostapd_dpp_rx_reconfig_announcement() 2061 u8 pkhash[SHA256_MAC_LEN]; in hostapd_dpp_rx_peer_disc_req() 2371 SHA256_MAC_LEN) != 0) { in hostapd_dpp_rx_pkex_commit_reveal_resp() 2378 bi->pubkey_hash_chirp, SHA256_MAC_LEN); in hostapd_dpp_rx_pkex_commit_reveal_resp() 2381 ifaces->dpp_pb_resp_hash, SHA256_MAC_LEN); in hostapd_dpp_rx_pkex_commit_reveal_resp() [all …]
|
/freebsd/contrib/wpa/src/eap_common/ |
H A D | eap_pwd_common.c | 24 u8 allzero[SHA256_MAC_LEN]; in eap_pwd_h_init() 25 os_memset(allzero, 0, SHA256_MAC_LEN); in eap_pwd_h_init() 27 SHA256_MAC_LEN); in eap_pwd_h_init() 39 size_t len = SHA256_MAC_LEN; in eap_pwd_h_final() 49 u8 digest[SHA256_MAC_LEN]; in eap_pwd_kdf() 64 crypto_hash_update(hash, digest, SHA256_MAC_LEN); in eap_pwd_kdf() 68 mdlen = SHA256_MAC_LEN; in eap_pwd_kdf() 133 unsigned char pwe_digest[SHA256_MAC_LEN], *prfbuf = NULL, ctr; in compute_password_element() 198 found, is_odd, pwe_digest[SHA256_MAC_LEN - 1] & 0x01); in compute_password_element() 199 if (eap_pwd_kdf(pwe_digest, SHA256_MAC_LEN, in compute_password_element() [all …]
|
H A D | eap_eke_common.c | 98 mac_len = SHA256_MAC_LEN; in eap_eke_pnonce_len() 113 mac_len = SHA256_MAC_LEN; in eap_eke_pnonce_ps_len() 152 return SHA256_MAC_LEN; in eap_eke_auth_len() 252 u8 hash[SHA256_MAC_LEN]; in eap_eke_prf_hmac_sha256() 260 vlen[0] = SHA256_MAC_LEN; in eap_eke_prf_hmac_sha256() 276 if (len > SHA256_MAC_LEN) { in eap_eke_prf_hmac_sha256() 277 os_memcpy(res, hash, SHA256_MAC_LEN); in eap_eke_prf_hmac_sha256() 278 res += SHA256_MAC_LEN; in eap_eke_prf_hmac_sha256() 279 len -= SHA256_MAC_LEN; in eap_eke_prf_hmac_sha256() 578 return hmac_sha256(key, SHA256_MAC_LEN, data, data_len, res); in eap_eke_mac() [all …]
|
H A D | eap_gpsk_common.c | 79 u8 ibuf[2], hash[SHA256_MAC_LEN]; in eap_gpsk_gkdf_sha256() 83 hashlen = SHA256_MAC_LEN; in eap_gpsk_gkdf_sha256() 130 mk_len = SHA256_MAC_LEN; in eap_gpsk_derive_keys_helper() 230 #define EAP_GPSK_SK_LEN_SHA256 SHA256_MAC_LEN in eap_gpsk_derive_keys_sha256() 231 #define EAP_GPSK_PK_LEN_SHA256 SHA256_MAC_LEN in eap_gpsk_derive_keys_sha256()
|
H A D | eap_sim_common.c | 238 u8 hash[SHA256_MAC_LEN]; in prf_prime() 266 len[0] = SHA256_MAC_LEN; in prf_prime() 267 hlen = res_len > SHA256_MAC_LEN ? SHA256_MAC_LEN : res_len; in prf_prime() 362 unsigned char hmac[SHA256_MAC_LEN]; in eap_sim_verify_mac_sha256() 401 unsigned char hmac[SHA256_MAC_LEN]; in eap_sim_add_mac_sha256() 429 u8 hash[SHA256_MAC_LEN]; in eap_aka_prime_derive_ck_ik_prime()
|
/freebsd/contrib/wpa/src/common/ |
H A D | dpp_auth.c | 36 wpabuf_put_le16(msg, SHA256_MAC_LEN); in dpp_build_attr_i_bootstrap_key_hash() 37 wpabuf_put_data(msg, hash, SHA256_MAC_LEN); in dpp_build_attr_i_bootstrap_key_hash() 75 attr_len = 2 * (4 + SHA256_MAC_LEN) + 4 + (pi ? wpabuf_len(pi) : 0) + in dpp_auth_build_req() 258 attr_len = 4 + 1 + 2 * (4 + SHA256_MAC_LEN) + in dpp_auth_build_resp() 430 u8 test_hash[SHA256_MAC_LEN]; in dpp_auth_build_resp_ok() 541 os_memcpy(test_hash, r_pubkey_hash, SHA256_MAC_LEN); in dpp_auth_build_resp_ok() 542 test_hash[SHA256_MAC_LEN - 1] ^= 0x01; in dpp_auth_build_resp_ok() 552 os_memcpy(test_hash, i_pubkey_hash, SHA256_MAC_LEN); in dpp_auth_build_resp_ok() 554 os_memset(test_hash, 0, SHA256_MAC_LEN); in dpp_auth_build_resp_ok() 555 test_hash[SHA256_MAC_LEN - 1] ^= 0x01; in dpp_auth_build_resp_ok() [all …]
|
H A D | dpp.h | 181 u8 pubkey_hash[SHA256_MAC_LEN]; 182 u8 pubkey_hash_chirp[SHA256_MAC_LEN]; 189 u8 peer_pubkey_hash[SHA256_MAC_LEN]; /* for enforcing a specific 291 u8 waiting_pubkey_hash[SHA256_MAC_LEN]; 409 u8 kid_hash[SHA256_MAC_LEN]; 456 u8 hash[SHA256_MAC_LEN];
|
H A D | dpp.c | 520 wpabuf_put_le16(msg, SHA256_MAC_LEN); in dpp_build_attr_r_bootstrap_key_hash() 521 wpabuf_put_data(msg, hash, SHA256_MAC_LEN); in dpp_build_attr_r_bootstrap_key_hash() 4549 char pkhash[2 * SHA256_MAC_LEN + 1]; in dpp_bootstrap_info() 4558 SHA256_MAC_LEN); in dpp_bootstrap_info() 4655 SHA256_MAC_LEN) == 0) { in dpp_bootstrap_find_pair() 4663 SHA256_MAC_LEN) == 0) { in dpp_bootstrap_find_pair() 4686 SHA256_MAC_LEN) == 0) in dpp_bootstrap_find_chirp() 4991 if (os_memcmp(conf->kid_hash, kid, SHA256_MAC_LEN) == 0) in dpp_configurator_find_kid() 5048 u8 hash[SHA256_MAC_LEN]; in dpp_notify_auth_success() 5049 char hex[SHA256_MAC_LEN * 2 + 1]; in dpp_notify_auth_success() [all …]
|
H A D | dpp_crypto.c | 559 bi->pubkey_hash, SHA256_MAC_LEN); in dpp_bi_pubkey_hash() 568 bi->pubkey_hash_chirp, SHA256_MAC_LEN); in dpp_bi_pubkey_hash() 691 u8 hash[SHA256_MAC_LEN]; in dpp_check_pubkey_match() 695 if (wpabuf_len(r_hash) != SHA256_MAC_LEN) in dpp_check_pubkey_match() 708 if (os_memcmp(hash, wpabuf_head(r_hash), SHA256_MAC_LEN) != 0) { in dpp_check_pubkey_match() 712 hash, SHA256_MAC_LEN); in dpp_check_pubkey_match() 761 if (wpabuf_len(kid) != SHA256_MAC_LEN) { in dpp_process_signed_connector() 764 (unsigned int) wpabuf_len(kid), SHA256_MAC_LEN); in dpp_process_signed_connector() 1177 u8 hash[SHA256_MAC_LEN]; in dpp_derive_pmkid() 1199 wpa_hexdump(MSG_DEBUG, "DPP: PMKID hash output", hash, SHA256_MAC_LEN); in dpp_derive_pmkid() [all …]
|
H A D | dpp_reconfig.c | 28 wpabuf_put_le16(msg, SHA256_MAC_LEN); in dpp_build_attr_csign_key_hash() 29 wpabuf_put_data(msg, hash, SHA256_MAC_LEN); in dpp_build_attr_csign_key_hash() 43 u8 hash[SHA256_MAC_LEN]; in dpp_build_reconfig_announcement() 80 hash, SHA256_MAC_LEN); in dpp_build_reconfig_announcement() 92 attr_len = 4 + SHA256_MAC_LEN; in dpp_build_reconfig_announcement()
|
H A D | wpa_common.c | 608 *pmk_len = SHA256_MAC_LEN; in fils_rmsk_to_pmk() 1013 u8 hash[SHA256_MAC_LEN]; in wpa_ft_mic() 1618 os_memcpy(ptk->ltf_keyseed, hash, SHA256_MAC_LEN); in wpa_ltf_keyseed() 1619 ptk->ltf_keyseed_len = SHA256_MAC_LEN; in wpa_ltf_keyseed() 2192 (xxkey_len == SHA256_MAC_LEN || xxkey_len == SHA384_MAC_LEN || in wpa_derive_pmk_r0() 2198 q = SHA256_MAC_LEN; in wpa_derive_pmk_r0() 2257 if (q == SHA256_MAC_LEN) { in wpa_derive_pmk_r0() 2290 if (q == SHA256_MAC_LEN) in wpa_derive_pmk_r0() 2346 if (pmk_r1_len == SHA256_MAC_LEN) { in wpa_derive_pmk_r1_name() 2399 if (pmk_r0_len == SHA256_MAC_LEN) in wpa_derive_pmk_r1() [all …]
|
/freebsd/contrib/wpa/src/wps/ |
H A D | wps_common.c | 31 u8 hash[SHA256_MAC_LEN], *opos; in wps_kdf() 45 iter = (res_len + SHA256_MAC_LEN - 1) / SHA256_MAC_LEN; in wps_kdf() 51 hmac_sha256_vector(key, SHA256_MAC_LEN, 4, addr, len, hash); in wps_kdf() 53 os_memcpy(opos, hash, SHA256_MAC_LEN); in wps_kdf() 54 opos += SHA256_MAC_LEN; in wps_kdf() 55 left -= SHA256_MAC_LEN; in wps_kdf() 65 u8 dhkey[SHA256_MAC_LEN], kdk[SHA256_MAC_LEN]; in wps_derive_keys() 135 u8 hash[SHA256_MAC_LEN]; in wps_derive_psk()
|
H A D | wps_attr_process.c | 19 u8 hash[SHA256_MAC_LEN]; in wps_process_authenticator() 57 u8 hash[SHA256_MAC_LEN]; in wps_process_key_wrap_auth()
|
H A D | wps_enrollee.c | 55 wpabuf_put_be16(msg, SHA256_MAC_LEN); in wps_build_e_hash() 56 hash = wpabuf_put(msg, SHA256_MAC_LEN); in wps_build_e_hash() 67 wpa_hexdump(MSG_DEBUG, "WPS: E-Hash1", hash, SHA256_MAC_LEN); in wps_build_e_hash() 71 wpabuf_put_be16(msg, SHA256_MAC_LEN); in wps_build_e_hash() 72 hash = wpabuf_put(msg, SHA256_MAC_LEN); in wps_build_e_hash() 77 wpa_hexdump(MSG_DEBUG, "WPS: E-Hash2", hash, SHA256_MAC_LEN); in wps_build_e_hash() 626 u8 hash[SHA256_MAC_LEN]; in wps_process_r_snonce1() 666 u8 hash[SHA256_MAC_LEN]; in wps_process_r_snonce2()
|
/freebsd/contrib/wpa/src/eap_server/ |
H A D | eap_server_pwd.c | 50 u8 my_confirm[SHA256_MAC_LEN]; 54 u8 session_id[1 + SHA256_MAC_LEN]; 318 u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; in eap_pwd_build_confirm_req() 407 os_memcpy(data->my_confirm, conf, SHA256_MAC_LEN); in eap_pwd_build_confirm_req() 409 data->outbuf = wpabuf_alloc(SHA256_MAC_LEN); in eap_pwd_build_confirm_req() 413 wpabuf_put_data(data->outbuf, conf, SHA256_MAC_LEN); in eap_pwd_build_confirm_req() 761 u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; in eap_pwd_process_confirm_resp() 767 if (payload_len != SHA256_MAC_LEN) { in eap_pwd_process_confirm_resp() 770 (unsigned int) payload_len, SHA256_MAC_LEN); in eap_pwd_process_confirm_resp() 844 if (os_memcmp_const(conf, ptr, SHA256_MAC_LEN)) { in eap_pwd_process_confirm_resp() [all …]
|
/freebsd/contrib/wpa/src/eap_peer/ |
H A D | eap_pwd.c | 54 u8 session_id[1 + SHA256_MAC_LEN]; 229 id = os_memdup(data->session_id, 1 + SHA256_MAC_LEN); in eap_pwd_get_session_id() 233 *len = 1 + SHA256_MAC_LEN; in eap_pwd_get_session_id() 491 password_len = SHA256_MAC_LEN; in eap_pwd_perform_commit_exchange() 698 u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; in eap_pwd_perform_confirm_exchange() 706 if (payload_len != SHA256_MAC_LEN) { in eap_pwd_perform_confirm_exchange() 709 (unsigned int) payload_len, SHA256_MAC_LEN); in eap_pwd_perform_confirm_exchange() 793 if (os_memcmp_const(conf, ptr, SHA256_MAC_LEN)) { in eap_pwd_perform_confirm_exchange() 862 data->outbuf = wpabuf_alloc(SHA256_MAC_LEN); in eap_pwd_perform_confirm_exchange() 866 wpabuf_put_data(data->outbuf, conf, SHA256_MAC_LEN); in eap_pwd_perform_confirm_exchange()
|
/freebsd/contrib/wpa/src/utils/ |
H A D | uuid.c | 78 u8 hash[SHA256_MAC_LEN]; in uuid_random()
|
/freebsd/contrib/wpa/wpa_supplicant/ |
H A D | dpp_supplicant.c | 1241 if (!r_bootstrap || r_bootstrap_len != SHA256_MAC_LEN) { in wpas_dpp_rx_auth_req() 1251 if (!i_bootstrap || i_bootstrap_len != SHA256_MAC_LEN) { in wpas_dpp_rx_auth_req() 1277 SHA256_MAC_LEN) != 0) { in wpas_dpp_rx_auth_req() 2212 SHA256_MAC_LEN) == 0) { in wpas_dpp_remove_pb_hash() 2428 if (!r_bootstrap || r_bootstrap_len != SHA256_MAC_LEN) { in wpas_dpp_rx_presence_announcement() 2521 if (!csign_hash || csign_hash_len != SHA256_MAC_LEN) { in wpas_dpp_rx_reconfig_announcement() 3310 SHA256_MAC_LEN) != 0) { in wpas_dpp_pkex_finish() 3317 bi->pubkey_hash_chirp, SHA256_MAC_LEN); in wpas_dpp_pkex_finish() 3320 wpa_s->dpp_pb_init_hash, SHA256_MAC_LEN); in wpas_dpp_pkex_finish() 3413 SHA256_MAC_LEN) != 0) { in wpas_dpp_rx_pkex_commit_reveal_resp() [all …]
|