Fix a silly typo, and with that enable CRT since now it works.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19750 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -49,8 +49,6 @@ RCSID("$Id$");
|
|||||||
#include "imath/imath.h"
|
#include "imath/imath.h"
|
||||||
#include "imath/iprime.h"
|
#include "imath/iprime.h"
|
||||||
|
|
||||||
#define USE_CRT 0
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
BN2mpz(mpz_t *s, const BIGNUM *bn)
|
BN2mpz(mpz_t *s, const BIGNUM *bn)
|
||||||
{
|
{
|
||||||
@@ -343,7 +341,7 @@ imath_rsa_private_encrypt(int flen, const unsigned char* from,
|
|||||||
blind(&in, &b, &e, &n);
|
blind(&in, &b, &e, &n);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (USE_CRT && rsa->p && rsa->q && rsa->dmp1 && rsa->dmq1 && rsa->iqmp) {
|
if (rsa->p && rsa->q && rsa->dmp1 && rsa->dmq1 && rsa->iqmp) {
|
||||||
mpz_t p, q, dmp1, dmq1, iqmp;
|
mpz_t p, q, dmp1, dmq1, iqmp;
|
||||||
|
|
||||||
BN2mpz(&p, rsa->p);
|
BN2mpz(&p, rsa->p);
|
||||||
@@ -434,7 +432,7 @@ imath_rsa_private_decrypt(int flen, const unsigned char* from,
|
|||||||
blind(&in, &b, &e, &n);
|
blind(&in, &b, &e, &n);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (USE_CRT && rsa->p && rsa->q && rsa->dmp1 && rsa->dmq1 && rsa->iqmp) {
|
if (rsa->p && rsa->q && rsa->dmp1 && rsa->dmq1 && rsa->iqmp) {
|
||||||
mpz_t p, q, dmp1, dmq1, iqmp;
|
mpz_t p, q, dmp1, dmq1, iqmp;
|
||||||
|
|
||||||
BN2mpz(&p, rsa->p);
|
BN2mpz(&p, rsa->p);
|
||||||
@@ -607,7 +605,7 @@ imath_rsa_generate_key(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb)
|
|||||||
rsa->n = mpz2BN(&n);
|
rsa->n = mpz2BN(&n);
|
||||||
rsa->d = mpz2BN(&d);
|
rsa->d = mpz2BN(&d);
|
||||||
rsa->dmp1 = mpz2BN(&dmp1);
|
rsa->dmp1 = mpz2BN(&dmp1);
|
||||||
rsa->dmq1 = mpz2BN(&dmp1);
|
rsa->dmq1 = mpz2BN(&dmq1);
|
||||||
rsa->iqmp = mpz2BN(&iqmp);
|
rsa->iqmp = mpz2BN(&iqmp);
|
||||||
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
Reference in New Issue
Block a user