Home
last modified time | relevance | path

Searched refs:prime (Results 1 - 25 of 79) sorted by relevance

1234

/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/common/
H A Ddragonfly.c21 * purposes: FFC groups whose prime is >= 3072 bits and ECC groups in dragonfly_suitable_group()
22 * defined over a prime field whose prime is >= 256 bits. Furthermore, in dragonfly_suitable_group()
26 * timing information due to the prime not being close to a power of in dragonfly_suitable_group()
44 /* FFC groups that have prime that is close to a power of two */ in dragonfly_min_pwe_loop_iter()
53 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, on in dragonfly_get_rand_1_to_p_1()
116 const struct crypto_bignum *prime; dragonfly_is_quadratic_residue_blind() local
222 const struct crypto_bignum *prime; dragonfly_sqrt() local
[all...]
H A Dsae.c51 tmp->prime = crypto_ec_get_prime(tmp->ec); in sae_set_group()
69 tmp->prime_buf = crypto_bignum_init_set(tmp->dh->prime, in sae_set_group()
75 tmp->prime = tmp->prime_buf; in sae_set_group()
148 const u8 *prime, const u8 *qr, const u8 *qnr, in sae_test_pwd_seed_ecc()
162 prime, sae->tmp->prime_len, pwd_value, bits) < 0) in sae_test_pwd_seed_ecc()
169 cmp_prime = const_time_memcmp(pwd_value, prime, sae->tmp->prime_len); in sae_test_pwd_seed_ecc()
171 * being smaller than prime. */ in sae_test_pwd_seed_ecc()
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()
251 crypto_bignum_sub(sae->tmp->prime, in sae_test_pwd_seed_ffc()
147 sae_test_pwd_seed_ecc(struct sae_data *sae, const u8 *pwd_seed, const u8 *prime, const u8 *qr, const u8 *qnr, u8 *pwd_value) sae_test_pwd_seed_ecc() argument
293 u8 prime[SAE_MAX_ECC_PRIME_LEN]; sae_derive_pwe_ecc() local
630 const struct crypto_bignum *a, *b, *prime; sswu() local
873 const struct crypto_bignum *prime; sae_derive_pt_ecc() local
971 struct crypto_bignum *prime, *order; sae_derive_pt_ffc() local
1213 struct crypto_bignum *pwe = NULL, *order = NULL, *prime = NULL; sae_derive_pwe_from_pt_ffc() local
1941 u8 prime[SAE_MAX_ECC_PRIME_LEN]; sae_parse_commit_element_ecc() local
[all...]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/common/
H A Ddragonfly.c21 * purposes: FFC groups whose prime is >= 3072 bits and ECC groups in dragonfly_suitable_group()
22 * defined over a prime field whose prime is >= 256 bits. Furthermore, in dragonfly_suitable_group()
26 * timing information due to the prime not being close to a power of in dragonfly_suitable_group()
44 /* FFC groups that have prime that is close to a power of two */ in dragonfly_min_pwe_loop_iter()
53 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, on in dragonfly_get_rand_1_to_p_1()
116 const struct crypto_bignum *prime; dragonfly_is_quadratic_residue_blind() local
222 const struct crypto_bignum *prime; dragonfly_sqrt() local
[all...]
H A 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()
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()
164 * being smaller than prime. */ 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, in sae_test_pwd_seed_ffc()
140 sae_test_pwd_seed_ecc(struct sae_data *sae, const u8 *pwd_seed, const u8 *prime, const u8 *qr, const u8 *qnr, u8 *pwd_value) sae_test_pwd_seed_ecc() argument
287 u8 prime[SAE_MAX_ECC_PRIME_LEN]; sae_derive_pwe_ecc() local
979 u8 prime[SAE_MAX_ECC_PRIME_LEN]; sae_parse_commit_element_ecc() local
[all...]
/third_party/skia/third_party/externals/oboe/src/flowgraph/resampler/
H A DIntegerRatio.cpp29 for (int prime : kPrimes) { in reduce()
30 if (mNumerator < prime || mDenominator < prime) { in reduce()
34 // Find biggest prime factor for numerator. 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/skia/third_party/externals/sfntly/java/src/com/google/typography/font/sfntly/table/bitmap/
H A DBitmapGlyphInfo.java101 final int prime = 31; in hashCode()
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/
H A 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()
24 /* Make sure private value is smaller than prime */ 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()
H A Dcrypto_wolfssl.c778 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
799 if (wc_DhSetKey(dh, prime, prime_len, &generator, 1) != 0) in crypto_dh_init()
828 int crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, in crypto_dh_derive_secret() argument
843 if (wc_DhSetKey(dh, prime, prime_len, &generator, 1) != 0) in crypto_dh_derive_secret()
1314 mp_int prime; member
1369 mp_init(&e->prime) != MP_OKAY || in crypto_ec_init()
1374 mp_read_radix(&e->prime, e->key.dp->prime, 16) != MP_OKAY || in crypto_ec_init()
1376 mp_montgomery_setup(&e->prime, &e->mont_b) != MP_OKAY) in crypto_ec_init()
1396 mp_clear(&e->prime); in crypto_ec_deinit()
[all...]
H A Dcrypto_gnutls.c286 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
293 if (os_memcmp(privkey, prime, prime_len) > 0) { in crypto_dh_init()
294 /* Make sure private value is smaller than prime */ in crypto_dh_init()
299 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len, in crypto_dh_init()
312 int crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, in crypto_dh_derive_secret() argument
323 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret()
338 gcry_mpi_scan(&p, GCRYMPI_FMT_USG, prime, prime_len, in crypto_dh_derive_secret()
354 prime, prime_len, secret, len); in crypto_dh_derive_secret()
H A Dcrypto_nettle.c307 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
314 if (os_memcmp(privkey, prime, prime_len) > 0) { in crypto_dh_init()
315 /* Make sure private value is smaller than prime */ in crypto_dh_init()
320 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len, in crypto_dh_init()
333 int crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, in crypto_dh_derive_secret() argument
344 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret()
358 mpz_import(p, prime_len, 1, 1, 1, 0, prime); in crypto_dh_derive_secret()
368 prime, prime_len, secret, len); in crypto_dh_derive_secret()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/
H A 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()
24 /* Make sure private value is smaller than prime */ 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()
H A Dcrypto_wolfssl.c782 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
803 if (wc_DhSetKey(dh, prime, prime_len, &generator, 1) != 0) in crypto_dh_init()
832 int crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, in crypto_dh_derive_secret() argument
847 if (wc_DhSetKey(dh, prime, prime_len, &generator, 1) != 0) in crypto_dh_derive_secret()
1320 mp_int prime; member
1375 mp_init(&e->prime) != MP_OKAY || in crypto_ec_init()
1380 mp_read_radix(&e->prime, e->key.dp->prime, 16) != MP_OKAY || in crypto_ec_init()
1382 mp_montgomery_setup(&e->prime, &e->mont_b) != MP_OKAY) in crypto_ec_init()
1402 mp_clear(&e->prime); in crypto_ec_deinit()
[all...]
H A Dcrypto_gnutls.c286 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
293 if (os_memcmp(privkey, prime, prime_len) > 0) { in crypto_dh_init()
294 /* Make sure private value is smaller than prime */ in crypto_dh_init()
299 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len, in crypto_dh_init()
312 int crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, in crypto_dh_derive_secret() argument
323 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret()
338 gcry_mpi_scan(&p, GCRYMPI_FMT_USG, prime, prime_len, in crypto_dh_derive_secret()
354 prime, prime_len, secret, len); in crypto_dh_derive_secret()
/third_party/python/Lib/test/
H A Dtest_pow.py101 prime = 1000000000039 # for speed, relatively small prime modulus
108 got1 = pow(a, b, prime)
109 got2 = pow(a, b1, prime) * pow(a, b2, prime) % prime
112 got3 = pow(a, b1 * b2, prime)
113 got4 = pow(pow(a, b1, prime), b2, prime)
/third_party/mesa3d/src/loader/
H A Dloader.c270 char *prime = NULL; in loader_get_dri_config_device_id() local
277 prime = strdup(driQueryOptionstr(&userInitOptions, "device_id")); in loader_get_dri_config_device_id()
281 return prime; in loader_get_dri_config_device_id()
358 char *default_tag, *prime = NULL; in loader_get_user_preferred_fd() local
364 prime = strdup(dri_prime); in loader_get_user_preferred_fd()
366 prime = loader_get_dri_config_device_id(); in loader_get_user_preferred_fd()
369 prime = strdup(dri_prime); in loader_get_user_preferred_fd()
372 if (prime == NULL) { in loader_get_user_preferred_fd()
394 if (!strcmp(prime,"1")) { in loader_get_user_preferred_fd()
398 if (!drm_device_matches_tag(devices[i], prime)) in loader_get_user_preferred_fd()
[all...]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_common/
H A 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()
183 * compute counter-mode password value and stretch to prime in compute_password_element()
209 * being smaller than prime. */ in compute_password_element()
245 * prime) handles this in constant time. 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) > in eap_pwd_element_coord_ok()
411 const struct crypto_bignum *prime; eap_pwd_get_element() local
[all...]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_common/
H A 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()
183 * compute counter-mode password value and stretch to prime in compute_password_element()
209 * being smaller than prime. */ in compute_password_element()
245 * prime) handles this in constant time. 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) > in eap_pwd_element_coord_ok()
411 const struct crypto_bignum *prime; eap_pwd_get_element() local
[all...]
/third_party/mbedtls/scripts/mbedtls_dev/
H A Dbignum_data.py19 # First number generated by random.getrandbits(192) - seed(2,2), not a prime
22 # Second number generated by random.getrandbits(192) - seed(2,2), not a prime
25 # Third number generated by random.getrandbits(192) - seed(2,2), not a prime
28 # Fourth number generated by random.getrandbits(192) - seed(2,2), not a prime
31 # Ninth number generated by random.getrandbits(192) - seed(2,2), not a prime
42 # First number generated by random.getrandbits(1024) - seed(4,2), not a prime
50 # Second number generated by random.getrandbits(1024) - seed(4,2), not a prime
58 # Third number generated by random.getrandbits(1024) - seed(4,2), not a prime
66 # Fourth number generated by random.getrandbits(1024) - seed(4,2), not a prime
74 # Fifth number generated by random.getrandbits(1024) - seed(4,2), not a prime
[all...]
/third_party/node/deps/openssl/openssl/crypto/rsa/
H A Drsa_gen.c54 /* multi-prime is only supported with the builtin key generation */ in RSA_generate_multi_prime_key()
61 * have to honour it in 2-prime case and assume that it wouldn't in RSA_generate_multi_prime_key()
62 * know what to do with multi-prime key generated by builtin in RSA_generate_multi_prime_key()
78 BIGNUM *r0 = NULL, *r1 = NULL, *r2 = NULL, *tmp, *prime; in rsa_multiprime_keygen() local
149 /* initialize multi-prime components */ in rsa_multiprime_keygen()
180 prime = rsa->p; in rsa_multiprime_keygen()
182 prime = rsa->q; in rsa_multiprime_keygen()
185 prime = pinfo->r; in rsa_multiprime_keygen()
187 BN_set_flags(prime, BN_FLG_CONSTTIME); in rsa_multiprime_keygen()
191 if (!BN_generate_prime_ex2(prime, bits in rsa_multiprime_keygen()
[all...]
/third_party/openssl/crypto/rsa/
H A Drsa_gen.c54 /* multi-prime is only supported with the builtin key generation */ in RSA_generate_multi_prime_key()
61 * have to honour it in 2-prime case and assume that it wouldn't in RSA_generate_multi_prime_key()
62 * know what to do with multi-prime key generated by builtin in RSA_generate_multi_prime_key()
78 BIGNUM *r0 = NULL, *r1 = NULL, *r2 = NULL, *tmp, *prime; in rsa_multiprime_keygen() local
149 /* initialize multi-prime components */ in rsa_multiprime_keygen()
180 prime = rsa->p; in rsa_multiprime_keygen()
182 prime = rsa->q; in rsa_multiprime_keygen()
185 prime = pinfo->r; in rsa_multiprime_keygen()
187 BN_set_flags(prime, BN_FLG_CONSTTIME); in rsa_multiprime_keygen()
191 if (!BN_generate_prime_ex2(prime, bits in rsa_multiprime_keygen()
[all...]
/third_party/node/lib/internal/crypto/
H A Dkeygen.js310 const { group, primeLength, prime, generator } = options;
312 if (prime != null)
313 throw new ERR_INCOMPATIBLE_OPTION_PAIR('group', 'prime');
324 if (prime != null) {
326 throw new ERR_INCOMPATIBLE_OPTION_PAIR('prime', 'primeLength');
328 validateBuffer(prime, 'options.prime');
333 'At least one of the group, prime, or primeLength options');
341 prime != null ? prime
[all...]
/third_party/node/src/crypto/
H A Dcrypto_random.cc67 tracker->TrackFieldWithSize("prime", prime ? bits * 8 : 0); in MemoryInfo()
75 size_t size = BN_num_bytes(params.prime.get()); in EncodeOutput()
79 params.prime.get(), in EncodeOutput()
103 THROW_ERR_CRYPTO_OPERATION_FAILED(env, "could not generate prime"); in AdditionalConfig()
112 THROW_ERR_CRYPTO_OPERATION_FAILED(env, "could not generate prime"); in AdditionalConfig()
123 // If we allowed this, the best case would be returning a static prime in AdditionalConfig()
143 params->prime.reset(BN_secure_new()); in AdditionalConfig()
144 if (!params->prime) { in AdditionalConfig()
145 THROW_ERR_CRYPTO_OPERATION_FAILED(env, "could not generate prime"); in AdditionalConfig()
[all...]
/third_party/skia/third_party/externals/harfbuzz/src/
H A Dhb-map.hh93 unsigned int prime; member
103 hb_swap (a.prime, b.prime); in swap()
111 prime = 0; in init_shallow()
160 prime = prime_for (power); in resize()
283 unsigned int i = hash % prime; in bucket_for_hash()
300 /* Each table size has an associated prime modulo (the first prime in prime_for()
302 * then works modulo 2^n. The prime modulo is necessary to get a in prime_for()
/third_party/node/test/pummel/
H A Dtest-crypto-dh-hash.js53 const prime = group.getPrime('hex');
56 .update(prime.toUpperCase()).digest('hex');
/third_party/node/deps/v8/src/inspector/
H A Dv8-debugger-script.cc25 static uint64_t prime[] = {0x3FB75161, 0xAB1F4E4F, 0x82675BC5, 0xCD924D35, in calculateHash() local
55 hashes[current] = (hashes[current] + zi[current] * xi) % prime[current]; in calculateHash()
56 zi[current] = (zi[current] * random[current]) % prime[current]; in calculateHash()
75 hashes[current] = (hashes[current] + zi[current] * xi) % prime[current]; in calculateHash()
76 zi[current] = (zi[current] * random[current]) % prime[current]; in calculateHash()
81 hashes[i] = (hashes[i] + zi[i] * (prime[i] - 1)) % prime[i]; in calculateHash()

Completed in 17 milliseconds

1234