Home
last modified time | relevance | path

Searched refs:dh (Results 1 – 19 of 19) sorted by relevance

/hostap-latest/src/crypto/
Ddh_groups.c1193 struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv) in dh_init() argument
1198 if (dh == NULL) in dh_init()
1202 *priv = wpabuf_alloc(dh->prime_len); in dh_init()
1206 pv_len = dh->prime_len; in dh_init()
1213 if (crypto_dh_init(*dh->generator, dh->prime, dh->prime_len, in dh_init()
1221 wpabuf_put(*priv, dh->prime_len); in dh_init()
1222 wpabuf_put(pv, dh->prime_len); in dh_init()
1239 const struct dh_group *dh) in dh_derive_shared() argument
1244 if (dh == NULL || peer_public == NULL || own_private == NULL) in dh_derive_shared()
1247 shared_len = dh->prime_len; in dh_derive_shared()
[all …]
Dcrypto_wolfssl.c934 DhKey *dh = NULL; in dh5_init() local
943 dh = XMALLOC(sizeof(DhKey), NULL, DYNAMIC_TYPE_TMP_BUFFER); in dh5_init()
944 if (!dh) in dh5_init()
946 wc_InitDhKey(dh); in dh5_init()
949 XFREE(dh, NULL, DYNAMIC_TYPE_TMP_BUFFER); in dh5_init()
958 if (wc_DhSetKey(dh, RFC3526_PRIME_1536, sizeof(RFC3526_PRIME_1536), in dh5_init()
964 if (wc_DhGenerateKeyPair(dh, &rng, wpabuf_mhead(privkey), &priv_sz, in dh5_init()
971 ret = dh; in dh5_init()
974 dh = NULL; in dh5_init()
980 if (dh) { in dh5_init()
[all …]
Dcrypto_openssl.c970 DH *dh; in dh5_init() local
978 dh = DH_new(); in dh5_init()
979 if (dh == NULL) in dh5_init()
982 dh->g = BN_new(); in dh5_init()
983 if (dh->g == NULL || BN_set_word(dh->g, 2) != 1) in dh5_init()
986 dh->p = get_group5_prime(); in dh5_init()
987 if (dh->p == NULL) in dh5_init()
990 dh->q = get_group5_order(); in dh5_init()
991 if (!dh->q) in dh5_init()
994 if (DH_generate_key(dh) != 1) in dh5_init()
[all …]
Ddh_groups.h24 struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv);
27 const struct dh_group *dh);
Dtls_openssl.c4237 DH *dh; in tls_global_dh()
4255 dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); in tls_global_dh()
4258 while (dh == NULL) { in tls_global_dh()
4276 dh = DSA_dup_DH(dsa); in tls_global_dh()
4278 if (dh == NULL) { in tls_global_dh()
4286 if (dh == NULL) { in tls_global_dh()
4292 if (SSL_CTX_set_tmp_dh(ssl_ctx, dh) != 1) { in tls_global_dh()
4296 DH_free(dh); in tls_global_dh()
4299 DH_free(dh); in tls_global_dh()
/hostap-latest/src/eap_common/
Deap_eke_common.c163 const struct dh_group *dh; in eap_eke_dh_init() local
166 dh = eap_eke_dh_group(group); in eap_eke_dh_init()
167 if (generator < 0 || generator > 255 || !dh) in eap_eke_dh_init()
171 if (crypto_dh_init(gen, dh->prime, dh->prime_len, ret_priv, in eap_eke_dh_init()
175 ret_priv, dh->prime_len); in eap_eke_dh_init()
177 ret_pub, dh->prime_len); in eap_eke_dh_init()
384 const struct dh_group *dh; in eap_eke_shared_secret() local
386 dh = eap_eke_dh_group(sess->dhgroup); in eap_eke_shared_secret()
387 if (sess->encr != EAP_EKE_ENCR_AES128_CBC || !dh) in eap_eke_shared_secret()
391 os_memcpy(peer_pub, peer_dhcomp + AES_BLOCK_SIZE, dh->prime_len); in eap_eke_shared_secret()
[all …]
/hostap-latest/src/eap_peer/
Dikev2.c54 data->dh); in ikev2_derive_keys()
78 pad_len = data->dh->prime_len - wpabuf_len(shared); in ikev2_derive_keys()
192 prop->dh = transform_id; in ikev2_parse_transform()
322 prop.dh = -1; in ikev2_process_sai1()
328 prop.encr != -1 && prop.dh != -1) { in ikev2_process_sai1()
330 data->dh = dh_groups_get(prop.dh); in ikev2_process_sai1()
350 data->proposal.integ, data->proposal.dh); in ikev2_process_sai1()
381 if (group != data->proposal.dh) { in ikev2_process_kei()
384 group, data->proposal.dh); in ikev2_process_kei()
392 if (data->dh == NULL) { in ikev2_process_kei()
[all …]
Dikev2.h19 int dh; member
35 const struct dh_group *dh; member
/hostap-latest/src/eap_server/
Dikev2.c58 data->dh); in ikev2_derive_keys()
83 pad_len = data->dh->prime_len - wpabuf_len(shared); in ikev2_derive_keys()
200 transform_id == data->proposal.dh) in ikev2_parse_transform()
201 prop->dh = transform_id; in ikev2_parse_transform()
328 prop.dh = -1; in ikev2_process_sar1()
334 prop.encr != -1 && prop.dh != -1) { in ikev2_process_sar1()
357 data->proposal.integ, data->proposal.dh); in ikev2_process_sar1()
388 if (group != data->proposal.dh) { in ikev2_process_ker()
391 group, data->proposal.dh); in ikev2_process_ker()
395 if (data->dh == NULL) { in ikev2_process_ker()
[all …]
Dikev2.h19 int dh; member
34 const struct dh_group *dh; member
Deap_server_ikev2.c104 data->ikev2.proposal.dh = DH_GROUP2_1024BIT_MODP; in eap_ikev2_init()
/hostap-latest/src/common/
Dsae.c58 tmp->dh = dh_groups_get(group); in sae_set_group()
59 if (tmp->dh) { in sae_set_group()
63 tmp->prime_len = tmp->dh->prime_len; in sae_set_group()
69 tmp->prime_buf = crypto_bignum_init_set(tmp->dh->prime, in sae_set_group()
77 tmp->order_len = tmp->dh->order_len; in sae_set_group()
78 tmp->order_buf = crypto_bignum_init_set(tmp->dh->order, in sae_set_group()
79 tmp->dh->order_len); in sae_set_group()
210 sae->tmp->dh->prime, sae->tmp->prime_len, pwd_value, in sae_test_pwd_seed_ffc()
217 res = const_time_memcmp(pwd_value, sae->tmp->dh->prime, in sae_test_pwd_seed_ffc()
239 if (sae->tmp->dh->safe_prime) { in sae_test_pwd_seed_ffc()
[all …]
Dsae.h55 const struct dh_group *dh; member
95 const struct dh_group *dh; member
/hostap-latest/src/l2_packet/
Dl2_packet_freebsd.c178 dlpi_handle_t dh; in eth_get() local
183 retval = dlpi_open(device, &dh, 0); in eth_get()
190 retval = dlpi_get_physaddr(dh, DL_CURR_PHYS_ADDR, physaddr, in eth_get()
195 dlpi_close(dh); in eth_get()
199 dlpi_close(dh); in eth_get()
/hostap-latest/tests/hwsim/auth_serv/
Das2.conf18 dh_file=auth_serv/dh.conf
Das.conf18 dh_file=auth_serv/dh.conf
Dupdate.sh11 if [ -r dh.conf ]; then
14 openssl dhparam -out dh.conf 2048
/hostap-latest/src/tls/
Dtlsv1_cred.c1072 const u8 *dh, size_t len) in tlsv1_set_dhparams_der() argument
1077 pos = dh; in tlsv1_set_dhparams_der()
1078 end = dh + len; in tlsv1_set_dhparams_der()
/hostap-latest/src/ap/
Dieee802_11_eht.c859 const struct dh_group *dh = dh_groups_get(group); in sae_commit_skip_fixed_fields() local
861 if (!dh) { in sae_commit_skip_fixed_fields()
867 prime_len = dh->prime_len; in sae_commit_skip_fixed_fields()