Home | History | Annotate | Download | only in bn

Lines Matching refs:ctx

62 BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) 
114 BN_CTX_start(ctx);
115 A = BN_CTX_get(ctx);
116 b = BN_CTX_get(ctx);
117 q = BN_CTX_get(ctx);
118 t = BN_CTX_get(ctx);
119 x = BN_CTX_get(ctx);
120 y = BN_CTX_get(ctx);
128 if (!BN_nnmod(A, a, p, ctx)) goto end;
148 if (!BN_mod_exp(ret, A, q, p, ctx)) goto end;
187 if (!BN_mod_exp(b, t, q, p, ctx)) goto end;
190 if (!BN_mod_sqr(y, b, p, ctx)) goto end;
193 if (!BN_mod_mul(t, t, y, p, ctx)) goto end;
197 if (!BN_mod_mul(x, A, b, p, ctx)) goto end;
198 if (!BN_mod_mul(x, x, t, p, ctx)) goto end;
231 r = BN_kronecker(y, q, ctx); /* here 'q' is |p| */
258 if (!BN_mod_exp(y, y, q, p, ctx)) goto end;
289 if (!BN_nnmod(t, A, p, ctx)) goto end;
302 if (!BN_mod_exp(x, A, t, p, ctx)) goto end;
313 if (!BN_mod_sqr(b, x, p, ctx)) goto end;
314 if (!BN_mod_mul(b, b, A, p, ctx)) goto end;
317 if (!BN_mod_mul(x, x, A, p, ctx)) goto end;
340 if (!BN_mod_sqr(t, b, p, ctx)) goto end;
349 if (!BN_mod_mul(t, t, t, p, ctx)) goto end;
357 if (!BN_mod_sqr(t, t, p, ctx)) goto end;
359 if (!BN_mod_mul(y, t, t, p, ctx)) goto end;
360 if (!BN_mod_mul(x, x, t, p, ctx)) goto end;
361 if (!BN_mod_mul(b, b, y, p, ctx)) goto end;
371 if (!BN_mod_sqr(x, ret, p, ctx))
390 BN_CTX_end(ctx);