RC4: Update -m 97x0 and -m 104x0 to new RC4 crypto library code, improving performance by 20% or more

This commit is contained in:
Jens Steube
2021-05-30 15:40:33 +02:00
parent 58467e0869
commit 2a55fd7f33
17 changed files with 444 additions and 997 deletions
+4 -3
View File
@@ -10,8 +10,9 @@ DECLSPEC u8 GET_KEY8 (LOCAL_AS u32 *S, const int k);
DECLSPEC void SET_KEY8 (LOCAL_AS u32 *S, const int k, const u8 v);
DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const int k, const u32 v);
DECLSPEC void rc4_swap (LOCAL_AS u32 *S, const u8 i, const u8 j);
DECLSPEC void rc4_init_16 (LOCAL_AS u32 *S, const u32 *data);
DECLSPEC u8 rc4_next_16 (LOCAL_AS u32 *S, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out);
DECLSPEC void rc4_init_40 (LOCAL_AS u32 *S, const u32 *key);
DECLSPEC void rc4_init_128 (LOCAL_AS u32 *S, const u32 *key);
DECLSPEC void rc4_swap (LOCAL_AS u32 *S, const u8 i, const u8 j);
DECLSPEC u8 rc4_next_16 (LOCAL_AS u32 *S, const u8 i, const u8 j, const u32 *in, u32 *out);
#endif // _INC_CIPHER_RC4_H