1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 14:48:12 +00:00

Fix streebog512_g() in vector datatype mode

This commit is contained in:
Jens Steube 2020-02-20 16:42:12 +01:00
parent ee4168d8fc
commit 398e06878d
2 changed files with 19 additions and 7 deletions

View File

@ -682,7 +682,7 @@ DECLSPEC void streebog512_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a (
for (int i = 0; i < 8; i++)
{
k[i] = SBOG_LPSti64;
k[i] = SBOG_LPSti64_S;
}
#ifdef _unroll
@ -708,7 +708,7 @@ DECLSPEC void streebog512_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a (
#endif
for (int i = 0; i < 8; i++)
{
s[i] = SBOG_LPSti64;
s[i] = SBOG_LPSti64_S;
}
for (int i = 0; i < 8; i++)
@ -721,7 +721,7 @@ DECLSPEC void streebog512_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a (
#endif
for (int i = 0; i < 8; i++)
{
k[i] = SBOG_LPSti64;
k[i] = SBOG_LPSti64_S;
}
}

View File

@ -6,6 +6,8 @@
#ifndef _INC_HASH_STREEBOG512_H
#define _INC_HASH_STREEBOG512_H
#define BOX_S(S,n,i) ((S)[(n)][(i)])
#if VECT_SIZE == 1
#define BOX(S,n,i) ((S)[(n)][(i)])
@ -17,15 +19,25 @@
#elif VECT_SIZE == 8
#define BOX(S,n,i) make_u64x ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], \
(S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7])
(S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7])
#elif VECT_SIZE == 16
#define BOX(S,n,i) make_u64x ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], \
(S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], \
(S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], \
(S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf])
(S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], \
(S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], \
(S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf])
#endif
#define SBOG_LPSti64_S \
BOX_S (s_sbob_sl64, 0, ((t[0] >> (i * 8)) & 0xff)) ^ \
BOX_S (s_sbob_sl64, 1, ((t[1] >> (i * 8)) & 0xff)) ^ \
BOX_S (s_sbob_sl64, 2, ((t[2] >> (i * 8)) & 0xff)) ^ \
BOX_S (s_sbob_sl64, 3, ((t[3] >> (i * 8)) & 0xff)) ^ \
BOX_S (s_sbob_sl64, 4, ((t[4] >> (i * 8)) & 0xff)) ^ \
BOX_S (s_sbob_sl64, 5, ((t[5] >> (i * 8)) & 0xff)) ^ \
BOX_S (s_sbob_sl64, 6, ((t[6] >> (i * 8)) & 0xff)) ^ \
BOX_S (s_sbob_sl64, 7, ((t[7] >> (i * 8)) & 0xff))
#define SBOG_LPSti64 \
BOX (s_sbob_sl64, 0, ((t[0] >> (i * 8)) & 0xff)) ^ \
BOX (s_sbob_sl64, 1, ((t[1] >> (i * 8)) & 0xff)) ^ \