* using the Tonelli/Shanks algorithm (cf. Henri Cohen, "A Course
* in Algebraic Computational Number Theory", algorithm 1.5.1).
* 'p' must be prime!
- * If 'a' is not a square, this is not necessarily detected by
- * the algorithms; a bogus result must be expected in this case.
*/
{
BIGNUM *ret = in;
return ret;
}
-#if 0 /* if BN_mod_sqrt is used with correct input, this just wastes time */
- r = BN_kronecker(a, p, ctx);
- if (r < -1) return NULL;
- if (r == -1)
- {
- BNerr(BN_F_BN_MOD_SQRT, BN_R_NOT_A_SQUARE);
- return(NULL);
- }
-#endif
-
BN_CTX_start(ctx);
A = BN_CTX_get(ctx);
b = BN_CTX_get(ctx);