Lines Matching defs:tmp
60 struct crypto_bignum *tmp;
63 tmp = crypto_bignum_init();
64 if (!tmp || crypto_bignum_rand(tmp, prime) < 0) {
65 crypto_bignum_deinit(tmp, 0);
69 res = crypto_bignum_legendre(tmp, prime);
71 *qr = tmp;
73 *qnr = tmp;
75 crypto_bignum_deinit(tmp, 0);
90 struct crypto_bignum *tmp, *pm1, *one;
92 tmp = crypto_bignum_init();
95 if (!tmp || !pm1 || !one ||
97 crypto_bignum_rand(tmp, pm1) < 0 ||
98 crypto_bignum_add(tmp, one, tmp) < 0) {
99 crypto_bignum_deinit(tmp, 0);
100 tmp = NULL;
105 return tmp;
223 struct crypto_bignum *tmp, *one;
232 tmp = crypto_bignum_init();
238 !tmp || !one ||
239 /* tmp = (p+1)/4 */
240 crypto_bignum_add(prime, one, tmp) < 0 ||
241 crypto_bignum_rshift(tmp, 2, tmp) < 0 ||
243 crypto_bignum_exptmod(val, tmp, prime, res) < 0)
246 crypto_bignum_deinit(tmp, 0);