Home
last modified time | relevance | path

Searched full:prime (Results 1 – 25 of 3521) sorted by relevance

12345678910>>...141

/aosp_15_r20/external/boringssl/src/third_party/wycheproof_testvectors/
H A Dprimality_test.txt9 # small non prime integer
14 # small non prime integer
19 # small non prime integer
24 # Non-prime Mersenne number that is pseudoprime to base 2
29 # Non-prime Mersenne number that is pseudoprime to base 2
34 # Non-prime Fermat number
39 # Non-prime Fermat number
44 # Non-prime Fermat number
49 # pseudoprime square derived from Wiefrich prime
54 # pseudoprime square derived from Wiefrich prime
[all …]
H A Dprimality_test.json10 …"NegativeOfPrime" : "Some libraries accept the negative of a prime number as prime. For crypto li…
11 …erprets the paper \"Average case error estimates for the strong probable prime test.\" Math. of C…
20 "comment" : "small non prime integer",
27 "comment" : "small non prime integer",
34 "comment" : "small non prime integer",
41 "comment" : "Non-prime Mersenne number that is pseudoprime to base 2",
48 "comment" : "Non-prime Mersenne number that is pseudoprime to base 2",
55 "comment" : "Non-prime Fermat number",
62 "comment" : "Non-prime Fermat number",
69 "comment" : "Non-prime Fermat number",
[all …]
/aosp_15_r20/external/cronet/third_party/boringssl/src/third_party/wycheproof_testvectors/
H A Dprimality_test.txt9 # small non prime integer
14 # small non prime integer
19 # small non prime integer
24 # Non-prime Mersenne number that is pseudoprime to base 2
29 # Non-prime Mersenne number that is pseudoprime to base 2
34 # Non-prime Fermat number
39 # Non-prime Fermat number
44 # Non-prime Fermat number
49 # pseudoprime square derived from Wiefrich prime
54 # pseudoprime square derived from Wiefrich prime
[all …]
H A Dprimality_test.json10 …"NegativeOfPrime" : "Some libraries accept the negative of a prime number as prime. For crypto li…
11 …erprets the paper \"Average case error estimates for the strong probable prime test.\" Math. of C…
20 "comment" : "small non prime integer",
27 "comment" : "small non prime integer",
34 "comment" : "small non prime integer",
41 "comment" : "Non-prime Mersenne number that is pseudoprime to base 2",
48 "comment" : "Non-prime Mersenne number that is pseudoprime to base 2",
55 "comment" : "Non-prime Fermat number",
62 "comment" : "Non-prime Fermat number",
69 "comment" : "Non-prime Fermat number",
[all …]
/aosp_15_r20/external/cronet/third_party/rust/chromium_crates_io/vendor/wycheproof-0.4.0/src/data/
H A Dprimality_test.json10 …"NegativeOfPrime" : "Some libraries accept the negative of a prime number as prime. For crypto li…
11 …erprets the paper \"Average case error estimates for the strong probable prime test.\" Math. of C…
20 "comment" : "small non prime integer",
27 "comment" : "small non prime integer",
34 "comment" : "small non prime integer",
41 "comment" : "Non-prime Mersenne number that is pseudoprime to base 2",
48 "comment" : "Non-prime Mersenne number that is pseudoprime to base 2",
55 "comment" : "Non-prime Fermat number",
62 "comment" : "Non-prime Fermat number",
69 "comment" : "Non-prime Fermat number",
[all …]
/aosp_15_r20/external/ms-tpm-20-ref/TPMCmd/tpm/src/crypt/
H A DCryptPrime.c36 // This file contains the code for prime validation.
55 // This finds ceil(sqrt(n)) to use as a stopping point for searching the prime
107 // see if this prime evenly divides the number in IsPrimeInt()
120 bigNum prime, // IN: in BnIsProbablyPrime() argument
126 if(BnUnsignedCmpWord(prime, UINT32_MAX) <= 0) in BnIsProbablyPrime()
128 if(BnGetSize(prime) == 1) in BnIsProbablyPrime()
130 return IsPrimeInt((uint32_t)prime->d[0]); in BnIsProbablyPrime()
132 if(BnIsEven(prime)) in BnIsProbablyPrime()
134 if(BnUnsignedCmpWord(prime, s_LastPrimeInTable) <= 0) in BnIsProbablyPrime()
136 crypt_uword_t temp = prime->d[0] >> 1; in BnIsProbablyPrime()
[all …]
H A DCryptPrimeSieve.c51 // This table is set of prime markers. Each entry is the prime value
52 // for the ((n + 1) * 1024) prime. That is, the entry in s_PrimeMarkers[1]
53 // is the value for the 2,048th prime. This is used in the PrimeSieve
54 // to adjust the limit for the prime search. When processing smaller
55 // prime candidates, fewer primes are checked directly before going to
56 // Miller-Rabin. As the prime grows, it is worth spending more time eliminating
68 // next prime (RsaNextPrime()) will return primes until it hits the
90 // last prime returned (or any starting point) and the output is the
91 // next higher prime. The function returns 0 when the primeLimit is
227 UINT16 prime; member
[all …]
/aosp_15_r20/external/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 …]
/aosp_15_r20/external/openthread/third_party/mbedtls/repo/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 …]
/aosp_15_r20/external/python/rsa/tests/
Dtest_prime.py15 """Tests prime functions."""
19 import rsa.prime
28 self.assertFalse(rsa.prime.is_prime(-1))
29 self.assertFalse(rsa.prime.is_prime(0))
30 self.assertFalse(rsa.prime.is_prime(1))
31 self.assertTrue(rsa.prime.is_prime(2))
32 self.assertFalse(rsa.prime.is_prime(42))
33 self.assertTrue(rsa.prime.is_prime(41))
38 [x for x in range(901, 1000) if rsa.prime.is_prime(x)]
41 # Test around the 50th millionth known prime.
[all …]
/aosp_15_r20/external/wpa_supplicant_8/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()
91 dragonfly_get_rand_1_to_p_1(const struct crypto_bignum *prime) in dragonfly_get_rand_1_to_p_1() argument
99 crypto_bignum_sub(prime, one, pm1) < 0 || in dragonfly_get_rand_1_to_p_1()
119 const struct crypto_bignum *prime; in dragonfly_is_quadratic_residue_blind() 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() argument
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, b, b) < 0 || in sae_test_pwd_seed_ffc()
[all …]
/aosp_15_r20/external/mesa3d/src/loader/
H A Dloader.c299 char *prime = NULL; in loader_get_dri_config_device_id() local
308 prime = strdup(opt); in loader_get_dri_config_device_id()
313 return prime; in loader_get_dri_config_device_id()
407 } prime = {}; in loader_get_user_preferred_fd() local
408 prime.str = NULL; in loader_get_user_preferred_fd()
411 prime.str = strdup(dri_prime); in loader_get_user_preferred_fd()
414 prime.str = loader_get_dri_config_device_id(); in loader_get_user_preferred_fd()
417 if (prime.str == NULL) { in loader_get_user_preferred_fd()
421 if (sscanf(prime.str, "%hx:%hx", &vendor_id, &device_id) == 2) { in loader_get_user_preferred_fd()
422 prime.semantics = PRIME_IS_VID_DID; in loader_get_user_preferred_fd()
[all …]
/aosp_15_r20/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/h264/model/
H A DPictureParameterSet.java285 final int prime = 31; in hashCode() local
287 result = prime * result + Arrays.hashCode(bottom_right); in hashCode()
288 result = prime * result + chroma_qp_index_offset; in hashCode()
289 result = prime * result + (constrained_intra_pred_flag ? 1231 : 1237); in hashCode()
290 result = prime * result in hashCode()
292 result = prime * result + (entropy_coding_mode_flag ? 1231 : 1237); in hashCode()
293 result = prime * result in hashCode()
295 result = prime * result + num_ref_idx_l0_active_minus1; in hashCode()
296 result = prime * result + num_ref_idx_l1_active_minus1; in hashCode()
297 result = prime * result + num_slice_groups_minus1; in hashCode()
[all …]
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/gensrcs/libcore/ojluni/src/main/java/java/security/spec/
DRSAOtherPrimeInfo.java31 * This class represents the triplet (prime, exponent, and coefficient)
38 * prime INTEGER,
56 private BigInteger prime; field in RSAOtherPrimeInfo
63 * given the prime, primeExponent, and
66 * @param prime the prime factor of n.
71 * {@code prime}, {@code primeExponent},
75 public RSAOtherPrimeInfo(BigInteger prime, in RSAOtherPrimeInfo() argument
78 if (prime == null) { in RSAOtherPrimeInfo()
79 throw new NullPointerException("the prime parameter must be " + in RSAOtherPrimeInfo()
90 this.prime = prime; in RSAOtherPrimeInfo()
[all …]
/aosp_15_r20/libcore/ojluni/src/main/java/java/security/spec/
H A DRSAOtherPrimeInfo.java31 * This class represents the triplet (prime, exponent, and coefficient)
38 * prime INTEGER,
56 private BigInteger prime; field in RSAOtherPrimeInfo
63 * given the prime, primeExponent, and
66 * @param prime the prime factor of n.
71 * {@code prime}, {@code primeExponent},
75 public RSAOtherPrimeInfo(BigInteger prime, in RSAOtherPrimeInfo() argument
78 if (prime == null) { in RSAOtherPrimeInfo()
79 throw new NullPointerException("the prime parameter must be " + in RSAOtherPrimeInfo()
90 this.prime = prime; in RSAOtherPrimeInfo()
[all …]
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/14/libcore/ojluni/src/main/java/java/security/spec/
DRSAOtherPrimeInfo.java31 * This class represents the triplet (prime, exponent, and coefficient)
38 * prime INTEGER,
56 private BigInteger prime; field in RSAOtherPrimeInfo
63 * given the prime, primeExponent, and
66 * @param prime the prime factor of n.
71 * {@code prime}, {@code primeExponent},
75 public RSAOtherPrimeInfo(BigInteger prime, in RSAOtherPrimeInfo() argument
78 if (prime == null) { in RSAOtherPrimeInfo()
79 throw new NullPointerException("the prime parameter must be " + in RSAOtherPrimeInfo()
90 this.prime = prime; in RSAOtherPrimeInfo()
[all …]
/aosp_15_r20/frameworks/base/core/java/android/hardware/soundtrigger/
H A DSoundTrigger.java408 final int prime = 31; in hashCode() local
410 result = prime * result + mId; in hashCode()
411 result = prime * result + mImplementor.hashCode(); in hashCode()
412 result = prime * result + mDescription.hashCode(); in hashCode()
413 result = prime * result + mUuid.hashCode(); in hashCode()
414 result = prime * result + mVersion; in hashCode()
415 result = prime * result + mSupportedModelArch.hashCode(); in hashCode()
416 result = prime * result + mMaxSoundModels; in hashCode()
417 result = prime * result + mMaxKeyphrases; in hashCode()
418 result = prime * result + mMaxUsers; in hashCode()
[all …]
/aosp_15_r20/external/ms-tpm-20-ref/TPMCmd/tpm/include/prototypes/
H A DCryptPrime_fp.h56 bigNum prime, // IN:
63 // error probability equal to the security strength of the prime. These values
67 UINT32 bits // IN: Number of bits in the RSA prime
73 // is not prime, the first test fails.
75 // TRUE(1) probably prime
85 // This will check to see if a number is prime and appropriate for an
86 // RSA prime.
92 // probably prime.
98 bigNum prime,
110 // we accept any 1024-bit prime that has its MSb set, then it is possible to produce a
[all …]
/aosp_15_r20/prebuilts/go/linux-x86/src/crypto/rsa/
Drsa.go115 Primes []*big.Int // prime factors of N, has >= 2 elements.
216 // backwards compatibility but are not used. Multi-prime RSA is very rare,
226 Exp *big.Int // D mod (prime-1).
227 Coeff *big.Int // R·Coeff ≡ 1 mod Prime.
240 for _, prime := range priv.Primes {
242 if prime.Cmp(bigOne) <= 0 {
243 return errors.New("crypto/rsa: invalid prime value")
245 modulus.Mul(modulus, prime)
251 // Check that de ≡ 1 mod p-1, for each prime.
259 for _, prime := range priv.Primes {
[all …]
/aosp_15_r20/external/wycheproof/java/com/google/security/wycheproof/testcases/
H A DDhTest.java44 * fields of order p where p is a safe prime (i.e. q=(p-1)/2), hence the only elements of small
48 * security p must be at least 1024 bits long and the prime q must be at least 160 bits long. A 2048
49 * bit prime p and a 224 bit prime q are sufficient for 112 bit security. To avoid subgroup
76 * <p>C.H. Lim and P.J. Lee, "A key recovery attack on discrete log-based schemes using a prime
93 * prime factor, q is used instead of the generator g.
117 * 1.0.2f does not ensure that prime numbers are appropriate for Diffie-Hellman (DH) key exchange,
132 * <p>CVE-2015-2419: Random generation of the prime p allows Pohlig-Hellman and probably other
216 * The result should contain all prime factors of n smaller than 10^8.
217 * This method is heuristic, since it could in principle find large prime factors too.
218 * However, for a random 160-bit prime q the probability of this should be less than 2^{-100}.
[all …]
/aosp_15_r20/external/bouncycastle/bcprov/src/test/java/org/bouncycastle/math/test/
H A DPrimesTest.java32 BigInteger prime = randomPrime(); in testHasAnySmallFactors() local
33 assertFalse(Primes.hasAnySmallFactors(prime)); in testHasAnySmallFactors()
38 … BigInteger nonPrimeWithSmallFactor = BigInteger.valueOf(smallFactor).multiply(prime); in testHasAnySmallFactors()
49 BigInteger prime = randomPrime(); in testEnhancedMRProbablePrime() local
50 MROutput mr = Primes.enhancedMRProbablePrimeTest(prime, R, mrIterations); in testEnhancedMRProbablePrime()
55 BigInteger primePower = prime; in testEnhancedMRProbablePrime()
58 primePower = primePower.multiply(prime); in testEnhancedMRProbablePrime()
64 assertEquals(mr2.getFactor(), prime); in testEnhancedMRProbablePrime() local
66 BigInteger nonPrimePower = randomPrime().multiply(prime); in testEnhancedMRProbablePrime()
79 BigInteger prime = randomPrime(); in testMRProbablePrime() local
[all …]
/aosp_15_r20/external/mbedtls/library/
H A Drsa_alt_helpers.h56 * \brief Compute RSA prime moduli P, Q from public modulus N=PQ
66 * \param P Pointer to MPI holding first prime factor of N on success
67 * \param Q Pointer to MPI holding second prime factor of N on success
74 * \note It is neither checked that P, Q are prime nor that
85 * prime moduli and public key.
91 * \param P First prime factor of RSA modulus
92 * \param Q Second prime factor of RSA modulus
117 * \param P First prime factor of N
118 * \param Q Second prime factor of N
127 * prime and whether D is a valid private exponent.
[all …]
/aosp_15_r20/external/openthread/third_party/mbedtls/repo/library/
H A Drsa_alt_helpers.h54 * \brief Compute RSA prime moduli P, Q from public modulus N=PQ
64 * \param P Pointer to MPI holding first prime factor of N on success
65 * \param Q Pointer to MPI holding second prime factor of N on success
72 * \note It is neither checked that P, Q are prime nor that
83 * prime moduli and public key.
89 * \param P First prime factor of RSA modulus
90 * \param Q Second prime factor of RSA modulus
115 * \param P First prime factor of N
116 * \param Q Second prime factor of N
125 * prime and whether D is a valid private exponent.
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/src/
H A Dhash.cpp36 // Returns: If n == 0, returns 0. Else returns the lowest prime number that
40 // potential primes. All prime numbers are potential prime numbers. However
41 // some potential prime numbers are not prime. In an ideal world, all potential
42 // prime numbers would be prime. Candidate prime numbers are chosen as the next
43 // highest potential prime. Then this number is tested for prime by dividing it
44 // by all potential prime numbers less than the sqrt of the candidate.
50 // primes which the potential prime is not divisible by, the set of potential
51 // primes more closely approximates the set of prime numbers. And thus there
78 // Select first potential prime >= n in __next_prime()
85 // 1. The division is even, so try next potential prime. in __next_prime()
[all …]

12345678910>>...141