1999-12-13 07:02:03 +00:00
|
|
|
*** rsa.original.c Fri Mar 26 14:01:48 1994
|
|
|
|
--- rsa.c Fri Dec 10 12:56:34 1999
|
|
|
|
***************
|
|
|
|
*** 33,38 ****
|
|
|
|
--- 33,41 ----
|
|
|
|
unsigned char byte, pkcsBlock[MAX_RSA_MODULUS_LEN];
|
|
|
|
unsigned int i, modulusLen;
|
|
|
|
|
|
|
|
+ if (publicKey->bits > MAX_RSA_MODULUS_BITS)
|
|
|
|
+ return (RE_LEN);
|
1999-12-02 07:49:03 +00:00
|
|
|
+
|
1999-12-13 07:02:03 +00:00
|
|
|
modulusLen = (publicKey->bits + 7) / 8;
|
|
|
|
if (inputLen + 11 > modulusLen)
|
|
|
|
return (RE_LEN);
|
|
|
|
***************
|
|
|
|
*** 78,83 ****
|
|
|
|
--- 81,89 ----
|
|
|
|
unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN];
|
|
|
|
unsigned int i, modulusLen, pkcsBlockLen;
|
|
|
|
|
|
|
|
+ if (publicKey->bits > MAX_RSA_MODULUS_BITS)
|
|
|
|
+ return (RE_LEN);
|
1999-12-02 07:49:03 +00:00
|
|
|
+
|
1999-12-13 07:02:03 +00:00
|
|
|
modulusLen = (publicKey->bits + 7) / 8;
|
|
|
|
if (inputLen > modulusLen)
|
|
|
|
return (RE_LEN);
|
|
|
|
***************
|
|
|
|
*** 128,133 ****
|
|
|
|
--- 134,142 ----
|
|
|
|
int status;
|
|
|
|
unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN];
|
|
|
|
unsigned int i, modulusLen;
|
1999-12-02 07:49:03 +00:00
|
|
|
+
|
1999-12-13 07:02:03 +00:00
|
|
|
+ if (privateKey->bits > MAX_RSA_MODULUS_BITS)
|
|
|
|
+ return (RE_LEN);
|
|
|
|
|
|
|
|
modulusLen = (privateKey->bits + 7) / 8;
|
|
|
|
if (inputLen + 11 > modulusLen)
|
|
|
|
***************
|
|
|
|
*** 168,173 ****
|
|
|
|
--- 177,185 ----
|
|
|
|
unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN];
|
|
|
|
unsigned int i, modulusLen, pkcsBlockLen;
|
|
|
|
|
|
|
|
+ if (privateKey->bits > MAX_RSA_MODULUS_BITS)
|
|
|
|
+ return (RE_LEN);
|
1999-12-02 07:49:03 +00:00
|
|
|
+
|
1999-12-13 07:02:03 +00:00
|
|
|
modulusLen = (privateKey->bits + 7) / 8;
|
|
|
|
if (inputLen > modulusLen)
|
|
|
|
return (RE_LEN);
|