From 364e63f12a90c96dd5026cfeaf0ea4218c71a91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Fri, 15 Sep 2006 14:09:28 +0000 Subject: [PATCH] Add commeted out test that exponent is > 3 git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18092 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/des/rsa-imath.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/des/rsa-imath.c b/lib/des/rsa-imath.c index 24243bfb2..ecf104036 100644 --- a/lib/des/rsa-imath.c +++ b/lib/des/rsa-imath.c @@ -151,6 +151,15 @@ imath_rsa_public_decrypt(int flen, const unsigned char* from, BN2mpz(&n, rsa->n); BN2mpz(&e, rsa->e); +#if 0 + /* Check that the exponent is larger then 3 */ + if (mp_int_compare_value(&e, 3) <= 0) { + mp_int_clear(&n); + mp_int_clear(&e); + return -1; + } +#endif + mp_int_init(&s); mp_int_init(&us); mp_int_read_unsigned(&s, rk_UNCONST(from), flen);