remove {MIN,MAX}_RSA_SIZE
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user