diff --git a/crypt.tex b/crypt.tex index 7e854a7..041baac 100644 --- a/crypt.tex +++ b/crypt.tex @@ -609,7 +609,7 @@ As of this release the current cipher\_descriptors elements are the following: \hline \textbf{Name} & \textbf{Descriptor Name} & \textbf{Block Size} & \textbf{Key Range} & \textbf{Rounds} \\ \hline Blowfish & blowfish\_desc & 8 & 8 $\ldots$ 56 & 16 \\ \hline X-Tea & xtea\_desc & 8 & 16 & 32 \\ - \hline RC2 & rc2\_desc & 8 & 8 $\ldots$ 128 & 16 \\ + \hline RC2 & rc2\_desc & 8 & 5 $\ldots$ 128 & 16 \\ \hline RC5-32/12/b & rc5\_desc & 8 & 8 $\ldots$ 128 & 12 $\ldots$ 24 \\ \hline RC6-32/20/b & rc6\_desc & 16 & 8 $\ldots$ 128 & 20 \\ \hline SAFER+ & saferp\_desc &16 & 16, 24, 32 & 8, 12, 16 \\ diff --git a/src/ciphers/rc2.c b/src/ciphers/rc2.c index a778535..2520b83 100644 --- a/src/ciphers/rc2.c +++ b/src/ciphers/rc2.c @@ -77,7 +77,7 @@ int rc2_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_ke LTC_ARGCHK(key != NULL); LTC_ARGCHK(skey != NULL); - if (keylen < 8 || keylen > 128) { + if (keylen < 5 || keylen > 128) { return CRYPT_INVALID_KEYSIZE; } @@ -345,7 +345,7 @@ void rc2_done(symmetric_key *skey) int rc2_keysize(int *keysize) { LTC_ARGCHK(keysize != NULL); - if (*keysize < 8) { + if (*keysize < 5) { return CRYPT_INVALID_KEYSIZE; } else if (*keysize > 128) { *keysize = 128;