From 693d87cfbf35b425390c097144c14b77c1e3de73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sat, 6 Jan 2007 13:45:25 +0000 Subject: [PATCH] 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 --- lib/des/rsa-imath.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/des/rsa-imath.c b/lib/des/rsa-imath.c index 98c05be40..7a90bd425 100644 --- a/lib/des/rsa-imath.c +++ b/lib/des/rsa-imath.c @@ -49,8 +49,6 @@ RCSID("$Id$"); #include "imath/imath.h" #include "imath/iprime.h" -#define USE_CRT 0 - static void 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); } - 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; BN2mpz(&p, rsa->p); @@ -434,7 +432,7 @@ imath_rsa_private_decrypt(int flen, const unsigned char* from, 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; 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->d = mpz2BN(&d); rsa->dmp1 = mpz2BN(&dmp1); - rsa->dmq1 = mpz2BN(&dmp1); + rsa->dmq1 = mpz2BN(&dmq1); rsa->iqmp = mpz2BN(&iqmp); ret = 1;