summaryrefslogtreecommitdiff
path: root/rsa.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2002-01-16 21:13:06 +0100
committerNiels Möller <nisse@lysator.liu.se>2002-01-16 21:13:06 +0100
commit55726355987146b1dc5747e28b51f30ee3d46e44 (patch)
treea90f99a65a96962e022cf823a2f3697f5b54111e /rsa.c
parent99fb36a2c4547612c6c4b69e7fa2782411ac148a (diff)
downloadnettle-55726355987146b1dc5747e28b51f30ee3d46e44.tar.gz
*** empty log message ***
Rev: src/nettle/ChangeLog:1.57 Rev: src/nettle/rsa.c:1.7
Diffstat (limited to 'rsa.c')
-rw-r--r--rsa.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/rsa.c b/rsa.c
index 6dc83033..d64cb061 100644
--- a/rsa.c
+++ b/rsa.c
@@ -64,13 +64,7 @@ rsa_check_size(mpz_t n)
/* Round upwards */
unsigned size = (mpz_sizeinbase(n, 2) + 7) / 8;
- /* For PKCS#1 to make sense, the size of the modulo, in octets, must
- * be at least 11 + the length of the DER-encoded Digest Info.
- *
- * And a DigestInfo is 34 octets for md5, and 35 octets for sha1.
- * 46 octets is 368 bits. */
-
- if (size < 46)
+ if (size < RSA_MINIMUM_N_OCTETS)
return 0;
return size;