1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-26 01:50:10 +00:00

Update inc_cipher_cast.h to make use of hashcat multi-platform compatible rotl32_S() instead of rotate()

This commit is contained in:
jsteube 2023-07-23 06:37:00 +00:00
parent 7aca373752
commit f924ee801b

View File

@ -586,15 +586,15 @@ CONSTANT_AS uint S[8][256] = {
/* CAST uses three different round functions */ /* CAST uses three different round functions */
#define _CAST_f1(l, r, km, kr) \ #define _CAST_f1(l, r, km, kr) \
t = rotate(km + r, kr); \ t = rotl32_S(km + r, kr); \
l ^= ((s_S[0][U8a(t)] ^ s_S[1][U8b(t)]) - \ l ^= ((s_S[0][U8a(t)] ^ s_S[1][U8b(t)]) - \
s_S[2][U8c(t)]) + s_S[3][U8d(t)]; s_S[2][U8c(t)]) + s_S[3][U8d(t)];
#define _CAST_f2(l, r, km, kr) \ #define _CAST_f2(l, r, km, kr) \
t = rotate(km ^ r, kr); \ t = rotl32_S(km ^ r, kr); \
l ^= ((s_S[0][U8a(t)] - s_S[1][U8b(t)]) + \ l ^= ((s_S[0][U8a(t)] - s_S[1][U8b(t)]) + \
s_S[2][U8c(t)]) ^ s_S[3][U8d(t)]; s_S[2][U8c(t)]) ^ s_S[3][U8d(t)];
#define _CAST_f3(l, r, km, kr) \ #define _CAST_f3(l, r, km, kr) \
t = rotate(km - r, kr); \ t = rotl32_S(km - r, kr); \
l ^= ((s_S[0][U8a(t)] + s_S[1][U8b(t)]) ^ \ l ^= ((s_S[0][U8a(t)] + s_S[1][U8b(t)]) ^ \
s_S[2][U8c(t)]) - s_S[3][U8d(t)]; s_S[2][U8c(t)]) - s_S[3][U8d(t)];