Lines Matching defs:ctx
86 BN_CTX *ctx = NULL;
88 ctx = BN_CTX_new();
89 if (ctx == NULL)
91 BN_CTX_start(ctx);
92 if ((r0 = BN_CTX_get(ctx)) == NULL)
94 if ((r1 = BN_CTX_get(ctx)) == NULL)
96 if ((r2 = BN_CTX_get(ctx)) == NULL)
98 if ((r3 = BN_CTX_get(ctx)) == NULL)
131 if (!BN_gcd_ct(r1, r2, rsa->e, ctx))
160 if (!BN_gcd_ct(r1, r2, rsa->e, ctx))
176 if (!BN_mul(rsa->n, rsa->p, rsa->q, ctx))
184 if (!BN_mul(r0, r1, r2, ctx)) /* (p-1)(q-1) */
190 if (BN_mod_inverse_ct(rsa->d, rsa->e, &pr0, ctx) == NULL) /* d */
198 if (!BN_mod_ct(rsa->dmp1, &d, r1, ctx))
202 if (!BN_mod_ct(rsa->dmq1, &d, r2, ctx))
208 if (BN_mod_inverse_ct(rsa->iqmp, rsa->q, &p, ctx) == NULL)
217 if (ctx != NULL) {
218 BN_CTX_end(ctx);
219 BN_CTX_free(ctx);