Lines Matching defs:ctx
63 BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
109 BN_CTX_start(ctx);
110 A = BN_CTX_get(ctx);
111 b = BN_CTX_get(ctx);
112 q = BN_CTX_get(ctx);
113 t = BN_CTX_get(ctx);
114 x = BN_CTX_get(ctx);
115 y = BN_CTX_get(ctx);
125 if (!BN_nnmod(A, a, p, ctx))
148 if (!BN_mod_exp(ret, A, q, p, ctx))
190 if (!BN_mod_exp(b, t, q, p, ctx))
194 if (!BN_mod_sqr(y, b, p, ctx))
198 if (!BN_mod_mul(t, t, y, p, ctx))
204 if (!BN_mod_mul(x, A, b, p, ctx))
206 if (!BN_mod_mul(x, x, t, p, ctx))
244 r = BN_kronecker(y, q, ctx); /* here 'q' is |p| */
273 if (!BN_mod_exp(y, y, q, p, ctx))
305 if (!BN_nnmod(t, A, p, ctx))
315 if (!BN_mod_exp(x, A, t, p, ctx))
326 if (!BN_mod_sqr(b, x, p, ctx))
328 if (!BN_mod_mul(b, b, A, p, ctx))
332 if (!BN_mod_mul(x, x, A, p, ctx))
355 if (!BN_mod_sqr(t, b, p, ctx))
363 if (!BN_mod_mul(t, t, t, p, ctx))
371 if (!BN_mod_sqr(t, t, p, ctx))
374 if (!BN_mod_mul(y, t, t, p, ctx))
376 if (!BN_mod_mul(x, x, t, p, ctx))
378 if (!BN_mod_mul(b, b, y, p, ctx))
390 if (!BN_mod_sqr(x, ret, p, ctx))
406 BN_CTX_end(ctx);