Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 25 of 83) sorted by relevance

1234

/hostap-latest/src/common/
Dptksa_cache.c138 const u8 *addr, u32 cipher) in ptksa_cache_get() argument
147 (cipher == WPA_CIPHER_NONE || cipher == e->cipher)) in ptksa_cache_get()
191 wpa_cipher_txt(e->cipher), in ptksa_cache_list()
233 void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher) in ptksa_cache_flush() argument
244 (cipher == WPA_CIPHER_NONE || cipher == e->cipher)) { in ptksa_cache_flush()
278 const u8 *addr, u32 cipher, in ptksa_cache_add() argument
289 if (!ptksa || !ptk || !addr || !life_time || cipher == WPA_CIPHER_NONE) in ptksa_cache_add()
293 ptksa_cache_flush(ptksa, addr, cipher); in ptksa_cache_add()
305 entry->cipher = cipher; in ptksa_cache_add()
340 MAC2STR(addr), cipher); in ptksa_cache_add()
[all …]
Dwpa_common.h467 struct wpa_ptk *ptk, int akmp, int cipher,
477 u8 *ick, size_t *ick_len, int akmp, int cipher,
511 struct wpa_ptk *ptk, u8 *ptk_name, int akmp, int cipher,
558 const char * wpa_cipher_txt(int cipher);
748 int wpa_cipher_key_len(int cipher);
749 int wpa_cipher_rsc_len(int cipher);
750 enum wpa_alg wpa_cipher_to_alg(int cipher);
751 int wpa_cipher_valid_group(int cipher);
752 int wpa_cipher_valid_pairwise(int cipher);
753 int wpa_cipher_valid_mgmt_group(int cipher);
[all …]
Dptksa_cache.h24 u32 cipher; member
38 const u8 *addr, u32 cipher);
42 const u8 *addr, u32 cipher,
48 void ptksa_cache_flush(struct ptksa_cache *ptksa, const u8 *addr, u32 cipher);
Dwpa_common.c396 struct wpa_ptk *ptk, int akmp, int cipher, in wpa_pmk_to_ptk() argument
454 ptk->tk_len = wpa_cipher_key_len(cipher); in wpa_pmk_to_ptk()
459 cipher); in wpa_pmk_to_ptk()
669 u8 *ick, size_t *ick_len, int akmp, int cipher, in fils_pmk_to_ptk() argument
712 ptk->tk_len = wpa_cipher_key_len(cipher); in fils_pmk_to_ptk()
1438 bool pasn_use_sha384(int akmp, int cipher) in pasn_use_sha384() argument
1440 return (akmp == WPA_KEY_MGMT_PASN && (cipher == WPA_CIPHER_CCMP_256 || in pasn_use_sha384()
1441 cipher == WPA_CIPHER_GCMP_256)) || in pasn_use_sha384()
1464 struct wpa_ptk *ptk, int akmp, int cipher, in pasn_pmk_to_ptk() argument
1500 ptk->tk_len = wpa_cipher_key_len(cipher); in pasn_pmk_to_ptk()
[all …]
/hostap-latest/tests/hwsim/
Dtest_ap_ciphers.py22 def check_cipher(dev, ap, cipher, group_cipher=None): argument
23 if cipher not in dev.get_capability("pairwise"):
24 raise HwsimSkip("Cipher %s not supported" % cipher)
31 "rsn_pairwise": cipher}
35 group_cipher = cipher
38 pairwise=cipher, group=group_cipher, scan_freq="2412")
42 def check_group_mgmt_cipher(dev, ap, cipher, sta_req_cipher=None): argument
43 if cipher not in dev.get_capability("group_mgmt"):
44 raise HwsimSkip("Cipher %s not supported" % cipher)
51 "group_mgmt_cipher": cipher}
[all …]
Dtest_pasn.py30 def pasn_ap_params(akmp="PASN", cipher="CCMP", group="19"): argument
36 "rsn_pairwise": cipher,
50 def check_pasn_ptk(dev, hapd, cipher, fail_ptk=False, clear_keys=True, argument
52 sta_ptksa = dev.get_ptksa(hapd.own_addr(), cipher)
53 ap_ptksa = hapd.get_ptksa(dev.own_addr(), cipher)
62 ap_ptksa = hapd.get_ptksa(dev.own_addr(), cipher)
91 sta_ptksa = dev.get_ptksa(hapd.own_addr(), cipher)
92 ap_ptksa = hapd.get_ptksa(dev.own_addr(), cipher)
96 def check_pasn_akmp_cipher(dev, hapd, akmp="PASN", cipher="CCMP", argument
102 cmd = "PASN_START bssid=%s akmp=%s cipher=%s group=%s" % (hapd.own_addr(), akmp, cipher, group)
[all …]
Dtest_suite_b.py199 cipher = dev[0].get_status_field("mgmt_group_cipher")
200 if cipher != "BIP-GMAC-256":
201 raise Exception("Unexpected mgmt_group_cipher: " + cipher)
457 cipher = dev[0].get_status_field("mgmt_group_cipher")
458 if cipher != "BIP-GMAC-256":
459 raise Exception("Unexpected mgmt_group_cipher: " + cipher)
/hostap-latest/src/tls/
Dtlsv1_server.c531 char *cipher; in tlsv1_server_get_cipher() local
535 cipher = "RC4-MD5"; in tlsv1_server_get_cipher()
538 cipher = "RC4-SHA"; in tlsv1_server_get_cipher()
541 cipher = "DES-CBC-SHA"; in tlsv1_server_get_cipher()
544 cipher = "DES-CBC3-SHA"; in tlsv1_server_get_cipher()
547 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_server_get_cipher()
550 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_server_get_cipher()
553 cipher = "ADH-RC4-MD5"; in tlsv1_server_get_cipher()
556 cipher = "ADH-DES-SHA"; in tlsv1_server_get_cipher()
559 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_server_get_cipher()
[all …]
Dtlsv1_client.c607 char *cipher; in tlsv1_client_get_cipher() local
611 cipher = "RC4-MD5"; in tlsv1_client_get_cipher()
614 cipher = "RC4-SHA"; in tlsv1_client_get_cipher()
617 cipher = "DES-CBC-SHA"; in tlsv1_client_get_cipher()
620 cipher = "DES-CBC3-SHA"; in tlsv1_client_get_cipher()
623 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_client_get_cipher()
626 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_client_get_cipher()
629 cipher = "ADH-RC4-MD5"; in tlsv1_client_get_cipher()
632 cipher = "ADH-DES-SHA"; in tlsv1_client_get_cipher()
635 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_client_get_cipher()
[all …]
Dtlsv1_common.h218 tls_cipher cipher; member
228 tls_cipher cipher; member
251 const struct tls_cipher_data * tls_get_cipher_data(tls_cipher cipher);
252 int tls_server_key_exchange_allowed(tls_cipher cipher);
Dtlsv1_common.c117 const struct tls_cipher_data * tls_get_cipher_data(tls_cipher cipher) in tls_get_cipher_data() argument
121 if (tls_ciphers[i].cipher == cipher) in tls_get_cipher_data()
127 int tls_server_key_exchange_allowed(tls_cipher cipher) in tls_server_key_exchange_allowed() argument
132 suite = tls_get_cipher_suite(cipher); in tls_server_key_exchange_allowed()
/hostap-latest/wpa_supplicant/
Dpasn_supplicant.c35 int cipher; member
82 int akmp, int cipher, u8 status, in wpas_pasn_auth_status() argument
302 peer->cipher = pairwise_cipher; in wpas_pasn_get_params_from_bss()
312 int cipher, int akmp) in wpas_pasn_set_keys_from_cache() argument
316 entry = ptksa_cache_get(wpa_s->ptksa, peer_addr, cipher); in wpas_pasn_set_keys_from_cache()
333 wpa_drv_set_secure_ranging_ctx(wpa_s, own_addr, peer_addr, cipher, in wpas_pasn_set_keys_from_cache()
365 peer->cipher, in wpas_pasn_configure_next_peer()
380 peer->cipher, peer->group, in wpas_pasn_configure_next_peer()
464 int cipher) in wpas_pasn_allowed() argument
496 !(rsne_data.pairwise_cipher & cipher)) { in wpas_pasn_allowed()
[all …]
Dmesh.c86 int cipher; in mesh_config_create() local
111 cipher = wpa_pick_pairwise_cipher(ssid->pairwise_cipher, 0); in mesh_config_create()
112 if (cipher < 0 || cipher == WPA_CIPHER_TKIP) { in mesh_config_create()
117 conf->pairwise_cipher = cipher; in mesh_config_create()
119 cipher = wpa_pick_group_cipher(ssid->group_cipher); in mesh_config_create()
120 if (cipher < 0 || cipher == WPA_CIPHER_TKIP || in mesh_config_create()
121 cipher == WPA_CIPHER_GTK_NOT_USED) { in mesh_config_create()
127 conf->group_cipher = cipher; in mesh_config_create()
/hostap-latest/src/crypto/
Daes-wrap.c26 int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher) in aes_wrap() argument
33 a = cipher; in aes_wrap()
34 r = cipher + 8; in aes_wrap()
52 r = cipher + 8; in aes_wrap()
Daes-unwrap.c26 int aes_unwrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, in aes_unwrap() argument
35 os_memcpy(a, cipher, 8); in aes_unwrap()
37 os_memcpy(r, cipher + 8, 8 * n); in aes_unwrap()
Dcrypto_module_tests.c308 u8 cipher[] = { 0x19, 0xDD, 0x5C, 0x4C, 0x93, 0x31, 0x04, 0x9D, in test_eax() local
319 if (os_memcmp(data, cipher, sizeof(data)) != 0) { in test_eax()
324 if (os_memcmp(tag, cipher + sizeof(data), AES_BLOCK_SIZE) != 0) { in test_eax()
354 u8 cipher[32]; in test_cbc() member
398 os_memcmp(buf, tv->cipher, tv->len) != 0) { in test_cbc()
403 os_memcpy(buf, tv->cipher, tv->len); in test_cbc()
475 u8 key[16], plain[16], cipher[16], out[16]; in test_ecb() local
482 hexstr2bin(tv->ciphertext, cipher, sizeof(cipher))) { in test_ecb()
490 os_memcmp(out, cipher, 16) != 0) { in test_ecb()
Daes_wrap.h22 u8 *cipher);
24 const u8 *cipher, u8 *plain);
/hostap-latest/src/pasn/
Dpasn_initiator.c238 wpa_pasn_add_rsne(buf, NULL, pasn->akmp, pasn->cipher); in wpas_pasn_fils_build_auth()
578 if (wpa_pasn_add_rsne(buf, pmkid, pasn->akmp, pasn->cipher) < 0) in wpas_pasn_build_auth_1()
594 ret = pasn_auth_frame_hash(pasn->akmp, pasn->cipher, in wpas_pasn_build_auth_1()
658 mic_len = pasn_mic_len(pasn->akmp, pasn->cipher); in wpas_pasn_build_auth_3()
668 ret = pasn_mic(pasn->ptk.kck, pasn->akmp, pasn->cipher, in wpas_pasn_build_auth_3()
706 pasn->cipher = 0; in wpa_pasn_reset()
876 int cipher, u16 group, int freq, in wpas_pasn_send_auth_1() argument
907 pasn->cipher = cipher; in wpas_pasn_send_auth_1()
918 MAC2STR(pasn->peer_addr), pasn->akmp, pasn->cipher, in wpas_pasn_send_auth_1()
946 int akmp, int cipher, u16 group, in wpas_pasn_start() argument
[all …]
Dpasn_common.c79 void pasn_set_cipher(struct pasn_data *pasn, int cipher) in pasn_set_cipher() argument
83 pasn->cipher = cipher; in pasn_set_cipher()
207 return pasn->cipher; in pasn_get_cipher()
Dpasn_responder.c242 wpa_pasn_add_rsne(buf, NULL, pasn->akmp, pasn->cipher); in pasn_get_fils_wd()
352 pasn->cipher, pasn->kdk_len); in pasn_derive_keys()
360 pasn->cipher); in pasn_derive_keys()
470 pasn->akmp, pasn->cipher) < 0) in handle_auth_pasn_resp()
508 mic_len = pasn_mic_len(pasn->akmp, pasn->cipher); in handle_auth_pasn_resp()
533 pasn->akmp, pasn->cipher) < 0) in handle_auth_pasn_resp()
558 ret = pasn_mic(pasn->ptk.kck, pasn->akmp, pasn->cipher, in handle_auth_pasn_resp()
658 pasn->cipher = rsn_data.pairwise_cipher; in handle_auth_pasn_1()
810 ret = pasn_auth_frame_hash(pasn->akmp, pasn->cipher, in handle_auth_pasn_1()
886 ret = pasn_auth_frame_hash(pasn->akmp, pasn->cipher, in handle_auth_pasn_1()
[all …]
Dpasn_common.h39 int cipher; member
159 int akmp, int cipher, u16 group,
165 int akmp, int cipher, u16 group,
199 void pasn_set_cipher(struct pasn_data *pasn, int cipher);
/hostap-latest/src/eap_common/
Dikev2_common.c178 struct crypto_cipher *cipher; in ikev2_encr_encrypt() local
193 cipher = crypto_cipher_init(encr_alg, iv, key, key_len); in ikev2_encr_encrypt()
194 if (cipher == NULL) { in ikev2_encr_encrypt()
199 if (crypto_cipher_encrypt(cipher, plain, crypt, len) < 0) { in ikev2_encr_encrypt()
201 crypto_cipher_deinit(cipher); in ikev2_encr_encrypt()
204 crypto_cipher_deinit(cipher); in ikev2_encr_encrypt()
213 struct crypto_cipher *cipher; in ikev2_encr_decrypt() local
228 cipher = crypto_cipher_init(encr_alg, iv, key, key_len); in ikev2_encr_decrypt()
229 if (cipher == NULL) { in ikev2_encr_decrypt()
234 if (crypto_cipher_decrypt(cipher, crypt, plain, len) < 0) { in ikev2_encr_decrypt()
[all …]
/hostap-latest/src/ap/
Dwpa_auth_ie.c1474 u32 cipher, suite, selector, mask; in wpa_auth_write_fd_rsn_info() local
1491 cipher = 63; /* No cipher suite selected */ in wpa_auth_write_fd_rsn_info()
1493 cipher = suite & 0xff; in wpa_auth_write_fd_rsn_info()
1495 cipher = 62; /* vendor specific */ in wpa_auth_write_fd_rsn_info()
1496 selectors |= cipher; in wpa_auth_write_fd_rsn_info()
1499 cipher = 63; /* Default to no cipher suite selected */ in wpa_auth_write_fd_rsn_info()
1503 cipher = RSN_CIPHER_SUITE_AES_128_CMAC & 0xff; in wpa_auth_write_fd_rsn_info()
1506 cipher = RSN_CIPHER_SUITE_BIP_GMAC_128 & 0xff; in wpa_auth_write_fd_rsn_info()
1509 cipher = RSN_CIPHER_SUITE_BIP_GMAC_256 & 0xff; in wpa_auth_write_fd_rsn_info()
1512 cipher = RSN_CIPHER_SUITE_BIP_CMAC_256 & 0xff; in wpa_auth_write_fd_rsn_info()
[all …]
Dap_config.c1652 int cipher = WPA_CIPHER_NONE; in hostapd_set_security_params() local
1657 cipher = bss->default_wep_key_len >= 13 ? in hostapd_set_security_params()
1661 cipher = WPA_CIPHER_WEP104; in hostapd_set_security_params()
1663 cipher = WPA_CIPHER_WEP40; in hostapd_set_security_params()
1666 bss->wpa_group = cipher; in hostapd_set_security_params()
1667 bss->wpa_pairwise = cipher; in hostapd_set_security_params()
1668 bss->rsn_pairwise = cipher; in hostapd_set_security_params()
1673 int cipher = WPA_CIPHER_WEP40; in hostapd_set_security_params() local
1675 cipher = WPA_CIPHER_WEP104; in hostapd_set_security_params()
1677 bss->wpa_group = cipher; in hostapd_set_security_params()
[all …]
/hostap-latest/src/rsn_supp/
Dtdls.c108 int cipher; /* Selected cipher (WPA_CIPHER_*) */ member
230 switch (peer->cipher) { in wpa_tdls_set_key()
744 peer->cipher = 0; in wpa_tdls_peer_clear()
1948 int cipher; in wpa_tdls_process_tpk_m1() local
2145 cipher = ie.pairwise_cipher; in wpa_tdls_process_tpk_m1()
2146 if (cipher & WPA_CIPHER_CCMP) { in wpa_tdls_process_tpk_m1()
2148 cipher = WPA_CIPHER_CCMP; in wpa_tdls_process_tpk_m1()
2199 peer->cipher = WPA_CIPHER_NONE; in wpa_tdls_process_tpk_m1()
2206 peer->cipher = cipher; in wpa_tdls_process_tpk_m1()
2248 if (cipher == WPA_CIPHER_CCMP) in wpa_tdls_process_tpk_m1()
[all …]

1234