Home
last modified time | relevance | path

Searched refs:prime_len (Results 1 – 15 of 15) sorted by relevance

/external/wpa_supplicant_8/src/common/
Dsae.c33 tmp->prime_len = crypto_ec_prime_len(tmp->ec); in sae_set_group()
43 tmp->prime_len = tmp->dh->prime_len; in sae_set_group()
44 if (tmp->prime_len > SAE_MAX_PRIME_LEN) { in sae_set_group()
50 tmp->prime_len); in sae_set_group()
173 get_rand_1_to_p_1(const u8 *prime, size_t prime_len, size_t prime_bits, in get_rand_1_to_p_1() argument
180 if (random_get_bytes(tmp, prime_len) < 0) in get_rand_1_to_p_1()
183 buf_shift_right(tmp, prime_len, 8 - prime_bits % 8); in get_rand_1_to_p_1()
184 if (os_memcmp(tmp, prime, prime_len) >= 0) in get_rand_1_to_p_1()
186 r = crypto_bignum_init_set(tmp, prime_len); in get_rand_1_to_p_1()
194 *r_odd = tmp[prime_len - 1] & 0x01; in get_rand_1_to_p_1()
[all …]
Ddpp.c3027 x = (char *) base64_url_encode(pos, curve->prime_len, NULL, 0); in dpp_build_jwk()
3028 pos += curve->prime_len; in dpp_build_jwk()
3029 y = (char *) base64_url_encode(pos, curve->prime_len, NULL, 0); in dpp_build_jwk()
3099 dppcon = wpabuf_alloc(extra_len + 2 * auth->curve->prime_len * 4 / 3); in dpp_build_conf_obj_dpp()
3194 if (dpp_bn2bin_pad(r, signature, curve->prime_len) < 0 || in dpp_build_conf_obj_dpp()
3195 dpp_bn2bin_pad(s, signature + curve->prime_len, in dpp_build_conf_obj_dpp()
3196 curve->prime_len) < 0) in dpp_build_conf_obj_dpp()
3198 signature_len = 2 * curve->prime_len; in dpp_build_conf_obj_dpp()
3207 tailroom += 2 * curve->prime_len * 4 / 3 + os_strlen(auth->conf->kid); in dpp_build_conf_obj_dpp()
3665 if (wpabuf_len(x) != curve->prime_len) { in dpp_parse_jwk()
[all …]
Dsae.h35 int prime_len; member
Ddpp.h81 size_t prime_len; member
/external/wpa_supplicant_8/src/crypto/
Ddh_groups.c1202 *priv = wpabuf_alloc(dh->prime_len); in dh_init()
1206 if (random_get_bytes(wpabuf_put(*priv, dh->prime_len), dh->prime_len)) in dh_init()
1213 if (os_memcmp(wpabuf_head(*priv), dh->prime, dh->prime_len) > 0) { in dh_init()
1219 pv_len = dh->prime_len; in dh_init()
1228 dh->prime, dh->prime_len, wpabuf_mhead(pv), in dh_init()
1260 shared_len = dh->prime_len; in dh_derive_shared()
1266 dh->prime, dh->prime_len, in dh_derive_shared()
Ddh_groups.h17 size_t prime_len; member
/external/wpa_supplicant_8/src/eap_common/
Deap_eke_common.c173 if (random_get_bytes(ret_priv, dh->prime_len)) in eap_eke_dh_init()
175 if (os_memcmp(ret_priv, dh->prime, dh->prime_len) > 0) { in eap_eke_dh_init()
179 for (i = 0; i < dh->prime_len - 1; i++) { in eap_eke_dh_init()
183 if (i == dh->prime_len - 1 && (ret_priv[i] == 0 || ret_priv[i] == 1)) in eap_eke_dh_init()
186 ret_priv, dh->prime_len); in eap_eke_dh_init()
189 pub_len = dh->prime_len; in eap_eke_dh_init()
190 if (crypto_mod_exp(&gen, 1, ret_priv, dh->prime_len, in eap_eke_dh_init()
191 dh->prime, dh->prime_len, ret_pub, &pub_len) < 0) in eap_eke_dh_init()
193 if (pub_len < dh->prime_len) { in eap_eke_dh_init()
194 size_t pad = dh->prime_len - pub_len; in eap_eke_dh_init()
[all …]
/external/boringssl/src/decrepit/dh/
Ddh_decrepit.c70 DH *DH_generate_parameters(int prime_len, int generator, in DH_generate_parameters() argument
72 if (prime_len < 0 || generator < 0) { in DH_generate_parameters()
94 if (!DH_generate_parameters_ex(ret, prime_len, generator, cb)) { in DH_generate_parameters()
/external/boringssl/src/include/openssl/
Ddh.h225 OPENSSL_EXPORT DH *DH_generate_parameters(int prime_len, int generator,
/external/wpa_supplicant_8/src/eap_server/
Dikev2.c83 pad_len = data->dh->prime_len - wpabuf_len(shared); in ikev2_derive_keys()
404 if (ker_len - 4 != data->dh->prime_len) { in ikev2_process_ker()
407 (long) (ker_len - 4), (long) data->dh->prime_len); in ikev2_process_ker()
990 wpabuf_put(msg, data->dh->prime_len - wpabuf_len(pv)); in ikev2_build_kei()
Deap_server_pwd.c666 size_t prime_len, order_len; in eap_pwd_process_commit_resp() local
670 prime_len = BN_num_bytes(data->grp->prime); in eap_pwd_process_commit_resp()
673 if (payload_len != 2 * prime_len + order_len) { in eap_pwd_process_commit_resp()
677 (unsigned int) (2 * prime_len + order_len)); in eap_pwd_process_commit_resp()
/external/wpa_supplicant_8/src/eap_peer/
Dikev2.c78 pad_len = data->dh->prime_len - wpabuf_len(shared); in ikev2_derive_keys()
399 if (kei_len - 4 != data->dh->prime_len) { in ikev2_process_kei()
402 (long) (kei_len - 4), (long) data->dh->prime_len); in ikev2_process_kei()
924 wpabuf_put(msg, data->dh->prime_len - wpabuf_len(pv)); in ikev2_build_ker()
Deap_pwd.c363 size_t prime_len, order_len; in eap_pwd_perform_commit_exchange() local
370 prime_len = BN_num_bytes(data->grp->prime); in eap_pwd_perform_commit_exchange()
373 if (payload_len != 2 * prime_len + order_len) { in eap_pwd_perform_commit_exchange()
377 (unsigned int) (2 * prime_len + order_len)); in eap_pwd_perform_commit_exchange()
/external/wpa_supplicant_8/src/rsn_supp/
Dwpa.c4197 size_t prime_len; in owe_build_assoc_req() local
4200 prime_len = 32; in owe_build_assoc_req()
4202 prime_len = 48; in owe_build_assoc_req()
4204 prime_len = 66; in owe_build_assoc_req()
4214 pub = wpabuf_zeropad(pub, prime_len); in owe_build_assoc_req()
4250 size_t hash_len, prime_len; in owe_process_assoc_resp() local
4291 prime_len = 32; in owe_process_assoc_resp()
4293 prime_len = 48; in owe_process_assoc_resp()
4295 prime_len = 66; in owe_process_assoc_resp()
4302 secret = wpabuf_zeropad(secret, prime_len); in owe_process_assoc_resp()
[all …]
/external/wpa_supplicant_8/src/ap/
Dieee802_11.c2166 size_t hash_len, prime_len; in owe_process_assoc_req() local
2179 prime_len = 32; in owe_process_assoc_req()
2181 prime_len = 48; in owe_process_assoc_req()
2183 prime_len = 66; in owe_process_assoc_req()
2195 secret = wpabuf_zeropad(secret, prime_len); in owe_process_assoc_req()
2229 pub = wpabuf_zeropad(pub, prime_len); in owe_process_assoc_req()