Lines Matching defs:rsa
104 static int e_gmp_rsa_mod_exp(BIGNUM *r, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
292 static E_GMP_RSA_CTX *e_gmp_get_rsa(RSA *rsa)
294 E_GMP_RSA_CTX *hptr = RSA_get_ex_data(rsa, hndidx_rsa);
312 if(!bn2gmp(rsa->n, hptr->n) || !bn2gmp(rsa->e, hptr->e))
314 if(!rsa->p || !rsa->q || !rsa->d || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp)
319 if(!bn2gmp(rsa->d, hptr->d) || !bn2gmp(rsa->p, hptr->p) ||
320 !bn2gmp(rsa->q, hptr->q) || !bn2gmp(rsa->dmp1, hptr->dmp1) ||
321 !bn2gmp(rsa->dmq1, hptr->dmq1) || !bn2gmp(rsa->iqmp, hptr->iqmp))
324 RSA_set_ex_data(rsa, hndidx_rsa, hptr);
343 static int e_gmp_rsa_finish(RSA *rsa)
345 E_GMP_RSA_CTX *hptr = RSA_get_ex_data(rsa, hndidx_rsa);
360 RSA_set_ex_data(rsa, hndidx_rsa, NULL);
364 static int e_gmp_rsa_mod_exp(BIGNUM *r, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
369 hptr = e_gmp_get_rsa(rsa);
387 /* This is basically the CRT logic in crypto/rsa/rsa_eay.c reworded into