Lines Matching refs:ret
15 * Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks
21 BIGNUM *ret = in;
30 if (ret == NULL)
31 ret = BN_new();
32 if (ret == NULL)
34 if (!BN_set_word(ret, BN_is_bit_set(a, 0))) {
35 if (ret != in)
36 BN_free(ret);
39 bn_check_top(ret);
40 return ret;
48 if (ret == NULL)
49 ret = BN_new();
50 if (ret == NULL)
52 if (!BN_set_word(ret, BN_is_one(a))) {
53 if (ret != in)
54 BN_free(ret);
57 bn_check_top(ret);
58 return ret;
72 if (ret == NULL)
73 ret = BN_new();
74 if (ret == NULL)
101 if (!BN_mod_exp(ret, A, q, p, ctx))
163 if (!BN_copy(ret, x))
263 BN_zero(ret);
273 BN_zero(ret);
301 if (!BN_copy(ret, x))
349 if (!BN_mod_sqr(x, ret, p, ctx))
360 if (ret != in)
361 BN_clear_free(ret);
362 ret = NULL;
366 bn_check_top(ret);
367 return ret;