remove {MIN,MAX}_RSA_SIZE

This commit is contained in:
Steffen Jaeckel
2017-09-30 13:29:11 +02:00
parent 40e4a66693
commit 30b3a9a986
6 changed files with 3 additions and 23 deletions
-13
View File
@@ -425,19 +425,6 @@
#define LTC_ECC_TIMING_RESISTANT
#endif
/* define these PK sizes out of LTC_NO_PK
* to have them always defined
*/
#if defined(LTC_MRSA)
/* Min and Max RSA key sizes (in bits) */
#ifndef MIN_RSA_SIZE
#define MIN_RSA_SIZE 1024
#endif
#ifndef MAX_RSA_SIZE
#define MAX_RSA_SIZE 4096
#endif
#endif
/* PKCS #1 (RSA) and #5 (Password Handling) stuff */
#ifndef LTC_NO_PKCS
-2
View File
@@ -77,8 +77,6 @@ static const crypt_constant _crypt_constants[] = {
#ifdef LTC_MRSA
{"LTC_MRSA", 1},
_C_STRINGIFY(MIN_RSA_SIZE),
_C_STRINGIFY(MAX_RSA_SIZE),
#else
{"LTC_MRSA", 0},
#endif
-4
View File
@@ -32,10 +32,6 @@ int rsa_make_key(prng_state *prng, int wprng, int size, long e, rsa_key *key)
LTC_ARGCHK(ltc_mp.name != NULL);
LTC_ARGCHK(key != NULL);
if ((size < (MIN_RSA_SIZE/8)) || (size > (MAX_RSA_SIZE/8))) {
return CRYPT_INVALID_KEYSIZE;
}
if ((e < 3) || ((e & 1) == 0)) {
return CRYPT_INVALID_ARG;
}