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