Home
last modified time | relevance | path

Searched refs:prime (Results 1 – 25 of 399) sorted by relevance

12345678910>>...16

/third_party/wpa_supplicant/wpa_supplicant-2.9/src/common/
Ddragonfly.c53 int dragonfly_get_random_qr_qnr(const struct crypto_bignum *prime, in dragonfly_get_random_qr_qnr() argument
64 if (!tmp || crypto_bignum_rand(tmp, prime) < 0) { in dragonfly_get_random_qr_qnr()
69 res = crypto_bignum_legendre(tmp, prime); in dragonfly_get_random_qr_qnr()
88 dragonfly_get_rand_1_to_p_1(const struct crypto_bignum *prime) in dragonfly_get_rand_1_to_p_1() argument
96 crypto_bignum_sub(prime, one, pm1) < 0 || in dragonfly_get_rand_1_to_p_1()
116 const struct crypto_bignum *prime; in dragonfly_is_quadratic_residue_blind() local
120 prime = crypto_ec_get_prime(ec); in dragonfly_is_quadratic_residue_blind()
132 r = dragonfly_get_rand_1_to_p_1(prime); in dragonfly_is_quadratic_residue_blind()
138 crypto_bignum_mulmod(val, r, prime, num) < 0 || in dragonfly_is_quadratic_residue_blind()
139 crypto_bignum_mulmod(num, r, prime, num) < 0) in dragonfly_is_quadratic_residue_blind()
[all …]
Dsae.c47 tmp->prime = crypto_ec_get_prime(tmp->ec); in sae_set_group()
65 tmp->prime_buf = crypto_bignum_init_set(tmp->dh->prime, in sae_set_group()
71 tmp->prime = tmp->prime_buf; in sae_set_group()
141 const u8 *prime, const u8 *qr, const u8 *qnr, in sae_test_pwd_seed_ecc() argument
155 prime, sae->tmp->prime_len, pwd_value, bits) < 0) in sae_test_pwd_seed_ecc()
162 cmp_prime = const_time_memcmp(pwd_value, prime, sae->tmp->prime_len); in sae_test_pwd_seed_ecc()
203 sae->tmp->dh->prime, sae->tmp->prime_len, pwd_value, in sae_test_pwd_seed_ffc()
210 res = const_time_memcmp(pwd_value, sae->tmp->dh->prime, in sae_test_pwd_seed_ffc()
244 crypto_bignum_sub(sae->tmp->prime, b, b) < 0 || in sae_test_pwd_seed_ffc()
252 res = crypto_bignum_exptmod(a, b, sae->tmp->prime, pwe); in sae_test_pwd_seed_ffc()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/common/
Ddragonfly.c53 int dragonfly_get_random_qr_qnr(const struct crypto_bignum *prime, in dragonfly_get_random_qr_qnr() argument
64 if (!tmp || crypto_bignum_rand(tmp, prime) < 0) { in dragonfly_get_random_qr_qnr()
69 res = crypto_bignum_legendre(tmp, prime); in dragonfly_get_random_qr_qnr()
88 dragonfly_get_rand_1_to_p_1(const struct crypto_bignum *prime) in dragonfly_get_rand_1_to_p_1() argument
96 crypto_bignum_sub(prime, one, pm1) < 0 || in dragonfly_get_rand_1_to_p_1()
116 const struct crypto_bignum *prime; in dragonfly_is_quadratic_residue_blind() local
120 prime = crypto_ec_get_prime(ec); in dragonfly_is_quadratic_residue_blind()
132 r = dragonfly_get_rand_1_to_p_1(prime); in dragonfly_is_quadratic_residue_blind()
138 crypto_bignum_mulmod(val, r, prime, num) < 0 || in dragonfly_is_quadratic_residue_blind()
139 crypto_bignum_mulmod(num, r, prime, num) < 0) in dragonfly_is_quadratic_residue_blind()
[all …]
Dsae.c49 tmp->prime = crypto_ec_get_prime(tmp->ec); in sae_set_group()
67 tmp->prime_buf = crypto_bignum_init_set(tmp->dh->prime, in sae_set_group()
73 tmp->prime = tmp->prime_buf; in sae_set_group()
146 const u8 *prime, const u8 *qr, const u8 *qnr, in sae_test_pwd_seed_ecc() argument
160 prime, sae->tmp->prime_len, pwd_value, bits) < 0) in sae_test_pwd_seed_ecc()
167 cmp_prime = const_time_memcmp(pwd_value, prime, sae->tmp->prime_len); in sae_test_pwd_seed_ecc()
208 sae->tmp->dh->prime, sae->tmp->prime_len, pwd_value, in sae_test_pwd_seed_ffc()
215 res = const_time_memcmp(pwd_value, sae->tmp->dh->prime, in sae_test_pwd_seed_ffc()
249 crypto_bignum_sub(sae->tmp->prime, b, b) < 0 || in sae_test_pwd_seed_ffc()
257 res = crypto_bignum_exptmod(a, b, sae->tmp->prime, pwe); in sae_test_pwd_seed_ffc()
[all …]
/third_party/skia/third_party/externals/oboe/src/flowgraph/resampler/
DIntegerRatio.cpp29 for (int prime : kPrimes) { in reduce() local
30 if (mNumerator < prime || mDenominator < prime) { in reduce()
36 int top = mNumerator / prime; in reduce()
37 int bottom = mDenominator / prime; in reduce()
40 && (top * prime == mNumerator) // divided evenly? in reduce()
41 && (bottom * prime == mDenominator)) { in reduce()
/third_party/openssl/doc/man1/
Dprime.pod5 openssl-prime,
6 prime - compute prime numbers
10 B<openssl prime>
21 The B<prime> command checks if the specified numbers are prime.
41 Generate a prime number.
45 Generate a prime with B<num> bits.
49 When used with B<-generate>, generates a "safe" prime. If the number
50 generated is B<n>, then check that B<(n-1)/2> is also prime.
55 is prime. The default is 20.
/third_party/boost/libs/math/test/
Dcubic_hermite_test.cpp54 CHECK_ULP_CLOSE(Real(0), hermite_spline.prime(tlo), 2); in test_constant()
55 CHECK_ULP_CLOSE(Real(0), hermite_spline.prime(thi), 2); in test_constant()
79 CHECK_ULP_CLOSE(Real(0), circular_hermite_spline.prime(t), 2); in test_constant()
83 CHECK_ULP_CLOSE(Real(0), circular_hermite_spline.prime(x.back()+1), 2); in test_constant()
122 CHECK_ULP_CLOSE(Real(1), hermite_spline.prime(t), 0); in test_linear()
144 CHECK_ULP_CLOSE(Real(1), circular_hermite_spline.prime(t), 2); in test_linear()
150 CHECK_ULP_CLOSE(Real(1), circular_hermite_spline.prime(Real(x.back()+1)), 2); in test_linear()
178 CHECK_ULP_CLOSE(t, s.prime(t), 65); in test_quadratic()
207 CHECK_ULP_CLOSE(dydx[i], s.prime(x[i]), 2); in test_interpolation_condition()
228 CHECK_ULP_CLOSE(Real(0), hermite_spline.prime(t), 2); in test_cardinal_constant()
[all …]
Dquintic_hermite_test.cpp44 CHECK_ULP_CLOSE(Real(0), qh.prime(t), 24); in test_constant()
63 CHECK_ULP_CLOSE(Real(1), qh.prime(t), 2); in test_linear()
87 CHECK_ULP_CLOSE(Real(1), qh.prime(t), 100); in test_linear()
115 CHECK_ULP_CLOSE(t, qh.prime(t), 12); in test_quadratic()
149 CHECK_ULP_CLOSE(t, qh.prime(t), 53); in test_quadratic()
181 CHECK_ULP_CLOSE(3*t*t, qh.prime(t), 15); in test_cubic()
214 CHECK_ULP_CLOSE(4*t*t*t, qh.prime(t), 100); in test_quartic()
248 CHECK_ULP_CLOSE(dydx[i], s.prime(x[i]), 2); in test_interpolation_condition()
272 CHECK_ULP_CLOSE(Real(0), qh.prime(t), 24); in test_cardinal_constant()
288 CHECK_ULP_CLOSE(Real(0), qh_aos.prime(t), 24); in test_cardinal_constant()
[all …]
Dseptic_hermite_test.cpp45 CHECK_ULP_CLOSE(Real(0), sh.prime(t), 24); in test_constant()
58 CHECK_ULP_CLOSE(Real(0), csh.prime(t), 24); in test_constant()
74 CHECK_ULP_CLOSE(Real(0), csh_aos.prime(t), 24); in test_constant()
88 CHECK_ULP_CLOSE(Real(0), csh.prime(tlo), 2); in test_constant()
89 CHECK_ULP_CLOSE(Real(0), csh.prime(thi), 2); in test_constant()
90 CHECK_ULP_CLOSE(Real(0), csh_aos.prime(tlo), 2); in test_constant()
91 CHECK_ULP_CLOSE(Real(0), csh_aos.prime(thi), 2); in test_constant()
118 CHECK_ULP_CLOSE(Real(1), sh.prime(t), 2); in test_linear()
142 CHECK_ULP_CLOSE(Real(1), sh.prime(t), 850); in test_linear()
159 CHECK_ULP_CLOSE(Real(1), csh.prime(t), 15); in test_linear()
[all …]
Dchebyshev_transform_test.cpp58 BOOST_CHECK_CLOSE_FRACTION(c, cheb.prime(x), 100*tol); in test_sin_chebyshev_transform()
65 BOOST_CHECK_SMALL(cheb.prime(x), 100*tol); in test_sin_chebyshev_transform()
69 BOOST_CHECK_CLOSE_FRACTION(c, cheb.prime(x), 100*tol); in test_sin_chebyshev_transform()
114 BOOST_CHECK_SMALL(cheb.prime(x), 5 * tol); in test_sinc_chebyshev_transform()
118 BOOST_CHECK_CLOSE_FRACTION(ds, cheb.prime(x), 300*tol); in test_sinc_chebyshev_transform()
188 BOOST_CHECK_SMALL(cheb0.prime(x), tol); in test_chebyshev_chebyshev_transform()
208 BOOST_CHECK_CLOSE_FRACTION(cheb1.prime(x), 1, tol); in test_chebyshev_chebyshev_transform()
223 BOOST_CHECK_CLOSE_FRACTION(cheb2.prime(x), 4*x, tol); in test_chebyshev_chebyshev_transform()
227 BOOST_CHECK_SMALL(cheb2.prime(x), tol); in test_chebyshev_chebyshev_transform()
Dcardinal_quintic_b_spline_test.cpp34 CHECK_MOLLIFIED_CLOSE(Real(0), qbs.prime(t), 400*std::numeric_limits<Real>::epsilon()); in test_constant()
43 CHECK_MOLLIFIED_CLOSE(Real(0), qbs.prime(t), 600*std::numeric_limits<Real>::epsilon()); in test_constant()
47 CHECK_MOLLIFIED_CLOSE(Real(0), qbs.prime(t), 600*std::numeric_limits<Real>::epsilon()); in test_constant()
67 CHECK_MOLLIFIED_CLOSE(Real(0), qbs.prime(t), 1200*std::numeric_limits<Real>::epsilon()); in test_constant_estimate_derivatives()
76 CHECK_MOLLIFIED_CLOSE(Real(0), qbs.prime(t), 1200*std::numeric_limits<Real>::epsilon()); in test_constant_estimate_derivatives()
80 CHECK_MOLLIFIED_CLOSE(Real(0), qbs.prime(t), 1200*std::numeric_limits<Real>::epsilon()); in test_constant_estimate_derivatives()
111 … if(!CHECK_MOLLIFIED_CLOSE(m, qbs.prime(t), 100*abs(m*t+b)*std::numeric_limits<Real>::epsilon())) { in test_linear()
126 CHECK_MOLLIFIED_CLOSE(m, qbs.prime(t), 1500*std::numeric_limits<Real>::epsilon()); in test_linear()
131 CHECK_MOLLIFIED_CLOSE(m, qbs.prime(t), 3000*std::numeric_limits<Real>::epsilon()); in test_linear()
159 … if(!CHECK_MOLLIFIED_CLOSE(m, qbs.prime(t), 100*abs(m*t+b)*std::numeric_limits<Real>::epsilon())) { in test_linear_estimate_derivatives()
[all …]
/third_party/flutter/skia/third_party/externals/sfntly/java/src/com/google/typography/font/sfntly/table/bitmap/
DBitmapGlyphInfo.java101 final int prime = 31; in hashCode() local
103 result = prime * result + blockOffset; in hashCode()
104 result = prime * result + format; in hashCode()
105 result = prime * result + glyphId; in hashCode()
106 result = prime * result + length; in hashCode()
107 result = prime * result + startOffset; in hashCode()
/third_party/skia/third_party/externals/sfntly/java/src/com/google/typography/font/sfntly/table/bitmap/
DBitmapGlyphInfo.java101 final int prime = 31; in hashCode() local
103 result = prime * result + blockOffset; in hashCode()
104 result = prime * result + format; in hashCode()
105 result = prime * result + glyphId; in hashCode()
106 result = prime * result + length; in hashCode()
107 result = prime * result + startOffset; in hashCode()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/
Dcrypto_internal-modexp.c16 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
23 if (os_memcmp(privkey, prime, prime_len) > 0) { in crypto_dh_init()
29 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len, in crypto_dh_init()
42 int crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, in crypto_dh_derive_secret() argument
53 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret()
70 bignum_set_unsigned_bin(p, prime, prime_len) < 0 || in crypto_dh_derive_secret()
82 prime, prime_len, secret, len); in crypto_dh_derive_secret()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/
Dcrypto_internal-modexp.c16 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
23 if (os_memcmp(privkey, prime, prime_len) > 0) { in crypto_dh_init()
29 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len, in crypto_dh_init()
42 int crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, in crypto_dh_derive_secret() argument
53 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret()
70 bignum_set_unsigned_bin(p, prime, prime_len) < 0 || in crypto_dh_derive_secret()
82 prime, prime_len, secret, len); in crypto_dh_derive_secret()
/third_party/boost/boost/math/interpolators/
Dcubic_hermite.hpp27 inline Real prime(Real x) const { in prime() function in boost::math::interpolators::cubic_hermite
28 return impl_->prime(x); in prime()
70 inline Real prime(Real x) const in prime() function in boost::math::interpolators::cardinal_cubic_hermite
72 return impl_->prime(x); in prime()
111 inline Real prime(Real x) const in prime() function in boost::math::interpolators::cardinal_cubic_hermite_aos
113 return impl_->prime(x); in prime()
Dseptic_hermite.hpp32 inline Real prime(Real x) const in prime() function in boost::math::interpolators::septic_hermite
34 return impl_->prime(x); in prime()
78 inline Real prime(Real x) const in prime() function in boost::math::interpolators::cardinal_septic_hermite
80 return impl_->prime(x); in prime()
117 inline Real prime(Real x) const in prime() function in boost::math::interpolators::cardinal_septic_hermite_aos
119 return impl_->prime(x); in prime()
Dquintic_hermite.hpp30 Real prime(Real x) const in prime() function in boost::math::interpolators::quintic_hermite
32 return impl_->prime(x); in prime()
77 inline Real prime(Real x) const { in prime() function in boost::math::interpolators::cardinal_quintic_hermite
78 return impl_->prime(x); in prime()
114 inline Real prime(Real x) const in prime() function in boost::math::interpolators::cardinal_quintic_hermite_aos
116 return impl_->prime(x); in prime()
/third_party/openssl/doc/man3/
DBN_generate_prime.pod53 BN_generate_prime_ex() generates a pseudo-random prime number of
54 at least bit length B<bits>. The returned number is probably prime
55 with a negligible error. If B<add> is B<NULL> the returned prime
68 potential prime number.
77 When a prime has been found, B<BN_GENCB_call(cb, 2, i)> is called.
86 The prime may have to fulfill additional requirements for use in
89 If B<add> is not B<NULL>, the prime will fulfill the condition p % B<add>
93 If B<safe> is true, it will be a safe prime (i.e. a prime p so
94 that (p-1)/2 is also prime). If B<safe> is true, and B<rem> == B<NULL>
103 prime. The following tests are performed until one of them shows that
[all …]
/third_party/mesa3d/src/loader/
Dloader.c216 char *prime = NULL; in loader_get_dri_config_device_id() local
223 prime = strdup(driQueryOptionstr(&userInitOptions, "device_id")); in loader_get_dri_config_device_id()
227 return prime; in loader_get_dri_config_device_id()
304 char *default_tag, *prime = NULL; in loader_get_user_preferred_fd() local
309 prime = strdup(dri_prime); in loader_get_user_preferred_fd()
312 prime = loader_get_dri_config_device_id(); in loader_get_user_preferred_fd()
315 if (prime == NULL) { in loader_get_user_preferred_fd()
337 if (!strcmp(prime,"1")) { in loader_get_user_preferred_fd()
341 if (!drm_device_matches_tag(devices[i], prime)) in loader_get_user_preferred_fd()
358 *different_device = !!strcmp(default_tag, prime); in loader_get_user_preferred_fd()
[all …]
/third_party/openssl/crypto/rsa/
Drsa_gen.c67 BIGNUM *r0 = NULL, *r1 = NULL, *r2 = NULL, *tmp, *prime; in rsa_builtin_keygen() local
153 prime = rsa->p; in rsa_builtin_keygen()
155 prime = rsa->q; in rsa_builtin_keygen()
158 prime = pinfo->r; in rsa_builtin_keygen()
160 BN_set_flags(prime, BN_FLG_CONSTTIME); in rsa_builtin_keygen()
164 if (!BN_generate_prime_ex(prime, bitsr[i] + adj, 0, NULL, NULL, cb)) in rsa_builtin_keygen()
184 if (!BN_cmp(prime, prev_prime)) { in rsa_builtin_keygen()
189 if (!BN_sub(r2, prime, BN_value_one())) in rsa_builtin_keygen()
218 if (!BN_mul(r1, rsa->n, prime, ctx)) in rsa_builtin_keygen()
/third_party/mindspore/mindspore/lite/java/java/fl_client/src/main/java/com/mindspore/flclient/cipher/
DShareSecrets.java33 private BigInteger prime; field in ShareSecrets
80 prime = BaseUtil.byteArray2BigInteger(primeByte); in split()
84 coefficient[i] = randomZp(prime); in split()
92 final BigInteger b1 = BigInteger.valueOf(i).modPow(BigInteger.valueOf(j), prime); in split()
93 final BigInteger b2 = coefficient[j - 1].multiply(b1).mod(prime); in split()
95 accumulate = accumulate.add(b2).mod(prime); in split()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_common/
Deap_pwd_common.c139 const struct crypto_bignum *prime; in compute_password_element() local
150 prime = crypto_ec_get_prime(grp->group); in compute_password_element()
153 if (crypto_bignum_to_bin(prime, prime_bin, sizeof(prime_bin), in compute_password_element()
164 if (dragonfly_get_random_qr_qnr(prime, &qr, &qnr) < 0 || in compute_password_element()
275 crypto_bignum_sub(prime, y, y) < 0 || in compute_password_element()
392 static int eap_pwd_element_coord_ok(const struct crypto_bignum *prime, in eap_pwd_element_coord_ok() argument
400 crypto_bignum_cmp(val, prime) >= 0) in eap_pwd_element_coord_ok()
411 const struct crypto_bignum *prime; in eap_pwd_get_element() local
414 prime = crypto_ec_get_prime(group->group); in eap_pwd_get_element()
418 if (!eap_pwd_element_coord_ok(prime, buf, prime_len) || in eap_pwd_get_element()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_common/
Deap_pwd_common.c139 const struct crypto_bignum *prime; in compute_password_element() local
150 prime = crypto_ec_get_prime(grp->group); in compute_password_element()
153 if (crypto_bignum_to_bin(prime, prime_bin, sizeof(prime_bin), in compute_password_element()
164 if (dragonfly_get_random_qr_qnr(prime, &qr, &qnr) < 0 || in compute_password_element()
275 crypto_bignum_sub(prime, y, y) < 0 || in compute_password_element()
392 static int eap_pwd_element_coord_ok(const struct crypto_bignum *prime, in eap_pwd_element_coord_ok() argument
400 crypto_bignum_cmp(val, prime) >= 0) in eap_pwd_element_coord_ok()
411 const struct crypto_bignum *prime; in eap_pwd_get_element() local
414 prime = crypto_ec_get_prime(group->group); in eap_pwd_get_element()
418 if (!eap_pwd_element_coord_ok(prime, buf, prime_len) || in eap_pwd_get_element()
[all …]
/third_party/node/lib/internal/crypto/
Dkeygen.js253 const { group, primeLength, prime, generator } = needOptions();
256 if (prime != null)
266 if (prime != null) {
269 if (!isArrayBufferView(prime))
270 throw new ERR_INVALID_OPT_VALUE('prime', prime);
284 args = [prime != null ? prime : primeLength,

12345678910>>...16