Latest update

This commit is contained in:
2019-07-13 19:13:22 +09:00
parent 9a23f88dc2
commit 2e57f602ae
542 changed files with 17287 additions and 6184 deletions
+14 -1
View File
@@ -1,6 +1,19 @@
LIBS=../../libcrypto
$RC5ASM=rc5_enc.c
IF[{- !$disabled{asm} -}]
$RC5ASM_x86=rc5-586.s
# Now that we have defined all the arch specific variables, use the
# appropriate one, and define the appropriate macros
IF[$RC5ASM_{- $target{asm_arch} -}]
$RC5ASM=$RC5ASM_{- $target{asm_arch} -}
$RC5DEF=RC5_ASM
ENDIF
ENDIF
SOURCE[../../libcrypto]=\
rc5_skey.c rc5_ecb.c {- $target{rc5_asm_src} -} rc5cfb64.c rc5ofb64.c
rc5_skey.c rc5_ecb.c $RC5ASM rc5cfb64.c rc5ofb64.c
GENERATE[rc5-586.s]=asm/rc5-586.pl \
$(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS)
+7 -2
View File
@@ -10,12 +10,15 @@
#include <openssl/rc5.h>
#include "rc5_locl.h"
void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
int rounds)
int RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
int rounds)
{
RC5_32_INT L[64], l, ll, A, B, *S, k;
int i, j, m, c, t, ii, jj;
if (len > 255)
return 0;
if ((rounds != RC5_16_ROUNDS) &&
(rounds != RC5_12_ROUNDS) && (rounds != RC5_8_ROUNDS))
rounds = RC5_16_ROUNDS;
@@ -58,4 +61,6 @@ void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
if (++jj >= c)
jj = 0;
}
return 1;
}