Lines Matching refs:hash
211 u8 hash[SHA512_MAC_LEN]; in wpa_eapol_key_mic() local
227 if (hmac_sha1(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
229 os_memcpy(mic, hash, MD5_MAC_LEN); in wpa_eapol_key_mic()
248 if (hmac_sha256(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
252 if (hmac_sha384(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
257 if (hmac_sha512(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
266 os_memcpy(mic, hash, key_len); in wpa_eapol_key_mic()
279 if (hmac_sha256(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
281 os_memcpy(mic, hash, MD5_MAC_LEN); in wpa_eapol_key_mic()
288 if (hmac_sha384(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
290 os_memcpy(mic, hash, 24); in wpa_eapol_key_mic()
299 if (hmac_sha256(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
302 if (hmac_sha384(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
305 if (hmac_sha512(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
313 os_memcpy(mic, hash, key_len); in wpa_eapol_key_mic()
322 if (hmac_sha256(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
325 if (hmac_sha384(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
328 if (hmac_sha512(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
336 os_memcpy(mic, hash, key_len); in wpa_eapol_key_mic()
346 if (hmac_sha384(key, key_len, buf, len, hash)) in wpa_eapol_key_mic()
348 os_memcpy(mic, hash, 24); in wpa_eapol_key_mic()
646 u8 hash[SHA384_MAC_LEN]; in fils_pmkid_erp() local
653 res = sha384_vector(1, addr, len, hash); in fils_pmkid_erp()
655 res = sha256_vector(1, addr, len, hash); in fils_pmkid_erp()
660 os_memcpy(pmkid, hash, PMKID_LEN); in fils_pmkid_erp()
994 u8 hash[SHA512_MAC_LEN]; in wpa_ft_mic() local
996 if (hmac_sha512_vector(kck, kck_len, num_elem, addr, len, hash)) in wpa_ft_mic()
998 os_memcpy(mic, hash, 32); in wpa_ft_mic()
1004 u8 hash[SHA384_MAC_LEN]; in wpa_ft_mic() local
1006 if (hmac_sha384_vector(kck, kck_len, num_elem, addr, len, hash)) in wpa_ft_mic()
1008 os_memcpy(mic, hash, 24); in wpa_ft_mic()
1013 u8 hash[SHA256_MAC_LEN]; in wpa_ft_mic() local
1015 if (hmac_sha256_vector(kck, kck_len, num_elem, addr, len, hash)) in wpa_ft_mic()
1017 os_memcpy(mic, hash, 16); in wpa_ft_mic()
1583 u8 hash[SHA384_MAC_LEN]; in wpa_ltf_keyseed() local
1600 if (hmac_sha384(kdk, kdk_len, buf, buf_len, hash)) { in wpa_ltf_keyseed()
1605 os_memcpy(ptk->ltf_keyseed, hash, SHA384_MAC_LEN); in wpa_ltf_keyseed()
1613 if (hmac_sha256(kdk, kdk_len, buf, buf_len, hash)) { in wpa_ltf_keyseed()
1618 os_memcpy(ptk->ltf_keyseed, hash, SHA256_MAC_LEN); in wpa_ltf_keyseed()
1654 u8 hash[SHA384_MAC_LEN]; in pasn_mic() local
1692 if (hmac_sha384(kck, WPA_PASN_KCK_LEN, buf, buf_len, hash)) in pasn_mic()
1695 os_memcpy(mic, hash, 24); in pasn_mic()
1700 if (hmac_sha256(kck, WPA_PASN_KCK_LEN, buf, buf_len, hash)) in pasn_mic()
1703 os_memcpy(mic, hash, 16); in pasn_mic()
1725 u8 *hash) in pasn_auth_frame_hash() argument
1729 return sha384_vector(1, &data, &len, hash); in pasn_auth_frame_hash()
1732 return sha256_vector(1, &data, &len, hash); in pasn_auth_frame_hash()
2193 u8 *pos, r0_key_data[64 + 16], hash[64]; in wpa_derive_pmk_r0() local
2292 res = sha512_vector(2, addr, len, hash); in wpa_derive_pmk_r0()
2296 res = sha384_vector(2, addr, len, hash); in wpa_derive_pmk_r0()
2299 res = sha256_vector(2, addr, len, hash); in wpa_derive_pmk_r0()
2306 os_memcpy(pmk_r0_name, hash, WPA_PMK_NAME_LEN); in wpa_derive_pmk_r0()
2322 u8 hash[64]; in wpa_derive_pmk_r1_name() local
2345 res = sha512_vector(4, addr, len, hash); in wpa_derive_pmk_r1_name()
2351 res = sha384_vector(4, addr, len, hash); in wpa_derive_pmk_r1_name()
2356 res = sha256_vector(4, addr, len, hash); in wpa_derive_pmk_r1_name()
2364 os_memcpy(pmk_r1_name, hash, WPA_PMK_NAME_LEN); in wpa_derive_pmk_r1_name()
2434 u8 *pos, hash[32]; in wpa_pmk_r1_to_ptk() local
2545 if (sha256_vector(6, addr, len, hash) < 0) in wpa_pmk_r1_to_ptk()
2547 os_memcpy(ptk_name, hash, WPA_PMK_NAME_LEN); in wpa_pmk_r1_to_ptk()
2610 unsigned char hash[SHA384_MAC_LEN]; in rsn_pmkid() local
2620 hmac_sha384_vector(pmk, pmk_len, 3, addr, len, hash); in rsn_pmkid()
2624 hmac_sha256_vector(pmk, pmk_len, 3, addr, len, hash); in rsn_pmkid()
2627 hmac_sha1_vector(pmk, pmk_len, 3, addr, len, hash); in rsn_pmkid()
2629 wpa_hexdump(MSG_DEBUG, "RSN: Derived PMKID", hash, PMKID_LEN); in rsn_pmkid()
2630 os_memcpy(pmkid, hash, PMKID_LEN); in rsn_pmkid()
2653 unsigned char hash[SHA256_MAC_LEN]; in rsn_pmkid_suite_b() local
2659 if (hmac_sha256_vector(kck, kck_len, 3, addr, len, hash) < 0) in rsn_pmkid_suite_b()
2661 os_memcpy(pmkid, hash, PMKID_LEN); in rsn_pmkid_suite_b()
2686 unsigned char hash[SHA384_MAC_LEN]; in rsn_pmkid_suite_b_192() local
2692 if (hmac_sha384_vector(kck, kck_len, 3, addr, len, hash) < 0) in rsn_pmkid_suite_b_192()
2694 os_memcpy(pmkid, hash, PMKID_LEN); in rsn_pmkid_suite_b_192()
3377 int fils_domain_name_hash(const char *domain, u8 *hash) in fils_domain_name_hash() argument
3396 os_memcpy(hash, mac, 2); in fils_domain_name_hash()