/hostap-3.7.0/src/eap_common/ |
D | eap_pwd_common.c | 31 void eap_pwd_h_update(struct crypto_hash *hash, const u8 *data, size_t len) in eap_pwd_h_update() argument 33 crypto_hash_update(hash, data, len); in eap_pwd_h_update() 37 void eap_pwd_h_final(struct crypto_hash *hash, u8 *digest) in eap_pwd_h_final() argument 40 crypto_hash_finish(hash, digest, &len); in eap_pwd_h_final() 48 struct crypto_hash *hash; in eap_pwd_kdf() local 59 hash = crypto_hash_init(CRYPTO_HASH_ALG_HMAC_SHA256, in eap_pwd_kdf() 61 if (hash == NULL) in eap_pwd_kdf() 64 crypto_hash_update(hash, digest, SHA256_MAC_LEN); in eap_pwd_kdf() 65 crypto_hash_update(hash, (u8 *) &i, sizeof(u16)); in eap_pwd_kdf() 66 crypto_hash_update(hash, label, labellen); in eap_pwd_kdf() [all …]
|
D | eap_psk_common.c | 37 u8 hash[aes_block_size]; in eap_psk_derive_keys() local 41 if (aes_128_encrypt_block(kdk, rand_p, hash)) in eap_psk_derive_keys() 44 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 45 if (aes_128_encrypt_block(kdk, hash, tek)) in eap_psk_derive_keys() 47 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 51 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 52 if (aes_128_encrypt_block(kdk, hash, &msk[i * aes_block_size])) in eap_psk_derive_keys() 54 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 59 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 60 if (aes_128_encrypt_block(kdk, hash, in eap_psk_derive_keys() [all …]
|
D | eap_peap_common.c | 21 u8 hash[SHA1_MAC_LEN]; in peap_prfplus() local 27 addr[0] = hash; in peap_prfplus() 72 if (hmac_sha1_vector(key, key_len, 5, addr, len, hash) < 0) in peap_prfplus() 75 os_memcpy(&buf[pos], hash, SHA1_MAC_LEN); in peap_prfplus() 78 os_memcpy(&buf[pos], hash, plen); in peap_prfplus()
|
D | ikev2_common.c | 57 size_t data_len, u8 *hash) in ikev2_integ_hash() argument 67 os_memcpy(hash, tmphash, 12); in ikev2_integ_hash() 74 os_memcpy(hash, tmphash, 12); in ikev2_integ_hash() 99 u8 *hash) in ikev2_prf_hash() argument 104 hash); in ikev2_prf_hash() 106 return hmac_md5_vector(key, key_len, num_elem, addr, len, hash); in ikev2_prf_hash() 117 u8 hash[IKEV2_MAX_HASH_LEN]; in ikev2_prf_plus() local 130 addr[0] = hash; in ikev2_prf_plus() 144 &len[1], hash); in ikev2_prf_plus() 147 hash); in ikev2_prf_plus() [all …]
|
/hostap-3.7.0/tests/ |
D | test-md4.c | 18 char *hash; in main() member 59 u8 hash[16]; in main() local 69 md4_vector(1, addr, len, hash); in main() 70 if (memcmp(hash, tests[i].hash, 16) != 0) { in main() 81 md4_vector(1, addr, len, hash); in main() 82 if (memcmp(hash, tests[i].hash, 16) != 0) { in main()
|
D | test-rsa-sig-ver.c | 127 u8 hash[32]; in cavp_rsa_sig_ver() local 134 if (sha1_vector(1, addr, len, hash) < 0) { in cavp_rsa_sig_ver() 141 if (sha256_vector(1, addr, len, hash) < 0) { 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.7.0/src/crypto/ |
D | crypto_module_tests.c | 901 char *hash; in test_md5() member 942 u8 hash[16]; in test_md5() local 952 if (md5_vector(1, addr, len, hash) < 0 || in test_md5() 953 os_memcmp(hash, tests[i].hash, 16) != 0) { in test_md5() 964 if (md5_vector(1, addr, len, hash) < 0 || in test_md5() 965 os_memcmp(hash, tests[i].hash, 16) != 0) { in test_md5() 1425 u8 hash[32]; member 1452 u8 hash[32]; /* HMAC-SHA-256 */ member 1839 u8 hash[32]; in test_sha256() local 1850 sha256_vector(1, addr, len, hash); in test_sha256() [all …]
|
D | sha1-tprf.c | 34 u8 hash[SHA1_MAC_LEN]; in sha1_t_prf() local 40 addr[0] = hash; in sha1_t_prf() 57 if (hmac_sha1_vector(key, key_len, 5, addr, len, hash)) in sha1_t_prf() 60 os_memcpy(&buf[pos], hash, SHA1_MAC_LEN); in sha1_t_prf() 63 os_memcpy(&buf[pos], hash, plen); in sha1_t_prf() 69 forced_memzero(hash, SHA1_MAC_LEN); in sha1_t_prf()
|
D | sha1-prf.c | 35 u8 hash[SHA1_MAC_LEN]; in sha1_prf() local 57 hash)) in sha1_prf() 59 os_memcpy(&buf[pos], hash, plen); in sha1_prf() 64 forced_memzero(hash, sizeof(hash)); in sha1_prf()
|
D | tls_openssl_ocsp.c | 402 ASN1_OCTET_STRING *hash; in issuer_match() local 415 hash = ASN1_OCTET_STRING_new(); in issuer_match() 416 if (!hash) in issuer_match() 418 if (!ASN1_OCTET_STRING_set(hash, md, len)) { in issuer_match() 419 ASN1_OCTET_STRING_free(hash); in issuer_match() 423 txt = octet_string_str(hash); in issuer_match() 430 if (ASN1_OCTET_STRING_cmp(certid->issuerNameHash, hash)) { in issuer_match() 431 ASN1_OCTET_STRING_free(hash); in issuer_match() 438 !ASN1_OCTET_STRING_set(hash, md, len)) { in issuer_match() 439 ASN1_OCTET_STRING_free(hash); in issuer_match() [all …]
|
D | sha256-prf.c | 60 u8 hash[SHA256_MAC_LEN]; in sha256_prf_bits() local 87 hash) < 0) in sha256_prf_bits() 89 os_memcpy(&buf[pos], hash, plen); in sha256_prf_bits() 105 forced_memzero(hash, sizeof(hash)); in sha256_prf_bits()
|
D | sha384-prf.c | 60 u8 hash[SHA384_MAC_LEN]; in sha384_prf_bits() local 87 hash) < 0) in sha384_prf_bits() 89 os_memcpy(&buf[pos], hash, plen); in sha384_prf_bits() 105 forced_memzero(hash, sizeof(hash)); in sha384_prf_bits()
|
D | sha512-prf.c | 60 u8 hash[SHA512_MAC_LEN]; in sha512_prf_bits() local 87 hash) < 0) in sha512_prf_bits() 89 os_memcpy(&buf[pos], hash, plen); in sha512_prf_bits() 105 forced_memzero(hash, sizeof(hash)); in sha512_prf_bits()
|
D | random.c | 107 u8 hash[SHA1_MAC_LEN]; in random_extract() local 113 sizeof(pool), hash); in random_extract() 114 random_mix_pool(hash, sizeof(hash)); in random_extract() 119 sizeof(buf), hash); in random_extract() 125 hash_ptr = (u32 *) hash; in random_extract() 127 os_memcpy(out, hash, EXTRACT_LEN); in random_extract()
|
/hostap-3.7.0/hostapd/ |
D | sae_pk_gen.c | 28 u8 hash[SAE_MAX_HASH_LEN]; in main() local 110 if (sae_hash(hash_len, data, data_len, hash) < 0) { in main() 114 if (hash[0] == 0 && hash[1] == 0) { in main() 115 if ((hash[2] & 0xf0) == 0) in main() 119 if (hash[j]) in main() 129 wpa_snprintf_hex(hash_hex, sizeof(hash_hex), hash, hash_len) < 0) in main() 150 val20 = sae_pk_get_be19(hash + sec); in main() 152 sae_pk_buf_shift_left_19(hash + sec, hash_len - sec); in main()
|
/hostap-3.7.0/src/tls/ |
D | tlsv1_client_ocsp.c | 54 u8 hash[SHA1_MAC_LEN]; in ocsp_responder_id_match() local 58 if (sha1_vector(1, addr, len, hash) < 0) in ocsp_responder_id_match() 60 return os_memcmp(hash, key_hash, SHA1_MAC_LEN) == 0; in ocsp_responder_id_match() 68 size_t data_len, u8 *hash) in ocsp_hash_data() argument 75 if (sha1_vector(1, addr, len, hash) < 0) in ocsp_hash_data() 77 wpa_hexdump(MSG_MSGDUMP, "OCSP: Hash (SHA1)", hash, 20); in ocsp_hash_data() 82 if (sha256_vector(1, addr, len, hash) < 0) in ocsp_hash_data() 84 wpa_hexdump(MSG_MSGDUMP, "OCSP: Hash (SHA256)", hash, 32); in ocsp_hash_data() 89 if (sha384_vector(1, addr, len, hash) < 0) in ocsp_hash_data() 91 wpa_hexdump(MSG_MSGDUMP, "OCSP: Hash (SHA384)", hash, 48); in ocsp_hash_data() [all …]
|
D | pkcs5.c | 439 u8 hash[SHA1_MAC_LEN]; in pkcs12_key_gen() local 447 if (sha1_vector(2, addr, len, hash) < 0) in pkcs12_key_gen() 450 addr[0] = hash; in pkcs12_key_gen() 453 if (sha1_vector(1, addr, len, hash) < 0) in pkcs12_key_gen() 458 os_memcpy(out, hash, out_len); in pkcs12_key_gen() 463 os_memcpy(out, hash, u); in pkcs12_key_gen() 470 B[i] = hash[i % u]; in pkcs12_key_gen() 533 u8 hash[MD5_MAC_LEN]; in pkcs5_crypto_init() local 550 if (md5_vector(2, addr, len, hash) < 0) in pkcs5_crypto_init() 552 addr[0] = hash; in pkcs5_crypto_init() [all …]
|
/hostap-3.7.0/src/common/ |
D | sae_pk.c | 529 int sae_hash(size_t hash_len, const u8 *data, size_t len, u8 *hash) in sae_hash() argument 532 return sha256_vector(1, &data, &len, hash); in sae_hash() 535 return sha384_vector(1, &data, &len, hash); in sae_hash() 539 return sha512_vector(1, &data, &len, hash); in sae_hash() 547 const u8 *pubkey, size_t pubkey_len, u8 *hash) in sae_pk_hash_sig_data() argument 588 hash) < 0) in sae_pk_hash_sig_data() 591 hash, hash_len); in sae_pk_hash_sig_data() 608 u8 hash[SAE_MAX_HASH_LEN]; in sae_write_confirm_pk() local 646 wpabuf_len(pk->pubkey), hash) < 0) in sae_write_confirm_pk() 648 sig = crypto_ec_key_sign(key, hash, hash_len); in sae_write_confirm_pk() [all …]
|
D | wpa_common.c | 195 u8 hash[SHA512_MAC_LEN]; in wpa_eapol_key_mic() local 211 if (hmac_sha1(key, key_len, buf, len, hash)) in wpa_eapol_key_mic() 213 os_memcpy(mic, hash, MD5_MAC_LEN); in wpa_eapol_key_mic() 237 if (hmac_sha256(key, key_len, buf, len, hash)) in wpa_eapol_key_mic() 239 os_memcpy(mic, hash, MD5_MAC_LEN); in wpa_eapol_key_mic() 246 if (hmac_sha384(key, key_len, buf, len, hash)) in wpa_eapol_key_mic() 248 os_memcpy(mic, hash, 24); in wpa_eapol_key_mic() 257 if (hmac_sha256(key, key_len, buf, len, hash)) in wpa_eapol_key_mic() 260 if (hmac_sha384(key, key_len, buf, len, hash)) in wpa_eapol_key_mic() 263 if (hmac_sha512(key, key_len, buf, len, hash)) in wpa_eapol_key_mic() [all …]
|
/hostap-3.7.0/src/eap_server/ |
D | eap_server_pwd.c | 314 struct crypto_hash *hash = NULL; in eap_pwd_build_confirm_req() local 342 hash = eap_pwd_h_init(); in eap_pwd_build_confirm_req() 343 if (hash == NULL) in eap_pwd_build_confirm_req() 353 eap_pwd_h_update(hash, cruft, prime_len); in eap_pwd_build_confirm_req() 362 eap_pwd_h_update(hash, cruft, prime_len * 2); in eap_pwd_build_confirm_req() 366 eap_pwd_h_update(hash, cruft, order_len); in eap_pwd_build_confirm_req() 375 eap_pwd_h_update(hash, cruft, prime_len * 2); in eap_pwd_build_confirm_req() 379 eap_pwd_h_update(hash, cruft, order_len); in eap_pwd_build_confirm_req() 391 eap_pwd_h_update(hash, cruft, ptr - cruft); in eap_pwd_build_confirm_req() 394 eap_pwd_h_final(hash, conf); in eap_pwd_build_confirm_req() [all …]
|
/hostap-3.7.0/src/eap_peer/ |
D | eap_pwd.c | 692 struct crypto_hash *hash = NULL; in eap_pwd_perform_confirm_exchange() local 737 hash = eap_pwd_h_init(); in eap_pwd_perform_confirm_exchange() 738 if (hash == NULL) in eap_pwd_perform_confirm_exchange() 746 eap_pwd_h_update(hash, cruft, prime_len); in eap_pwd_perform_confirm_exchange() 755 eap_pwd_h_update(hash, cruft, prime_len * 2); in eap_pwd_perform_confirm_exchange() 759 eap_pwd_h_update(hash, cruft, order_len); in eap_pwd_perform_confirm_exchange() 768 eap_pwd_h_update(hash, cruft, prime_len * 2); in eap_pwd_perform_confirm_exchange() 772 eap_pwd_h_update(hash, cruft, order_len); in eap_pwd_perform_confirm_exchange() 775 eap_pwd_h_update(hash, (u8 *) &cs, sizeof(u32)); in eap_pwd_perform_confirm_exchange() 778 eap_pwd_h_final(hash, conf); in eap_pwd_perform_confirm_exchange() [all …]
|
/hostap-3.7.0/src/l2_packet/ |
D | l2_packet_linux.c | 171 u8 hash[SHA1_MAC_LEN]; in l2_packet_receive() local 194 sha1_vector(1, addr, len, hash); in l2_packet_receive() 196 os_memcmp(hash, l2->last_hash, SHA1_MAC_LEN) == 0) { in l2_packet_receive() 202 os_memcmp(hash, l2->last_hash_prev, SHA1_MAC_LEN) == 0) { in l2_packet_receive() 209 os_memcpy(l2->last_hash, hash, SHA1_MAC_LEN); in l2_packet_receive() 226 u8 hash[SHA1_MAC_LEN]; in l2_packet_receive_br() local 251 sha1_vector(1, addr, len, hash); in l2_packet_receive_br() 253 os_memcmp(hash, l2->last_hash, SHA1_MAC_LEN) == 0) { in l2_packet_receive_br() 258 os_memcmp(hash, l2->last_hash_prev, SHA1_MAC_LEN) == 0) { in l2_packet_receive_br() 265 os_memcpy(l2->last_hash, hash, SHA1_MAC_LEN); in l2_packet_receive_br()
|
/hostap-3.7.0/src/wps/ |
D | wps_attr_process.c | 19 u8 hash[SHA256_MAC_LEN]; in wps_process_authenticator() local 44 hash) < 0 || in wps_process_authenticator() 45 os_memcmp_const(hash, authenticator, WPS_AUTHENTICATOR_LEN) != 0) { in wps_process_authenticator() 57 u8 hash[SHA256_MAC_LEN]; in wps_process_key_wrap_auth() local 74 if (hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, head, len, hash) < 0 || in wps_process_key_wrap_auth() 75 os_memcmp_const(hash, key_wrap_auth, WPS_KWA_LEN) != 0) { in wps_process_key_wrap_auth()
|
/hostap-3.7.0/tests/hwsim/auth_serv/ |
D | openssl2.cnf | 90 subjectKeyIdentifier=hash 103 subjectKeyIdentifier=hash 121 subjectKeyIdentifier=hash 131 subjectKeyIdentifier=hash 142 subjectKeyIdentifier=hash
|
/hostap-3.7.0/src/radius/ |
D | radius.c | 526 u8 hash[MD5_MAC_LEN]; in radius_msg_verify_acct_req() local 537 md5_vector(4, addr, len, hash); in radius_msg_verify_acct_req() 538 return os_memcmp_const(msg->hdr->authenticator, hash, MD5_MAC_LEN) != 0; in radius_msg_verify_acct_req() 549 u8 hash[MD5_MAC_LEN]; in radius_msg_verify_das_req() local 565 md5_vector(4, addr, len, hash); in radius_msg_verify_das_req() 566 if (os_memcmp_const(msg->hdr->authenticator, hash, MD5_MAC_LEN) != 0) in radius_msg_verify_das_req() 854 u8 hash[MD5_MAC_LEN]; in radius_msg_verify() local 876 if (md5_vector(4, addr, len, hash) < 0 || in radius_msg_verify() 877 os_memcmp_const(hash, msg->hdr->authenticator, MD5_MAC_LEN) != 0) { in radius_msg_verify() 988 u8 hash[MD5_MAC_LEN]; in decrypt_ms_key() local [all …]
|