Home
last modified time | relevance | path

Searched refs:_rand (Results 1 – 17 of 17) sorted by relevance

/hostap-3.7.0/src/crypto/
Dmilenage.c36 int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand, in milenage_f1() argument
44 tmp1[i] = _rand[i] ^ opc[i]; in milenage_f1()
88 int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand, in milenage_f2345() argument
96 tmp1[i] = _rand[i] ^ opc[i]; in milenage_f2345()
174 const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik, in milenage_generate() argument
184 if (milenage_f1(opc, k, _rand, sqn, amf, mac_a, NULL) || in milenage_generate()
185 milenage_f2345(opc, k, _rand, res, ck, ik, ak, NULL)) { in milenage_generate()
208 int milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts, in milenage_auts() argument
215 if (milenage_f2345(opc, k, _rand, NULL, NULL, NULL, NULL, ak)) in milenage_auts()
219 if (milenage_f1(opc, k, _rand, sqn, amf, NULL, mac_s) || in milenage_auts()
[all …]
Dmilenage.h13 const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik,
15 int milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts,
17 int gsm_milenage(const u8 *opc, const u8 *k, const u8 *_rand, u8 *sres,
19 int milenage_check(const u8 *opc, const u8 *k, const u8 *sqn, const u8 *_rand,
22 int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand,
24 int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand,
/hostap-3.7.0/tests/
Dtest-milenage.c699 u8 auts[14], sqn[6], _rand[16]; in main() local
760 os_memset(_rand, 0xaa, sizeof(_rand)); in main()
764 res = milenage_auts(t->opc, t->k, _rand, auts, buf); in main()
772 os_memcpy(_rand, "\x12\x69\xb8\x23\x41\x39\x35\x66\xfb\x99\x41\xe9\x84" in main()
775 milenage_generate(t->opc, t->amf, t->k, sqn, _rand, buf, buf2, buf3, in main()
778 wpa_hexdump(MSG_DEBUG, "RAND", _rand, 16); in main()
/hostap-3.7.0/hostapd/
Dhlr_auc_gw.c76 u8 _rand[16]; member
344 hexstr2bin(pos, g->_rand, 16)) { in read_gsm_triplets()
617 u8 _rand[16], sres[4], kc[8]; in sim_req_auth() local
619 if (random_get_bytes(_rand, 16) < 0) in sim_req_auth()
621 gsm_milenage(m->opc, m->ki, _rand, sres, kc); in sim_req_auth()
627 rpos += wpa_snprintf_hex(rpos, rend - rpos, _rand, 16); in sim_req_auth()
646 rpos += wpa_snprintf_hex(rpos, rend - rpos, g->_rand, 16); in sim_req_auth()
684 u8 _rand[16], sres[4], kc[8]; in gsm_auth_req() local
686 if (hexstr2bin(pos, _rand, 16) != 0) in gsm_auth_req()
688 gsm_milenage(m->opc, m->ki, _rand, sres, kc); in gsm_auth_req()
[all …]
/hostap-3.7.0/src/eap_common/
Deap_sake_common.c335 u8 _rand[2 * EAP_SAKE_RAND_LEN]; in eap_sake_compute_mic() local
357 os_memcpy(_rand, rand_s, EAP_SAKE_RAND_LEN); in eap_sake_compute_mic()
358 os_memcpy(_rand + EAP_SAKE_RAND_LEN, rand_p, in eap_sake_compute_mic()
372 os_memcpy(_rand, rand_p, EAP_SAKE_RAND_LEN); in eap_sake_compute_mic()
373 os_memcpy(_rand + EAP_SAKE_RAND_LEN, rand_s, in eap_sake_compute_mic()
382 _rand, 2 * EAP_SAKE_RAND_LEN, tmp, tmplen, in eap_sake_compute_mic()
Deap_pwd_common.h73 int eap_pwd_get_rand_mask(EAP_PWD_group *group, struct crypto_bignum *_rand,
Deap_pwd_common.c469 int eap_pwd_get_rand_mask(EAP_PWD_group *group, struct crypto_bignum *_rand, in eap_pwd_get_rand_mask() argument
474 _rand, _mask, scalar); in eap_pwd_get_rand_mask()
/hostap-3.7.0/src/eap_server/
Deap_sim_db.h42 u8 *_rand, u8 *kc, u8 *sres,
86 u8 *_rand, u8 *autn, u8 *ik, u8 *ck,
91 const u8 *_rand);
Deap_sim_db.c927 u8 *_rand, u8 *kc, u8 *sres, in eap_sim_db_get_gsm_triplets() argument
968 os_memcpy(_rand, entry->u.sim.rand, num_chal * GSM_RAND_LEN); in eap_sim_db_get_gsm_triplets()
1394 u8 *_rand, u8 *autn, u8 *ik, u8 *ck, in eap_sim_db_get_aka_auth() argument
1431 os_memcpy(_rand, entry->u.aka.rand, EAP_AKA_RAND_LEN); in eap_sim_db_get_aka_auth()
1491 const u8 *auts, const u8 *_rand) in eap_sim_db_resynchronize() argument
1531 _rand, EAP_AKA_RAND_LEN); in eap_sim_db_resynchronize()
/hostap-3.7.0/src/utils/
Dpcsc_funcs.h19 int scard_gsm_auth(struct scard_data *scard, const unsigned char *_rand,
21 int scard_umts_auth(struct scard_data *scard, const unsigned char *_rand,
Dpcsc_funcs.c1241 int scard_gsm_auth(struct scard_data *scard, const unsigned char *_rand, in scard_gsm_auth() argument
1254 wpa_hexdump(MSG_DEBUG, "SCARD: GSM auth - RAND", _rand, 16); in scard_gsm_auth()
1257 os_memcpy(cmd + 5, _rand, 16); in scard_gsm_auth()
1264 os_memcpy(cmd + 6, _rand, 16); in scard_gsm_auth()
1340 int scard_umts_auth(struct scard_data *scard, const unsigned char *_rand, in scard_umts_auth() argument
1361 wpa_hexdump(MSG_DEBUG, "SCARD: UMTS auth - RAND", _rand, AKA_RAND_LEN); in scard_umts_auth()
1364 os_memcpy(cmd + 6, _rand, AKA_RAND_LEN); in scard_umts_auth()
/hostap-3.7.0/src/common/
Ddragonfly.c195 struct crypto_bignum *_rand, in dragonfly_generate_scalar() argument
204 if (dragonfly_get_rand_2_to_r_1(_rand, order) && in dragonfly_generate_scalar()
206 crypto_bignum_add(_rand, _mask, scalar) == 0 && in dragonfly_generate_scalar()
Ddragonfly.h27 struct crypto_bignum *_rand,
/hostap-3.7.0/wpa_supplicant/
Deapol_test.c1066 unsigned char _rand[16]; in scard_test() local
1110 os_memset(_rand, 0, sizeof(_rand)); in scard_test()
1111 if (scard_gsm_auth(scard, _rand, sres, kc)) in scard_test()
1114 os_memset(_rand, 0xff, sizeof(_rand)); in scard_test()
1115 if (scard_gsm_auth(scard, _rand, sres, kc)) in scard_test()
1175 unsigned char _rand[16]; in scard_get_triplets() local
1210 os_memset(_rand, i, sizeof(_rand)); in scard_get_triplets()
1211 if (scard_gsm_auth(scard, _rand, sres, kc)) in scard_get_triplets()
1225 printf("%02X", _rand[j]); in scard_get_triplets()
Drrm.c1170 u32 _rand; in wpas_rm_handle_beacon_req() local
1248 if (os_get_random((u8 *) &_rand, sizeof(_rand)) < 0) in wpas_rm_handle_beacon_req()
1249 _rand = os_random(); in wpas_rm_handle_beacon_req()
1250 interval_usec = (_rand % (rand_interval + 1)) * 1024; in wpas_rm_handle_beacon_req()
Dsme.c2807 u32 _rand; in sme_event_ch_switch() local
2817 if (os_get_random((u8 *) &_rand, sizeof(_rand)) < 0) in sme_event_ch_switch()
2818 _rand = os_random(); in sme_event_ch_switch()
2819 usec = _rand % (sa_query_ch_switch_max_delay + 1); in sme_event_ch_switch()
/hostap-3.7.0/src/ap/
Ddfs.c505 u32 _rand; in dfs_get_valid_channel() local
526 if (os_get_random((u8 *) &_rand, sizeof(_rand)) < 0) in dfs_get_valid_channel()
528 chan_idx = _rand % num_available_chandefs; in dfs_get_valid_channel()