From fed2ec931e04713a08e67152d40737e70e123a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Fri, 5 Jan 2007 21:04:22 +0000 Subject: [PATCH] Use mp_int_exptmod directly. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19738 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/des/rsa-imath.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/des/rsa-imath.c b/lib/des/rsa-imath.c index a3a65bb40..5375837fd 100644 --- a/lib/des/rsa-imath.c +++ b/lib/des/rsa-imath.c @@ -210,7 +210,8 @@ imath_rsa_public_encrypt(int flen, const unsigned char* from, mp_int_read_unsigned(&dec, p0, size - 1); free(p0); - res = rsa_rsaep(&dec, &e, &n, &enc); + res = mp_int_exptmod(&dec, &e, &n, &enc); + mp_int_clear(&dec); mp_int_clear(&e); mp_int_clear(&n); @@ -263,7 +264,8 @@ imath_rsa_public_decrypt(int flen, const unsigned char* from, return -4; } - res = rsa_rsavp(&s, &e, &n, &us); + res = mp_int_exptmod(&s, &e, &n, &us); + mp_int_clear(&s); mp_int_clear(&n); mp_int_clear(&e);