Home | History | Annotate | Download | only in rsa

Lines Matching refs:ctx

93 	BN_CTX *ctx=NULL;
95 ctx=BN_CTX_new();
96 if (ctx == NULL) goto err;
97 BN_CTX_start(ctx);
98 r0 = BN_CTX_get(ctx);
99 r1 = BN_CTX_get(ctx);
100 r2 = BN_CTX_get(ctx);
101 r3 = BN_CTX_get(ctx);
125 if (!BN_gcd(r1,r2,rsa->e,ctx)) goto err;
150 if (!BN_gcd(r1,r2,rsa->e,ctx)) goto err;
166 if (!BN_mul(rsa->n,rsa->p,rsa->q,ctx)) goto err;
171 if (!BN_mul(r0,r1,r2,ctx)) goto err; /* (p-1)(q-1) */
179 if (!BN_mod_inverse(rsa->d,rsa->e,pr0,ctx)) goto err; /* d */
191 if (!BN_mod(rsa->dmp1,d,r1,ctx)) goto err;
194 if (!BN_mod(rsa->dmq1,d,r2,ctx)) goto err;
204 if (!BN_mod_inverse(rsa->iqmp,rsa->q,p,ctx)) goto err;
213 if (ctx != NULL)
215 BN_CTX_end(ctx);
216 BN_CTX_free(ctx);