Lines Matching refs:prime
21 * purposes: FFC groups whose prime is >= 3072 bits and ECC groups
22 * defined over a prime field whose prime is >= 256 bits. Furthermore,
26 * timing information due to the prime not being close to a power of
44 /* FFC groups that have prime that is close to a power of two */
53 int dragonfly_get_random_qr_qnr(const struct crypto_bignum *prime,
64 if (!tmp || crypto_bignum_rand(tmp, prime) < 0) {
69 res = crypto_bignum_legendre(tmp, prime);
88 dragonfly_get_rand_1_to_p_1(const struct crypto_bignum *prime)
96 crypto_bignum_sub(prime, one, pm1) < 0 ||
116 const struct crypto_bignum *prime;
120 prime = crypto_ec_get_prime(ec);
132 r = dragonfly_get_rand_1_to_p_1(prime);
138 crypto_bignum_mulmod(val, r, prime, num) < 0 ||
139 crypto_bignum_mulmod(num, r, prime, num) < 0)
159 crypto_bignum_mulmod(num, qr_or_qnr, prime, num) < 0)
165 res = crypto_bignum_legendre(num, prime);