diff --git a/.appveyor.yml b/.appveyor.yml index 31a726934..d2cac8213 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,14 +12,16 @@ environment: CYG_SETUP: setup-x86.exe BASH: C:\cygwin\bin\bash CC: gcc - - MSYSTEM: MINGW64 - MSYS_CACHE: C:\msys64\var\cache\pacman\pkg - BASH: C:\msys64\usr\bin\bash - CC: gcc - - MSYSTEM: MINGW32 - MSYS_CACHE: C:\msys64\var\cache\pacman\pkg - BASH: C:\msys64\usr\bin\bash - CC: gcc + # Disable MINGW test. It seems AppVeyor is no longer supporting MSYS2. Not a hashcat problem. + # See BUILD_MSYS2.md for local test + #- MSYSTEM: MINGW64 + # MSYS_CACHE: C:\msys64\var\cache\pacman\pkg + # BASH: C:\msys64\usr\bin\bash + # CC: gcc + #- MSYSTEM: MINGW32 + # MSYS_CACHE: C:\msys64\var\cache\pacman\pkg + # BASH: C:\msys64\usr\bin\bash + # CC: gcc # if we have too many commits at the same time, we might need to download more than just the last commit for appveyor to succeed # otherwise we get the error: "fatal: reference is not a tree " @@ -33,14 +35,15 @@ install: - ps: if (Test-Path Env:\CYG_ROOT) { Start-FileDownload "https://cygwin.com/$env:CYG_SETUP" -FileName "$env:CYG_SETUP" } - if defined CYG_ROOT (%CYG_SETUP% --quiet-mode --no-shortcuts --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages "%CYG_PACKAGES%" --upgrade-also) # (temporary?) problem with msys/pacman/objc/ada (see https://github.com/msys2/msys2/wiki/FAQ) - - if defined MSYSTEM (%BASH% -lc "pacman -Rns --noconfirm mingw-w64-{i686,x86_64}-gcc-ada mingw-w64-{i686,x86_64}-gcc-objc") + #- if defined MSYSTEM (%BASH% -lc "pacman -Rns --noconfirm mingw-w64-{i686,x86_64}-gcc-ada mingw-w64-{i686,x86_64}-gcc-objc") # temporary fix for MSYS revoked/new signing keys: - - if defined MSYSTEM (%BASH% -lc "curl https://pastebin.com/raw/e0y4Ky9U | bash") - - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") + #- if defined MSYSTEM (%BASH% -lc "curl https://pastebin.com/raw/e0y4Ky9U | bash") + #- if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") # the following line is not a duplicate line: # it is necessary to upgrade the MSYS base files and after that all the packages # the 2 separate commands/lines are required because a new shell is necessary for each step - - if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") + #- if defined MSYSTEM (%BASH% -lc "pacman -Suuy --noconfirm") + #- if defined MSYSTEM (%BASH% -lc "pacman -S --needed --noconfirm git make gcc libiconv-devel") build_script: - if defined BASH (%BASH% -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && make") diff --git a/BUILD_WSL.md b/BUILD_WSL.md index 814eaa326..115c3772b 100644 --- a/BUILD_WSL.md +++ b/BUILD_WSL.md @@ -2,13 +2,17 @@ Tested on Windows 10 x64, should also work to build hashcat for Windows on Linux. +I had it tested with WSL2 using Ubuntu_2004.2020.424.0_x64.appx. + +Make sure to have the system upgraded after install (otherwise it will fail to find the gcc-mingw-w64-x86-64 package). + ### Installation ### Enable WSL. Press the win + r key on your keyboard simultaneously and in the "Run" popup window type bash and make sure to install additional dependencies necessary for hashcat compilation ``` -sudo apt install gcc-mingw-w64-x86-64 make git +sudo apt install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 make git git clone https://github.com/hashcat/hashcat git clone https://github.com/win-iconv/win-iconv cd win-iconv/ @@ -33,4 +37,4 @@ cd "C:\Users\user\hashcat" and start hashcat by typing ``` hashcat.exe -``` \ No newline at end of file +``` diff --git a/OpenCL/inc_cipher_aes-gcm.cl b/OpenCL/inc_cipher_aes-gcm.cl new file mode 100644 index 000000000..5ea054fb3 --- /dev/null +++ b/OpenCL/inc_cipher_aes-gcm.cl @@ -0,0 +1,306 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.h" +#include "inc_common.h" +#include "inc_cipher_aes.h" +#include "inc_cipher_aes-gcm.h" + +DECLSPEC void AES_GCM_inc32 (u32 *block) +{ + block[3] += 1; +} + +DECLSPEC void AES_GCM_xor_block (u32 *dst, const u32 *src) +{ + dst[0] ^= src[0]; + dst[1] ^= src[1]; + dst[2] ^= src[2]; + dst[3] ^= src[3]; +} + +DECLSPEC void AES_GCM_gf_mult (const u32 *x, const u32 *y, u32 *z) +{ + z[0] = 0; + z[1] = 0; + z[2] = 0; + z[3] = 0; + + u32 t[4]; + + t[0] = y[0]; + t[1] = y[1]; + t[2] = y[2]; + t[3] = y[3]; + + for (int i = 0; i < 4; i++) + { + const u32 tv = x[i]; + + for (int j = 0; j < 32; j++) + { + if ((tv >> (31 - j)) & 1) + { + z[0] ^= t[0]; + z[1] ^= t[1]; + z[2] ^= t[2]; + z[3] ^= t[3]; + } + + const int m = t[3] & 1; // save lost bit + + t[3] = (t[2] << 31) | (t[3] >> 1); + t[2] = (t[1] << 31) | (t[2] >> 1); + t[1] = (t[0] << 31) | (t[1] >> 1); + t[0] = 0 | (t[0] >> 1); + + t[0] ^= m * 0xe1000000; + } + } +} + +DECLSPEC void AES_GCM_ghash (const u32 *subkey, const u32 *in, int in_len, u32 *out) +{ + int i; + int j; + + for (i = 0, j = 0; i < in_len - 15; i += 16, j += 4) + { + u32 t2[4]; + + t2[0] = in[j + 0]; + t2[1] = in[j + 1]; + t2[2] = in[j + 2]; + t2[3] = in[j + 3]; + + AES_GCM_xor_block (out, t2); + + u32 tmp[4]; + + AES_GCM_gf_mult (out, subkey, tmp); + + out[0] = tmp[0]; + out[1] = tmp[1]; + out[2] = tmp[2]; + out[3] = tmp[3]; + } + + const int left = in_len - i; + + if (left > 0) + { + u32 t2[4]; + + t2[0] = (left > 0) ? in[j + 0] : 0; + t2[1] = (left > 4) ? in[j + 1] : 0; + t2[2] = (left > 8) ? in[j + 2] : 0; + t2[3] = (left > 12) ? in[j + 3] : 0; + + AES_GCM_xor_block (out, t2); + + u32 tmp[4]; + + AES_GCM_gf_mult (out, subkey, tmp); + + out[0] = tmp[0]; + out[1] = tmp[1]; + out[2] = tmp[2]; + out[3] = tmp[3]; + } +} + +DECLSPEC void AES_GCM_ghash_global (const u32 *subkey, GLOBAL_AS const u32 *in, int in_len, u32 *out) +{ + int i; + int j; + + for (i = 0, j = 0; i < in_len - 15; i += 16, j += 4) + { + u32 t2[4]; + + t2[0] = in[j + 0]; + t2[1] = in[j + 1]; + t2[2] = in[j + 2]; + t2[3] = in[j + 3]; + + AES_GCM_xor_block (out, t2); + + u32 tmp[4]; + + AES_GCM_gf_mult (out, subkey, tmp); + + out[0] = tmp[0]; + out[1] = tmp[1]; + out[2] = tmp[2]; + out[3] = tmp[3]; + } + + const int left = in_len - i; + + if (left > 0) + { + u32 t2[4]; + + t2[0] = (left > 0) ? in[j + 0] : 0; + t2[1] = (left > 4) ? in[j + 1] : 0; + t2[2] = (left > 8) ? in[j + 2] : 0; + t2[3] = (left > 12) ? in[j + 3] : 0; + + AES_GCM_xor_block (out, t2); + + u32 tmp[4]; + + AES_GCM_gf_mult (out, subkey, tmp); + + out[0] = tmp[0]; + out[1] = tmp[1]; + out[2] = tmp[2]; + out[3] = tmp[3]; + } +} + +DECLSPEC void AES_GCM_Init (const u32 *ukey, int key_len, u32 *key, u32 *subkey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +{ + if (key_len == 128) + { + AES128_set_encrypt_key (key, ukey, s_te0, s_te1, s_te2, s_te3); + + AES192_encrypt (key, subkey, subkey, s_te0, s_te1, s_te2, s_te3, s_te4); + } + else if (key_len == 192) + { + AES192_set_encrypt_key (key, ukey, s_te0, s_te1, s_te2, s_te3); + + AES192_encrypt (key, subkey, subkey, s_te0, s_te1, s_te2, s_te3, s_te4); + } + else if (key_len == 256) + { + AES256_set_encrypt_key (key, ukey, s_te0, s_te1, s_te2, s_te3); + + AES256_encrypt (key, subkey, subkey, s_te0, s_te1, s_te2, s_te3, s_te4); + } +} + +DECLSPEC void AES_GCM_Prepare_J0 (const u32 *iv, int iv_len, const u32 *subkey, u32 *J0) +{ + if (iv_len == 12) + { + J0[0] = iv[0]; + J0[1] = iv[1]; + J0[2] = iv[2]; + J0[3] = 0x00000001; + } + else + { + AES_GCM_gf_mult (iv, subkey, J0); + + u32 len_buf[4] = { 0 }; + + len_buf[3] = iv_len * 8; + + AES_GCM_xor_block (len_buf, J0); + + AES_GCM_gf_mult (len_buf, subkey, J0); + } +} + +DECLSPEC void AES_GCM_gctr (const u32 *key, const u32 *iv, const u32 *in, int in_len, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +{ + const u32 *xpos = in; + + u32 *ypos = out; + + u32 iv_buf[4]; + + iv_buf[0] = iv[0]; + iv_buf[1] = iv[1]; + iv_buf[2] = iv[2]; + iv_buf[3] = iv[3]; + + const int n = in_len / 16; + + for (u32 i = 0; i < n; i++) + { + AES256_encrypt (key, iv_buf, ypos, s_te0, s_te1, s_te2, s_te3, s_te4); + + AES_GCM_xor_block (ypos, xpos); + + xpos += 4; + ypos += 4; + + AES_GCM_inc32 (iv_buf); + } + + // this is not byte accurate but 4-byte accurate. needs fix? + + int last = in + (in_len/4) - xpos; + + if (last) + { + u32 tmp[4] = { 0 }; + + AES256_encrypt (key, iv_buf, tmp, s_te0, s_te1, s_te2, s_te3, s_te4); + + if (last >= 1) *ypos++ = *xpos++ ^ tmp[0]; + if (last >= 2) *ypos++ = *xpos++ ^ tmp[1]; + if (last >= 3) *ypos++ = *xpos++ ^ tmp[2]; + } +} + +DECLSPEC void AES_GCM_GCTR (u32 *key, u32 *J0, const u32 *in, int in_len, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +{ + u32 J0_incr[4]; + + J0_incr[0] = J0[0]; + J0_incr[1] = J0[1]; + J0_incr[2] = J0[2]; + J0_incr[3] = J0[3]; + + AES_GCM_gctr (key, J0_incr, in, in_len, out, s_te0, s_te1, s_te2, s_te3, s_te4); +} + +DECLSPEC void AES_GCM_GHASH (const u32 *subkey, const u32 *aad_buf, int aad_len, const u32 *enc_buf, int enc_len, u32 *out) +{ + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 0; + + AES_GCM_ghash (subkey, aad_buf, aad_len, out); + + AES_GCM_ghash (subkey, enc_buf, enc_len, out); + + u32 len_buf[4]; + + len_buf[0] = aad_len * 8; + len_buf[1] = 0; + len_buf[2] = 0; + len_buf[3] = enc_len * 8; + + AES_GCM_ghash (subkey, len_buf, 16, out); +} + +DECLSPEC void AES_GCM_GHASH_GLOBAL (const u32 *subkey, const u32 *aad_buf, int aad_len, GLOBAL_AS const u32 *enc_buf, int enc_len, u32 *out) +{ + out[0] = 0; + out[1] = 0; + out[2] = 0; + out[3] = 0; + + AES_GCM_ghash (subkey, aad_buf, aad_len, out); + + AES_GCM_ghash_global (subkey, enc_buf, enc_len, out); + + u32 len_buf[4]; + + len_buf[0] = aad_len * 8; + len_buf[1] = 0; + len_buf[2] = 0; + len_buf[3] = enc_len * 8; + + AES_GCM_ghash (subkey, len_buf, 16, out); +} diff --git a/OpenCL/inc_cipher_aes-gcm.h b/OpenCL/inc_cipher_aes-gcm.h new file mode 100644 index 000000000..753a4d0c7 --- /dev/null +++ b/OpenCL/inc_cipher_aes-gcm.h @@ -0,0 +1,21 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#ifndef _INC_CIPHER_AES_GCM_H +#define _INC_CIPHER_AES_GCM_H + +DECLSPEC void AES_GCM_inc32 (u32 *block); +DECLSPEC void AES_GCM_xor_block (u32 *dst, const u32 *src); +DECLSPEC void AES_GCM_gf_mult (const u32 *x, const u32 *y, u32 *z); +DECLSPEC void AES_GCM_ghash (const u32 *subkey, const u32 *in, int in_len, u32 *out); +DECLSPEC void AES_GCM_ghash_global (const u32 *subkey, GLOBAL_AS const u32 *in, int in_len, u32 *out); +DECLSPEC void AES_GCM_Init (const u32 *ukey, int key_len, u32 *key, u32 *subkey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void AES_GCM_Prepare_J0 (const u32 *iv, int iv_len, const u32 *subkey, u32 *J0); +DECLSPEC void AES_GCM_gctr (const u32 *key, const u32 *iv, const u32 *in, int in_len, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void AES_GCM_GCTR (u32 *key, u32 *J0, const u32 *in, int in_len, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void AES_GCM_GHASH (const u32 *subkey, const u32 *aad_buf, int aad_len, const u32 *enc_buf, int enc_len, u32 *out); +DECLSPEC void AES_GCM_GHASH_GLOBAL (const u32 *subkey, const u32 *aad_buf, int aad_len, GLOBAL_AS const u32 *enc_buf, int enc_len, u32 *out); + +#endif // _INC_CIPHER_AES_GCM_H diff --git a/OpenCL/inc_common.cl b/OpenCL/inc_common.cl index 8024d3fc9..f8fc15724 100644 --- a/OpenCL/inc_common.cl +++ b/OpenCL/inc_common.cl @@ -1981,6 +1981,268 @@ DECLSPEC int find_hash (const u32 *digest, const u32 digests_cnt, GLOBAL_AS cons } #endif +// Constants and some code snippets from unicode.org's ConvertUTF.c +// Compiler can perfectly translate some of the branches and switch cases this into MOVC +// which is faster than lookup tables + +#define halfShift 10 + +#define halfBase 0x0010000 +#define halfMask 0x3FF + +#define UNI_MAX_BMP 0xFFFF +#define UNI_SUR_HIGH_START 0xD800 +#define UNI_SUR_HIGH_END 0xDBFF +#define UNI_SUR_LOW_START 0xDC00 +#define UNI_SUR_LOW_END 0xDFFF + +/* + * Magic values subtracted from a buffer value during UTF8 conversion. + * This table contains as many values as there might be trailing bytes + * in a UTF-8 sequence. + */ + +#define offsetsFromUTF8_0 0x00000000UL +#define offsetsFromUTF8_1 0x00003080UL +#define offsetsFromUTF8_2 0x000E2080UL +#define offsetsFromUTF8_3 0x03C82080UL +#define offsetsFromUTF8_4 0xFA082080UL +#define offsetsFromUTF8_5 0x82082080UL + +DECLSPEC int utf8_to_utf16le (const u32 *src_buf, int src_len, int src_size, u32 *dst_buf, int dst_size) +{ + const u8 *src_ptr = (const u8 *) src_buf; + u16 *dst_ptr = ( u16 *) dst_buf; + + int src_pos = 0; + int dst_pos = 0; + int dst_len = 0; + + while (src_pos < src_len) + { + const u8 c = src_ptr[src_pos]; + + int extraBytesToRead = 0; + + if (c >= 0xfc) + { + extraBytesToRead = 5; + } + else if (c >= 0xf8) + { + extraBytesToRead = 4; + } + else if (c >= 0xf0) + { + extraBytesToRead = 3; + } + else if (c >= 0xe0) + { + extraBytesToRead = 2; + } + else if (c >= 0xc0) + { + extraBytesToRead = 1; + } + + if ((src_pos + extraBytesToRead) >= src_size) return dst_len; + + u32 ch = 0; + + switch (extraBytesToRead) + { + case 5: + ch += src_ptr[src_pos++]; ch <<= 6; /* remember, illegal UTF-8 */ + ch += src_ptr[src_pos++]; ch <<= 6; /* remember, illegal UTF-8 */ + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_5; + break; + case 4: + ch += src_ptr[src_pos++]; ch <<= 6; /* remember, illegal UTF-8 */ + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_4; + break; + case 3: + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_3; + break; + case 2: + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_2; + break; + case 1: + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_1; + break; + case 0: + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_0; + break; + } + + /* Target is a character <= 0xFFFF */ + if (ch <= UNI_MAX_BMP) + { + if ((dst_len + 2) >= dst_size) return dst_len; + + dst_ptr[dst_pos++] = (u16) ch; + + dst_len += 2; + } + else + { + if ((dst_len + 4) >= dst_size) return dst_len; + + ch -= halfBase; + + dst_ptr[dst_pos++] = (u16) ((ch >> halfShift) + UNI_SUR_HIGH_START); + dst_ptr[dst_pos++] = (u16) ((ch & halfMask) + UNI_SUR_LOW_START); + + dst_len += 4; + } + } + + return dst_len; +} + +DECLSPEC int utf8_to_utf16le_global (GLOBAL_AS const u32 *src_buf, int src_len, int src_size, u32 *dst_buf, int dst_size) +{ + GLOBAL_AS const u8 *src_ptr = (GLOBAL_AS const u8 *) src_buf; + u16 *dst_ptr = ( u16 *) dst_buf; + + int src_pos = 0; + int dst_pos = 0; + int dst_len = 0; + + while (src_pos < src_len) + { + const u8 c = src_ptr[src_pos]; + + int extraBytesToRead = 0; + + if (c >= 0xfc) + { + extraBytesToRead = 5; + } + else if (c >= 0xf8) + { + extraBytesToRead = 4; + } + else if (c >= 0xf0) + { + extraBytesToRead = 3; + } + else if (c >= 0xe0) + { + extraBytesToRead = 2; + } + else if (c >= 0xc0) + { + extraBytesToRead = 1; + } + + if ((src_pos + extraBytesToRead) >= src_size) return dst_len; + + u32 ch = 0; + + switch (extraBytesToRead) + { + case 5: + ch += src_ptr[src_pos++]; ch <<= 6; /* remember, illegal UTF-8 */ + ch += src_ptr[src_pos++]; ch <<= 6; /* remember, illegal UTF-8 */ + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_5; + break; + case 4: + ch += src_ptr[src_pos++]; ch <<= 6; /* remember, illegal UTF-8 */ + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_4; + break; + case 3: + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_3; + break; + case 2: + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_2; + break; + case 1: + ch += src_ptr[src_pos++]; ch <<= 6; + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_1; + break; + case 0: + ch += src_ptr[src_pos++]; + ch -= offsetsFromUTF8_0; + break; + } + + /* Target is a character <= 0xFFFF */ + if (ch <= UNI_MAX_BMP) + { + if ((dst_len + 2) >= dst_size) return dst_len; + + dst_ptr[dst_pos++] = (u16) ch; + + dst_len += 2; + } + else + { + if ((dst_len + 4) >= dst_size) return dst_len; + + ch -= halfBase; + + dst_ptr[dst_pos++] = (u16) ((ch >> halfShift) + UNI_SUR_HIGH_START); + dst_ptr[dst_pos++] = (u16) ((ch & halfMask) + UNI_SUR_LOW_START); + + dst_len += 4; + } + } + + return dst_len; +} + +#undef halfShift + +#undef halfBase +#undef halfMask + +#undef UNI_MAX_BMP +#undef UNI_SUR_HIGH_START +#undef UNI_SUR_HIGH_END +#undef UNI_SUR_LOW_START +#undef UNI_SUR_LOW_END + +#undef offsetsFromUTF8_0 +#undef offsetsFromUTF8_1 +#undef offsetsFromUTF8_2 +#undef offsetsFromUTF8_3 +#undef offsetsFromUTF8_4 +#undef offsetsFromUTF8_5 + DECLSPEC int pkcs_padding_bs8 (const u32 *data_buf, const int data_len) { if (data_len == 0) return -1; // cannot have zero length, is important to avoid out of boundary reads @@ -2148,6 +2410,9 @@ DECLSPEC void mark_hash (GLOBAL_AS plain_t *plains_buf, GLOBAL_AS u32 *d_result, { const u32 idx = atomic_inc (d_result); + #if ATTACK_MODE == 9 + + #else if (idx >= digests_cnt) { // this is kind of tricky: we *must* call atomic_inc() to know about the current value from a multi-thread perspective @@ -2157,6 +2422,7 @@ DECLSPEC void mark_hash (GLOBAL_AS plain_t *plains_buf, GLOBAL_AS u32 *d_result, return; } + #endif plains_buf[idx].salt_pos = salt_pos; plains_buf[idx].digest_pos = digest_pos; // relative diff --git a/OpenCL/inc_common.h b/OpenCL/inc_common.h index 8c8120759..9b3437326 100644 --- a/OpenCL/inc_common.h +++ b/OpenCL/inc_common.h @@ -27,78 +27,80 @@ */ #ifdef IS_CUDA -#define KERN_ATTR(p2,p4,p5,p6,p19) \ - MAYBE_UNUSED GLOBAL_AS pw_t *pws, \ - MAYBE_UNUSED p2 const kernel_rule_t *g_rules_buf, \ - MAYBE_UNUSED GLOBAL_AS const pw_t *combs_buf, \ - MAYBE_UNUSED p4, \ - MAYBE_UNUSED GLOBAL_AS p5 *tmps, \ - MAYBE_UNUSED GLOBAL_AS p6 *hooks, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_a, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_b, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_c, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_d, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_a, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_b, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_c, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_d, \ - MAYBE_UNUSED GLOBAL_AS plain_t *plains_buf, \ - MAYBE_UNUSED GLOBAL_AS const digest_t *digests_buf, \ - MAYBE_UNUSED GLOBAL_AS u32 *hashes_shown, \ - MAYBE_UNUSED GLOBAL_AS const salt_t *salt_bufs, \ - MAYBE_UNUSED GLOBAL_AS const p19 *esalt_bufs, \ - MAYBE_UNUSED GLOBAL_AS u32 *d_return_buf, \ - MAYBE_UNUSED GLOBAL_AS void *d_extra0_buf, \ - MAYBE_UNUSED GLOBAL_AS void *d_extra1_buf, \ - MAYBE_UNUSED GLOBAL_AS void *d_extra2_buf, \ - MAYBE_UNUSED GLOBAL_AS void *d_extra3_buf, \ - MAYBE_UNUSED const u32 bitmap_mask, \ - MAYBE_UNUSED const u32 bitmap_shift1, \ - MAYBE_UNUSED const u32 bitmap_shift2, \ - MAYBE_UNUSED const u32 salt_pos, \ - MAYBE_UNUSED const u32 loop_pos, \ - MAYBE_UNUSED const u32 loop_cnt, \ - MAYBE_UNUSED const u32 il_cnt, \ - MAYBE_UNUSED const u32 digests_cnt, \ - MAYBE_UNUSED const u32 digests_offset, \ - MAYBE_UNUSED const u32 combs_mode, \ +#define KERN_ATTR(p2,p4,p5,p6,p19) \ + MAYBE_UNUSED GLOBAL_AS pw_t *pws, \ + MAYBE_UNUSED p2 const kernel_rule_t *g_rules_buf, \ + MAYBE_UNUSED GLOBAL_AS const pw_t *combs_buf, \ + MAYBE_UNUSED p4, \ + MAYBE_UNUSED GLOBAL_AS p5 *tmps, \ + MAYBE_UNUSED GLOBAL_AS p6 *hooks, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_a, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_b, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_c, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_d, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_a, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_b, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_c, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_d, \ + MAYBE_UNUSED GLOBAL_AS plain_t *plains_buf, \ + MAYBE_UNUSED GLOBAL_AS const digest_t *digests_buf, \ + MAYBE_UNUSED GLOBAL_AS u32 *hashes_shown, \ + MAYBE_UNUSED GLOBAL_AS const salt_t *salt_bufs, \ + MAYBE_UNUSED GLOBAL_AS const p19 *esalt_bufs, \ + MAYBE_UNUSED GLOBAL_AS u32 *d_return_buf, \ + MAYBE_UNUSED GLOBAL_AS void *d_extra0_buf, \ + MAYBE_UNUSED GLOBAL_AS void *d_extra1_buf, \ + MAYBE_UNUSED GLOBAL_AS void *d_extra2_buf, \ + MAYBE_UNUSED GLOBAL_AS void *d_extra3_buf, \ + MAYBE_UNUSED const u32 bitmap_mask, \ + MAYBE_UNUSED const u32 bitmap_shift1, \ + MAYBE_UNUSED const u32 bitmap_shift2, \ + MAYBE_UNUSED const u32 salt_pos_host, \ + MAYBE_UNUSED const u32 loop_pos, \ + MAYBE_UNUSED const u32 loop_cnt, \ + MAYBE_UNUSED const u32 il_cnt, \ + MAYBE_UNUSED const u32 digests_cnt, \ + MAYBE_UNUSED const u32 digests_offset_host, \ + MAYBE_UNUSED const u32 combs_mode, \ + MAYBE_UNUSED const u64 pws_pos, \ MAYBE_UNUSED const u64 gid_max #else -#define KERN_ATTR(p2,p4,p5,p6,p19) \ - MAYBE_UNUSED GLOBAL_AS pw_t *pws, \ - MAYBE_UNUSED p2 const kernel_rule_t *rules_buf, \ - MAYBE_UNUSED GLOBAL_AS const pw_t *combs_buf, \ - MAYBE_UNUSED p4, \ - MAYBE_UNUSED GLOBAL_AS p5 *tmps, \ - MAYBE_UNUSED GLOBAL_AS p6 *hooks, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_a, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_b, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_c, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_d, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_a, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_b, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_c, \ - MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_d, \ - MAYBE_UNUSED GLOBAL_AS plain_t *plains_buf, \ - MAYBE_UNUSED GLOBAL_AS const digest_t *digests_buf, \ - MAYBE_UNUSED GLOBAL_AS u32 *hashes_shown, \ - MAYBE_UNUSED GLOBAL_AS const salt_t *salt_bufs, \ - MAYBE_UNUSED GLOBAL_AS const p19 *esalt_bufs, \ - MAYBE_UNUSED GLOBAL_AS u32 *d_return_buf, \ - MAYBE_UNUSED GLOBAL_AS void *d_extra0_buf, \ - MAYBE_UNUSED GLOBAL_AS void *d_extra1_buf, \ - MAYBE_UNUSED GLOBAL_AS void *d_extra2_buf, \ - MAYBE_UNUSED GLOBAL_AS void *d_extra3_buf, \ - MAYBE_UNUSED const u32 bitmap_mask, \ - MAYBE_UNUSED const u32 bitmap_shift1, \ - MAYBE_UNUSED const u32 bitmap_shift2, \ - MAYBE_UNUSED const u32 salt_pos, \ - MAYBE_UNUSED const u32 loop_pos, \ - MAYBE_UNUSED const u32 loop_cnt, \ - MAYBE_UNUSED const u32 il_cnt, \ - MAYBE_UNUSED const u32 digests_cnt, \ - MAYBE_UNUSED const u32 digests_offset, \ - MAYBE_UNUSED const u32 combs_mode, \ +#define KERN_ATTR(p2,p4,p5,p6,p19) \ + MAYBE_UNUSED GLOBAL_AS pw_t *pws, \ + MAYBE_UNUSED p2 const kernel_rule_t *rules_buf, \ + MAYBE_UNUSED GLOBAL_AS const pw_t *combs_buf, \ + MAYBE_UNUSED p4, \ + MAYBE_UNUSED GLOBAL_AS p5 *tmps, \ + MAYBE_UNUSED GLOBAL_AS p6 *hooks, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_a, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_b, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_c, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s1_d, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_a, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_b, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_c, \ + MAYBE_UNUSED GLOBAL_AS const u32 *bitmaps_buf_s2_d, \ + MAYBE_UNUSED GLOBAL_AS plain_t *plains_buf, \ + MAYBE_UNUSED GLOBAL_AS const digest_t *digests_buf, \ + MAYBE_UNUSED GLOBAL_AS u32 *hashes_shown, \ + MAYBE_UNUSED GLOBAL_AS const salt_t *salt_bufs, \ + MAYBE_UNUSED GLOBAL_AS const p19 *esalt_bufs, \ + MAYBE_UNUSED GLOBAL_AS u32 *d_return_buf, \ + MAYBE_UNUSED GLOBAL_AS void *d_extra0_buf, \ + MAYBE_UNUSED GLOBAL_AS void *d_extra1_buf, \ + MAYBE_UNUSED GLOBAL_AS void *d_extra2_buf, \ + MAYBE_UNUSED GLOBAL_AS void *d_extra3_buf, \ + MAYBE_UNUSED const u32 bitmap_mask, \ + MAYBE_UNUSED const u32 bitmap_shift1, \ + MAYBE_UNUSED const u32 bitmap_shift2, \ + MAYBE_UNUSED const u32 salt_pos_host, \ + MAYBE_UNUSED const u32 loop_pos, \ + MAYBE_UNUSED const u32 loop_cnt, \ + MAYBE_UNUSED const u32 il_cnt, \ + MAYBE_UNUSED const u32 digests_cnt, \ + MAYBE_UNUSED const u32 digests_offset_host, \ + MAYBE_UNUSED const u32 combs_mode, \ + MAYBE_UNUSED const u64 pws_pos, \ MAYBE_UNUSED const u64 gid_max #endif /* @@ -232,6 +234,8 @@ DECLSPEC int hash_comp (const u32 *d1, GLOBAL_AS const u32 *d2); DECLSPEC int find_hash (const u32 *digest, const u32 digests_cnt, GLOBAL_AS const digest_t *digests_buf); #endif +DECLSPEC int utf8_to_utf16le (const u32 *src_buf, int src_len, int src_size, u32 *dst_buf, int dst_size); +DECLSPEC int utf8_to_utf16le_global (GLOBAL_AS const u32 *src_buf, int src_len, int src_size, u32 *dst_buf, int dst_size); DECLSPEC int pkcs_padding_bs8 (const u32 *data_buf, const int data_len); DECLSPEC int pkcs_padding_bs16 (const u32 *data_buf, const int data_len); DECLSPEC int asn1_detect (const u32 *buf, const int len); diff --git a/OpenCL/inc_comp_multi.cl b/OpenCL/inc_comp_multi.cl index 5e6011237..f6cb0a08e 100644 --- a/OpenCL/inc_comp_multi.cl +++ b/OpenCL/inc_comp_multi.cl @@ -18,15 +18,15 @@ if (check (digest_tp, bitmap_shift1, bitmap_shift2)) { - int digest_pos = find_hash (digest_tp, digests_cnt, &digests_buf[digests_offset]); + int digest_pos = find_hash (digest_tp, digests_cnt, &digests_buf[DIGESTS_OFFSET]); if (digest_pos != -1) { - const u32 final_hash_pos = digests_offset + digest_pos; + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/inc_comp_multi_bs.cl b/OpenCL/inc_comp_multi_bs.cl index 82a8c1e02..bc189a786 100644 --- a/OpenCL/inc_comp_multi_bs.cl +++ b/OpenCL/inc_comp_multi_bs.cl @@ -18,17 +18,17 @@ if (check (digest_tp, bitmap_shift1, bitmap_shift2)) { - int digest_pos = find_hash (digest_tp, digests_cnt, &digests_buf[digests_offset]); + int digest_pos = find_hash (digest_tp, digests_cnt, &digests_buf[DIGESTS_OFFSET]); if (digest_pos != -1) { if ((il_pos + slice) < il_cnt) { - const u32 final_hash_pos = digests_offset + digest_pos; + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + slice, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + slice, 0, 0); } } } diff --git a/OpenCL/inc_comp_single.cl b/OpenCL/inc_comp_single.cl index 2f931579e..d78414ac6 100644 --- a/OpenCL/inc_comp_single.cl +++ b/OpenCL/inc_comp_single.cl @@ -3,10 +3,10 @@ if ((r0 == search[0]) && (r2 == search[2]) && (r3 == search[3])) { - const u32 final_hash_pos = digests_offset + 0; + const u32 final_hash_pos = DIGESTS_OFFSET + 0; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos, 0, 0); } } diff --git a/OpenCL/inc_comp_single_bs.cl b/OpenCL/inc_comp_single_bs.cl index 5fc4a84b4..0ef2989aa 100644 --- a/OpenCL/inc_comp_single_bs.cl +++ b/OpenCL/inc_comp_single_bs.cl @@ -1,10 +1,10 @@ if ((il_pos + slice) < il_cnt) { - const u32 final_hash_pos = digests_offset + 0; + const u32 final_hash_pos = DIGESTS_OFFSET + 0; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + slice, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + slice, 0, 0); } } diff --git a/OpenCL/inc_ecc_secp256k1.cl b/OpenCL/inc_ecc_secp256k1.cl index ff877ca11..bd583b976 100644 --- a/OpenCL/inc_ecc_secp256k1.cl +++ b/OpenCL/inc_ecc_secp256k1.cl @@ -1730,14 +1730,16 @@ DECLSPEC void point_get_coords (secp256k1_t *r, const u32 *x, const u32 *y) r->xy[95] = neg[7]; } -DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps) +/* + * Convert the tweak/scalar k to w-NAF (window size is 4). + * @param naf out: w-NAF form of the tweak/scalar, a pointer to an u32 array with a size of 33. + * @param k in: tweak/scalar which should be converted, a pointer to an u32 array with a size of 8. + * @return Returns the loop start index. + */ +DECLSPEC int convert_to_window_naf (u32 *naf, const u32 *k) { - /* - * Convert the tweak/scalar k to w-NAF (window size is 4) - */ - + int loop_start = 0; u32 n[9]; - n[0] = 0; // we need this extra slot sometimes for the subtraction to work n[1] = k[7]; n[2] = k[6]; @@ -1748,10 +1750,6 @@ DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps n[7] = k[1]; n[8] = k[0]; - u32 naf[32 + 1] = { 0 }; // we need one extra slot - - int loop_start = 0; - for (int i = 0; i <= 256; i++) { if (n[8] & 1) @@ -1835,8 +1833,21 @@ DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps n[1] = n[1] >> 1 | n[0] << 31; n[0] = n[0] >> 1; } + return loop_start; +} - +/* + * @param x1 out: x coordinate, a pointer to an u32 array with a size of 8. + * @param y1 out: y coordinate, a pointer to an u32 array with a size of 8. + * @param k in: tweak/scalar which should be converted, a pointer to an u32 array with a size of 8. + * @param tmps in: a basepoint for the multiplication. + * @return Returns the x coordinate with a leading parity/sign (for odd/even y), it is named a compressed coordinate. + */ +DECLSPEC void point_mul_xy (u32 *x1, u32 *y1, const u32 *k, GLOBAL_AS const secp256k1_t *tmps) +{ + u32 naf[SECP256K1_NAF_SIZE] = { 0 }; + int loop_start = convert_to_window_naf(naf, k); + // first set: const u32 multiplier = (naf[loop_start >> 3] >> ((loop_start & 7) << 2)) & 0x0f; // or use u8 ? @@ -1846,7 +1857,6 @@ DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps const u32 x_pos = ((multiplier - 1 + odd) >> 1) * 24; const u32 y_pos = odd ? (x_pos + 8) : (x_pos + 16); - u32 x1[8]; x1[0] = tmps->xy[x_pos + 0]; x1[1] = tmps->xy[x_pos + 1]; @@ -1857,8 +1867,6 @@ DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps x1[6] = tmps->xy[x_pos + 6]; x1[7] = tmps->xy[x_pos + 7]; - u32 y1[8]; - y1[0] = tmps->xy[y_pos + 0]; y1[1] = tmps->xy[y_pos + 1]; y1[2] = tmps->xy[y_pos + 2]; @@ -1965,6 +1973,21 @@ DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps mul_mod (z1, z2, z1); // z1^3 mul_mod (y1, y1, z1); // y1_affine + + // return values are already in x1 and y1 +} + +/* + * @param r out: x coordinate with leading parity/sign (for odd/even y), a pointer to an u32 array with a size of 9. + * @param k in: tweak/scalar which should be converted, a pointer to an u32 array with a size of 8. + * @param tmps in: a basepoint for the multiplication. + * @return Returns the x coordinate with a leading parity/sign (for odd/even y), it is named a compressed coordinate. + */ +DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps) +{ + u32 x[8]; + u32 y[8]; + point_mul_xy(x, y, k, tmps); /* * output: @@ -1972,45 +1995,30 @@ DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps // shift by 1 byte (8 bits) to make room and add the parity/sign (for odd/even y): - r[8] = (x1[0] << 24); - r[7] = (x1[0] >> 8) | (x1[1] << 24); - r[6] = (x1[1] >> 8) | (x1[2] << 24); - r[5] = (x1[2] >> 8) | (x1[3] << 24); - r[4] = (x1[3] >> 8) | (x1[4] << 24); - r[3] = (x1[4] >> 8) | (x1[5] << 24); - r[2] = (x1[5] >> 8) | (x1[6] << 24); - r[1] = (x1[6] >> 8) | (x1[7] << 24); - r[0] = (x1[7] >> 8); + r[8] = (x[0] << 24); + r[7] = (x[0] >> 8) | (x[1] << 24); + r[6] = (x[1] >> 8) | (x[2] << 24); + r[5] = (x[2] >> 8) | (x[3] << 24); + r[4] = (x[3] >> 8) | (x[4] << 24); + r[3] = (x[4] >> 8) | (x[5] << 24); + r[2] = (x[5] >> 8) | (x[6] << 24); + r[1] = (x[6] >> 8) | (x[7] << 24); + r[0] = (x[7] >> 8); - const u32 type = 0x02 | (y1[0] & 1); // (note: 0b10 | 0b01 = 0x03) + const u32 type = 0x02 | (y[0] & 1); // (note: 0b10 | 0b01 = 0x03) r[0] = r[0] | type << 24; // 0x02 or 0x03 } -DECLSPEC u32 parse_public (secp256k1_t *r, const u32 *k) +/* + * Transform a x coordinate and separate parity to secp256k1_t. + * @param r out: x and y coordinates. + * @param x in: x coordinate which should be converted, a pointer to an u32 array with a size of 8. + * @param first_byte in: The parity of the y coordinate, a u32. + * @return Returns 0 if successfull, returns 1 if x is greater than the basepoint. + */ +DECLSPEC u32 transform_public (secp256k1_t *r, const u32 *x, const u32 first_byte) { - // verify: - - const u32 first_byte = k[0] & 0xff; - - if ((first_byte != '\x02') && (first_byte != '\x03')) - { - return 1; - } - - // load k into x without the first byte: - - u32 x[8]; - - x[0] = (k[7] & 0xff00) << 16 | (k[7] & 0xff0000) | (k[7] & 0xff000000) >> 16 | (k[8] & 0xff); - x[1] = (k[6] & 0xff00) << 16 | (k[6] & 0xff0000) | (k[6] & 0xff000000) >> 16 | (k[7] & 0xff); - x[2] = (k[5] & 0xff00) << 16 | (k[5] & 0xff0000) | (k[5] & 0xff000000) >> 16 | (k[6] & 0xff); - x[3] = (k[4] & 0xff00) << 16 | (k[4] & 0xff0000) | (k[4] & 0xff000000) >> 16 | (k[5] & 0xff); - x[4] = (k[3] & 0xff00) << 16 | (k[3] & 0xff0000) | (k[3] & 0xff000000) >> 16 | (k[4] & 0xff); - x[5] = (k[2] & 0xff00) << 16 | (k[2] & 0xff0000) | (k[2] & 0xff000000) >> 16 | (k[3] & 0xff); - x[6] = (k[1] & 0xff00) << 16 | (k[1] & 0xff0000) | (k[1] & 0xff000000) >> 16 | (k[2] & 0xff); - x[7] = (k[0] & 0xff00) << 16 | (k[0] & 0xff0000) | (k[0] & 0xff000000) >> 16 | (k[1] & 0xff); - u32 p[8]; p[0] = SECP256K1_P0; @@ -2062,3 +2070,163 @@ DECLSPEC u32 parse_public (secp256k1_t *r, const u32 *k) return 0; } + +/* + * Parse a x coordinate with leading parity to secp256k1_t. + * @param r out: x and y coordinates. + * @param k in: x coordinate which should be converted with leading parity, a pointer to an u32 array with a size of 9. + * @return Returns 0 if successfull, returns 1 if x is greater than the basepoint or the parity has an unexpected value. + */ +DECLSPEC u32 parse_public (secp256k1_t *r, const u32 *k) +{ + // verify: + + const u32 first_byte = k[0] & 0xff; + + if ((first_byte != '\x02') && (first_byte != '\x03')) + { + return 1; + } + + // load k into x without the first byte: + + u32 x[8]; + + x[0] = (k[7] & 0xff00) << 16 | (k[7] & 0xff0000) | (k[7] & 0xff000000) >> 16 | (k[8] & 0xff); + x[1] = (k[6] & 0xff00) << 16 | (k[6] & 0xff0000) | (k[6] & 0xff000000) >> 16 | (k[7] & 0xff); + x[2] = (k[5] & 0xff00) << 16 | (k[5] & 0xff0000) | (k[5] & 0xff000000) >> 16 | (k[6] & 0xff); + x[3] = (k[4] & 0xff00) << 16 | (k[4] & 0xff0000) | (k[4] & 0xff000000) >> 16 | (k[5] & 0xff); + x[4] = (k[3] & 0xff00) << 16 | (k[3] & 0xff0000) | (k[3] & 0xff000000) >> 16 | (k[4] & 0xff); + x[5] = (k[2] & 0xff00) << 16 | (k[2] & 0xff0000) | (k[2] & 0xff000000) >> 16 | (k[3] & 0xff); + x[6] = (k[1] & 0xff00) << 16 | (k[1] & 0xff0000) | (k[1] & 0xff000000) >> 16 | (k[2] & 0xff); + x[7] = (k[0] & 0xff00) << 16 | (k[0] & 0xff0000) | (k[0] & 0xff000000) >> 16 | (k[1] & 0xff); + + return transform_public(r, x, first_byte); +} + + +/* + * Set precomputed values of the basepoint g to a secp256k1 structure. + * @param r out: x and y coordinates. pre-computed points: (x1,y1,-y1),(x3,y3,-y3),(x5,y5,-y5),(x7,y7,-y7) + */ +DECLSPEC void set_precomputed_basepoint_g (secp256k1_t *r) { + // x1 + r->xy[ 0] = SECP256K1_G_PRE_COMPUTED_00; + r->xy[ 1] = SECP256K1_G_PRE_COMPUTED_01; + r->xy[ 2] = SECP256K1_G_PRE_COMPUTED_02; + r->xy[ 3] = SECP256K1_G_PRE_COMPUTED_03; + r->xy[ 4] = SECP256K1_G_PRE_COMPUTED_04; + r->xy[ 5] = SECP256K1_G_PRE_COMPUTED_05; + r->xy[ 6] = SECP256K1_G_PRE_COMPUTED_06; + r->xy[ 7] = SECP256K1_G_PRE_COMPUTED_07; + + // y1 + r->xy[ 8] = SECP256K1_G_PRE_COMPUTED_08; + r->xy[ 9] = SECP256K1_G_PRE_COMPUTED_09; + r->xy[10] = SECP256K1_G_PRE_COMPUTED_10; + r->xy[11] = SECP256K1_G_PRE_COMPUTED_11; + r->xy[12] = SECP256K1_G_PRE_COMPUTED_12; + r->xy[13] = SECP256K1_G_PRE_COMPUTED_13; + r->xy[14] = SECP256K1_G_PRE_COMPUTED_14; + r->xy[15] = SECP256K1_G_PRE_COMPUTED_15; + + // -y1 + r->xy[16] = SECP256K1_G_PRE_COMPUTED_16; + r->xy[17] = SECP256K1_G_PRE_COMPUTED_17; + r->xy[18] = SECP256K1_G_PRE_COMPUTED_18; + r->xy[19] = SECP256K1_G_PRE_COMPUTED_19; + r->xy[20] = SECP256K1_G_PRE_COMPUTED_20; + r->xy[21] = SECP256K1_G_PRE_COMPUTED_21; + r->xy[22] = SECP256K1_G_PRE_COMPUTED_22; + r->xy[23] = SECP256K1_G_PRE_COMPUTED_23; + + // x3 + r->xy[24] = SECP256K1_G_PRE_COMPUTED_24; + r->xy[25] = SECP256K1_G_PRE_COMPUTED_25; + r->xy[26] = SECP256K1_G_PRE_COMPUTED_26; + r->xy[27] = SECP256K1_G_PRE_COMPUTED_27; + r->xy[28] = SECP256K1_G_PRE_COMPUTED_28; + r->xy[29] = SECP256K1_G_PRE_COMPUTED_29; + r->xy[30] = SECP256K1_G_PRE_COMPUTED_30; + r->xy[31] = SECP256K1_G_PRE_COMPUTED_31; + + // y3 + r->xy[32] = SECP256K1_G_PRE_COMPUTED_32; + r->xy[33] = SECP256K1_G_PRE_COMPUTED_33; + r->xy[34] = SECP256K1_G_PRE_COMPUTED_34; + r->xy[35] = SECP256K1_G_PRE_COMPUTED_35; + r->xy[36] = SECP256K1_G_PRE_COMPUTED_36; + r->xy[37] = SECP256K1_G_PRE_COMPUTED_37; + r->xy[38] = SECP256K1_G_PRE_COMPUTED_38; + r->xy[39] = SECP256K1_G_PRE_COMPUTED_39; + + // -y3 + r->xy[40] = SECP256K1_G_PRE_COMPUTED_40; + r->xy[41] = SECP256K1_G_PRE_COMPUTED_41; + r->xy[42] = SECP256K1_G_PRE_COMPUTED_42; + r->xy[43] = SECP256K1_G_PRE_COMPUTED_43; + r->xy[44] = SECP256K1_G_PRE_COMPUTED_44; + r->xy[45] = SECP256K1_G_PRE_COMPUTED_45; + r->xy[46] = SECP256K1_G_PRE_COMPUTED_46; + r->xy[47] = SECP256K1_G_PRE_COMPUTED_47; + + // x5 + r->xy[48] = SECP256K1_G_PRE_COMPUTED_48; + r->xy[49] = SECP256K1_G_PRE_COMPUTED_49; + r->xy[50] = SECP256K1_G_PRE_COMPUTED_50; + r->xy[51] = SECP256K1_G_PRE_COMPUTED_51; + r->xy[52] = SECP256K1_G_PRE_COMPUTED_52; + r->xy[53] = SECP256K1_G_PRE_COMPUTED_53; + r->xy[54] = SECP256K1_G_PRE_COMPUTED_54; + r->xy[55] = SECP256K1_G_PRE_COMPUTED_55; + + // y5 + r->xy[56] = SECP256K1_G_PRE_COMPUTED_56; + r->xy[57] = SECP256K1_G_PRE_COMPUTED_57; + r->xy[58] = SECP256K1_G_PRE_COMPUTED_58; + r->xy[59] = SECP256K1_G_PRE_COMPUTED_59; + r->xy[60] = SECP256K1_G_PRE_COMPUTED_60; + r->xy[61] = SECP256K1_G_PRE_COMPUTED_61; + r->xy[62] = SECP256K1_G_PRE_COMPUTED_62; + r->xy[63] = SECP256K1_G_PRE_COMPUTED_63; + + // -y5 + r->xy[64] = SECP256K1_G_PRE_COMPUTED_64; + r->xy[65] = SECP256K1_G_PRE_COMPUTED_65; + r->xy[66] = SECP256K1_G_PRE_COMPUTED_66; + r->xy[67] = SECP256K1_G_PRE_COMPUTED_67; + r->xy[68] = SECP256K1_G_PRE_COMPUTED_68; + r->xy[69] = SECP256K1_G_PRE_COMPUTED_69; + r->xy[70] = SECP256K1_G_PRE_COMPUTED_70; + r->xy[71] = SECP256K1_G_PRE_COMPUTED_71; + + // x7 + r->xy[72] = SECP256K1_G_PRE_COMPUTED_72; + r->xy[73] = SECP256K1_G_PRE_COMPUTED_73; + r->xy[74] = SECP256K1_G_PRE_COMPUTED_74; + r->xy[75] = SECP256K1_G_PRE_COMPUTED_75; + r->xy[76] = SECP256K1_G_PRE_COMPUTED_76; + r->xy[77] = SECP256K1_G_PRE_COMPUTED_77; + r->xy[78] = SECP256K1_G_PRE_COMPUTED_78; + r->xy[79] = SECP256K1_G_PRE_COMPUTED_79; + + // y7 + r->xy[80] = SECP256K1_G_PRE_COMPUTED_80; + r->xy[81] = SECP256K1_G_PRE_COMPUTED_81; + r->xy[82] = SECP256K1_G_PRE_COMPUTED_82; + r->xy[83] = SECP256K1_G_PRE_COMPUTED_83; + r->xy[84] = SECP256K1_G_PRE_COMPUTED_84; + r->xy[85] = SECP256K1_G_PRE_COMPUTED_85; + r->xy[86] = SECP256K1_G_PRE_COMPUTED_86; + r->xy[87] = SECP256K1_G_PRE_COMPUTED_87; + + // -y7 + r->xy[88] = SECP256K1_G_PRE_COMPUTED_88; + r->xy[89] = SECP256K1_G_PRE_COMPUTED_89; + r->xy[90] = SECP256K1_G_PRE_COMPUTED_90; + r->xy[91] = SECP256K1_G_PRE_COMPUTED_91; + r->xy[92] = SECP256K1_G_PRE_COMPUTED_92; + r->xy[93] = SECP256K1_G_PRE_COMPUTED_93; + r->xy[94] = SECP256K1_G_PRE_COMPUTED_94; + r->xy[95] = SECP256K1_G_PRE_COMPUTED_95; +} diff --git a/OpenCL/inc_ecc_secp256k1.h b/OpenCL/inc_ecc_secp256k1.h index 9a8e069d2..4a45d8b8c 100644 --- a/OpenCL/inc_ecc_secp256k1.h +++ b/OpenCL/inc_ecc_secp256k1.h @@ -10,6 +10,8 @@ #define SECP256K1_B 7 +// finite field Fp +// p = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F #define SECP256K1_P0 0xfffffc2f #define SECP256K1_P1 0xfffffffe #define SECP256K1_P2 0xffffffff @@ -19,6 +21,8 @@ #define SECP256K1_P6 0xffffffff #define SECP256K1_P7 0xffffffff +// prime order N +// n = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141 #define SECP256K1_N0 0xd0364141 #define SECP256K1_N1 0xbfd25e8c #define SECP256K1_N2 0xaf48a03b @@ -28,14 +32,194 @@ #define SECP256K1_N6 0xffffffff #define SECP256K1_N7 0xffffffff +// the base point G in compressed form for transform_public +// G = 02 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 +#define SECP256K1_G_PARITY 0x00000002 +#define SECP256K1_G0 0x16f81798 +#define SECP256K1_G1 0x59f2815b +#define SECP256K1_G2 0x2dce28d9 +#define SECP256K1_G3 0x029bfcdb +#define SECP256K1_G4 0xce870b07 +#define SECP256K1_G5 0x55a06295 +#define SECP256K1_G6 0xf9dcbbac +#define SECP256K1_G7 0x79be667e + +// the base point G in compressed form for parse_public +// parity and reversed byte/char (8 bit) byte order +// G = 02 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 +#define SECP256K1_G_STRING0 0x66be7902 +#define SECP256K1_G_STRING1 0xbbdcf97e +#define SECP256K1_G_STRING2 0x62a055ac +#define SECP256K1_G_STRING3 0x0b87ce95 +#define SECP256K1_G_STRING4 0xfc9b0207 +#define SECP256K1_G_STRING5 0x28ce2ddb +#define SECP256K1_G_STRING6 0x81f259d9 +#define SECP256K1_G_STRING7 0x17f8165b +#define SECP256K1_G_STRING8 0x00000098 + +// pre computed values, can be verified using private keys for +// x1 is the same as the basepoint g +// x1 WIF: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn +// x3 WIF: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU74sHUHy8S +// x5 WIF: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU75s2EPgZf +// x7 WIF: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU76rnZwVdz + +// x1: 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 +// x1: 79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798 +#define SECP256K1_G_PRE_COMPUTED_00 0x16f81798 +#define SECP256K1_G_PRE_COMPUTED_01 0x59f2815b +#define SECP256K1_G_PRE_COMPUTED_02 0x2dce28d9 +#define SECP256K1_G_PRE_COMPUTED_03 0x029bfcdb +#define SECP256K1_G_PRE_COMPUTED_04 0xce870b07 +#define SECP256K1_G_PRE_COMPUTED_05 0x55a06295 +#define SECP256K1_G_PRE_COMPUTED_06 0xf9dcbbac +#define SECP256K1_G_PRE_COMPUTED_07 0x79be667e + +// y1: 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8 +// y1: 483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8 +#define SECP256K1_G_PRE_COMPUTED_08 0xfb10d4b8 +#define SECP256K1_G_PRE_COMPUTED_09 0x9c47d08f +#define SECP256K1_G_PRE_COMPUTED_10 0xa6855419 +#define SECP256K1_G_PRE_COMPUTED_11 0xfd17b448 +#define SECP256K1_G_PRE_COMPUTED_12 0x0e1108a8 +#define SECP256K1_G_PRE_COMPUTED_13 0x5da4fbfc +#define SECP256K1_G_PRE_COMPUTED_14 0x26a3c465 +#define SECP256K1_G_PRE_COMPUTED_15 0x483ada77 + +// -y1: B7C52588 D95C3B9A A25B0403 F1EEF757 02E84BB7 597AABE6 63B82F6F 04EF2777 +// -y1: B7C52588D95C3B9AA25B0403F1EEF75702E84BB7597AABE663B82F6F04EF2777 +#define SECP256K1_G_PRE_COMPUTED_16 0x04ef2777 +#define SECP256K1_G_PRE_COMPUTED_17 0x63b82f6f +#define SECP256K1_G_PRE_COMPUTED_18 0x597aabe6 +#define SECP256K1_G_PRE_COMPUTED_19 0x02e84bb7 +#define SECP256K1_G_PRE_COMPUTED_20 0xf1eef757 +#define SECP256K1_G_PRE_COMPUTED_21 0xa25b0403 +#define SECP256K1_G_PRE_COMPUTED_22 0xd95c3b9a +#define SECP256K1_G_PRE_COMPUTED_23 0xb7c52588 + +// x3: F9308A01 9258C310 49344F85 F89D5229 B531C845 836F99B0 8601F113 BCE036F9 +// x3: F9308A019258C31049344F85F89D5229B531C845836F99B08601F113BCE036F9 +#define SECP256K1_G_PRE_COMPUTED_24 0xbce036f9 +#define SECP256K1_G_PRE_COMPUTED_25 0x8601f113 +#define SECP256K1_G_PRE_COMPUTED_26 0x836f99b0 +#define SECP256K1_G_PRE_COMPUTED_27 0xb531c845 +#define SECP256K1_G_PRE_COMPUTED_28 0xf89d5229 +#define SECP256K1_G_PRE_COMPUTED_29 0x49344f85 +#define SECP256K1_G_PRE_COMPUTED_30 0x9258c310 +#define SECP256K1_G_PRE_COMPUTED_31 0xf9308a01 + +// y3: 388F7B0F 632DE814 0FE337E6 2A37F356 6500A999 34C2231B 6CB9FD75 84B8E672 +// y3: 388F7B0F632DE8140FE337E62A37F3566500A99934C2231B6CB9FD7584B8E672 +#define SECP256K1_G_PRE_COMPUTED_32 0x84b8e672 +#define SECP256K1_G_PRE_COMPUTED_33 0x6cb9fd75 +#define SECP256K1_G_PRE_COMPUTED_34 0x34c2231b +#define SECP256K1_G_PRE_COMPUTED_35 0x6500a999 +#define SECP256K1_G_PRE_COMPUTED_36 0x2a37f356 +#define SECP256K1_G_PRE_COMPUTED_37 0x0fe337e6 +#define SECP256K1_G_PRE_COMPUTED_38 0x632de814 +#define SECP256K1_G_PRE_COMPUTED_39 0x388f7b0f + +// -y3: C77084F0 9CD217EB F01CC819 D5C80CA9 9AFF5666 CB3DDCE4 93460289 7B4715BD +// -y3: C77084F09CD217EBF01CC819D5C80CA99AFF5666CB3DDCE4934602897B4715BD +#define SECP256K1_G_PRE_COMPUTED_40 0x7b4715bd +#define SECP256K1_G_PRE_COMPUTED_41 0x93460289 +#define SECP256K1_G_PRE_COMPUTED_42 0xcb3ddce4 +#define SECP256K1_G_PRE_COMPUTED_43 0x9aff5666 +#define SECP256K1_G_PRE_COMPUTED_44 0xd5c80ca9 +#define SECP256K1_G_PRE_COMPUTED_45 0xf01cc819 +#define SECP256K1_G_PRE_COMPUTED_46 0x9cd217eb +#define SECP256K1_G_PRE_COMPUTED_47 0xc77084f0 + +// x5: 2F8BDE4D 1A072093 55B4A725 0A5C5128 E88B84BD DC619AB7 CBA8D569 B240EFE4 +// x5: 2F8BDE4D1A07209355B4A7250A5C5128E88B84BDDC619AB7CBA8D569B240EFE4 +#define SECP256K1_G_PRE_COMPUTED_48 0xb240efe4 +#define SECP256K1_G_PRE_COMPUTED_49 0xcba8d569 +#define SECP256K1_G_PRE_COMPUTED_50 0xdc619ab7 +#define SECP256K1_G_PRE_COMPUTED_51 0xe88b84bd +#define SECP256K1_G_PRE_COMPUTED_52 0x0a5c5128 +#define SECP256K1_G_PRE_COMPUTED_53 0x55b4a725 +#define SECP256K1_G_PRE_COMPUTED_54 0x1a072093 +#define SECP256K1_G_PRE_COMPUTED_55 0x2f8bde4d + +// y5: D8AC2226 36E5E3D6 D4DBA9DD A6C9C426 F788271B AB0D6840 DCA87D3A A6AC62D6 +// y5: D8AC222636E5E3D6D4DBA9DDA6C9C426F788271BAB0D6840DCA87D3AA6AC62D6 +#define SECP256K1_G_PRE_COMPUTED_56 0xa6ac62d6 +#define SECP256K1_G_PRE_COMPUTED_57 0xdca87d3a +#define SECP256K1_G_PRE_COMPUTED_58 0xab0d6840 +#define SECP256K1_G_PRE_COMPUTED_59 0xf788271b +#define SECP256K1_G_PRE_COMPUTED_60 0xa6c9c426 +#define SECP256K1_G_PRE_COMPUTED_61 0xd4dba9dd +#define SECP256K1_G_PRE_COMPUTED_62 0x36e5e3d6 +#define SECP256K1_G_PRE_COMPUTED_63 0xd8ac2226 + +// -y5: 2753DDD9 C91A1C29 2B245622 59363BD9 0877D8E4 54F297BF 235782C4 59539959 +// -y5: 2753DDD9C91A1C292B24562259363BD90877D8E454F297BF235782C459539959 +#define SECP256K1_G_PRE_COMPUTED_64 0x59539959 +#define SECP256K1_G_PRE_COMPUTED_65 0x235782c4 +#define SECP256K1_G_PRE_COMPUTED_66 0x54f297bf +#define SECP256K1_G_PRE_COMPUTED_67 0x0877d8e4 +#define SECP256K1_G_PRE_COMPUTED_68 0x59363bd9 +#define SECP256K1_G_PRE_COMPUTED_69 0x2b245622 +#define SECP256K1_G_PRE_COMPUTED_70 0xc91a1c29 +#define SECP256K1_G_PRE_COMPUTED_71 0x2753ddd9 + +// x7: 5CBDF064 6E5DB4EA A398F365 F2EA7A0E 3D419B7E 0330E39C E92BDDED CAC4F9BC +// x7: 5CBDF0646E5DB4EAA398F365F2EA7A0E3D419B7E0330E39CE92BDDEDCAC4F9BC +#define SECP256K1_G_PRE_COMPUTED_72 0xcac4f9bc +#define SECP256K1_G_PRE_COMPUTED_73 0xe92bdded +#define SECP256K1_G_PRE_COMPUTED_74 0x0330e39c +#define SECP256K1_G_PRE_COMPUTED_75 0x3d419b7e +#define SECP256K1_G_PRE_COMPUTED_76 0xf2ea7a0e +#define SECP256K1_G_PRE_COMPUTED_77 0xa398f365 +#define SECP256K1_G_PRE_COMPUTED_78 0x6e5db4ea +#define SECP256K1_G_PRE_COMPUTED_79 0x5cbdf064 + +// y7: 6AEBCA40 BA255960 A3178D6D 861A54DB A813D0B8 13FDE7B5 A5082628 087264DA +// y7: 6AEBCA40BA255960A3178D6D861A54DBA813D0B813FDE7B5A5082628087264DA +#define SECP256K1_G_PRE_COMPUTED_80 0x087264da +#define SECP256K1_G_PRE_COMPUTED_81 0xa5082628 +#define SECP256K1_G_PRE_COMPUTED_82 0x13fde7b5 +#define SECP256K1_G_PRE_COMPUTED_83 0xa813d0b8 +#define SECP256K1_G_PRE_COMPUTED_84 0x861a54db +#define SECP256K1_G_PRE_COMPUTED_85 0xa3178d6d +#define SECP256K1_G_PRE_COMPUTED_86 0xba255960 +#define SECP256K1_G_PRE_COMPUTED_87 0x6aebca40 + +// -y7: 951435BF 45DAA69F 5CE87292 79E5AB24 57EC2F47 EC02184A 5AF7D9D6 F78D9755 +// -y7: 951435BF45DAA69F5CE8729279E5AB2457EC2F47EC02184A5AF7D9D6F78D9755 +#define SECP256K1_G_PRE_COMPUTED_88 0xf78d9755 +#define SECP256K1_G_PRE_COMPUTED_89 0x5af7d9d6 +#define SECP256K1_G_PRE_COMPUTED_90 0xec02184a +#define SECP256K1_G_PRE_COMPUTED_91 0x57ec2f47 +#define SECP256K1_G_PRE_COMPUTED_92 0x79e5ab24 +#define SECP256K1_G_PRE_COMPUTED_93 0x5ce87292 +#define SECP256K1_G_PRE_COMPUTED_94 0x45daa69f +#define SECP256K1_G_PRE_COMPUTED_95 0x951435bf + +#define SECP256K1_PRE_COMPUTED_XY_SIZE 96 +#define SECP256K1_NAF_SIZE 33 // 32+1, we need one extra slot + +#define PUBLIC_KEY_LENGTH_WITHOUT_PARITY 8 +#define PUBLIC_KEY_LENGTH_X_Y_WITHOUT_PARITY 16 +// 8+1 to make room for the parity +#define PUBLIC_KEY_LENGTH_WITH_PARITY 9 + +// (32*8 == 256) +#define PRIVATE_KEY_LENGTH 8 + typedef struct secp256k1 { - u32 xy[96]; // pre-computed points: (x1,y1,-y1),(x3,y3,-y3),(x5,y5,-y5),(x7,y7,-y7) + u32 xy[SECP256K1_PRE_COMPUTED_XY_SIZE]; // pre-computed points: (x1,y1,-y1),(x3,y3,-y3),(x5,y5,-y5),(x7,y7,-y7) } secp256k1_t; + +DECLSPEC u32 transform_public (secp256k1_t *r, const u32 *x, const u32 first_byte); DECLSPEC u32 parse_public (secp256k1_t *r, const u32 *k); +DECLSPEC void point_mul_xy (u32 *x1, u32 *y1, const u32 *k, GLOBAL_AS const secp256k1_t *tmps); DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps); +DECLSPEC void set_precomputed_basepoint_g (secp256k1_t *r); + #endif // _INC_ECC_SECP256K1_H diff --git a/OpenCL/inc_hash_md4.cl b/OpenCL/inc_hash_md4.cl index eeb28cd17..149e7002f 100644 --- a/OpenCL/inc_hash_md4.cl +++ b/OpenCL/inc_hash_md4.cl @@ -363,120 +363,20 @@ DECLSPEC void md4_update_swap (md4_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void md4_update_utf16le (md4_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - md4_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + md4_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void md4_update_utf16le_swap (md4_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - md4_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + md4_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void md4_update_global (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) @@ -619,120 +519,20 @@ DECLSPEC void md4_update_global_swap (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, co DECLSPEC void md4_update_global_utf16le (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - md4_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + md4_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void md4_update_global_utf16le_swap (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - md4_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + md4_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void md4_final (md4_ctx_t *ctx) @@ -1068,16 +868,6 @@ DECLSPEC void md4_hmac_update_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int md4_update_swap (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_update_utf16le (md4_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - md4_update_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void md4_hmac_update_utf16le_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - md4_update_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void md4_hmac_update_global (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md4_update_global (&ctx->ipad, w, len); @@ -1088,16 +878,6 @@ DECLSPEC void md4_hmac_update_global_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const md4_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_update_global_utf16le (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - md4_update_global_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void md4_hmac_update_global_utf16le_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - md4_update_global_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void md4_hmac_final (md4_hmac_ctx_t *ctx) { md4_final (&ctx->ipad); diff --git a/OpenCL/inc_hash_md4.h b/OpenCL/inc_hash_md4.h index 7c3b31894..c8b3351a1 100644 --- a/OpenCL/inc_hash_md4.h +++ b/OpenCL/inc_hash_md4.h @@ -102,12 +102,8 @@ DECLSPEC void md4_hmac_init_global_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u3 DECLSPEC void md4_hmac_update_64 (md4_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); DECLSPEC void md4_hmac_update (md4_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void md4_hmac_update_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_hmac_update_utf16le (md4_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_hmac_update_utf16le_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void md4_hmac_update_global (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void md4_hmac_update_global_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_hmac_update_global_utf16le (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_hmac_update_global_utf16le_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void md4_hmac_final (md4_hmac_ctx_t *ctx); DECLSPEC void md4_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); DECLSPEC void md4_init_vector (md4_ctx_vector_t *ctx); diff --git a/OpenCL/inc_hash_md5.cl b/OpenCL/inc_hash_md5.cl index 3c52c1f40..d268cd3c3 100644 --- a/OpenCL/inc_hash_md5.cl +++ b/OpenCL/inc_hash_md5.cl @@ -399,120 +399,20 @@ DECLSPEC void md5_update_swap (md5_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void md5_update_utf16le (md5_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - md5_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + md5_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void md5_update_utf16le_swap (md5_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - md5_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + md5_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void md5_update_global (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) @@ -655,120 +555,20 @@ DECLSPEC void md5_update_global_swap (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, co DECLSPEC void md5_update_global_utf16le (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - md5_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + md5_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void md5_update_global_utf16le_swap (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - md5_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + md5_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void md5_final (md5_ctx_t *ctx) @@ -1104,16 +904,6 @@ DECLSPEC void md5_hmac_update_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int md5_update_swap (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_update_utf16le (md5_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - md5_update_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void md5_hmac_update_utf16le_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - md5_update_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void md5_hmac_update_global (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md5_update_global (&ctx->ipad, w, len); @@ -1124,16 +914,6 @@ DECLSPEC void md5_hmac_update_global_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const md5_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_update_global_utf16le (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - md5_update_global_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void md5_hmac_update_global_utf16le_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - md5_update_global_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void md5_hmac_final (md5_hmac_ctx_t *ctx) { md5_final (&ctx->ipad); diff --git a/OpenCL/inc_hash_md5.h b/OpenCL/inc_hash_md5.h index 1e6eaaf93..273a35bb3 100644 --- a/OpenCL/inc_hash_md5.h +++ b/OpenCL/inc_hash_md5.h @@ -109,12 +109,8 @@ DECLSPEC void md5_hmac_init_global_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u3 DECLSPEC void md5_hmac_update_64 (md5_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); DECLSPEC void md5_hmac_update (md5_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void md5_hmac_update_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_hmac_update_utf16le (md5_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_hmac_update_utf16le_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void md5_hmac_update_global (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void md5_hmac_update_global_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_hmac_update_global_utf16le (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_hmac_update_global_utf16le_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void md5_hmac_final (md5_hmac_ctx_t *ctx); DECLSPEC void md5_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); DECLSPEC void md5_init_vector (md5_ctx_vector_t *ctx); diff --git a/OpenCL/inc_hash_ripemd160.cl b/OpenCL/inc_hash_ripemd160.cl index bcf1074ac..d100ebf70 100644 --- a/OpenCL/inc_hash_ripemd160.cl +++ b/OpenCL/inc_hash_ripemd160.cl @@ -497,120 +497,20 @@ DECLSPEC void ripemd160_update_swap (ripemd160_ctx_t *ctx, const u32 *w, const i DECLSPEC void ripemd160_update_utf16le (ripemd160_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - ripemd160_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + ripemd160_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void ripemd160_update_utf16le_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - ripemd160_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + ripemd160_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void ripemd160_update_global (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) @@ -753,120 +653,20 @@ DECLSPEC void ripemd160_update_global_swap (ripemd160_ctx_t *ctx, GLOBAL_AS cons DECLSPEC void ripemd160_update_global_utf16le (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - ripemd160_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + ripemd160_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void ripemd160_update_global_utf16le_swap (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - ripemd160_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + ripemd160_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void ripemd160_final (ripemd160_ctx_t *ctx) @@ -1202,16 +1002,6 @@ DECLSPEC void ripemd160_hmac_update_swap (ripemd160_hmac_ctx_t *ctx, const u32 * ripemd160_update_swap (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_update_utf16le (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - ripemd160_update_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void ripemd160_hmac_update_utf16le_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - ripemd160_update_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void ripemd160_hmac_update_global (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { ripemd160_update_global (&ctx->ipad, w, len); @@ -1222,16 +1012,6 @@ DECLSPEC void ripemd160_hmac_update_global_swap (ripemd160_hmac_ctx_t *ctx, GLOB ripemd160_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_update_global_utf16le (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - ripemd160_update_global_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void ripemd160_hmac_update_global_utf16le_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - ripemd160_update_global_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void ripemd160_hmac_final (ripemd160_hmac_ctx_t *ctx) { ripemd160_final (&ctx->ipad); diff --git a/OpenCL/inc_hash_ripemd160.h b/OpenCL/inc_hash_ripemd160.h index 25a69ed56..70fa3f60f 100644 --- a/OpenCL/inc_hash_ripemd160.h +++ b/OpenCL/inc_hash_ripemd160.h @@ -122,12 +122,8 @@ DECLSPEC void ripemd160_hmac_init_global_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL DECLSPEC void ripemd160_hmac_update_64 (ripemd160_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); DECLSPEC void ripemd160_hmac_update (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void ripemd160_hmac_update_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_utf16le (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_utf16le_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void ripemd160_hmac_update_global (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void ripemd160_hmac_update_global_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_global_utf16le (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_global_utf16le_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void ripemd160_hmac_final (ripemd160_hmac_ctx_t *ctx); DECLSPEC void ripemd160_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); DECLSPEC void ripemd160_init_vector (ripemd160_ctx_vector_t *ctx); diff --git a/OpenCL/inc_hash_sha1.cl b/OpenCL/inc_hash_sha1.cl index a8f754c1a..3ea263178 100644 --- a/OpenCL/inc_hash_sha1.cl +++ b/OpenCL/inc_hash_sha1.cl @@ -612,120 +612,20 @@ DECLSPEC void sha1_update_swap (sha1_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void sha1_update_utf16le (sha1_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha1_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha1_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha1_update_utf16le_swap (sha1_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha1_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha1_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha1_update_utf16be (sha1_ctx_t *ctx, const u32 *w, const int len) @@ -986,120 +886,20 @@ DECLSPEC void sha1_update_global_swap (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, DECLSPEC void sha1_update_global_utf16le (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha1_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha1_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha1_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha1_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha1_update_global_utf16be (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) @@ -1553,16 +1353,6 @@ DECLSPEC void sha1_hmac_update_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const i sha1_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_update_utf16le (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha1_update_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha1_hmac_update_utf16le_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha1_update_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha1_hmac_update_global (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha1_update_global (&ctx->ipad, w, len); @@ -1573,16 +1363,6 @@ DECLSPEC void sha1_hmac_update_global_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS cons sha1_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_update_global_utf16le (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha1_update_global_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha1_hmac_update_global_utf16le_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha1_update_global_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha1_hmac_final (sha1_hmac_ctx_t *ctx) { sha1_final (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha1.h b/OpenCL/inc_hash_sha1.h index 2ff36fdad..69f6b58d4 100644 --- a/OpenCL/inc_hash_sha1.h +++ b/OpenCL/inc_hash_sha1.h @@ -114,12 +114,8 @@ DECLSPEC void sha1_hmac_init_global_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const DECLSPEC void sha1_hmac_update_64 (sha1_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); DECLSPEC void sha1_hmac_update (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha1_hmac_update_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_utf16le (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_utf16le_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha1_hmac_update_global (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha1_hmac_update_global_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_global_utf16le (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_global_utf16le_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha1_hmac_final (sha1_hmac_ctx_t *ctx); DECLSPEC void sha1_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); DECLSPEC void sha1_init_vector (sha1_ctx_vector_t *ctx); diff --git a/OpenCL/inc_hash_sha224.cl b/OpenCL/inc_hash_sha224.cl index 72f3dac99..2e970a10a 100644 --- a/OpenCL/inc_hash_sha224.cl +++ b/OpenCL/inc_hash_sha224.cl @@ -414,120 +414,20 @@ DECLSPEC void sha224_update_swap (sha224_ctx_t *ctx, const u32 *w, const int len DECLSPEC void sha224_update_utf16le (sha224_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha224_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha224_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha224_update_utf16le_swap (sha224_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha224_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha224_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha224_update_global (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) @@ -670,120 +570,20 @@ DECLSPEC void sha224_update_global_swap (sha224_ctx_t *ctx, GLOBAL_AS const u32 DECLSPEC void sha224_update_global_utf16le (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha224_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha224_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha224_update_global_utf16le_swap (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha224_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha224_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha224_final (sha224_ctx_t *ctx) @@ -1119,16 +919,6 @@ DECLSPEC void sha224_hmac_update_swap (sha224_hmac_ctx_t *ctx, const u32 *w, con sha224_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_update_utf16le (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha224_update_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha224_hmac_update_utf16le_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha224_update_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha224_hmac_update_global (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha224_update_global (&ctx->ipad, w, len); @@ -1139,16 +929,6 @@ DECLSPEC void sha224_hmac_update_global_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS sha224_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_update_global_utf16le (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha224_update_global_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha224_hmac_update_global_utf16le_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha224_update_global_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha224_hmac_final (sha224_hmac_ctx_t *ctx) { sha224_final (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha224.h b/OpenCL/inc_hash_sha224.h index d68c79d65..46f03a35d 100644 --- a/OpenCL/inc_hash_sha224.h +++ b/OpenCL/inc_hash_sha224.h @@ -109,12 +109,8 @@ DECLSPEC void sha224_hmac_init_global_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS co DECLSPEC void sha224_hmac_update_64 (sha224_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); DECLSPEC void sha224_hmac_update (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha224_hmac_update_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_utf16le (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_utf16le_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha224_hmac_update_global (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha224_hmac_update_global_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_global_utf16le (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_global_utf16le_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha224_hmac_final (sha224_hmac_ctx_t *ctx); DECLSPEC void sha224_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); DECLSPEC void sha224_init_vector (sha224_ctx_vector_t *ctx); diff --git a/OpenCL/inc_hash_sha256.cl b/OpenCL/inc_hash_sha256.cl index 430b0e8b9..93208b060 100644 --- a/OpenCL/inc_hash_sha256.cl +++ b/OpenCL/inc_hash_sha256.cl @@ -414,120 +414,20 @@ DECLSPEC void sha256_update_swap (sha256_ctx_t *ctx, const u32 *w, const int len DECLSPEC void sha256_update_utf16le (sha256_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha256_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha256_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha256_update_utf16le_swap (sha256_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha256_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha256_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha256_update_global (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) @@ -670,120 +570,20 @@ DECLSPEC void sha256_update_global_swap (sha256_ctx_t *ctx, GLOBAL_AS const u32 DECLSPEC void sha256_update_global_utf16le (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha256_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha256_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha256_update_global_utf16le_swap (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha256_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + sha256_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha256_final (sha256_ctx_t *ctx) @@ -1119,16 +919,6 @@ DECLSPEC void sha256_hmac_update_swap (sha256_hmac_ctx_t *ctx, const u32 *w, con sha256_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_update_utf16le (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha256_update_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha256_hmac_update_utf16le_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha256_update_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha256_hmac_update_global (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha256_update_global (&ctx->ipad, w, len); @@ -1139,16 +929,6 @@ DECLSPEC void sha256_hmac_update_global_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS sha256_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_update_global_utf16le (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha256_update_global_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha256_hmac_update_global_utf16le_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha256_update_global_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha256_hmac_final (sha256_hmac_ctx_t *ctx) { sha256_final (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha256.h b/OpenCL/inc_hash_sha256.h index ccf5a79f8..bc655d80b 100644 --- a/OpenCL/inc_hash_sha256.h +++ b/OpenCL/inc_hash_sha256.h @@ -109,12 +109,8 @@ DECLSPEC void sha256_hmac_init_global_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS co DECLSPEC void sha256_hmac_update_64 (sha256_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); DECLSPEC void sha256_hmac_update (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha256_hmac_update_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_utf16le (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_utf16le_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha256_hmac_update_global (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha256_hmac_update_global_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_global_utf16le (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_global_utf16le_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha256_hmac_final (sha256_hmac_ctx_t *ctx); DECLSPEC void sha256_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); DECLSPEC void sha256_init_vector (sha256_ctx_vector_t *ctx); diff --git a/OpenCL/inc_hash_sha384.cl b/OpenCL/inc_hash_sha384.cl index d63a5ab2b..37db1f676 100644 --- a/OpenCL/inc_hash_sha384.cl +++ b/OpenCL/inc_hash_sha384.cl @@ -622,200 +622,20 @@ DECLSPEC void sha384_update_swap (sha384_ctx_t *ctx, const u32 *w, const int len DECLSPEC void sha384_update_utf16le (sha384_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - u32 w4[4]; - u32 w5[4]; - u32 w6[4]; - u32 w7[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, 64 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); + sha384_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha384_update_utf16le_swap (sha384_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - u32 w4[4]; - u32 w5[4]; - u32 w6[4]; - u32 w7[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - w4[0] = hc_swap32_S (w4[0]); - w4[1] = hc_swap32_S (w4[1]); - w4[2] = hc_swap32_S (w4[2]); - w4[3] = hc_swap32_S (w4[3]); - w5[0] = hc_swap32_S (w5[0]); - w5[1] = hc_swap32_S (w5[1]); - w5[2] = hc_swap32_S (w5[2]); - w5[3] = hc_swap32_S (w5[3]); - w6[0] = hc_swap32_S (w6[0]); - w6[1] = hc_swap32_S (w6[1]); - w6[2] = hc_swap32_S (w6[2]); - w6[3] = hc_swap32_S (w6[3]); - w7[0] = hc_swap32_S (w7[0]); - w7[1] = hc_swap32_S (w7[1]); - w7[2] = hc_swap32_S (w7[2]); - w7[3] = hc_swap32_S (w7[3]); - - sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, 64 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - w4[0] = hc_swap32_S (w4[0]); - w4[1] = hc_swap32_S (w4[1]); - w4[2] = hc_swap32_S (w4[2]); - w4[3] = hc_swap32_S (w4[3]); - w5[0] = hc_swap32_S (w5[0]); - w5[1] = hc_swap32_S (w5[1]); - w5[2] = hc_swap32_S (w5[2]); - w5[3] = hc_swap32_S (w5[3]); - w6[0] = hc_swap32_S (w6[0]); - w6[1] = hc_swap32_S (w6[1]); - w6[2] = hc_swap32_S (w6[2]); - w6[3] = hc_swap32_S (w6[3]); - w7[0] = hc_swap32_S (w7[0]); - w7[1] = hc_swap32_S (w7[1]); - w7[2] = hc_swap32_S (w7[2]); - w7[3] = hc_swap32_S (w7[3]); - - sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); + sha384_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha384_update_global (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) @@ -1062,200 +882,20 @@ DECLSPEC void sha384_update_global_swap (sha384_ctx_t *ctx, GLOBAL_AS const u32 DECLSPEC void sha384_update_global_utf16le (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - u32 w4[4]; - u32 w5[4]; - u32 w6[4]; - u32 w7[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, 64 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); + sha384_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha384_update_global_utf16le_swap (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - u32 w4[4]; - u32 w5[4]; - u32 w6[4]; - u32 w7[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - w4[0] = hc_swap32_S (w4[0]); - w4[1] = hc_swap32_S (w4[1]); - w4[2] = hc_swap32_S (w4[2]); - w4[3] = hc_swap32_S (w4[3]); - w5[0] = hc_swap32_S (w5[0]); - w5[1] = hc_swap32_S (w5[1]); - w5[2] = hc_swap32_S (w5[2]); - w5[3] = hc_swap32_S (w5[3]); - w6[0] = hc_swap32_S (w6[0]); - w6[1] = hc_swap32_S (w6[1]); - w6[2] = hc_swap32_S (w6[2]); - w6[3] = hc_swap32_S (w6[3]); - w7[0] = hc_swap32_S (w7[0]); - w7[1] = hc_swap32_S (w7[1]); - w7[2] = hc_swap32_S (w7[2]); - w7[3] = hc_swap32_S (w7[3]); - - sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, 64 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - w4[0] = hc_swap32_S (w4[0]); - w4[1] = hc_swap32_S (w4[1]); - w4[2] = hc_swap32_S (w4[2]); - w4[3] = hc_swap32_S (w4[3]); - w5[0] = hc_swap32_S (w5[0]); - w5[1] = hc_swap32_S (w5[1]); - w5[2] = hc_swap32_S (w5[2]); - w5[3] = hc_swap32_S (w5[3]); - w6[0] = hc_swap32_S (w6[0]); - w6[1] = hc_swap32_S (w6[1]); - w6[2] = hc_swap32_S (w6[2]); - w6[3] = hc_swap32_S (w6[3]); - w7[0] = hc_swap32_S (w7[0]); - w7[1] = hc_swap32_S (w7[1]); - w7[2] = hc_swap32_S (w7[2]); - w7[3] = hc_swap32_S (w7[3]); - - sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); + sha384_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha384_final (sha384_ctx_t *ctx) @@ -1787,16 +1427,6 @@ DECLSPEC void sha384_hmac_update_swap (sha384_hmac_ctx_t *ctx, const u32 *w, con sha384_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_update_utf16le (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha384_update_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha384_hmac_update_utf16le_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha384_update_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha384_hmac_update_global (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha384_update_global (&ctx->ipad, w, len); @@ -1807,16 +1437,6 @@ DECLSPEC void sha384_hmac_update_global_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS sha384_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_update_global_utf16le (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha384_update_global_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha384_hmac_update_global_utf16le_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha384_update_global_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha384_hmac_final (sha384_hmac_ctx_t *ctx) { sha384_final (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha384.h b/OpenCL/inc_hash_sha384.h index 92266b24a..e3705c206 100644 --- a/OpenCL/inc_hash_sha384.h +++ b/OpenCL/inc_hash_sha384.h @@ -123,12 +123,8 @@ DECLSPEC void sha384_hmac_init_global_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS co DECLSPEC void sha384_hmac_update_128 (sha384_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len); DECLSPEC void sha384_hmac_update (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha384_hmac_update_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_utf16le (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_utf16le_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha384_hmac_update_global (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha384_hmac_update_global_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_global_utf16le (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_global_utf16le_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha384_hmac_final (sha384_hmac_ctx_t *ctx); DECLSPEC void sha384_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest); DECLSPEC void sha384_init_vector (sha384_ctx_vector_t *ctx); diff --git a/OpenCL/inc_hash_sha512.cl b/OpenCL/inc_hash_sha512.cl index 0f5ca288a..a00780271 100644 --- a/OpenCL/inc_hash_sha512.cl +++ b/OpenCL/inc_hash_sha512.cl @@ -622,200 +622,20 @@ DECLSPEC void sha512_update_swap (sha512_ctx_t *ctx, const u32 *w, const int len DECLSPEC void sha512_update_utf16le (sha512_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - u32 w4[4]; - u32 w5[4]; - u32 w6[4]; - u32 w7[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, 64 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); + sha512_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha512_update_utf16le_swap (sha512_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - u32 w4[4]; - u32 w5[4]; - u32 w6[4]; - u32 w7[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - w4[0] = hc_swap32_S (w4[0]); - w4[1] = hc_swap32_S (w4[1]); - w4[2] = hc_swap32_S (w4[2]); - w4[3] = hc_swap32_S (w4[3]); - w5[0] = hc_swap32_S (w5[0]); - w5[1] = hc_swap32_S (w5[1]); - w5[2] = hc_swap32_S (w5[2]); - w5[3] = hc_swap32_S (w5[3]); - w6[0] = hc_swap32_S (w6[0]); - w6[1] = hc_swap32_S (w6[1]); - w6[2] = hc_swap32_S (w6[2]); - w6[3] = hc_swap32_S (w6[3]); - w7[0] = hc_swap32_S (w7[0]); - w7[1] = hc_swap32_S (w7[1]); - w7[2] = hc_swap32_S (w7[2]); - w7[3] = hc_swap32_S (w7[3]); - - sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, 64 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - w4[0] = hc_swap32_S (w4[0]); - w4[1] = hc_swap32_S (w4[1]); - w4[2] = hc_swap32_S (w4[2]); - w4[3] = hc_swap32_S (w4[3]); - w5[0] = hc_swap32_S (w5[0]); - w5[1] = hc_swap32_S (w5[1]); - w5[2] = hc_swap32_S (w5[2]); - w5[3] = hc_swap32_S (w5[3]); - w6[0] = hc_swap32_S (w6[0]); - w6[1] = hc_swap32_S (w6[1]); - w6[2] = hc_swap32_S (w6[2]); - w6[3] = hc_swap32_S (w6[3]); - w7[0] = hc_swap32_S (w7[0]); - w7[1] = hc_swap32_S (w7[1]); - w7[2] = hc_swap32_S (w7[2]); - w7[3] = hc_swap32_S (w7[3]); - - sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); + sha512_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha512_update_global (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) @@ -1062,200 +882,20 @@ DECLSPEC void sha512_update_global_swap (sha512_ctx_t *ctx, GLOBAL_AS const u32 DECLSPEC void sha512_update_global_utf16le (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - u32 w4[4]; - u32 w5[4]; - u32 w6[4]; - u32 w7[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, 64 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); + sha512_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha512_update_global_utf16le_swap (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - u32 w4[4]; - u32 w5[4]; - u32 w6[4]; - u32 w7[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - w4[0] = hc_swap32_S (w4[0]); - w4[1] = hc_swap32_S (w4[1]); - w4[2] = hc_swap32_S (w4[2]); - w4[3] = hc_swap32_S (w4[3]); - w5[0] = hc_swap32_S (w5[0]); - w5[1] = hc_swap32_S (w5[1]); - w5[2] = hc_swap32_S (w5[2]); - w5[3] = hc_swap32_S (w5[3]); - w6[0] = hc_swap32_S (w6[0]); - w6[1] = hc_swap32_S (w6[1]); - w6[2] = hc_swap32_S (w6[2]); - w6[3] = hc_swap32_S (w6[3]); - w7[0] = hc_swap32_S (w7[0]); - w7[1] = hc_swap32_S (w7[1]); - w7[2] = hc_swap32_S (w7[2]); - w7[3] = hc_swap32_S (w7[3]); - - sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, 64 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - w2[0] = w[pos4 + 8]; - w2[1] = w[pos4 + 9]; - w2[2] = w[pos4 + 10]; - w2[3] = w[pos4 + 11]; - w3[0] = w[pos4 + 12]; - w3[1] = w[pos4 + 13]; - w3[2] = w[pos4 + 14]; - w3[3] = w[pos4 + 15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - w4[0] = hc_swap32_S (w4[0]); - w4[1] = hc_swap32_S (w4[1]); - w4[2] = hc_swap32_S (w4[2]); - w4[3] = hc_swap32_S (w4[3]); - w5[0] = hc_swap32_S (w5[0]); - w5[1] = hc_swap32_S (w5[1]); - w5[2] = hc_swap32_S (w5[2]); - w5[3] = hc_swap32_S (w5[3]); - w6[0] = hc_swap32_S (w6[0]); - w6[1] = hc_swap32_S (w6[1]); - w6[2] = hc_swap32_S (w6[2]); - w6[3] = hc_swap32_S (w6[3]); - w7[0] = hc_swap32_S (w7[0]); - w7[1] = hc_swap32_S (w7[1]); - w7[2] = hc_swap32_S (w7[2]); - w7[3] = hc_swap32_S (w7[3]); - - sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); + sha512_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha512_final (sha512_ctx_t *ctx) @@ -1772,121 +1412,22 @@ DECLSPEC void sha512_hmac_init_global_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS co sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } +DECLSPEC void sha512_hmac_init_global_ut16le (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +{ + u32 w_utf16_buf[256] = { 0 }; + + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); + + sha512_hmac_init (ctx, w_utf16_buf, w_utf16_len); +} + DECLSPEC void sha512_hmac_init_global_utf16le_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - u32 w4[4]; - u32 w5[4]; - u32 w6[4]; - u32 w7[4]; + u32 w_utf16_buf[256] = { 0 }; - const int len_new = len * 2; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - if (len_new > 128) - { - sha512_ctx_t tmp; - - sha512_init (&tmp); - - sha512_update_global_utf16le_swap (&tmp, w, len); - - sha512_final (&tmp); - - w0[0] = h32_from_64_S (tmp.h[0]); - w0[1] = l32_from_64_S (tmp.h[0]); - w0[2] = h32_from_64_S (tmp.h[1]); - w0[3] = l32_from_64_S (tmp.h[1]); - w1[0] = h32_from_64_S (tmp.h[2]); - w1[1] = l32_from_64_S (tmp.h[2]); - w1[2] = h32_from_64_S (tmp.h[3]); - w1[3] = l32_from_64_S (tmp.h[3]); - w2[0] = h32_from_64_S (tmp.h[4]); - w2[1] = l32_from_64_S (tmp.h[4]); - w2[2] = h32_from_64_S (tmp.h[5]); - w2[3] = l32_from_64_S (tmp.h[5]); - w3[0] = h32_from_64_S (tmp.h[6]); - w3[1] = l32_from_64_S (tmp.h[6]); - w3[2] = h32_from_64_S (tmp.h[7]); - w3[3] = l32_from_64_S (tmp.h[7]); - w4[0] = 0; - w4[1] = 0; - w4[2] = 0; - w4[3] = 0; - w5[0] = 0; - w5[1] = 0; - w5[2] = 0; - w5[3] = 0; - w6[0] = 0; - w6[1] = 0; - w6[2] = 0; - w6[3] = 0; - w7[0] = 0; - w7[1] = 0; - w7[2] = 0; - w7[3] = 0; - } - else - { - w0[0] = w[ 0]; - w0[1] = w[ 1]; - w0[2] = w[ 2]; - w0[3] = w[ 3]; - w1[0] = w[ 4]; - w1[1] = w[ 5]; - w1[2] = w[ 6]; - w1[3] = w[ 7]; - w2[0] = w[ 8]; - w2[1] = w[ 9]; - w2[2] = w[10]; - w2[3] = w[11]; - w3[0] = w[12]; - w3[1] = w[13]; - w3[2] = w[14]; - w3[3] = w[15]; - - make_utf16le_S (w3, w6, w7); - make_utf16le_S (w2, w4, w5); - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - w4[0] = hc_swap32_S (w4[0]); - w4[1] = hc_swap32_S (w4[1]); - w4[2] = hc_swap32_S (w4[2]); - w4[3] = hc_swap32_S (w4[3]); - w5[0] = hc_swap32_S (w5[0]); - w5[1] = hc_swap32_S (w5[1]); - w5[2] = hc_swap32_S (w5[2]); - w5[3] = hc_swap32_S (w5[3]); - w6[0] = hc_swap32_S (w6[0]); - w6[1] = hc_swap32_S (w6[1]); - w6[2] = hc_swap32_S (w6[2]); - w6[3] = hc_swap32_S (w6[3]); - w7[0] = hc_swap32_S (w7[0]); - w7[1] = hc_swap32_S (w7[1]); - w7[2] = hc_swap32_S (w7[2]); - w7[3] = hc_swap32_S (w7[3]); - } - - sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); + sha512_hmac_init_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void sha512_hmac_update_128 (sha512_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len) @@ -1904,16 +1445,6 @@ DECLSPEC void sha512_hmac_update_swap (sha512_hmac_ctx_t *ctx, const u32 *w, con sha512_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_update_utf16le (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha512_update_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha512_hmac_update_utf16le_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - sha512_update_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha512_hmac_update_global (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha512_update_global (&ctx->ipad, w, len); @@ -1924,16 +1455,6 @@ DECLSPEC void sha512_hmac_update_global_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS sha512_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_update_global_utf16le (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha512_update_global_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void sha512_hmac_update_global_utf16le_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - sha512_update_global_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void sha512_hmac_final (sha512_hmac_ctx_t *ctx) { sha512_final (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha512.h b/OpenCL/inc_hash_sha512.h index c66aa1fb9..7009b7d4a 100644 --- a/OpenCL/inc_hash_sha512.h +++ b/OpenCL/inc_hash_sha512.h @@ -120,16 +120,13 @@ DECLSPEC void sha512_hmac_init (sha512_hmac_ctx_t *ctx, const u32 *w, const int DECLSPEC void sha512_hmac_init_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha512_hmac_init_global (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha512_hmac_init_global_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_init_global_ut16le (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha512_hmac_init_global_utf16le_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha512_hmac_update_128 (sha512_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len); DECLSPEC void sha512_hmac_update (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha512_hmac_update_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_utf16le (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_utf16le_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void sha512_hmac_update_global (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha512_hmac_update_global_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_global_utf16le (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_global_utf16le_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void sha512_hmac_final (sha512_hmac_ctx_t *ctx); DECLSPEC void sha512_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest); DECLSPEC void sha512_init_vector (sha512_ctx_vector_t *ctx); diff --git a/OpenCL/inc_hash_whirlpool.cl b/OpenCL/inc_hash_whirlpool.cl index 2835fc72d..d2853e4f9 100644 --- a/OpenCL/inc_hash_whirlpool.cl +++ b/OpenCL/inc_hash_whirlpool.cl @@ -1018,120 +1018,20 @@ DECLSPEC void whirlpool_update_swap (whirlpool_ctx_t *ctx, const u32 *w, const i DECLSPEC void whirlpool_update_utf16le (whirlpool_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - whirlpool_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + whirlpool_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void whirlpool_update_utf16le_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - whirlpool_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + whirlpool_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void whirlpool_update_global (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) @@ -1274,120 +1174,20 @@ DECLSPEC void whirlpool_update_global_swap (whirlpool_ctx_t *ctx, GLOBAL_AS cons DECLSPEC void whirlpool_update_global_utf16le (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - whirlpool_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + whirlpool_update (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void whirlpool_update_global_utf16le_swap (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + u32 w_utf16_buf[256] = { 0 }; - int pos1; - int pos4; + const int w_utf16_len = utf8_to_utf16le_global (w, len, 256, w_utf16_buf, sizeof (w_utf16_buf)); - for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8) - { - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - whirlpool_update_64 (ctx, w0, w1, w2, w3, 32 * 2); - } - - w0[0] = w[pos4 + 0]; - w0[1] = w[pos4 + 1]; - w0[2] = w[pos4 + 2]; - w0[3] = w[pos4 + 3]; - w1[0] = w[pos4 + 4]; - w1[1] = w[pos4 + 5]; - w1[2] = w[pos4 + 6]; - w1[3] = w[pos4 + 7]; - - make_utf16le_S (w1, w2, w3); - make_utf16le_S (w0, w0, w1); - - w0[0] = hc_swap32_S (w0[0]); - w0[1] = hc_swap32_S (w0[1]); - w0[2] = hc_swap32_S (w0[2]); - w0[3] = hc_swap32_S (w0[3]); - w1[0] = hc_swap32_S (w1[0]); - w1[1] = hc_swap32_S (w1[1]); - w1[2] = hc_swap32_S (w1[2]); - w1[3] = hc_swap32_S (w1[3]); - w2[0] = hc_swap32_S (w2[0]); - w2[1] = hc_swap32_S (w2[1]); - w2[2] = hc_swap32_S (w2[2]); - w2[3] = hc_swap32_S (w2[3]); - w3[0] = hc_swap32_S (w3[0]); - w3[1] = hc_swap32_S (w3[1]); - w3[2] = hc_swap32_S (w3[2]); - w3[3] = hc_swap32_S (w3[3]); - - whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); + whirlpool_update_swap (ctx, w_utf16_buf, w_utf16_len); } DECLSPEC void whirlpool_final (whirlpool_ctx_t *ctx) @@ -1723,16 +1523,6 @@ DECLSPEC void whirlpool_hmac_update_swap (whirlpool_hmac_ctx_t *ctx, const u32 * whirlpool_update_swap (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_update_utf16le (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - whirlpool_update_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void whirlpool_hmac_update_utf16le_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) -{ - whirlpool_update_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void whirlpool_hmac_update_global (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { whirlpool_update_global (&ctx->ipad, w, len); @@ -1743,16 +1533,6 @@ DECLSPEC void whirlpool_hmac_update_global_swap (whirlpool_hmac_ctx_t *ctx, GLOB whirlpool_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_update_global_utf16le (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - whirlpool_update_global_utf16le (&ctx->ipad, w, len); -} - -DECLSPEC void whirlpool_hmac_update_global_utf16le_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) -{ - whirlpool_update_global_utf16le_swap (&ctx->ipad, w, len); -} - DECLSPEC void whirlpool_hmac_final (whirlpool_hmac_ctx_t *ctx) { whirlpool_final (&ctx->ipad); diff --git a/OpenCL/inc_hash_whirlpool.h b/OpenCL/inc_hash_whirlpool.h index e13ec9960..b7600feca 100644 --- a/OpenCL/inc_hash_whirlpool.h +++ b/OpenCL/inc_hash_whirlpool.h @@ -104,12 +104,8 @@ DECLSPEC void whirlpool_hmac_init_global_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL DECLSPEC void whirlpool_hmac_update_64 (whirlpool_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); DECLSPEC void whirlpool_hmac_update (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void whirlpool_hmac_update_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_utf16le (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_utf16le_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len); DECLSPEC void whirlpool_hmac_update_global (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void whirlpool_hmac_update_global_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_global_utf16le (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_global_utf16le_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); DECLSPEC void whirlpool_hmac_final (whirlpool_hmac_ctx_t *ctx); DECLSPEC void whirlpool_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); DECLSPEC void whirlpool_init_vector (whirlpool_ctx_vector_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); diff --git a/OpenCL/inc_scalar.cl b/OpenCL/inc_scalar.cl index 49983b10a..e9ea12315 100644 --- a/OpenCL/inc_scalar.cl +++ b/OpenCL/inc_scalar.cl @@ -7,11 +7,11 @@ { \ if (((h0) == search[0]) && ((h1) == search[1]) && ((h2) == search[2]) && ((h3) == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos, 0, 0); \ } \ } \ } @@ -27,15 +27,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); \ } \ } \ } \ diff --git a/OpenCL/inc_simd.h b/OpenCL/inc_simd.h index a9a23b6db..fb0cb1e5d 100644 --- a/OpenCL/inc_simd.h +++ b/OpenCL/inc_simd.h @@ -17,11 +17,11 @@ { \ if (((h0) == search[0]) && ((h1) == search[1]) && ((h2) == search[2]) && ((h3) == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos, 0, 0); \ } \ } \ } @@ -37,15 +37,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); \ } \ } \ } \ @@ -66,21 +66,21 @@ { \ if (((h0).s0 == search[0]) && ((h1).s0 == search[1]) && ((h2).s0 == search[2]) && ((h3).s0 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 0) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 0, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 0, 0, 0); \ } \ } \ \ if (((h0).s1 == search[0]) && ((h1).s1 == search[1]) && ((h2).s1 == search[2]) && ((h3).s1 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 1) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 1, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 1, 0, 0); \ } \ } \ } @@ -97,15 +97,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 0) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 0, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 0, 0, 0); \ } \ } \ } \ @@ -117,15 +117,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 1) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 1, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 1, 0, 0); \ } \ } \ } \ @@ -144,41 +144,41 @@ { \ if (((h0).s0 == search[0]) && ((h1).s0 == search[1]) && ((h2).s0 == search[2]) && ((h3).s0 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 0) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 0, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 0, 0, 0); \ } \ } \ \ if (((h0).s1 == search[0]) && ((h1).s1 == search[1]) && ((h2).s1 == search[2]) && ((h3).s1 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 1) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 1, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 1, 0, 0); \ } \ } \ \ if (((h0).s2 == search[0]) && ((h1).s2 == search[1]) && ((h2).s2 == search[2]) && ((h3).s2 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 2) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 2, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 2, 0, 0); \ } \ } \ \ if (((h0).s3 == search[0]) && ((h1).s3 == search[1]) && ((h2).s3 == search[2]) && ((h3).s3 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 3) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 3, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 3, 0, 0); \ } \ } \ } @@ -197,15 +197,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 0) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 0, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 0, 0, 0); \ } \ } \ } \ @@ -217,15 +217,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 1) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 1, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 1, 0, 0); \ } \ } \ } \ @@ -237,15 +237,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp2, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp2, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 2) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 2, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 2, 0, 0); \ } \ } \ } \ @@ -257,15 +257,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp3, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp3, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 3) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 3, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 3, 0, 0); \ } \ } \ } \ @@ -284,80 +284,80 @@ { \ if (((h0).s0 == search[0]) && ((h1).s0 == search[1]) && ((h2).s0 == search[2]) && ((h3).s0 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 0) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 0, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 0, 0, 0); \ } \ } \ \ if (((h0).s1 == search[0]) && ((h1).s1 == search[1]) && ((h2).s1 == search[2]) && ((h3).s1 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 1) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 1, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 1, 0, 0); \ } \ } \ \ if (((h0).s2 == search[0]) && ((h1).s2 == search[1]) && ((h2).s2 == search[2]) && ((h3).s2 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 2) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 2, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 2, 0, 0); \ } \ } \ \ if (((h0).s3 == search[0]) && ((h1).s3 == search[1]) && ((h2).s3 == search[2]) && ((h3).s3 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 3) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 3, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 3, 0, 0); \ } \ } \ if (((h0).s4 == search[0]) && ((h1).s4 == search[1]) && ((h2).s4 == search[2]) && ((h3).s4 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 4) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 4, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 4, 0, 0); \ } \ } \ \ if (((h0).s5 == search[0]) && ((h1).s5 == search[1]) && ((h2).s5 == search[2]) && ((h3).s5 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 5) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 5, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 5, 0, 0); \ } \ } \ \ if (((h0).s6 == search[0]) && ((h1).s6 == search[1]) && ((h2).s6 == search[2]) && ((h3).s6 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 6) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 6, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 6, 0, 0); \ } \ } \ \ if (((h0).s7 == search[0]) && ((h1).s7 == search[1]) && ((h2).s7 == search[2]) && ((h3).s7 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 7) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 7, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 7, 0, 0); \ } \ } \ } @@ -380,15 +380,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 0) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 0, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 0, 0, 0); \ } \ } \ } \ @@ -400,15 +400,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 1) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 1, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 1, 0, 0); \ } \ } \ } \ @@ -420,15 +420,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp2, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp2, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 2) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 2, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 2, 0, 0); \ } \ } \ } \ @@ -440,15 +440,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp3, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp3, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 3) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 3, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 3, 0, 0); \ } \ } \ } \ @@ -459,15 +459,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp4, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp4, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 4) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 4, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 4, 0, 0); \ } \ } \ } \ @@ -479,15 +479,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp5, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp5, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 5) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 5, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 5, 0, 0); \ } \ } \ } \ @@ -499,15 +499,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp6, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp6, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 6) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 6, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 6, 0, 0); \ } \ } \ } \ @@ -519,15 +519,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp7, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp7, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 7) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 7, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 7, 0, 0); \ } \ } \ } \ @@ -546,160 +546,160 @@ { \ if (((h0).s0 == search[0]) && ((h1).s0 == search[1]) && ((h2).s0 == search[2]) && ((h3).s0 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 0) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 0, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 0, 0, 0); \ } \ } \ \ if (((h0).s1 == search[0]) && ((h1).s1 == search[1]) && ((h2).s1 == search[2]) && ((h3).s1 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 1) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 1, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 1, 0, 0); \ } \ } \ \ if (((h0).s2 == search[0]) && ((h1).s2 == search[1]) && ((h2).s2 == search[2]) && ((h3).s2 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 2) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 2, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 2, 0, 0); \ } \ } \ \ if (((h0).s3 == search[0]) && ((h1).s3 == search[1]) && ((h2).s3 == search[2]) && ((h3).s3 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 3) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 3, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 3, 0, 0); \ } \ } \ if (((h0).s4 == search[0]) && ((h1).s4 == search[1]) && ((h2).s4 == search[2]) && ((h3).s4 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 4) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 4, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 4, 0, 0); \ } \ } \ \ if (((h0).s5 == search[0]) && ((h1).s5 == search[1]) && ((h2).s5 == search[2]) && ((h3).s5 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 5) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 5, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 5, 0, 0); \ } \ } \ \ if (((h0).s6 == search[0]) && ((h1).s6 == search[1]) && ((h2).s6 == search[2]) && ((h3).s6 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 6) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 6, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 6, 0, 0); \ } \ } \ \ if (((h0).s7 == search[0]) && ((h1).s7 == search[1]) && ((h2).s7 == search[2]) && ((h3).s7 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 7) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 7, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 7, 0, 0); \ } \ } \ \ if (((h0).s8 == search[0]) && ((h1).s8 == search[1]) && ((h2).s8 == search[2]) && ((h3).s8 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 8) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 8, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 8, 0, 0); \ } \ } \ \ if (((h0).s9 == search[0]) && ((h1).s9 == search[1]) && ((h2).s9 == search[2]) && ((h3).s9 == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 9) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 9, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 9, 0, 0); \ } \ } \ \ if (((h0).sa == search[0]) && ((h1).sa == search[1]) && ((h2).sa == search[2]) && ((h3).sa == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 10) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 10, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 10, 0, 0); \ } \ } \ \ if (((h0).sb == search[0]) && ((h1).sb == search[1]) && ((h2).sb == search[2]) && ((h3).sb == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 11) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 11, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 11, 0, 0); \ } \ } \ \ if (((h0).sc == search[0]) && ((h1).sc == search[1]) && ((h2).sc == search[2]) && ((h3).sc == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 12) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 12, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 12, 0, 0); \ } \ } \ \ if (((h0).sd == search[0]) && ((h1).sd == search[1]) && ((h2).sd == search[2]) && ((h3).sd == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 13) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 13, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 13, 0, 0); \ } \ } \ \ if (((h0).se == search[0]) && ((h1).se == search[1]) && ((h2).se == search[2]) && ((h3).se == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 14) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 14, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 14, 0, 0); \ } \ } \ \ if (((h0).sf == search[0]) && ((h1).sf == search[1]) && ((h2).sf == search[2]) && ((h3).sf == search[3])) \ { \ - const u32 final_hash_pos = digests_offset + 0; \ + const u32 final_hash_pos = DIGESTS_OFFSET + 0; \ \ if (vector_accessible (il_pos, il_cnt, 15) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, final_hash_pos, gid, il_pos + 15, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, final_hash_pos, gid, il_pos + 15, 0, 0); \ } \ } \ } @@ -730,15 +730,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp00, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp00, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 0) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 0, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 0, 0, 0); \ } \ } \ } \ @@ -750,15 +750,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp01, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp01, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 1) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 1, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 1, 0, 0); \ } \ } \ } \ @@ -770,15 +770,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp02, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp02, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 2) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 2, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 2, 0, 0); \ } \ } \ } \ @@ -790,15 +790,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp03, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp03, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 3) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 3, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 3, 0, 0); \ } \ } \ } \ @@ -810,15 +810,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp04, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp04, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 4) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 4, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 4, 0, 0); \ } \ } \ } \ @@ -830,15 +830,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp05, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp05, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 5) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 5, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 5, 0, 0); \ } \ } \ } \ @@ -850,15 +850,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp06, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp06, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 6) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 6, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 6, 0, 0); \ } \ } \ } \ @@ -870,15 +870,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp07, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp07, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 7) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 7, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 7, 0, 0); \ } \ } \ } \ @@ -890,15 +890,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp08, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp08, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 8) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 8, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 8, 0, 0); \ } \ } \ } \ @@ -910,15 +910,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp09, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp09, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 9) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 9, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 9, 0, 0); \ } \ } \ } \ @@ -930,15 +930,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp10, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp10, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 10) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 10, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 10, 0, 0); \ } \ } \ } \ @@ -950,15 +950,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp11, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp11, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 11) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 11, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 11, 0, 0); \ } \ } \ } \ @@ -970,15 +970,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp12, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp12, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 12) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 12, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 12, 0, 0); \ } \ } \ } \ @@ -990,15 +990,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp13, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp13, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 13) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 13, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 13, 0, 0); \ } \ } \ } \ @@ -1010,15 +1010,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp14, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp14, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 14) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 14, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 14, 0, 0); \ } \ } \ } \ @@ -1030,15 +1030,15 @@ bitmap_shift1, \ bitmap_shift2)) \ { \ - int digest_pos = find_hash (digest_tp15, digests_cnt, &digests_buf[digests_offset]); \ + int digest_pos = find_hash (digest_tp15, digests_cnt, &digests_buf[DIGESTS_OFFSET]); \ \ if (digest_pos != -1) \ { \ - const u32 final_hash_pos = digests_offset + digest_pos; \ + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; \ \ if (vector_accessible (il_pos, il_cnt, 15) && (atomic_inc (&hashes_shown[final_hash_pos]) == 0)) \ { \ - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 15, 0, 0); \ + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos + 15, 0, 0); \ } \ } \ } \ diff --git a/OpenCL/inc_types.h b/OpenCL/inc_types.h index 9f0664263..9a5173c54 100644 --- a/OpenCL/inc_types.h +++ b/OpenCL/inc_types.h @@ -6,6 +6,16 @@ #ifndef _INC_TYPES_H #define _INC_TYPES_H +#if ATTACK_MODE == 9 +#define SALT_POS (pws_pos + gid) +#define DIGESTS_CNT 1 +#define DIGESTS_OFFSET (pws_pos + gid) +#else +#define SALT_POS salt_pos_host +#define DIGESTS_CNT digests_cnt_host +#define DIGESTS_OFFSET digests_offset_host +#endif + #ifdef IS_CUDA //https://docs.nvidia.com/cuda/nvrtc/index.html#integer-size typedef unsigned char uchar; @@ -161,6 +171,9 @@ inline __device__ u32x operator - (const u32x a, const u32x b) { return u32x (( inline __device__ u32x operator * (const u32x a, const u32 b) { return u32x ((a.s0 * b), (a.s1 * b) ); } inline __device__ u32x operator * (const u32x a, const u32x b) { return u32x ((a.s0 * b.s0), (a.s1 * b.s1)); } +inline __device__ u32x operator % (const u32x a, const u32 b) { return u32x ((a.s0 % b), (a.s1 % b) ); } +inline __device__ u32x operator % (const u32x a, const u32x b) { return u32x ((a.s0 % b.s0), (a.s1 % b.s1)); } + inline __device__ u32x operator ~ (const u32x a) { return u32x (~a.s0, ~a.s1); } inline __device__ bool operator != (const u64x a, const u64 b) { return ((a.s0 != b) && (a.s1 != b)); } @@ -214,6 +227,9 @@ inline __device__ u64x operator - (const u64x a, const u64x b) { return u64x (( inline __device__ u64x operator * (const u64x a, const u64 b) { return u64x ((a.s0 * b), (a.s1 * b) ); } inline __device__ u64x operator * (const u64x a, const u64x b) { return u64x ((a.s0 * b.s0), (a.s1 * b.s1)); } +inline __device__ u64x operator % (const u64x a, const u64 b) { return u64x ((a.s0 % b), (a.s1 % b) ); } +inline __device__ u64x operator % (const u64x a, const u64x b) { return u64x ((a.s0 % b.s0), (a.s1 % b.s1)); } + inline __device__ u64x operator ~ (const u64x a) { return u64x (~a.s0, ~a.s1); } #endif @@ -327,6 +343,9 @@ inline __device__ u32x operator - (const u32x a, const u32x b) { return u32x (( inline __device__ u32x operator * (const u32x a, const u32 b) { return u32x ((a.s0 * b), (a.s1 * b) , (a.s2 * b), (a.s3 * b) ); } inline __device__ u32x operator * (const u32x a, const u32x b) { return u32x ((a.s0 * b.s0), (a.s1 * b.s1), (a.s2 * b.s2), (a.s3 * b.s3)); } +inline __device__ u32x operator % (const u32x a, const u32 b) { return u32x ((a.s0 % b), (a.s1 % b) , (a.s2 % b), (a.s3 % b) ); } +inline __device__ u32x operator % (const u32x a, const u32x b) { return u32x ((a.s0 % b.s0), (a.s1 % b.s1), (a.s2 % b.s2), (a.s3 % b.s3)); } + inline __device__ u32x operator ~ (const u32x a) { return u32x (~a.s0, ~a.s1, ~a.s2, ~a.s3); } inline __device__ bool operator != (const u64x a, const u64 b) { return ((a.s0 != b) && (a.s1 != b) && (a.s2 != b) && (a.s3 != b) ); } @@ -380,6 +399,9 @@ inline __device__ u64x operator - (const u64x a, const u64x b) { return u64x (( inline __device__ u64x operator * (const u64x a, const u64 b) { return u64x ((a.s0 * b), (a.s1 * b) , (a.s2 * b), (a.s3 * b) ); } inline __device__ u64x operator * (const u64x a, const u64x b) { return u64x ((a.s0 * b.s0), (a.s1 * b.s1), (a.s2 * b.s2), (a.s3 * b.s3)); } +inline __device__ u64x operator % (const u64x a, const u32 b) { return u64x ((a.s0 % b), (a.s1 % b) , (a.s2 % b), (a.s3 % b) ); } +inline __device__ u64x operator % (const u64x a, const u64x b) { return u64x ((a.s0 % b.s0), (a.s1 % b.s1), (a.s2 % b.s2), (a.s3 % b.s3)); } + inline __device__ u64x operator ~ (const u64x a) { return u64x (~a.s0, ~a.s1, ~a.s2, ~a.s3); } #endif @@ -509,6 +531,9 @@ inline __device__ u32x operator - (const u32x a, const u32x b) { return u32x (( inline __device__ u32x operator * (const u32x a, const u32 b) { return u32x ((a.s0 * b), (a.s1 * b) , (a.s2 * b), (a.s3 * b) , (a.s4 * b), (a.s5 * b) , (a.s6 * b), (a.s7 * b) ); } inline __device__ u32x operator * (const u32x a, const u32x b) { return u32x ((a.s0 * b.s0), (a.s1 * b.s1), (a.s2 * b.s2), (a.s3 * b.s3), (a.s4 * b.s4), (a.s5 * b.s5), (a.s6 * b.s6), (a.s7 * b.s7)); } +inline __device__ u32x operator % (const u32x a, const u32 b) { return u32x ((a.s0 % b), (a.s1 % b) , (a.s2 % b), (a.s3 % b) , (a.s4 % b), (a.s5 % b) , (a.s6 % b), (a.s7 % b) ); } +inline __device__ u32x operator % (const u32x a, const u32x b) { return u32x ((a.s0 % b.s0), (a.s1 % b.s1), (a.s2 % b.s2), (a.s3 % b.s3), (a.s4 % b.s4), (a.s5 % b.s5), (a.s6 % b.s6), (a.s7 % b.s7)); } + inline __device__ u32x operator ~ (const u32x a) { return u32x (~a.s0, ~a.s1, ~a.s2, ~a.s3, ~a.s4, ~a.s5, ~a.s6, ~a.s7); } inline __device__ bool operator != (const u64x a, const u64 b) { return ((a.s0 != b) && (a.s1 != b) && (a.s2 != b) && (a.s3 != b) && (a.s4 != b) && (a.s5 != b) && (a.s6 != b) && (a.s7 != b) ); } @@ -562,6 +587,9 @@ inline __device__ u64x operator - (const u64x a, const u64x b) { return u64x (( inline __device__ u64x operator * (const u64x a, const u64 b) { return u64x ((a.s0 * b), (a.s1 * b) , (a.s2 * b), (a.s3 * b) , (a.s4 * b), (a.s5 * b) , (a.s6 * b), (a.s7 * b) ); } inline __device__ u64x operator * (const u64x a, const u64x b) { return u64x ((a.s0 * b.s0), (a.s1 * b.s1), (a.s2 * b.s2), (a.s3 * b.s3), (a.s4 * b.s4), (a.s5 * b.s5), (a.s6 * b.s6), (a.s7 * b.s7)); } +inline __device__ u64x operator % (const u64x a, const u64 b) { return u64x ((a.s0 % b), (a.s1 % b) , (a.s2 % b), (a.s3 % b) , (a.s4 % b), (a.s5 % b) , (a.s6 % b), (a.s7 % b) ); } +inline __device__ u64x operator % (const u64x a, const u64x b) { return u64x ((a.s0 % b.s0), (a.s1 % b.s1), (a.s2 % b.s2), (a.s3 % b.s3), (a.s4 % b.s4), (a.s5 % b.s5), (a.s6 % b.s6), (a.s7 % b.s7)); } + inline __device__ u64x operator ~ (const u64x a) { return u64x (~a.s0, ~a.s1, ~a.s2, ~a.s3, ~a.s4, ~a.s5, ~a.s6, ~a.s7); } #endif @@ -723,6 +751,9 @@ inline __device__ u32x operator - (const u32x a, const u32x b) { return u32x (( inline __device__ u32x operator * (const u32x a, const u32 b) { return u32x ((a.s0 * b), (a.s1 * b) , (a.s2 * b), (a.s3 * b) , (a.s4 * b), (a.s5 * b) , (a.s6 * b), (a.s7 * b), (a.s8 * b), (a.s9 * b) , (a.sa * b), (a.sb * b) , (a.sc * b), (a.sd * b) , (a.se * b), (a.sf * b) ); } inline __device__ u32x operator * (const u32x a, const u32x b) { return u32x ((a.s0 * b.s0), (a.s1 * b.s1), (a.s2 * b.s2), (a.s3 * b.s3), (a.s4 * b.s4), (a.s5 * b.s5), (a.s6 * b.s6), (a.s7 * b.s7), (a.s8 * b.s8), (a.s9 * b.s9), (a.sa * b.sa), (a.sb * b.sb), (a.sc * b.sc), (a.sd * b.sd), (a.se * b.se), (a.sf * b.sf)); } +inline __device__ u32x operator % (const u32x a, const u32 b) { return u32x ((a.s0 % b), (a.s1 % b) , (a.s2 % b), (a.s3 % b) , (a.s4 % b), (a.s5 % b) , (a.s6 % b), (a.s7 % b), (a.s8 % b), (a.s9 % b) , (a.sa % b), (a.sb % b) , (a.sc % b), (a.sd % b) , (a.se % b), (a.sf % b) ); } +inline __device__ u32x operator % (const u32x a, const u32x b) { return u32x ((a.s0 % b.s0), (a.s1 % b.s1), (a.s2 % b.s2), (a.s3 % b.s3), (a.s4 % b.s4), (a.s5 % b.s5), (a.s6 % b.s6), (a.s7 % b.s7), (a.s8 % b.s8), (a.s9 % b.s9), (a.sa % b.sa), (a.sb % b.sb), (a.sc % b.sc), (a.sd % b.sd), (a.se % b.se), (a.sf % b.sf)); } + inline __device__ u32x operator ~ (const u32x a) { return u32x (~a.s0, ~a.s1, ~a.s2, ~a.s3, ~a.s4, ~a.s5, ~a.s6, ~a.s7, ~a.s8, ~a.s9, ~a.sa, ~a.sb, ~a.sc, ~a.sd, ~a.se, ~a.sf); } inline __device__ bool operator != (const u64x a, const u64 b) { return ((a.s0 != b) && (a.s1 != b) && (a.s2 != b) && (a.s3 != b) && (a.s4 != b) && (a.s5 != b) && (a.s6 != b) && (a.s7 != b) && (a.s8 != b) && (a.s9 != b) && (a.sa != b) && (a.sb != b) && (a.sc != b) && (a.sd != b) && (a.se != b) && (a.sf != b) ); } @@ -776,6 +807,9 @@ inline __device__ u64x operator - (const u64x a, const u64x b) { return u64x (( inline __device__ u64x operator * (const u64x a, const u64 b) { return u64x ((a.s0 * b), (a.s1 * b) , (a.s2 * b), (a.s3 * b) , (a.s4 * b), (a.s5 * b) , (a.s6 * b), (a.s7 * b), (a.s8 * b), (a.s9 * b) , (a.sa * b), (a.sb * b) , (a.sc * b), (a.sd * b) , (a.se * b), (a.sf * b) ); } inline __device__ u64x operator * (const u64x a, const u64x b) { return u64x ((a.s0 * b.s0), (a.s1 * b.s1), (a.s2 * b.s2), (a.s3 * b.s3), (a.s4 * b.s4), (a.s5 * b.s5), (a.s6 * b.s6), (a.s7 * b.s7), (a.s8 * b.s8), (a.s9 * b.s9), (a.sa * b.sa), (a.sb * b.sb), (a.sc * b.sc), (a.sd * b.sd), (a.se * b.se), (a.sf * b.sf)); } +inline __device__ u64x operator % (const u64x a, const u64 b) { return u64x ((a.s0 % b), (a.s1 % b) , (a.s2 % b), (a.s3 % b) , (a.s4 % b), (a.s5 % b) , (a.s6 % b), (a.s7 % b), (a.s8 % b), (a.s9 % b) , (a.sa % b), (a.sb % b) , (a.sc % b), (a.sd % b) , (a.se % b), (a.sf % b) ); } +inline __device__ u64x operator % (const u64x a, const u64x b) { return u64x ((a.s0 % b.s0), (a.s1 % b.s1), (a.s2 % b.s2), (a.s3 % b.s3), (a.s4 % b.s4), (a.s5 % b.s5), (a.s6 % b.s6), (a.s7 % b.s7), (a.s8 % b.s8), (a.s9 % b.s9), (a.sa % b.sa), (a.sb % b.sb), (a.sc % b.sc), (a.sd % b.sd), (a.se % b.se), (a.sf % b.sf)); } + inline __device__ u64x operator ~ (const u64x a) { return u64x (~a.s0, ~a.s1, ~a.s2, ~a.s3, ~a.s4, ~a.s5, ~a.s6, ~a.s7, ~a.s8, ~a.s9, ~a.sa, ~a.sb, ~a.sc, ~a.sd, ~a.se, ~a.sf); } #endif @@ -1609,6 +1643,8 @@ typedef struct salt u32 salt_iter2; u32 salt_sign[2]; + u32 orig_pos; + u32 digests_cnt; u32 digests_done; diff --git a/OpenCL/m00000_a0-optimized.cl b/OpenCL/m00000_a0-optimized.cl index da224b637..52f1341fa 100644 --- a/OpenCL/m00000_a0-optimized.cl +++ b/OpenCL/m00000_a0-optimized.cl @@ -187,10 +187,10 @@ KERNEL_FQ void m00000_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00000_a0-pure.cl b/OpenCL/m00000_a0-pure.cl index ea2699153..5935e3cdd 100644 --- a/OpenCL/m00000_a0-pure.cl +++ b/OpenCL/m00000_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m00000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00000_a1-optimized.cl b/OpenCL/m00000_a1-optimized.cl index 4b49148a2..5b9104093 100644 --- a/OpenCL/m00000_a1-optimized.cl +++ b/OpenCL/m00000_a1-optimized.cl @@ -245,10 +245,10 @@ KERNEL_FQ void m00000_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00000_a1-pure.cl b/OpenCL/m00000_a1-pure.cl index 5bbb281c8..79e98d1df 100644 --- a/OpenCL/m00000_a1-pure.cl +++ b/OpenCL/m00000_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m00000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00000_a3-optimized.cl b/OpenCL/m00000_a3-optimized.cl index 1a7fb4f9a..147943deb 100644 --- a/OpenCL/m00000_a3-optimized.cl +++ b/OpenCL/m00000_a3-optimized.cl @@ -290,20 +290,20 @@ DECLSPEC void m00000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; MD5_STEP_REV (MD5_I_S, b_rev, c_rev, d_rev, a_rev, w[ 9], MD5C3f, MD5S33); MD5_STEP_REV (MD5_I_S, c_rev, d_rev, a_rev, b_rev, w[ 2], MD5C3e, MD5S32); @@ -464,7 +464,7 @@ KERNEL_FQ void m00000_m04 (KERN_ATTR_VECTOR ()) * main */ - m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00000_m08 (KERN_ATTR_VECTOR ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m00000_m08 (KERN_ATTR_VECTOR ()) * main */ - m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00000_m16 (KERN_ATTR_VECTOR ()) @@ -540,7 +540,7 @@ KERNEL_FQ void m00000_m16 (KERN_ATTR_VECTOR ()) * main */ - m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00000_s04 (KERN_ATTR_VECTOR ()) @@ -578,7 +578,7 @@ KERNEL_FQ void m00000_s04 (KERN_ATTR_VECTOR ()) * main */ - m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00000_s08 (KERN_ATTR_VECTOR ()) @@ -616,7 +616,7 @@ KERNEL_FQ void m00000_s08 (KERN_ATTR_VECTOR ()) * main */ - m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00000_s16 (KERN_ATTR_VECTOR ()) @@ -654,5 +654,5 @@ KERNEL_FQ void m00000_s16 (KERN_ATTR_VECTOR ()) * main */ - m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00000_a3-pure.cl b/OpenCL/m00000_a3-pure.cl index 9ff74dcc3..da4b1cebe 100644 --- a/OpenCL/m00000_a3-pure.cl +++ b/OpenCL/m00000_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m00000_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00010_a0-optimized.cl b/OpenCL/m00010_a0-optimized.cl index e735558df..683405dc8 100644 --- a/OpenCL/m00010_a0-optimized.cl +++ b/OpenCL/m00010_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m00010_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -264,24 +264,24 @@ KERNEL_FQ void m00010_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -289,10 +289,10 @@ KERNEL_FQ void m00010_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00010_a0-pure.cl b/OpenCL/m00010_a0-pure.cl index 047a01c9a..859b1114a 100644 --- a/OpenCL/m00010_a0-pure.cl +++ b/OpenCL/m00010_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m00010_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -88,10 +88,10 @@ KERNEL_FQ void m00010_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m00010_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m00010_a1-optimized.cl b/OpenCL/m00010_a1-optimized.cl index ece0ac663..64173871f 100644 --- a/OpenCL/m00010_a1-optimized.cl +++ b/OpenCL/m00010_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m00010_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -322,24 +322,24 @@ KERNEL_FQ void m00010_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -347,10 +347,10 @@ KERNEL_FQ void m00010_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00010_a1-pure.cl b/OpenCL/m00010_a1-pure.cl index 14f0c9271..0625577ba 100644 --- a/OpenCL/m00010_a1-pure.cl +++ b/OpenCL/m00010_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m00010_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -84,23 +84,23 @@ KERNEL_FQ void m00010_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m00010_a3-optimized.cl b/OpenCL/m00010_a3-optimized.cl index 85c6e5caa..406572cd8 100644 --- a/OpenCL/m00010_a3-optimized.cl +++ b/OpenCL/m00010_a3-optimized.cl @@ -49,24 +49,24 @@ DECLSPEC void m00010m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -339,20 +339,20 @@ DECLSPEC void m00010s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; MD5_STEP_REV (MD5_I_S, b_rev, c_rev, d_rev, a_rev, w[ 9], MD5C3f, MD5S33); MD5_STEP_REV (MD5_I_S, c_rev, d_rev, a_rev, b_rev, w[ 2], MD5C3e, MD5S32); @@ -513,7 +513,7 @@ KERNEL_FQ void m00010_m04 (KERN_ATTR_VECTOR ()) * main */ - m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00010_m08 (KERN_ATTR_VECTOR ()) @@ -551,7 +551,7 @@ KERNEL_FQ void m00010_m08 (KERN_ATTR_VECTOR ()) * main */ - m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00010_m16 (KERN_ATTR_VECTOR ()) @@ -589,7 +589,7 @@ KERNEL_FQ void m00010_m16 (KERN_ATTR_VECTOR ()) * main */ - m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00010_s04 (KERN_ATTR_VECTOR ()) @@ -627,7 +627,7 @@ KERNEL_FQ void m00010_s04 (KERN_ATTR_VECTOR ()) * main */ - m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00010_s08 (KERN_ATTR_VECTOR ()) @@ -665,7 +665,7 @@ KERNEL_FQ void m00010_s08 (KERN_ATTR_VECTOR ()) * main */ - m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00010_s16 (KERN_ATTR_VECTOR ()) @@ -703,5 +703,5 @@ KERNEL_FQ void m00010_s16 (KERN_ATTR_VECTOR ()) * main */ - m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00010_a3-pure.cl b/OpenCL/m00010_a3-pure.cl index caa63b0b5..dbcf6ce1e 100644 --- a/OpenCL/m00010_a3-pure.cl +++ b/OpenCL/m00010_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00010_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -97,10 +97,10 @@ KERNEL_FQ void m00010_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m00010_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m00020_a0-optimized.cl b/OpenCL/m00020_a0-optimized.cl index 7becd0173..ee1299ce2 100644 --- a/OpenCL/m00020_a0-optimized.cl +++ b/OpenCL/m00020_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m00020_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -244,24 +244,24 @@ KERNEL_FQ void m00020_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -269,10 +269,10 @@ KERNEL_FQ void m00020_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00020_a0-pure.cl b/OpenCL/m00020_a0-pure.cl index 43eb1158b..9d5bfb464 100644 --- a/OpenCL/m00020_a0-pure.cl +++ b/OpenCL/m00020_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m00020_mxx (KERN_ATTR_RULES ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -81,10 +81,10 @@ KERNEL_FQ void m00020_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -97,7 +97,7 @@ KERNEL_FQ void m00020_sxx (KERN_ATTR_RULES ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m00020_a1-optimized.cl b/OpenCL/m00020_a1-optimized.cl index 536b9ba16..be07636fb 100644 --- a/OpenCL/m00020_a1-optimized.cl +++ b/OpenCL/m00020_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m00020_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -300,24 +300,24 @@ KERNEL_FQ void m00020_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -325,10 +325,10 @@ KERNEL_FQ void m00020_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00020_a1-pure.cl b/OpenCL/m00020_a1-pure.cl index 818d352aa..7ee265892 100644 --- a/OpenCL/m00020_a1-pure.cl +++ b/OpenCL/m00020_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m00020_mxx (KERN_ATTR_BASIC ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_update_global (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -75,10 +75,10 @@ KERNEL_FQ void m00020_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -89,7 +89,7 @@ KERNEL_FQ void m00020_sxx (KERN_ATTR_BASIC ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_update_global (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m00020_a3-optimized.cl b/OpenCL/m00020_a3-optimized.cl index 939ce5710..a1d89b0d6 100644 --- a/OpenCL/m00020_a3-optimized.cl +++ b/OpenCL/m00020_a3-optimized.cl @@ -32,24 +32,24 @@ DECLSPEC void m00020m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -204,10 +204,10 @@ DECLSPEC void m00020s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -219,24 +219,24 @@ DECLSPEC void m00020s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -423,7 +423,7 @@ KERNEL_FQ void m00020_m04 (KERN_ATTR_BASIC ()) * main */ - m00020m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00020m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00020_m08 (KERN_ATTR_BASIC ()) @@ -470,7 +470,7 @@ KERNEL_FQ void m00020_m08 (KERN_ATTR_BASIC ()) * main */ - m00020m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00020m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00020_m16 (KERN_ATTR_BASIC ()) @@ -517,7 +517,7 @@ KERNEL_FQ void m00020_m16 (KERN_ATTR_BASIC ()) * main */ - m00020m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00020m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00020_s04 (KERN_ATTR_BASIC ()) @@ -564,7 +564,7 @@ KERNEL_FQ void m00020_s04 (KERN_ATTR_BASIC ()) * main */ - m00020s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00020s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00020_s08 (KERN_ATTR_BASIC ()) @@ -611,7 +611,7 @@ KERNEL_FQ void m00020_s08 (KERN_ATTR_BASIC ()) * main */ - m00020s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00020s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00020_s16 (KERN_ATTR_BASIC ()) @@ -658,5 +658,5 @@ KERNEL_FQ void m00020_s16 (KERN_ATTR_BASIC ()) * main */ - m00020s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00020s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00020_a3-pure.cl b/OpenCL/m00020_a3-pure.cl index 5cc9805f4..8a4d07ef6 100644 --- a/OpenCL/m00020_a3-pure.cl +++ b/OpenCL/m00020_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m00020_mxx (KERN_ATTR_VECTOR ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -92,10 +92,10 @@ KERNEL_FQ void m00020_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -115,7 +115,7 @@ KERNEL_FQ void m00020_sxx (KERN_ATTR_VECTOR ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m00030_a0-optimized.cl b/OpenCL/m00030_a0-optimized.cl index f6ba857a3..fbf615a42 100644 --- a/OpenCL/m00030_a0-optimized.cl +++ b/OpenCL/m00030_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m00030_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -269,24 +269,24 @@ KERNEL_FQ void m00030_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -294,10 +294,10 @@ KERNEL_FQ void m00030_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00030_a0-pure.cl b/OpenCL/m00030_a0-pure.cl index 22f4ae6a7..c9a3c36dd 100644 --- a/OpenCL/m00030_a0-pure.cl +++ b/OpenCL/m00030_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m00030_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -88,10 +88,10 @@ KERNEL_FQ void m00030_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m00030_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m00030_a1-optimized.cl b/OpenCL/m00030_a1-optimized.cl index e40e653db..38619a22c 100644 --- a/OpenCL/m00030_a1-optimized.cl +++ b/OpenCL/m00030_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m00030_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -327,24 +327,24 @@ KERNEL_FQ void m00030_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -352,10 +352,10 @@ KERNEL_FQ void m00030_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00030_a1-pure.cl b/OpenCL/m00030_a1-pure.cl index fb974b0a2..356a2dbd6 100644 --- a/OpenCL/m00030_a1-pure.cl +++ b/OpenCL/m00030_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m00030_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -84,23 +84,23 @@ KERNEL_FQ void m00030_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m00030_a3-optimized.cl b/OpenCL/m00030_a3-optimized.cl index 427040235..6d610bd2c 100644 --- a/OpenCL/m00030_a3-optimized.cl +++ b/OpenCL/m00030_a3-optimized.cl @@ -49,24 +49,24 @@ DECLSPEC void m00030m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -339,20 +339,20 @@ DECLSPEC void m00030s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; MD5_STEP_REV (MD5_I_S, b_rev, c_rev, d_rev, a_rev, w[ 9], MD5C3f, MD5S33); MD5_STEP_REV (MD5_I_S, c_rev, d_rev, a_rev, b_rev, w[ 2], MD5C3e, MD5S32); @@ -513,7 +513,7 @@ KERNEL_FQ void m00030_m04 (KERN_ATTR_VECTOR ()) * main */ - m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00030_m08 (KERN_ATTR_VECTOR ()) @@ -551,7 +551,7 @@ KERNEL_FQ void m00030_m08 (KERN_ATTR_VECTOR ()) * main */ - m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00030_m16 (KERN_ATTR_VECTOR ()) @@ -589,7 +589,7 @@ KERNEL_FQ void m00030_m16 (KERN_ATTR_VECTOR ()) * main */ - m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00030_s04 (KERN_ATTR_VECTOR ()) @@ -627,7 +627,7 @@ KERNEL_FQ void m00030_s04 (KERN_ATTR_VECTOR ()) * main */ - m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00030_s08 (KERN_ATTR_VECTOR ()) @@ -665,7 +665,7 @@ KERNEL_FQ void m00030_s08 (KERN_ATTR_VECTOR ()) * main */ - m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00030_s16 (KERN_ATTR_VECTOR ()) @@ -703,5 +703,5 @@ KERNEL_FQ void m00030_s16 (KERN_ATTR_VECTOR ()) * main */ - m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00030_a3-pure.cl b/OpenCL/m00030_a3-pure.cl index 053896651..6ad93a21c 100644 --- a/OpenCL/m00030_a3-pure.cl +++ b/OpenCL/m00030_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00030_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -97,10 +97,10 @@ KERNEL_FQ void m00030_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m00030_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m00040_a0-optimized.cl b/OpenCL/m00040_a0-optimized.cl index d04315627..02bf4b3d3 100644 --- a/OpenCL/m00040_a0-optimized.cl +++ b/OpenCL/m00040_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m00040_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -249,24 +249,24 @@ KERNEL_FQ void m00040_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -274,10 +274,10 @@ KERNEL_FQ void m00040_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00040_a0-pure.cl b/OpenCL/m00040_a0-pure.cl index ef4f774f0..90cdfea1d 100644 --- a/OpenCL/m00040_a0-pure.cl +++ b/OpenCL/m00040_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m00040_mxx (KERN_ATTR_RULES ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -81,10 +81,10 @@ KERNEL_FQ void m00040_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -97,7 +97,7 @@ KERNEL_FQ void m00040_sxx (KERN_ATTR_RULES ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m00040_a1-optimized.cl b/OpenCL/m00040_a1-optimized.cl index c5e5d3002..9cb03143f 100644 --- a/OpenCL/m00040_a1-optimized.cl +++ b/OpenCL/m00040_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m00040_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -305,24 +305,24 @@ KERNEL_FQ void m00040_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -330,10 +330,10 @@ KERNEL_FQ void m00040_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00040_a1-pure.cl b/OpenCL/m00040_a1-pure.cl index 842ac0fd8..97916d376 100644 --- a/OpenCL/m00040_a1-pure.cl +++ b/OpenCL/m00040_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m00040_mxx (KERN_ATTR_BASIC ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_update_global_utf16le (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -75,10 +75,10 @@ KERNEL_FQ void m00040_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -89,7 +89,7 @@ KERNEL_FQ void m00040_sxx (KERN_ATTR_BASIC ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_update_global_utf16le (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m00040_a3-optimized.cl b/OpenCL/m00040_a3-optimized.cl index bb9bc38a6..721712bff 100644 --- a/OpenCL/m00040_a3-optimized.cl +++ b/OpenCL/m00040_a3-optimized.cl @@ -32,24 +32,24 @@ DECLSPEC void m00040m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -204,10 +204,10 @@ DECLSPEC void m00040s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -219,24 +219,24 @@ DECLSPEC void m00040s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -423,7 +423,7 @@ KERNEL_FQ void m00040_m04 (KERN_ATTR_BASIC ()) * main */ - m00040m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00040m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00040_m08 (KERN_ATTR_BASIC ()) @@ -470,7 +470,7 @@ KERNEL_FQ void m00040_m08 (KERN_ATTR_BASIC ()) * main */ - m00040m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00040m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00040_m16 (KERN_ATTR_BASIC ()) @@ -517,7 +517,7 @@ KERNEL_FQ void m00040_m16 (KERN_ATTR_BASIC ()) * main */ - m00040m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00040m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00040_s04 (KERN_ATTR_BASIC ()) @@ -564,7 +564,7 @@ KERNEL_FQ void m00040_s04 (KERN_ATTR_BASIC ()) * main */ - m00040s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00040s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00040_s08 (KERN_ATTR_BASIC ()) @@ -611,7 +611,7 @@ KERNEL_FQ void m00040_s08 (KERN_ATTR_BASIC ()) * main */ - m00040s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00040s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00040_s16 (KERN_ATTR_BASIC ()) @@ -658,5 +658,5 @@ KERNEL_FQ void m00040_s16 (KERN_ATTR_BASIC ()) * main */ - m00040s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00040s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00040_a3-pure.cl b/OpenCL/m00040_a3-pure.cl index ca7d7b843..9608e9a2e 100644 --- a/OpenCL/m00040_a3-pure.cl +++ b/OpenCL/m00040_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m00040_mxx (KERN_ATTR_VECTOR ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -92,10 +92,10 @@ KERNEL_FQ void m00040_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -115,7 +115,7 @@ KERNEL_FQ void m00040_sxx (KERN_ATTR_VECTOR ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m00050_a0-optimized.cl b/OpenCL/m00050_a0-optimized.cl index f94854ed8..4c161b5c2 100644 --- a/OpenCL/m00050_a0-optimized.cl +++ b/OpenCL/m00050_a0-optimized.cl @@ -140,24 +140,24 @@ KERNEL_FQ void m00050_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -253,24 +253,24 @@ KERNEL_FQ void m00050_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -278,10 +278,10 @@ KERNEL_FQ void m00050_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00050_a0-pure.cl b/OpenCL/m00050_a0-pure.cl index 8ad06fa3b..2ce633773 100644 --- a/OpenCL/m00050_a0-pure.cl +++ b/OpenCL/m00050_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m00050_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -86,10 +86,10 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -98,13 +98,13 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m00050_a1-optimized.cl b/OpenCL/m00050_a1-optimized.cl index 650aec269..664ba42f9 100644 --- a/OpenCL/m00050_a1-optimized.cl +++ b/OpenCL/m00050_a1-optimized.cl @@ -138,24 +138,24 @@ KERNEL_FQ void m00050_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -311,24 +311,24 @@ KERNEL_FQ void m00050_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -336,10 +336,10 @@ KERNEL_FQ void m00050_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00050_a1-pure.cl b/OpenCL/m00050_a1-pure.cl index 0cd0bd0f0..553aa4ad3 100644 --- a/OpenCL/m00050_a1-pure.cl +++ b/OpenCL/m00050_a1-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00050_mxx (KERN_ATTR_BASIC ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -109,10 +109,10 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -128,13 +128,13 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_BASIC ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m00050_a3-optimized.cl b/OpenCL/m00050_a3-optimized.cl index f3d733ceb..67dfe41b3 100644 --- a/OpenCL/m00050_a3-optimized.cl +++ b/OpenCL/m00050_a3-optimized.cl @@ -117,24 +117,24 @@ DECLSPEC void m00050m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -222,24 +222,24 @@ DECLSPEC void m00050s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -247,10 +247,10 @@ DECLSPEC void m00050s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -365,7 +365,7 @@ KERNEL_FQ void m00050_m04 (KERN_ATTR_BASIC ()) * main */ - m00050m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00050m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00050_m08 (KERN_ATTR_BASIC ()) @@ -412,7 +412,7 @@ KERNEL_FQ void m00050_m08 (KERN_ATTR_BASIC ()) * main */ - m00050m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00050m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00050_m16 (KERN_ATTR_BASIC ()) @@ -459,7 +459,7 @@ KERNEL_FQ void m00050_m16 (KERN_ATTR_BASIC ()) * main */ - m00050m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00050m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00050_s04 (KERN_ATTR_BASIC ()) @@ -506,7 +506,7 @@ KERNEL_FQ void m00050_s04 (KERN_ATTR_BASIC ()) * main */ - m00050s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00050s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00050_s08 (KERN_ATTR_BASIC ()) @@ -553,7 +553,7 @@ KERNEL_FQ void m00050_s08 (KERN_ATTR_BASIC ()) * main */ - m00050s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00050s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00050_s16 (KERN_ATTR_BASIC ()) @@ -600,5 +600,5 @@ KERNEL_FQ void m00050_s16 (KERN_ATTR_BASIC ()) * main */ - m00050s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00050s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00050_a3-pure.cl b/OpenCL/m00050_a3-pure.cl index 693d3862f..09dd841a8 100644 --- a/OpenCL/m00050_a3-pure.cl +++ b/OpenCL/m00050_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00050_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -95,10 +95,10 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -114,13 +114,13 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m00060_a0-optimized.cl b/OpenCL/m00060_a0-optimized.cl index 7546e66d2..08bda4dfb 100644 --- a/OpenCL/m00060_a0-optimized.cl +++ b/OpenCL/m00060_a0-optimized.cl @@ -140,22 +140,22 @@ KERNEL_FQ void m00060_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; /** * pads @@ -275,22 +275,22 @@ KERNEL_FQ void m00060_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; /** * pads @@ -329,10 +329,10 @@ KERNEL_FQ void m00060_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00060_a0-pure.cl b/OpenCL/m00060_a0-pure.cl index dfa8c6205..253d9aa4e 100644 --- a/OpenCL/m00060_a0-pure.cl +++ b/OpenCL/m00060_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m00060_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_hmac_ctx_t ctx0; @@ -88,10 +88,10 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_hmac_ctx_t ctx0; diff --git a/OpenCL/m00060_a1-optimized.cl b/OpenCL/m00060_a1-optimized.cl index 2bc59801c..efc122955 100644 --- a/OpenCL/m00060_a1-optimized.cl +++ b/OpenCL/m00060_a1-optimized.cl @@ -138,22 +138,22 @@ KERNEL_FQ void m00060_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; /** * pads @@ -314,22 +314,22 @@ KERNEL_FQ void m00060_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; /** * pads @@ -368,10 +368,10 @@ KERNEL_FQ void m00060_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00060_a1-pure.cl b/OpenCL/m00060_a1-pure.cl index db7376a83..87f1d61c1 100644 --- a/OpenCL/m00060_a1-pure.cl +++ b/OpenCL/m00060_a1-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00060_mxx (KERN_ATTR_BASIC ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_hmac_ctx_t ctx0; @@ -111,10 +111,10 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -130,13 +130,13 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_BASIC ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_hmac_ctx_t ctx0; diff --git a/OpenCL/m00060_a3-optimized.cl b/OpenCL/m00060_a3-optimized.cl index 1e051b965..266b692ec 100644 --- a/OpenCL/m00060_a3-optimized.cl +++ b/OpenCL/m00060_a3-optimized.cl @@ -117,22 +117,22 @@ DECLSPEC void m00060m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; /** * pads @@ -220,22 +220,22 @@ DECLSPEC void m00060s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; /** * pads @@ -274,10 +274,10 @@ DECLSPEC void m00060s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -361,7 +361,7 @@ KERNEL_FQ void m00060_m04 (KERN_ATTR_BASIC ()) * main */ - m00060m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00060m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00060_m08 (KERN_ATTR_BASIC ()) @@ -408,7 +408,7 @@ KERNEL_FQ void m00060_m08 (KERN_ATTR_BASIC ()) * main */ - m00060m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00060m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00060_m16 (KERN_ATTR_BASIC ()) @@ -455,7 +455,7 @@ KERNEL_FQ void m00060_m16 (KERN_ATTR_BASIC ()) * main */ - m00060m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00060m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00060_s04 (KERN_ATTR_BASIC ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m00060_s04 (KERN_ATTR_BASIC ()) * main */ - m00060s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00060s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00060_s08 (KERN_ATTR_BASIC ()) @@ -549,7 +549,7 @@ KERNEL_FQ void m00060_s08 (KERN_ATTR_BASIC ()) * main */ - m00060s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00060s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00060_s16 (KERN_ATTR_BASIC ()) @@ -596,5 +596,5 @@ KERNEL_FQ void m00060_s16 (KERN_ATTR_BASIC ()) * main */ - m00060s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00060s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00060_a3-pure.cl b/OpenCL/m00060_a3-pure.cl index 73f2302a9..af7c364a5 100644 --- a/OpenCL/m00060_a3-pure.cl +++ b/OpenCL/m00060_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00060_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_hmac_ctx_vector_t ctx0; @@ -97,10 +97,10 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_hmac_ctx_vector_t ctx0; diff --git a/OpenCL/m00100_a0-optimized.cl b/OpenCL/m00100_a0-optimized.cl index 70363b391..54965a1b7 100644 --- a/OpenCL/m00100_a0-optimized.cl +++ b/OpenCL/m00100_a0-optimized.cl @@ -232,10 +232,10 @@ KERNEL_FQ void m00100_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00100_a0-pure.cl b/OpenCL/m00100_a0-pure.cl index 82e4d7b62..5c50cc075 100644 --- a/OpenCL/m00100_a0-pure.cl +++ b/OpenCL/m00100_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m00100_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00100_a1-optimized.cl b/OpenCL/m00100_a1-optimized.cl index ab46a7c10..a0b6a8e02 100644 --- a/OpenCL/m00100_a1-optimized.cl +++ b/OpenCL/m00100_a1-optimized.cl @@ -288,10 +288,10 @@ KERNEL_FQ void m00100_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00100_a1-pure.cl b/OpenCL/m00100_a1-pure.cl index 807ddc5ce..db6fec17b 100644 --- a/OpenCL/m00100_a1-pure.cl +++ b/OpenCL/m00100_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m00100_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00100_a3-optimized.cl b/OpenCL/m00100_a3-optimized.cl index 6e01fc490..c52572d8f 100644 --- a/OpenCL/m00100_a3-optimized.cl +++ b/OpenCL/m00100_a3-optimized.cl @@ -354,10 +354,10 @@ DECLSPEC void m00100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -557,7 +557,7 @@ KERNEL_FQ void m00100_m04 (KERN_ATTR_VECTOR ()) * main */ - m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00100_m08 (KERN_ATTR_VECTOR ()) @@ -595,7 +595,7 @@ KERNEL_FQ void m00100_m08 (KERN_ATTR_VECTOR ()) * main */ - m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00100_m16 (KERN_ATTR_VECTOR ()) @@ -633,7 +633,7 @@ KERNEL_FQ void m00100_m16 (KERN_ATTR_VECTOR ()) * main */ - m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00100_s04 (KERN_ATTR_VECTOR ()) @@ -671,7 +671,7 @@ KERNEL_FQ void m00100_s04 (KERN_ATTR_VECTOR ()) * main */ - m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00100_s08 (KERN_ATTR_VECTOR ()) @@ -709,7 +709,7 @@ KERNEL_FQ void m00100_s08 (KERN_ATTR_VECTOR ()) * main */ - m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00100_s16 (KERN_ATTR_VECTOR ()) @@ -747,5 +747,5 @@ KERNEL_FQ void m00100_s16 (KERN_ATTR_VECTOR ()) * main */ - m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00100_a3-pure.cl b/OpenCL/m00100_a3-pure.cl index 32189c46f..9149921fc 100644 --- a/OpenCL/m00100_a3-pure.cl +++ b/OpenCL/m00100_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m00100_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00110_a0-optimized.cl b/OpenCL/m00110_a0-optimized.cl index d210c5f11..cfb0ab6fe 100644 --- a/OpenCL/m00110_a0-optimized.cl +++ b/OpenCL/m00110_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m00110_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -308,24 +308,24 @@ KERNEL_FQ void m00110_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -333,10 +333,10 @@ KERNEL_FQ void m00110_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00110_a0-pure.cl b/OpenCL/m00110_a0-pure.cl index 1e3cc3c58..e2046fb7e 100644 --- a/OpenCL/m00110_a0-pure.cl +++ b/OpenCL/m00110_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m00110_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -88,10 +88,10 @@ KERNEL_FQ void m00110_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m00110_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m00110_a1-optimized.cl b/OpenCL/m00110_a1-optimized.cl index 57a87affd..842270483 100644 --- a/OpenCL/m00110_a1-optimized.cl +++ b/OpenCL/m00110_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m00110_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -366,24 +366,24 @@ KERNEL_FQ void m00110_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -391,10 +391,10 @@ KERNEL_FQ void m00110_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00110_a1-pure.cl b/OpenCL/m00110_a1-pure.cl index ca1e2285d..6935371dd 100644 --- a/OpenCL/m00110_a1-pure.cl +++ b/OpenCL/m00110_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m00110_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; @@ -84,23 +84,23 @@ KERNEL_FQ void m00110_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; diff --git a/OpenCL/m00110_a3-optimized.cl b/OpenCL/m00110_a3-optimized.cl index 187f5b658..889709072 100644 --- a/OpenCL/m00110_a3-optimized.cl +++ b/OpenCL/m00110_a3-optimized.cl @@ -32,22 +32,22 @@ DECLSPEC void m00110m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; switch_buffer_by_offset_le_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len); @@ -68,7 +68,7 @@ DECLSPEC void m00110m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) w[14] |= hc_swap32_S (salt_buf3[2]); w[15] |= hc_swap32_S (salt_buf3[3]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -402,10 +402,10 @@ DECLSPEC void m00110s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -605,7 +605,7 @@ KERNEL_FQ void m00110_m04 (KERN_ATTR_VECTOR ()) * main */ - m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00110_m08 (KERN_ATTR_VECTOR ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m00110_m08 (KERN_ATTR_VECTOR ()) * main */ - m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00110_m16 (KERN_ATTR_VECTOR ()) @@ -681,7 +681,7 @@ KERNEL_FQ void m00110_m16 (KERN_ATTR_VECTOR ()) * main */ - m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00110_s04 (KERN_ATTR_VECTOR ()) @@ -719,7 +719,7 @@ KERNEL_FQ void m00110_s04 (KERN_ATTR_VECTOR ()) * main */ - m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00110_s08 (KERN_ATTR_VECTOR ()) @@ -757,7 +757,7 @@ KERNEL_FQ void m00110_s08 (KERN_ATTR_VECTOR ()) * main */ - m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00110_s16 (KERN_ATTR_VECTOR ()) @@ -795,5 +795,5 @@ KERNEL_FQ void m00110_s16 (KERN_ATTR_VECTOR ()) * main */ - m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00110_a3-pure.cl b/OpenCL/m00110_a3-pure.cl index 8f3662640..881b66196 100644 --- a/OpenCL/m00110_a3-pure.cl +++ b/OpenCL/m00110_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00110_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -97,10 +97,10 @@ KERNEL_FQ void m00110_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m00110_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m00120_a0-optimized.cl b/OpenCL/m00120_a0-optimized.cl index 18c94f7be..df5eecb60 100644 --- a/OpenCL/m00120_a0-optimized.cl +++ b/OpenCL/m00120_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m00120_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -80,10 +80,10 @@ KERNEL_FQ void m00120_m04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -300,24 +300,24 @@ KERNEL_FQ void m00120_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -325,10 +325,10 @@ KERNEL_FQ void m00120_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00120_a0-pure.cl b/OpenCL/m00120_a0-pure.cl index 3af320dfa..e45201761 100644 --- a/OpenCL/m00120_a0-pure.cl +++ b/OpenCL/m00120_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m00120_mxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -81,10 +81,10 @@ KERNEL_FQ void m00120_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -97,7 +97,7 @@ KERNEL_FQ void m00120_sxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m00120_a1-optimized.cl b/OpenCL/m00120_a1-optimized.cl index f5c28c971..d5e6a321a 100644 --- a/OpenCL/m00120_a1-optimized.cl +++ b/OpenCL/m00120_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m00120_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -78,10 +78,10 @@ KERNEL_FQ void m00120_m04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -356,24 +356,24 @@ KERNEL_FQ void m00120_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -381,10 +381,10 @@ KERNEL_FQ void m00120_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00120_a1-pure.cl b/OpenCL/m00120_a1-pure.cl index ef1256f90..1e66fb72b 100644 --- a/OpenCL/m00120_a1-pure.cl +++ b/OpenCL/m00120_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m00120_mxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -75,10 +75,10 @@ KERNEL_FQ void m00120_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -89,7 +89,7 @@ KERNEL_FQ void m00120_sxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m00120_a3-optimized.cl b/OpenCL/m00120_a3-optimized.cl index 4e57defe7..fb45e9295 100644 --- a/OpenCL/m00120_a3-optimized.cl +++ b/OpenCL/m00120_a3-optimized.cl @@ -32,24 +32,24 @@ DECLSPEC void m00120m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -248,10 +248,10 @@ DECLSPEC void m00120s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -269,24 +269,24 @@ DECLSPEC void m00120s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -517,7 +517,7 @@ KERNEL_FQ void m00120_m04 (KERN_ATTR_BASIC ()) * main */ - m00120m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00120m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00120_m08 (KERN_ATTR_BASIC ()) @@ -564,7 +564,7 @@ KERNEL_FQ void m00120_m08 (KERN_ATTR_BASIC ()) * main */ - m00120m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00120m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00120_m16 (KERN_ATTR_BASIC ()) @@ -611,7 +611,7 @@ KERNEL_FQ void m00120_m16 (KERN_ATTR_BASIC ()) * main */ - m00120m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00120m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00120_s04 (KERN_ATTR_BASIC ()) @@ -658,7 +658,7 @@ KERNEL_FQ void m00120_s04 (KERN_ATTR_BASIC ()) * main */ - m00120s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00120s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00120_s08 (KERN_ATTR_BASIC ()) @@ -705,7 +705,7 @@ KERNEL_FQ void m00120_s08 (KERN_ATTR_BASIC ()) * main */ - m00120s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00120s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00120_s16 (KERN_ATTR_BASIC ()) @@ -752,5 +752,5 @@ KERNEL_FQ void m00120_s16 (KERN_ATTR_BASIC ()) * main */ - m00120s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00120s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00120_a3-pure.cl b/OpenCL/m00120_a3-pure.cl index d5bc699d3..6f105ac5d 100644 --- a/OpenCL/m00120_a3-pure.cl +++ b/OpenCL/m00120_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m00120_mxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -92,10 +92,10 @@ KERNEL_FQ void m00120_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -115,7 +115,7 @@ KERNEL_FQ void m00120_sxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m00130_a0-optimized.cl b/OpenCL/m00130_a0-optimized.cl index 2712d0b23..8f97b729f 100644 --- a/OpenCL/m00130_a0-optimized.cl +++ b/OpenCL/m00130_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m00130_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -313,24 +313,24 @@ KERNEL_FQ void m00130_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -338,10 +338,10 @@ KERNEL_FQ void m00130_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00130_a0-pure.cl b/OpenCL/m00130_a0-pure.cl index b9214191f..7fdb81cb4 100644 --- a/OpenCL/m00130_a0-pure.cl +++ b/OpenCL/m00130_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m00130_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -88,10 +88,10 @@ KERNEL_FQ void m00130_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m00130_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m00130_a1-optimized.cl b/OpenCL/m00130_a1-optimized.cl index 24d30df82..6783e7234 100644 --- a/OpenCL/m00130_a1-optimized.cl +++ b/OpenCL/m00130_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m00130_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -371,24 +371,24 @@ KERNEL_FQ void m00130_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -396,10 +396,10 @@ KERNEL_FQ void m00130_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00130_a1-pure.cl b/OpenCL/m00130_a1-pure.cl index a042b6a68..9c38c93c6 100644 --- a/OpenCL/m00130_a1-pure.cl +++ b/OpenCL/m00130_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m00130_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; @@ -84,23 +84,23 @@ KERNEL_FQ void m00130_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; diff --git a/OpenCL/m00130_a3-optimized.cl b/OpenCL/m00130_a3-optimized.cl index 28bbbb5e2..445534cba 100644 --- a/OpenCL/m00130_a3-optimized.cl +++ b/OpenCL/m00130_a3-optimized.cl @@ -32,22 +32,22 @@ DECLSPEC void m00130m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; switch_buffer_by_offset_le_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len); @@ -68,7 +68,7 @@ DECLSPEC void m00130m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) w[14] |= hc_swap32_S (salt_buf3[2]); w[15] |= hc_swap32_S (salt_buf3[3]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -402,10 +402,10 @@ DECLSPEC void m00130s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -605,7 +605,7 @@ KERNEL_FQ void m00130_m04 (KERN_ATTR_VECTOR ()) * main */ - m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00130_m08 (KERN_ATTR_VECTOR ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m00130_m08 (KERN_ATTR_VECTOR ()) * main */ - m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00130_m16 (KERN_ATTR_VECTOR ()) @@ -681,7 +681,7 @@ KERNEL_FQ void m00130_m16 (KERN_ATTR_VECTOR ()) * main */ - m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00130_s04 (KERN_ATTR_VECTOR ()) @@ -719,7 +719,7 @@ KERNEL_FQ void m00130_s04 (KERN_ATTR_VECTOR ()) * main */ - m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00130_s08 (KERN_ATTR_VECTOR ()) @@ -757,7 +757,7 @@ KERNEL_FQ void m00130_s08 (KERN_ATTR_VECTOR ()) * main */ - m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00130_s16 (KERN_ATTR_VECTOR ()) @@ -795,5 +795,5 @@ KERNEL_FQ void m00130_s16 (KERN_ATTR_VECTOR ()) * main */ - m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00130_a3-pure.cl b/OpenCL/m00130_a3-pure.cl index d86d1b541..50309d176 100644 --- a/OpenCL/m00130_a3-pure.cl +++ b/OpenCL/m00130_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00130_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -97,10 +97,10 @@ KERNEL_FQ void m00130_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m00130_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m00140_a0-optimized.cl b/OpenCL/m00140_a0-optimized.cl index 52da035e7..5d49d1f0e 100644 --- a/OpenCL/m00140_a0-optimized.cl +++ b/OpenCL/m00140_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m00140_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -293,24 +293,24 @@ KERNEL_FQ void m00140_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -318,10 +318,10 @@ KERNEL_FQ void m00140_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00140_a0-pure.cl b/OpenCL/m00140_a0-pure.cl index 54a7f92c8..347cbae16 100644 --- a/OpenCL/m00140_a0-pure.cl +++ b/OpenCL/m00140_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m00140_mxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -81,10 +81,10 @@ KERNEL_FQ void m00140_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -97,7 +97,7 @@ KERNEL_FQ void m00140_sxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m00140_a1-optimized.cl b/OpenCL/m00140_a1-optimized.cl index bbe818983..7274a6550 100644 --- a/OpenCL/m00140_a1-optimized.cl +++ b/OpenCL/m00140_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m00140_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -349,24 +349,24 @@ KERNEL_FQ void m00140_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -374,10 +374,10 @@ KERNEL_FQ void m00140_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00140_a1-pure.cl b/OpenCL/m00140_a1-pure.cl index e1a820a26..c9ad3a97c 100644 --- a/OpenCL/m00140_a1-pure.cl +++ b/OpenCL/m00140_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m00140_mxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_utf16le_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -75,10 +75,10 @@ KERNEL_FQ void m00140_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -89,7 +89,7 @@ KERNEL_FQ void m00140_sxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_utf16le_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m00140_a3-optimized.cl b/OpenCL/m00140_a3-optimized.cl index 3693569a1..84910243c 100644 --- a/OpenCL/m00140_a3-optimized.cl +++ b/OpenCL/m00140_a3-optimized.cl @@ -32,24 +32,24 @@ DECLSPEC void m00140m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -248,10 +248,10 @@ DECLSPEC void m00140s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -269,24 +269,24 @@ DECLSPEC void m00140s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -517,7 +517,7 @@ KERNEL_FQ void m00140_m04 (KERN_ATTR_BASIC ()) * main */ - m00140m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00140m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00140_m08 (KERN_ATTR_BASIC ()) @@ -564,7 +564,7 @@ KERNEL_FQ void m00140_m08 (KERN_ATTR_BASIC ()) * main */ - m00140m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00140m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00140_m16 (KERN_ATTR_BASIC ()) @@ -611,7 +611,7 @@ KERNEL_FQ void m00140_m16 (KERN_ATTR_BASIC ()) * main */ - m00140m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00140m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00140_s04 (KERN_ATTR_BASIC ()) @@ -658,7 +658,7 @@ KERNEL_FQ void m00140_s04 (KERN_ATTR_BASIC ()) * main */ - m00140s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00140s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00140_s08 (KERN_ATTR_BASIC ()) @@ -705,7 +705,7 @@ KERNEL_FQ void m00140_s08 (KERN_ATTR_BASIC ()) * main */ - m00140s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00140s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00140_s16 (KERN_ATTR_BASIC ()) @@ -752,5 +752,5 @@ KERNEL_FQ void m00140_s16 (KERN_ATTR_BASIC ()) * main */ - m00140s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00140s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00140_a3-pure.cl b/OpenCL/m00140_a3-pure.cl index a6c7a12fd..2326cf63f 100644 --- a/OpenCL/m00140_a3-pure.cl +++ b/OpenCL/m00140_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m00140_mxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -92,10 +92,10 @@ KERNEL_FQ void m00140_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -115,7 +115,7 @@ KERNEL_FQ void m00140_sxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m00150_a0-optimized.cl b/OpenCL/m00150_a0-optimized.cl index 4e4d4c822..9c740f2d6 100644 --- a/OpenCL/m00150_a0-optimized.cl +++ b/OpenCL/m00150_a0-optimized.cl @@ -144,24 +144,24 @@ KERNEL_FQ void m00150_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -266,24 +266,24 @@ KERNEL_FQ void m00150_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -291,10 +291,10 @@ KERNEL_FQ void m00150_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00150_a0-pure.cl b/OpenCL/m00150_a0-pure.cl index 1e9bf4e27..cc7286790 100644 --- a/OpenCL/m00150_a0-pure.cl +++ b/OpenCL/m00150_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m00150_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -86,10 +86,10 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -98,13 +98,13 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m00150_a1-optimized.cl b/OpenCL/m00150_a1-optimized.cl index 7ced69a81..3563810d2 100644 --- a/OpenCL/m00150_a1-optimized.cl +++ b/OpenCL/m00150_a1-optimized.cl @@ -142,24 +142,24 @@ KERNEL_FQ void m00150_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -332,24 +332,24 @@ KERNEL_FQ void m00150_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -357,10 +357,10 @@ KERNEL_FQ void m00150_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00150_a1-pure.cl b/OpenCL/m00150_a1-pure.cl index 9278eba7d..e73df686c 100644 --- a/OpenCL/m00150_a1-pure.cl +++ b/OpenCL/m00150_a1-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00150_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -109,10 +109,10 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -128,13 +128,13 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m00150_a3-optimized.cl b/OpenCL/m00150_a3-optimized.cl index 914ea49a1..160f3a879 100644 --- a/OpenCL/m00150_a3-optimized.cl +++ b/OpenCL/m00150_a3-optimized.cl @@ -121,24 +121,24 @@ DECLSPEC void m00150m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -226,24 +226,24 @@ DECLSPEC void m00150s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -251,10 +251,10 @@ DECLSPEC void m00150s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -369,7 +369,7 @@ KERNEL_FQ void m00150_m04 (KERN_ATTR_BASIC ()) * main */ - m00150m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00150m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00150_m08 (KERN_ATTR_BASIC ()) @@ -416,7 +416,7 @@ KERNEL_FQ void m00150_m08 (KERN_ATTR_BASIC ()) * main */ - m00150m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00150m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00150_m16 (KERN_ATTR_BASIC ()) @@ -463,7 +463,7 @@ KERNEL_FQ void m00150_m16 (KERN_ATTR_BASIC ()) * main */ - m00150m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00150m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00150_s04 (KERN_ATTR_BASIC ()) @@ -510,7 +510,7 @@ KERNEL_FQ void m00150_s04 (KERN_ATTR_BASIC ()) * main */ - m00150s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00150s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00150_s08 (KERN_ATTR_BASIC ()) @@ -557,7 +557,7 @@ KERNEL_FQ void m00150_s08 (KERN_ATTR_BASIC ()) * main */ - m00150s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00150s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00150_s16 (KERN_ATTR_BASIC ()) @@ -604,5 +604,5 @@ KERNEL_FQ void m00150_s16 (KERN_ATTR_BASIC ()) * main */ - m00150s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00150s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00150_a3-pure.cl b/OpenCL/m00150_a3-pure.cl index a77d52177..90d225dfd 100644 --- a/OpenCL/m00150_a3-pure.cl +++ b/OpenCL/m00150_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00150_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -95,10 +95,10 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -114,13 +114,13 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m00160_a0-optimized.cl b/OpenCL/m00160_a0-optimized.cl index eabf353d8..7bf3e3efd 100644 --- a/OpenCL/m00160_a0-optimized.cl +++ b/OpenCL/m00160_a0-optimized.cl @@ -144,22 +144,22 @@ KERNEL_FQ void m00160_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -279,22 +279,22 @@ KERNEL_FQ void m00160_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -333,10 +333,10 @@ KERNEL_FQ void m00160_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00160_a0-pure.cl b/OpenCL/m00160_a0-pure.cl index 700766036..6c35a8e73 100644 --- a/OpenCL/m00160_a0-pure.cl +++ b/OpenCL/m00160_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m00160_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_hmac_ctx_t ctx0; @@ -88,10 +88,10 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_hmac_ctx_t ctx0; diff --git a/OpenCL/m00160_a1-optimized.cl b/OpenCL/m00160_a1-optimized.cl index bbf9c1a4e..7c12c1ce6 100644 --- a/OpenCL/m00160_a1-optimized.cl +++ b/OpenCL/m00160_a1-optimized.cl @@ -142,22 +142,22 @@ KERNEL_FQ void m00160_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -337,22 +337,22 @@ KERNEL_FQ void m00160_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -391,10 +391,10 @@ KERNEL_FQ void m00160_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00160_a1-pure.cl b/OpenCL/m00160_a1-pure.cl index 0b7b9a97d..eb0bd9ba5 100644 --- a/OpenCL/m00160_a1-pure.cl +++ b/OpenCL/m00160_a1-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00160_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_hmac_ctx_t ctx0; @@ -111,10 +111,10 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -130,13 +130,13 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_hmac_ctx_t ctx0; diff --git a/OpenCL/m00160_a3-optimized.cl b/OpenCL/m00160_a3-optimized.cl index e228783a4..8d0b98595 100644 --- a/OpenCL/m00160_a3-optimized.cl +++ b/OpenCL/m00160_a3-optimized.cl @@ -121,22 +121,22 @@ DECLSPEC void m00160m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -224,22 +224,22 @@ DECLSPEC void m00160s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -278,10 +278,10 @@ DECLSPEC void m00160s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -365,7 +365,7 @@ KERNEL_FQ void m00160_m04 (KERN_ATTR_BASIC ()) * main */ - m00160m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00160m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00160_m08 (KERN_ATTR_BASIC ()) @@ -412,7 +412,7 @@ KERNEL_FQ void m00160_m08 (KERN_ATTR_BASIC ()) * main */ - m00160m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00160m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00160_m16 (KERN_ATTR_BASIC ()) @@ -459,7 +459,7 @@ KERNEL_FQ void m00160_m16 (KERN_ATTR_BASIC ()) * main */ - m00160m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00160m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00160_s04 (KERN_ATTR_BASIC ()) @@ -506,7 +506,7 @@ KERNEL_FQ void m00160_s04 (KERN_ATTR_BASIC ()) * main */ - m00160s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00160s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00160_s08 (KERN_ATTR_BASIC ()) @@ -553,7 +553,7 @@ KERNEL_FQ void m00160_s08 (KERN_ATTR_BASIC ()) * main */ - m00160s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00160s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00160_s16 (KERN_ATTR_BASIC ()) @@ -600,5 +600,5 @@ KERNEL_FQ void m00160_s16 (KERN_ATTR_BASIC ()) * main */ - m00160s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00160s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00160_a3-pure.cl b/OpenCL/m00160_a3-pure.cl index 3d1e1e650..7d28e69ce 100644 --- a/OpenCL/m00160_a3-pure.cl +++ b/OpenCL/m00160_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m00160_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_hmac_ctx_vector_t ctx0; @@ -97,10 +97,10 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_hmac_ctx_vector_t ctx0; diff --git a/OpenCL/m00200_a0-optimized.cl b/OpenCL/m00200_a0-optimized.cl index ab9071cb0..b5f930466 100644 --- a/OpenCL/m00200_a0-optimized.cl +++ b/OpenCL/m00200_a0-optimized.cl @@ -178,8 +178,8 @@ KERNEL_FQ void m00200_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m00200_a1-optimized.cl b/OpenCL/m00200_a1-optimized.cl index 16b5054ab..14ea330df 100644 --- a/OpenCL/m00200_a1-optimized.cl +++ b/OpenCL/m00200_a1-optimized.cl @@ -240,8 +240,8 @@ KERNEL_FQ void m00200_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m00200_a3-optimized.cl b/OpenCL/m00200_a3-optimized.cl index 1a9b72e39..bf3a0f496 100644 --- a/OpenCL/m00200_a3-optimized.cl +++ b/OpenCL/m00200_a3-optimized.cl @@ -105,8 +105,8 @@ DECLSPEC void m00200m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -233,8 +233,8 @@ DECLSPEC void m00200s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -381,7 +381,7 @@ KERNEL_FQ void m00200_m04 (KERN_ATTR_VECTOR ()) * main */ - m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00200_m08 (KERN_ATTR_VECTOR ()) @@ -419,7 +419,7 @@ KERNEL_FQ void m00200_m08 (KERN_ATTR_VECTOR ()) * main */ - m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00200_m16 (KERN_ATTR_VECTOR ()) @@ -457,7 +457,7 @@ KERNEL_FQ void m00200_m16 (KERN_ATTR_VECTOR ()) * main */ - m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00200_s04 (KERN_ATTR_VECTOR ()) @@ -495,7 +495,7 @@ KERNEL_FQ void m00200_s04 (KERN_ATTR_VECTOR ()) * main */ - m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00200_s08 (KERN_ATTR_VECTOR ()) @@ -533,7 +533,7 @@ KERNEL_FQ void m00200_s08 (KERN_ATTR_VECTOR ()) * main */ - m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00200_s16 (KERN_ATTR_VECTOR ()) @@ -571,5 +571,5 @@ KERNEL_FQ void m00200_s16 (KERN_ATTR_VECTOR ()) * main */ - m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00300_a0-optimized.cl b/OpenCL/m00300_a0-optimized.cl index 22294dd64..375999c9e 100644 --- a/OpenCL/m00300_a0-optimized.cl +++ b/OpenCL/m00300_a0-optimized.cl @@ -357,10 +357,10 @@ KERNEL_FQ void m00300_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00300_a0-pure.cl b/OpenCL/m00300_a0-pure.cl index 4dcff77d8..bc15934b4 100644 --- a/OpenCL/m00300_a0-pure.cl +++ b/OpenCL/m00300_a0-pure.cl @@ -100,10 +100,10 @@ KERNEL_FQ void m00300_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00300_a1-optimized.cl b/OpenCL/m00300_a1-optimized.cl index 03dfeb1c5..28f09a6c0 100644 --- a/OpenCL/m00300_a1-optimized.cl +++ b/OpenCL/m00300_a1-optimized.cl @@ -413,10 +413,10 @@ KERNEL_FQ void m00300_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00300_a1-pure.cl b/OpenCL/m00300_a1-pure.cl index 63728805b..544c10adf 100644 --- a/OpenCL/m00300_a1-pure.cl +++ b/OpenCL/m00300_a1-pure.cl @@ -96,10 +96,10 @@ KERNEL_FQ void m00300_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00300_a3-optimized.cl b/OpenCL/m00300_a3-optimized.cl index 2ae4ec0e9..76dd71098 100644 --- a/OpenCL/m00300_a3-optimized.cl +++ b/OpenCL/m00300_a3-optimized.cl @@ -479,10 +479,10 @@ DECLSPEC void m00300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -808,7 +808,7 @@ KERNEL_FQ void m00300_m04 (KERN_ATTR_VECTOR ()) * main */ - m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00300_m08 (KERN_ATTR_VECTOR ()) @@ -846,7 +846,7 @@ KERNEL_FQ void m00300_m08 (KERN_ATTR_VECTOR ()) * main */ - m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00300_m16 (KERN_ATTR_VECTOR ()) @@ -884,7 +884,7 @@ KERNEL_FQ void m00300_m16 (KERN_ATTR_VECTOR ()) * main */ - m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00300_s04 (KERN_ATTR_VECTOR ()) @@ -922,7 +922,7 @@ KERNEL_FQ void m00300_s04 (KERN_ATTR_VECTOR ()) * main */ - m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00300_s08 (KERN_ATTR_VECTOR ()) @@ -960,7 +960,7 @@ KERNEL_FQ void m00300_s08 (KERN_ATTR_VECTOR ()) * main */ - m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00300_s16 (KERN_ATTR_VECTOR ()) @@ -998,5 +998,5 @@ KERNEL_FQ void m00300_s16 (KERN_ATTR_VECTOR ()) * main */ - m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00300_a3-pure.cl b/OpenCL/m00300_a3-pure.cl index 333354daf..4e953d04b 100644 --- a/OpenCL/m00300_a3-pure.cl +++ b/OpenCL/m00300_a3-pure.cl @@ -109,10 +109,10 @@ KERNEL_FQ void m00300_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00400-optimized.cl b/OpenCL/m00400-optimized.cl index 0ba302163..cfaba4c02 100644 --- a/OpenCL/m00400-optimized.cl +++ b/OpenCL/m00400-optimized.cl @@ -62,8 +62,8 @@ KERNEL_FQ void m00400_init (KERN_ATTR_TMPS (phpass_tmp_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; /** * init diff --git a/OpenCL/m00400-pure.cl b/OpenCL/m00400-pure.cl index 5eeb0b36d..311b811ef 100644 --- a/OpenCL/m00400-pure.cl +++ b/OpenCL/m00400-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m00400_init (KERN_ATTR_TMPS (phpass_tmp_t)) md5_init (&md5_ctx); - md5_update_global (&md5_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&md5_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_update_global (&md5_ctx, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m00500-optimized.cl b/OpenCL/m00500-optimized.cl index b530a23d4..6ea000442 100644 --- a/OpenCL/m00500-optimized.cl +++ b/OpenCL/m00500-optimized.cl @@ -666,10 +666,10 @@ KERNEL_FQ void m00500_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * init @@ -838,10 +838,10 @@ KERNEL_FQ void m00500_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest diff --git a/OpenCL/m00500-pure.cl b/OpenCL/m00500-pure.cl index cbee878dd..cad75f6cf 100644 --- a/OpenCL/m00500-pure.cl +++ b/OpenCL/m00500-pure.cl @@ -47,13 +47,13 @@ KERNEL_FQ void m00500_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -153,13 +153,13 @@ KERNEL_FQ void m00500_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m00600_a0-optimized.cl b/OpenCL/m00600_a0-optimized.cl index 1a499c113..882ee7f6a 100644 --- a/OpenCL/m00600_a0-optimized.cl +++ b/OpenCL/m00600_a0-optimized.cl @@ -132,10 +132,10 @@ KERNEL_FQ void m00600_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00600_a0-pure.cl b/OpenCL/m00600_a0-pure.cl index 07dd567f0..fc86ffb90 100644 --- a/OpenCL/m00600_a0-pure.cl +++ b/OpenCL/m00600_a0-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m00600_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00600_a1-optimized.cl b/OpenCL/m00600_a1-optimized.cl index 64c852492..4603ef2f7 100644 --- a/OpenCL/m00600_a1-optimized.cl +++ b/OpenCL/m00600_a1-optimized.cl @@ -190,10 +190,10 @@ KERNEL_FQ void m00600_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00600_a1-pure.cl b/OpenCL/m00600_a1-pure.cl index 4cc7c9707..d6bbb311e 100644 --- a/OpenCL/m00600_a1-pure.cl +++ b/OpenCL/m00600_a1-pure.cl @@ -71,10 +71,10 @@ KERNEL_FQ void m00600_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00600_a3-optimized.cl b/OpenCL/m00600_a3-optimized.cl index 20f9e7327..03946a6ed 100644 --- a/OpenCL/m00600_a3-optimized.cl +++ b/OpenCL/m00600_a3-optimized.cl @@ -110,10 +110,10 @@ DECLSPEC void m00600s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -225,7 +225,7 @@ KERNEL_FQ void m00600_m04 (KERN_ATTR_VECTOR ()) * main */ - m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00600_m08 (KERN_ATTR_VECTOR ()) @@ -263,7 +263,7 @@ KERNEL_FQ void m00600_m08 (KERN_ATTR_VECTOR ()) * main */ - m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00600_m16 (KERN_ATTR_VECTOR ()) @@ -301,7 +301,7 @@ KERNEL_FQ void m00600_m16 (KERN_ATTR_VECTOR ()) * main */ - m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00600_s04 (KERN_ATTR_VECTOR ()) @@ -339,7 +339,7 @@ KERNEL_FQ void m00600_s04 (KERN_ATTR_VECTOR ()) * main */ - m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00600_s08 (KERN_ATTR_VECTOR ()) @@ -377,7 +377,7 @@ KERNEL_FQ void m00600_s08 (KERN_ATTR_VECTOR ()) * main */ - m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00600_s16 (KERN_ATTR_VECTOR ()) @@ -415,5 +415,5 @@ KERNEL_FQ void m00600_s16 (KERN_ATTR_VECTOR ()) * main */ - m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00600_a3-pure.cl b/OpenCL/m00600_a3-pure.cl index 6f19658b5..610442184 100644 --- a/OpenCL/m00600_a3-pure.cl +++ b/OpenCL/m00600_a3-pure.cl @@ -82,10 +82,10 @@ KERNEL_FQ void m00600_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00900_a0-optimized.cl b/OpenCL/m00900_a0-optimized.cl index 5f6dff580..25ee08aa2 100644 --- a/OpenCL/m00900_a0-optimized.cl +++ b/OpenCL/m00900_a0-optimized.cl @@ -168,10 +168,10 @@ KERNEL_FQ void m00900_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00900_a0-pure.cl b/OpenCL/m00900_a0-pure.cl index e8590bfd5..1578a97c3 100644 --- a/OpenCL/m00900_a0-pure.cl +++ b/OpenCL/m00900_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m00900_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00900_a1-optimized.cl b/OpenCL/m00900_a1-optimized.cl index b7df87f0a..83b55cc12 100644 --- a/OpenCL/m00900_a1-optimized.cl +++ b/OpenCL/m00900_a1-optimized.cl @@ -225,10 +225,10 @@ KERNEL_FQ void m00900_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00900_a1-pure.cl b/OpenCL/m00900_a1-pure.cl index 518656787..1329b3d13 100644 --- a/OpenCL/m00900_a1-pure.cl +++ b/OpenCL/m00900_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m00900_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m00900_a3-optimized.cl b/OpenCL/m00900_a3-optimized.cl index e6d4fd6f0..28ec3cdb8 100644 --- a/OpenCL/m00900_a3-optimized.cl +++ b/OpenCL/m00900_a3-optimized.cl @@ -235,20 +235,20 @@ DECLSPEC void m00900s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; MD4_STEP_REV (MD4_H_S, b_rev, c_rev, d_rev, a_rev, w[15], MD4C02, MD4S23); MD4_STEP_REV (MD4_H_S, c_rev, d_rev, a_rev, b_rev, w[ 7], MD4C02, MD4S22); @@ -388,7 +388,7 @@ KERNEL_FQ void m00900_m04 (KERN_ATTR_VECTOR ()) * main */ - m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00900_m08 (KERN_ATTR_VECTOR ()) @@ -426,7 +426,7 @@ KERNEL_FQ void m00900_m08 (KERN_ATTR_VECTOR ()) * main */ - m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00900_m16 (KERN_ATTR_VECTOR ()) @@ -464,7 +464,7 @@ KERNEL_FQ void m00900_m16 (KERN_ATTR_VECTOR ()) * main */ - m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00900_s04 (KERN_ATTR_VECTOR ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m00900_s04 (KERN_ATTR_VECTOR ()) * main */ - m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00900_s08 (KERN_ATTR_VECTOR ()) @@ -540,7 +540,7 @@ KERNEL_FQ void m00900_s08 (KERN_ATTR_VECTOR ()) * main */ - m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m00900_s16 (KERN_ATTR_VECTOR ()) @@ -578,5 +578,5 @@ KERNEL_FQ void m00900_s16 (KERN_ATTR_VECTOR ()) * main */ - m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m00900_a3-pure.cl b/OpenCL/m00900_a3-pure.cl index 49899c0c2..441522c95 100644 --- a/OpenCL/m00900_a3-pure.cl +++ b/OpenCL/m00900_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m00900_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01000_a0-optimized.cl b/OpenCL/m01000_a0-optimized.cl index 802ab947b..b9f6bb345 100644 --- a/OpenCL/m01000_a0-optimized.cl +++ b/OpenCL/m01000_a0-optimized.cl @@ -171,10 +171,10 @@ KERNEL_FQ void m01000_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01000_a0-pure.cl b/OpenCL/m01000_a0-pure.cl index dee609c2c..664d30c98 100644 --- a/OpenCL/m01000_a0-pure.cl +++ b/OpenCL/m01000_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m01000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01000_a1-optimized.cl b/OpenCL/m01000_a1-optimized.cl index e3e51132d..68223fe9d 100644 --- a/OpenCL/m01000_a1-optimized.cl +++ b/OpenCL/m01000_a1-optimized.cl @@ -231,10 +231,10 @@ KERNEL_FQ void m01000_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01000_a1-pure.cl b/OpenCL/m01000_a1-pure.cl index a08e6fedc..7850441f7 100644 --- a/OpenCL/m01000_a1-pure.cl +++ b/OpenCL/m01000_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m01000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01000_a3-optimized.cl b/OpenCL/m01000_a3-optimized.cl index 69a83ea05..0bd0a1b42 100644 --- a/OpenCL/m01000_a3-optimized.cl +++ b/OpenCL/m01000_a3-optimized.cl @@ -235,20 +235,20 @@ DECLSPEC void m01000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; MD4_STEP_REV (MD4_H_S, b_rev, c_rev, d_rev, a_rev, w[15], MD4C02, MD4S23); MD4_STEP_REV (MD4_H_S, c_rev, d_rev, a_rev, b_rev, w[ 7], MD4C02, MD4S22); @@ -388,7 +388,7 @@ KERNEL_FQ void m01000_m04 (KERN_ATTR_VECTOR ()) * main */ - m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01000_m08 (KERN_ATTR_VECTOR ()) @@ -426,7 +426,7 @@ KERNEL_FQ void m01000_m08 (KERN_ATTR_VECTOR ()) * main */ - m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01000_m16 (KERN_ATTR_VECTOR ()) @@ -464,7 +464,7 @@ KERNEL_FQ void m01000_m16 (KERN_ATTR_VECTOR ()) * main */ - m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01000_s04 (KERN_ATTR_VECTOR ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m01000_s04 (KERN_ATTR_VECTOR ()) * main */ - m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01000_s08 (KERN_ATTR_VECTOR ()) @@ -540,7 +540,7 @@ KERNEL_FQ void m01000_s08 (KERN_ATTR_VECTOR ()) * main */ - m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01000_s16 (KERN_ATTR_VECTOR ()) @@ -578,5 +578,5 @@ KERNEL_FQ void m01000_s16 (KERN_ATTR_VECTOR ()) * main */ - m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01000_a3-pure.cl b/OpenCL/m01000_a3-pure.cl index ff3f6a2da..bf04030f6 100644 --- a/OpenCL/m01000_a3-pure.cl +++ b/OpenCL/m01000_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m01000_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01100_a0-optimized.cl b/OpenCL/m01100_a0-optimized.cl index ba7a08b55..da35e1983 100644 --- a/OpenCL/m01100_a0-optimized.cl +++ b/OpenCL/m01100_a0-optimized.cl @@ -47,7 +47,7 @@ KERNEL_FQ void m01100_m04 (KERN_ATTR_RULES ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -266,7 +266,7 @@ KERNEL_FQ void m01100_s04 (KERN_ATTR_RULES ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -293,10 +293,10 @@ KERNEL_FQ void m01100_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01100_a0-pure.cl b/OpenCL/m01100_a0-pure.cl index f7465d7f3..83d17603e 100644 --- a/OpenCL/m01100_a0-pure.cl +++ b/OpenCL/m01100_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m01100_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -101,10 +101,10 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -113,13 +113,13 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m01100_a1-optimized.cl b/OpenCL/m01100_a1-optimized.cl index 466e3ff30..0f915b92f 100644 --- a/OpenCL/m01100_a1-optimized.cl +++ b/OpenCL/m01100_a1-optimized.cl @@ -45,7 +45,7 @@ KERNEL_FQ void m01100_m04 (KERN_ATTR_BASIC ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -326,7 +326,7 @@ KERNEL_FQ void m01100_s04 (KERN_ATTR_BASIC ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -353,10 +353,10 @@ KERNEL_FQ void m01100_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01100_a1-pure.cl b/OpenCL/m01100_a1-pure.cl index ca4fad103..de4834a2d 100644 --- a/OpenCL/m01100_a1-pure.cl +++ b/OpenCL/m01100_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m01100_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md4_ctx_t ctx0; @@ -97,23 +97,23 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md4_ctx_t ctx0; diff --git a/OpenCL/m01100_a3-optimized.cl b/OpenCL/m01100_a3-optimized.cl index a7da9f741..d66873da6 100644 --- a/OpenCL/m01100_a3-optimized.cl +++ b/OpenCL/m01100_a3-optimized.cl @@ -335,10 +335,10 @@ DECLSPEC void m01100s (LOCAL_AS salt_t *s_salt_buf, u32 *w, const u32 pw_len, KE const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -537,7 +537,7 @@ KERNEL_FQ void m01100_m04 (KERN_ATTR_VECTOR ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -550,7 +550,7 @@ KERNEL_FQ void m01100_m04 (KERN_ATTR_VECTOR ()) * main */ - m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01100_m08 (KERN_ATTR_VECTOR ()) @@ -591,7 +591,7 @@ KERNEL_FQ void m01100_m08 (KERN_ATTR_VECTOR ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -604,7 +604,7 @@ KERNEL_FQ void m01100_m08 (KERN_ATTR_VECTOR ()) * main */ - m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01100_m16 (KERN_ATTR_VECTOR ()) @@ -645,7 +645,7 @@ KERNEL_FQ void m01100_m16 (KERN_ATTR_VECTOR ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -658,7 +658,7 @@ KERNEL_FQ void m01100_m16 (KERN_ATTR_VECTOR ()) * main */ - m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01100_s04 (KERN_ATTR_VECTOR ()) @@ -699,7 +699,7 @@ KERNEL_FQ void m01100_s04 (KERN_ATTR_VECTOR ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -712,7 +712,7 @@ KERNEL_FQ void m01100_s04 (KERN_ATTR_VECTOR ()) * main */ - m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01100_s08 (KERN_ATTR_VECTOR ()) @@ -753,7 +753,7 @@ KERNEL_FQ void m01100_s08 (KERN_ATTR_VECTOR ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -766,7 +766,7 @@ KERNEL_FQ void m01100_s08 (KERN_ATTR_VECTOR ()) * main */ - m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01100_s16 (KERN_ATTR_VECTOR ()) @@ -807,7 +807,7 @@ KERNEL_FQ void m01100_s16 (KERN_ATTR_VECTOR ()) if (lid == 0) { - s_salt_buf[0] = salt_bufs[salt_pos]; + s_salt_buf[0] = salt_bufs[SALT_POS]; s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8; } @@ -820,5 +820,5 @@ KERNEL_FQ void m01100_s16 (KERN_ATTR_VECTOR ()) * main */ - m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01100_a3-pure.cl b/OpenCL/m01100_a3-pure.cl index f55770378..9bd57619a 100644 --- a/OpenCL/m01100_a3-pure.cl +++ b/OpenCL/m01100_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01100_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -110,10 +110,10 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -129,13 +129,13 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m01300_a0-optimized.cl b/OpenCL/m01300_a0-optimized.cl index 90fb84b27..df965bfd0 100644 --- a/OpenCL/m01300_a0-optimized.cl +++ b/OpenCL/m01300_a0-optimized.cl @@ -220,23 +220,23 @@ KERNEL_FQ void m01300_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; SHA224_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev); SHA224_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev); diff --git a/OpenCL/m01300_a0-pure.cl b/OpenCL/m01300_a0-pure.cl index 54ef39265..1a88e6429 100644 --- a/OpenCL/m01300_a0-pure.cl +++ b/OpenCL/m01300_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m01300_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01300_a1-optimized.cl b/OpenCL/m01300_a1-optimized.cl index fedc61b6d..3405eaeba 100644 --- a/OpenCL/m01300_a1-optimized.cl +++ b/OpenCL/m01300_a1-optimized.cl @@ -276,23 +276,23 @@ KERNEL_FQ void m01300_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; SHA224_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev); SHA224_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev); diff --git a/OpenCL/m01300_a1-pure.cl b/OpenCL/m01300_a1-pure.cl index 3a22e5f8a..421f39ce6 100644 --- a/OpenCL/m01300_a1-pure.cl +++ b/OpenCL/m01300_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m01300_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01300_a3-optimized.cl b/OpenCL/m01300_a3-optimized.cl index 23b8385f5..d6001d606 100644 --- a/OpenCL/m01300_a3-optimized.cl +++ b/OpenCL/m01300_a3-optimized.cl @@ -161,23 +161,23 @@ DECLSPEC void m01300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; SHA224_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev); SHA224_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev); @@ -331,7 +331,7 @@ KERNEL_FQ void m01300_m04 (KERN_ATTR_VECTOR ()) * main */ - m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01300_m08 (KERN_ATTR_VECTOR ()) @@ -369,7 +369,7 @@ KERNEL_FQ void m01300_m08 (KERN_ATTR_VECTOR ()) * main */ - m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01300_m16 (KERN_ATTR_VECTOR ()) @@ -407,7 +407,7 @@ KERNEL_FQ void m01300_m16 (KERN_ATTR_VECTOR ()) * main */ - m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01300_s04 (KERN_ATTR_VECTOR ()) @@ -445,7 +445,7 @@ KERNEL_FQ void m01300_s04 (KERN_ATTR_VECTOR ()) * main */ - m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01300_s08 (KERN_ATTR_VECTOR ()) @@ -483,7 +483,7 @@ KERNEL_FQ void m01300_s08 (KERN_ATTR_VECTOR ()) * main */ - m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01300_s16 (KERN_ATTR_VECTOR ()) @@ -521,5 +521,5 @@ KERNEL_FQ void m01300_s16 (KERN_ATTR_VECTOR ()) * main */ - m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01300_a3-pure.cl b/OpenCL/m01300_a3-pure.cl index 1fdc37fdd..e1e0392e3 100644 --- a/OpenCL/m01300_a3-pure.cl +++ b/OpenCL/m01300_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m01300_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01400_a0-optimized.cl b/OpenCL/m01400_a0-optimized.cl index 6b1dc826b..31c119910 100644 --- a/OpenCL/m01400_a0-optimized.cl +++ b/OpenCL/m01400_a0-optimized.cl @@ -221,24 +221,24 @@ KERNEL_FQ void m01400_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01400_a0-pure.cl b/OpenCL/m01400_a0-pure.cl index 367430536..cf704adf7 100644 --- a/OpenCL/m01400_a0-pure.cl +++ b/OpenCL/m01400_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m01400_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01400_a1-optimized.cl b/OpenCL/m01400_a1-optimized.cl index ca0f0d639..e90e1c462 100644 --- a/OpenCL/m01400_a1-optimized.cl +++ b/OpenCL/m01400_a1-optimized.cl @@ -277,24 +277,24 @@ KERNEL_FQ void m01400_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01400_a1-pure.cl b/OpenCL/m01400_a1-pure.cl index 4489e8a8b..33927a266 100644 --- a/OpenCL/m01400_a1-pure.cl +++ b/OpenCL/m01400_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m01400_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01400_a3-optimized.cl b/OpenCL/m01400_a3-optimized.cl index 48aa24f8a..510d62d11 100644 --- a/OpenCL/m01400_a3-optimized.cl +++ b/OpenCL/m01400_a3-optimized.cl @@ -162,24 +162,24 @@ DECLSPEC void m01400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); @@ -334,7 +334,7 @@ KERNEL_FQ void m01400_m04 (KERN_ATTR_VECTOR ()) * main */ - m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01400_m08 (KERN_ATTR_VECTOR ()) @@ -372,7 +372,7 @@ KERNEL_FQ void m01400_m08 (KERN_ATTR_VECTOR ()) * main */ - m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01400_m16 (KERN_ATTR_VECTOR ()) @@ -410,7 +410,7 @@ KERNEL_FQ void m01400_m16 (KERN_ATTR_VECTOR ()) * main */ - m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01400_s04 (KERN_ATTR_VECTOR ()) @@ -448,7 +448,7 @@ KERNEL_FQ void m01400_s04 (KERN_ATTR_VECTOR ()) * main */ - m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01400_s08 (KERN_ATTR_VECTOR ()) @@ -486,7 +486,7 @@ KERNEL_FQ void m01400_s08 (KERN_ATTR_VECTOR ()) * main */ - m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01400_s16 (KERN_ATTR_VECTOR ()) @@ -524,5 +524,5 @@ KERNEL_FQ void m01400_s16 (KERN_ATTR_VECTOR ()) * main */ - m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01400_a3-pure.cl b/OpenCL/m01400_a3-pure.cl index 86d97ba44..a61b968ba 100644 --- a/OpenCL/m01400_a3-pure.cl +++ b/OpenCL/m01400_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m01400_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01410_a0-optimized.cl b/OpenCL/m01410_a0-optimized.cl index 00e551dd5..2fd35a6e5 100644 --- a/OpenCL/m01410_a0-optimized.cl +++ b/OpenCL/m01410_a0-optimized.cl @@ -69,24 +69,24 @@ KERNEL_FQ void m01410_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -297,24 +297,24 @@ KERNEL_FQ void m01410_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -322,24 +322,24 @@ KERNEL_FQ void m01410_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01410_a0-pure.cl b/OpenCL/m01410_a0-pure.cl index bd91db24a..c06693df6 100644 --- a/OpenCL/m01410_a0-pure.cl +++ b/OpenCL/m01410_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m01410_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -88,10 +88,10 @@ KERNEL_FQ void m01410_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m01410_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01410_a1-optimized.cl b/OpenCL/m01410_a1-optimized.cl index 165e953b0..13dedd4e9 100644 --- a/OpenCL/m01410_a1-optimized.cl +++ b/OpenCL/m01410_a1-optimized.cl @@ -67,24 +67,24 @@ KERNEL_FQ void m01410_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -355,24 +355,24 @@ KERNEL_FQ void m01410_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -380,24 +380,24 @@ KERNEL_FQ void m01410_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01410_a1-pure.cl b/OpenCL/m01410_a1-pure.cl index 89772c07b..6b3b46dc2 100644 --- a/OpenCL/m01410_a1-pure.cl +++ b/OpenCL/m01410_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m01410_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; @@ -84,23 +84,23 @@ KERNEL_FQ void m01410_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; diff --git a/OpenCL/m01410_a3-optimized.cl b/OpenCL/m01410_a3-optimized.cl index 65752388c..3fcddd5ff 100644 --- a/OpenCL/m01410_a3-optimized.cl +++ b/OpenCL/m01410_a3-optimized.cl @@ -46,22 +46,22 @@ DECLSPEC void m01410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; switch_buffer_by_offset_le_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len); @@ -82,7 +82,7 @@ DECLSPEC void m01410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) w[14] |= hc_swap32_S (salt_buf3[2]); w[15] |= hc_swap32_S (salt_buf3[3]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -213,24 +213,24 @@ DECLSPEC void m01410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); @@ -385,7 +385,7 @@ KERNEL_FQ void m01410_m04 (KERN_ATTR_VECTOR ()) * main */ - m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01410_m08 (KERN_ATTR_VECTOR ()) @@ -423,7 +423,7 @@ KERNEL_FQ void m01410_m08 (KERN_ATTR_VECTOR ()) * main */ - m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01410_m16 (KERN_ATTR_VECTOR ()) @@ -461,7 +461,7 @@ KERNEL_FQ void m01410_m16 (KERN_ATTR_VECTOR ()) * main */ - m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01410_s04 (KERN_ATTR_VECTOR ()) @@ -499,7 +499,7 @@ KERNEL_FQ void m01410_s04 (KERN_ATTR_VECTOR ()) * main */ - m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01410_s08 (KERN_ATTR_VECTOR ()) @@ -537,7 +537,7 @@ KERNEL_FQ void m01410_s08 (KERN_ATTR_VECTOR ()) * main */ - m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01410_s16 (KERN_ATTR_VECTOR ()) @@ -575,5 +575,5 @@ KERNEL_FQ void m01410_s16 (KERN_ATTR_VECTOR ()) * main */ - m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01410_a3-pure.cl b/OpenCL/m01410_a3-pure.cl index a362f0f06..b5c77e460 100644 --- a/OpenCL/m01410_a3-pure.cl +++ b/OpenCL/m01410_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01410_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -97,10 +97,10 @@ KERNEL_FQ void m01410_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m01410_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01420_a0-optimized.cl b/OpenCL/m01420_a0-optimized.cl index a506c1d8f..750cb6c05 100644 --- a/OpenCL/m01420_a0-optimized.cl +++ b/OpenCL/m01420_a0-optimized.cl @@ -69,24 +69,24 @@ KERNEL_FQ void m01420_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -277,24 +277,24 @@ KERNEL_FQ void m01420_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -302,24 +302,24 @@ KERNEL_FQ void m01420_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01420_a0-pure.cl b/OpenCL/m01420_a0-pure.cl index eac257dde..276393b0e 100644 --- a/OpenCL/m01420_a0-pure.cl +++ b/OpenCL/m01420_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m01420_mxx (KERN_ATTR_RULES ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -81,10 +81,10 @@ KERNEL_FQ void m01420_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -97,7 +97,7 @@ KERNEL_FQ void m01420_sxx (KERN_ATTR_RULES ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m01420_a1-optimized.cl b/OpenCL/m01420_a1-optimized.cl index 91fa89196..65c90e090 100644 --- a/OpenCL/m01420_a1-optimized.cl +++ b/OpenCL/m01420_a1-optimized.cl @@ -67,24 +67,24 @@ KERNEL_FQ void m01420_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -333,24 +333,24 @@ KERNEL_FQ void m01420_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -358,24 +358,24 @@ KERNEL_FQ void m01420_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01420_a1-pure.cl b/OpenCL/m01420_a1-pure.cl index bd50b619c..aee8da2aa 100644 --- a/OpenCL/m01420_a1-pure.cl +++ b/OpenCL/m01420_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m01420_mxx (KERN_ATTR_BASIC ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -75,10 +75,10 @@ KERNEL_FQ void m01420_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -89,7 +89,7 @@ KERNEL_FQ void m01420_sxx (KERN_ATTR_BASIC ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m01420_a3-optimized.cl b/OpenCL/m01420_a3-optimized.cl index b19838862..9e9e4f222 100644 --- a/OpenCL/m01420_a3-optimized.cl +++ b/OpenCL/m01420_a3-optimized.cl @@ -46,24 +46,24 @@ DECLSPEC void m01420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -237,24 +237,24 @@ DECLSPEC void m01420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); @@ -270,24 +270,24 @@ DECLSPEC void m01420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -493,7 +493,7 @@ KERNEL_FQ void m01420_m04 (KERN_ATTR_BASIC ()) * main */ - m01420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01420_m08 (KERN_ATTR_BASIC ()) @@ -540,7 +540,7 @@ KERNEL_FQ void m01420_m08 (KERN_ATTR_BASIC ()) * main */ - m01420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01420_m16 (KERN_ATTR_BASIC ()) @@ -587,7 +587,7 @@ KERNEL_FQ void m01420_m16 (KERN_ATTR_BASIC ()) * main */ - m01420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01420_s04 (KERN_ATTR_BASIC ()) @@ -634,7 +634,7 @@ KERNEL_FQ void m01420_s04 (KERN_ATTR_BASIC ()) * main */ - m01420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01420_s08 (KERN_ATTR_BASIC ()) @@ -681,7 +681,7 @@ KERNEL_FQ void m01420_s08 (KERN_ATTR_BASIC ()) * main */ - m01420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01420_s16 (KERN_ATTR_BASIC ()) @@ -728,5 +728,5 @@ KERNEL_FQ void m01420_s16 (KERN_ATTR_BASIC ()) * main */ - m01420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01420_a3-pure.cl b/OpenCL/m01420_a3-pure.cl index b8b7d21c0..11dc947a2 100644 --- a/OpenCL/m01420_a3-pure.cl +++ b/OpenCL/m01420_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m01420_mxx (KERN_ATTR_VECTOR ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -92,10 +92,10 @@ KERNEL_FQ void m01420_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -115,7 +115,7 @@ KERNEL_FQ void m01420_sxx (KERN_ATTR_VECTOR ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m01430_a0-optimized.cl b/OpenCL/m01430_a0-optimized.cl index 61077c22e..bb0725ecd 100644 --- a/OpenCL/m01430_a0-optimized.cl +++ b/OpenCL/m01430_a0-optimized.cl @@ -69,24 +69,24 @@ KERNEL_FQ void m01430_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -302,24 +302,24 @@ KERNEL_FQ void m01430_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -327,24 +327,24 @@ KERNEL_FQ void m01430_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01430_a0-pure.cl b/OpenCL/m01430_a0-pure.cl index af950d387..5b6521de7 100644 --- a/OpenCL/m01430_a0-pure.cl +++ b/OpenCL/m01430_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m01430_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -88,10 +88,10 @@ KERNEL_FQ void m01430_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m01430_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01430_a1-optimized.cl b/OpenCL/m01430_a1-optimized.cl index 4b1c38642..d9c6d02cc 100644 --- a/OpenCL/m01430_a1-optimized.cl +++ b/OpenCL/m01430_a1-optimized.cl @@ -67,24 +67,24 @@ KERNEL_FQ void m01430_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -360,24 +360,24 @@ KERNEL_FQ void m01430_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -385,24 +385,24 @@ KERNEL_FQ void m01430_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01430_a1-pure.cl b/OpenCL/m01430_a1-pure.cl index b4597fd62..c97c9d536 100644 --- a/OpenCL/m01430_a1-pure.cl +++ b/OpenCL/m01430_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m01430_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; @@ -84,23 +84,23 @@ KERNEL_FQ void m01430_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; diff --git a/OpenCL/m01430_a3-optimized.cl b/OpenCL/m01430_a3-optimized.cl index 8476d60d2..626a2b5ae 100644 --- a/OpenCL/m01430_a3-optimized.cl +++ b/OpenCL/m01430_a3-optimized.cl @@ -46,22 +46,22 @@ DECLSPEC void m01430m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; switch_buffer_by_offset_le_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len); @@ -82,7 +82,7 @@ DECLSPEC void m01430m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) w[14] |= hc_swap32_S (salt_buf3[2]); w[15] |= hc_swap32_S (salt_buf3[3]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -213,24 +213,24 @@ DECLSPEC void m01430s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); @@ -385,7 +385,7 @@ KERNEL_FQ void m01430_m04 (KERN_ATTR_VECTOR ()) * main */ - m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01430_m08 (KERN_ATTR_VECTOR ()) @@ -423,7 +423,7 @@ KERNEL_FQ void m01430_m08 (KERN_ATTR_VECTOR ()) * main */ - m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01430_m16 (KERN_ATTR_VECTOR ()) @@ -461,7 +461,7 @@ KERNEL_FQ void m01430_m16 (KERN_ATTR_VECTOR ()) * main */ - m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01430_s04 (KERN_ATTR_VECTOR ()) @@ -499,7 +499,7 @@ KERNEL_FQ void m01430_s04 (KERN_ATTR_VECTOR ()) * main */ - m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01430_s08 (KERN_ATTR_VECTOR ()) @@ -537,7 +537,7 @@ KERNEL_FQ void m01430_s08 (KERN_ATTR_VECTOR ()) * main */ - m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01430_s16 (KERN_ATTR_VECTOR ()) @@ -575,5 +575,5 @@ KERNEL_FQ void m01430_s16 (KERN_ATTR_VECTOR ()) * main */ - m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01430_a3-pure.cl b/OpenCL/m01430_a3-pure.cl index 7ed56551b..6903d1fff 100644 --- a/OpenCL/m01430_a3-pure.cl +++ b/OpenCL/m01430_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01430_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -97,10 +97,10 @@ KERNEL_FQ void m01430_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m01430_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01440_a0-optimized.cl b/OpenCL/m01440_a0-optimized.cl index 23e81cee4..6c92d1a6a 100644 --- a/OpenCL/m01440_a0-optimized.cl +++ b/OpenCL/m01440_a0-optimized.cl @@ -69,24 +69,24 @@ KERNEL_FQ void m01440_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -282,24 +282,24 @@ KERNEL_FQ void m01440_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -307,24 +307,24 @@ KERNEL_FQ void m01440_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01440_a0-pure.cl b/OpenCL/m01440_a0-pure.cl index d602fb4ba..960a35424 100644 --- a/OpenCL/m01440_a0-pure.cl +++ b/OpenCL/m01440_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m01440_mxx (KERN_ATTR_RULES ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -81,10 +81,10 @@ KERNEL_FQ void m01440_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -97,7 +97,7 @@ KERNEL_FQ void m01440_sxx (KERN_ATTR_RULES ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m01440_a1-optimized.cl b/OpenCL/m01440_a1-optimized.cl index 90b1f369d..d753ca628 100644 --- a/OpenCL/m01440_a1-optimized.cl +++ b/OpenCL/m01440_a1-optimized.cl @@ -67,24 +67,24 @@ KERNEL_FQ void m01440_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -338,24 +338,24 @@ KERNEL_FQ void m01440_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -363,24 +363,24 @@ KERNEL_FQ void m01440_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m01440_a1-pure.cl b/OpenCL/m01440_a1-pure.cl index 7277bfa91..d06fff1ca 100644 --- a/OpenCL/m01440_a1-pure.cl +++ b/OpenCL/m01440_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m01440_mxx (KERN_ATTR_BASIC ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_update_global_utf16le_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -75,10 +75,10 @@ KERNEL_FQ void m01440_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -89,7 +89,7 @@ KERNEL_FQ void m01440_sxx (KERN_ATTR_BASIC ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_update_global_utf16le_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m01440_a3-optimized.cl b/OpenCL/m01440_a3-optimized.cl index ce9719a32..d5dc59efb 100644 --- a/OpenCL/m01440_a3-optimized.cl +++ b/OpenCL/m01440_a3-optimized.cl @@ -46,24 +46,24 @@ DECLSPEC void m01440m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -237,24 +237,24 @@ DECLSPEC void m01440s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); @@ -270,24 +270,24 @@ DECLSPEC void m01440s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -493,7 +493,7 @@ KERNEL_FQ void m01440_m04 (KERN_ATTR_BASIC ()) * main */ - m01440m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01440m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01440_m08 (KERN_ATTR_BASIC ()) @@ -540,7 +540,7 @@ KERNEL_FQ void m01440_m08 (KERN_ATTR_BASIC ()) * main */ - m01440m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01440m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01440_m16 (KERN_ATTR_BASIC ()) @@ -587,7 +587,7 @@ KERNEL_FQ void m01440_m16 (KERN_ATTR_BASIC ()) * main */ - m01440m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01440m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01440_s04 (KERN_ATTR_BASIC ()) @@ -634,7 +634,7 @@ KERNEL_FQ void m01440_s04 (KERN_ATTR_BASIC ()) * main */ - m01440s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01440s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01440_s08 (KERN_ATTR_BASIC ()) @@ -681,7 +681,7 @@ KERNEL_FQ void m01440_s08 (KERN_ATTR_BASIC ()) * main */ - m01440s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01440s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01440_s16 (KERN_ATTR_BASIC ()) @@ -728,5 +728,5 @@ KERNEL_FQ void m01440_s16 (KERN_ATTR_BASIC ()) * main */ - m01440s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01440s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01440_a3-pure.cl b/OpenCL/m01440_a3-pure.cl index 3aad0e874..a3740571c 100644 --- a/OpenCL/m01440_a3-pure.cl +++ b/OpenCL/m01440_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m01440_mxx (KERN_ATTR_VECTOR ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -92,10 +92,10 @@ KERNEL_FQ void m01440_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -115,7 +115,7 @@ KERNEL_FQ void m01440_sxx (KERN_ATTR_VECTOR ()) sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m01450_a0-optimized.cl b/OpenCL/m01450_a0-optimized.cl index c3716f329..51da3a874 100644 --- a/OpenCL/m01450_a0-optimized.cl +++ b/OpenCL/m01450_a0-optimized.cl @@ -156,24 +156,24 @@ KERNEL_FQ void m01450_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -278,24 +278,24 @@ KERNEL_FQ void m01450_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -303,10 +303,10 @@ KERNEL_FQ void m01450_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01450_a0-pure.cl b/OpenCL/m01450_a0-pure.cl index 036062aa0..6f04212c3 100644 --- a/OpenCL/m01450_a0-pure.cl +++ b/OpenCL/m01450_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m01450_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -86,10 +86,10 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -98,13 +98,13 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01450_a1-optimized.cl b/OpenCL/m01450_a1-optimized.cl index 1ff4e577f..7b294d0d5 100644 --- a/OpenCL/m01450_a1-optimized.cl +++ b/OpenCL/m01450_a1-optimized.cl @@ -154,24 +154,24 @@ KERNEL_FQ void m01450_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -344,24 +344,24 @@ KERNEL_FQ void m01450_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -369,10 +369,10 @@ KERNEL_FQ void m01450_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01450_a1-pure.cl b/OpenCL/m01450_a1-pure.cl index 5519e2ce7..6a49153c1 100644 --- a/OpenCL/m01450_a1-pure.cl +++ b/OpenCL/m01450_a1-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01450_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -109,10 +109,10 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -128,13 +128,13 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01450_a3-optimized.cl b/OpenCL/m01450_a3-optimized.cl index 039ea3f5d..c734bde4e 100644 --- a/OpenCL/m01450_a3-optimized.cl +++ b/OpenCL/m01450_a3-optimized.cl @@ -133,24 +133,24 @@ DECLSPEC void m01450m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -238,24 +238,24 @@ DECLSPEC void m01450s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -263,10 +263,10 @@ DECLSPEC void m01450s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -381,7 +381,7 @@ KERNEL_FQ void m01450_m04 (KERN_ATTR_BASIC ()) * main */ - m01450m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01450m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01450_m08 (KERN_ATTR_BASIC ()) @@ -428,7 +428,7 @@ KERNEL_FQ void m01450_m08 (KERN_ATTR_BASIC ()) * main */ - m01450m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01450m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01450_m16 (KERN_ATTR_BASIC ()) @@ -475,7 +475,7 @@ KERNEL_FQ void m01450_m16 (KERN_ATTR_BASIC ()) * main */ - m01450m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01450m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01450_s04 (KERN_ATTR_BASIC ()) @@ -522,7 +522,7 @@ KERNEL_FQ void m01450_s04 (KERN_ATTR_BASIC ()) * main */ - m01450s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01450s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01450_s08 (KERN_ATTR_BASIC ()) @@ -569,7 +569,7 @@ KERNEL_FQ void m01450_s08 (KERN_ATTR_BASIC ()) * main */ - m01450s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01450s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01450_s16 (KERN_ATTR_BASIC ()) @@ -616,5 +616,5 @@ KERNEL_FQ void m01450_s16 (KERN_ATTR_BASIC ()) * main */ - m01450s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01450s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01450_a3-pure.cl b/OpenCL/m01450_a3-pure.cl index 2c60c55d2..c9186c8c7 100644 --- a/OpenCL/m01450_a3-pure.cl +++ b/OpenCL/m01450_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01450_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -95,10 +95,10 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -114,13 +114,13 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01460_a0-optimized.cl b/OpenCL/m01460_a0-optimized.cl index aa4552081..13a99bd38 100644 --- a/OpenCL/m01460_a0-optimized.cl +++ b/OpenCL/m01460_a0-optimized.cl @@ -156,22 +156,22 @@ KERNEL_FQ void m01460_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -291,22 +291,22 @@ KERNEL_FQ void m01460_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -345,10 +345,10 @@ KERNEL_FQ void m01460_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01460_a0-pure.cl b/OpenCL/m01460_a0-pure.cl index 431d999ad..531b8670d 100644 --- a/OpenCL/m01460_a0-pure.cl +++ b/OpenCL/m01460_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m01460_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_hmac_ctx_t ctx0; @@ -88,10 +88,10 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_hmac_ctx_t ctx0; diff --git a/OpenCL/m01460_a1-optimized.cl b/OpenCL/m01460_a1-optimized.cl index 6ab70a48a..c018d8844 100644 --- a/OpenCL/m01460_a1-optimized.cl +++ b/OpenCL/m01460_a1-optimized.cl @@ -154,22 +154,22 @@ KERNEL_FQ void m01460_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -349,22 +349,22 @@ KERNEL_FQ void m01460_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -403,10 +403,10 @@ KERNEL_FQ void m01460_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01460_a1-pure.cl b/OpenCL/m01460_a1-pure.cl index 970130141..b0804ad36 100644 --- a/OpenCL/m01460_a1-pure.cl +++ b/OpenCL/m01460_a1-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01460_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_hmac_ctx_t ctx0; @@ -111,10 +111,10 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -130,13 +130,13 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_hmac_ctx_t ctx0; diff --git a/OpenCL/m01460_a3-optimized.cl b/OpenCL/m01460_a3-optimized.cl index 07cf8a797..d99f06ffb 100644 --- a/OpenCL/m01460_a3-optimized.cl +++ b/OpenCL/m01460_a3-optimized.cl @@ -133,22 +133,22 @@ DECLSPEC void m01460m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -236,22 +236,22 @@ DECLSPEC void m01460s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -290,10 +290,10 @@ DECLSPEC void m01460s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -377,7 +377,7 @@ KERNEL_FQ void m01460_m04 (KERN_ATTR_BASIC ()) * main */ - m01460m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01460m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01460_m08 (KERN_ATTR_BASIC ()) @@ -424,7 +424,7 @@ KERNEL_FQ void m01460_m08 (KERN_ATTR_BASIC ()) * main */ - m01460m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01460m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01460_m16 (KERN_ATTR_BASIC ()) @@ -471,7 +471,7 @@ KERNEL_FQ void m01460_m16 (KERN_ATTR_BASIC ()) * main */ - m01460m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01460m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01460_s04 (KERN_ATTR_BASIC ()) @@ -518,7 +518,7 @@ KERNEL_FQ void m01460_s04 (KERN_ATTR_BASIC ()) * main */ - m01460s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01460s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01460_s08 (KERN_ATTR_BASIC ()) @@ -565,7 +565,7 @@ KERNEL_FQ void m01460_s08 (KERN_ATTR_BASIC ()) * main */ - m01460s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01460s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01460_s16 (KERN_ATTR_BASIC ()) @@ -612,5 +612,5 @@ KERNEL_FQ void m01460_s16 (KERN_ATTR_BASIC ()) * main */ - m01460s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01460s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01460_a3-pure.cl b/OpenCL/m01460_a3-pure.cl index 70b497159..1fe5b71fd 100644 --- a/OpenCL/m01460_a3-pure.cl +++ b/OpenCL/m01460_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01460_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_hmac_ctx_vector_t ctx0; @@ -97,10 +97,10 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_hmac_ctx_vector_t ctx0; diff --git a/OpenCL/m01500_a0-pure.cl b/OpenCL/m01500_a0-pure.cl index 2b7b234a7..91c43b742 100644 --- a/OpenCL/m01500_a0-pure.cl +++ b/OpenCL/m01500_a0-pure.cl @@ -534,7 +534,7 @@ KERNEL_FQ void m01500_mxx (KERN_ATTR_RULES ()) * salt */ - const u32 mask = salt_bufs[salt_pos].salt_buf[0]; + const u32 mask = salt_bufs[SALT_POS].salt_buf[0]; /** * main @@ -618,7 +618,7 @@ KERNEL_FQ void m01500_sxx (KERN_ATTR_RULES ()) * salt */ - const u32 mask = salt_bufs[salt_pos].salt_buf[0]; + const u32 mask = salt_bufs[SALT_POS].salt_buf[0]; /** * digest @@ -626,8 +626,8 @@ KERNEL_FQ void m01500_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m01500_a1-pure.cl b/OpenCL/m01500_a1-pure.cl index e7ee552b8..921ee002d 100644 --- a/OpenCL/m01500_a1-pure.cl +++ b/OpenCL/m01500_a1-pure.cl @@ -544,7 +544,7 @@ KERNEL_FQ void m01500_mxx (KERN_ATTR_BASIC ()) * salt */ - const u32 mask = salt_bufs[salt_pos].salt_buf[0]; + const u32 mask = salt_bufs[SALT_POS].salt_buf[0]; /** * loop @@ -707,7 +707,7 @@ KERNEL_FQ void m01500_sxx (KERN_ATTR_BASIC ()) * salt */ - const u32 mask = salt_bufs[salt_pos].salt_buf[0]; + const u32 mask = salt_bufs[SALT_POS].salt_buf[0]; /** * digest @@ -715,8 +715,8 @@ KERNEL_FQ void m01500_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m01500_a3-pure.cl b/OpenCL/m01500_a3-pure.cl index 7a38bac65..76eedbb3d 100644 --- a/OpenCL/m01500_a3-pure.cl +++ b/OpenCL/m01500_a3-pure.cl @@ -1924,7 +1924,7 @@ KERNEL_FQ void m01500_mxx (KERN_ATTR_BITSLICE ()) * salt */ - const u32 salt = salt_bufs[salt_pos].salt_buf[0]; + const u32 salt = salt_bufs[SALT_POS].salt_buf[0]; /** * base @@ -2216,7 +2216,7 @@ KERNEL_FQ void m01500_mxx (KERN_ATTR_BITSLICE ()) { for (u32 d = 0; d < digests_cnt; d++) { - const u32 final_hash_pos = digests_offset + d; + const u32 final_hash_pos = DIGESTS_OFFSET + d; if (hashes_shown[final_hash_pos]) continue; @@ -2301,7 +2301,7 @@ KERNEL_FQ void m01500_sxx (KERN_ATTR_BITSLICE ()) * salt */ - const u32 salt = salt_bufs[salt_pos].salt_buf[0]; + const u32 salt = salt_bufs[SALT_POS].salt_buf[0]; /** * digest diff --git a/OpenCL/m01600-optimized.cl b/OpenCL/m01600-optimized.cl index e1110dc00..6489a04b8 100644 --- a/OpenCL/m01600-optimized.cl +++ b/OpenCL/m01600-optimized.cl @@ -681,10 +681,10 @@ KERNEL_FQ void m01600_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * init @@ -853,10 +853,10 @@ KERNEL_FQ void m01600_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest diff --git a/OpenCL/m01600-pure.cl b/OpenCL/m01600-pure.cl index af5972c7a..d978181c0 100644 --- a/OpenCL/m01600-pure.cl +++ b/OpenCL/m01600-pure.cl @@ -48,13 +48,13 @@ KERNEL_FQ void m01600_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -155,13 +155,13 @@ KERNEL_FQ void m01600_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m01700_a0-optimized.cl b/OpenCL/m01700_a0-optimized.cl index 0d6ddb337..b78fa21e2 100644 --- a/OpenCL/m01700_a0-optimized.cl +++ b/OpenCL/m01700_a0-optimized.cl @@ -259,10 +259,10 @@ KERNEL_FQ void m01700_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01700_a0-pure.cl b/OpenCL/m01700_a0-pure.cl index 0e4aba9b7..969bce2bd 100644 --- a/OpenCL/m01700_a0-pure.cl +++ b/OpenCL/m01700_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m01700_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01700_a1-optimized.cl b/OpenCL/m01700_a1-optimized.cl index abee4dfcb..1c0f82f8e 100644 --- a/OpenCL/m01700_a1-optimized.cl +++ b/OpenCL/m01700_a1-optimized.cl @@ -315,10 +315,10 @@ KERNEL_FQ void m01700_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01700_a1-pure.cl b/OpenCL/m01700_a1-pure.cl index e3286cce8..8865fc4ce 100644 --- a/OpenCL/m01700_a1-pure.cl +++ b/OpenCL/m01700_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m01700_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01700_a3-optimized.cl b/OpenCL/m01700_a3-optimized.cl index c4d8ee016..31abebaa3 100644 --- a/OpenCL/m01700_a3-optimized.cl +++ b/OpenCL/m01700_a3-optimized.cl @@ -200,10 +200,10 @@ DECLSPEC void m01700s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -297,7 +297,7 @@ KERNEL_FQ void m01700_m04 (KERN_ATTR_VECTOR ()) * main */ - m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01700_m08 (KERN_ATTR_VECTOR ()) @@ -335,7 +335,7 @@ KERNEL_FQ void m01700_m08 (KERN_ATTR_VECTOR ()) * main */ - m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01700_m16 (KERN_ATTR_VECTOR ()) @@ -373,7 +373,7 @@ KERNEL_FQ void m01700_m16 (KERN_ATTR_VECTOR ()) * main */ - m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01700_s04 (KERN_ATTR_VECTOR ()) @@ -411,7 +411,7 @@ KERNEL_FQ void m01700_s04 (KERN_ATTR_VECTOR ()) * main */ - m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01700_s08 (KERN_ATTR_VECTOR ()) @@ -449,7 +449,7 @@ KERNEL_FQ void m01700_s08 (KERN_ATTR_VECTOR ()) * main */ - m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01700_s16 (KERN_ATTR_VECTOR ()) @@ -487,5 +487,5 @@ KERNEL_FQ void m01700_s16 (KERN_ATTR_VECTOR ()) * main */ - m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01700_a3-pure.cl b/OpenCL/m01700_a3-pure.cl index 258aa8765..3cab23609 100644 --- a/OpenCL/m01700_a3-pure.cl +++ b/OpenCL/m01700_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m01700_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01710_a0-optimized.cl b/OpenCL/m01710_a0-optimized.cl index a5a53e831..a58b84b93 100644 --- a/OpenCL/m01710_a0-optimized.cl +++ b/OpenCL/m01710_a0-optimized.cl @@ -161,24 +161,24 @@ KERNEL_FQ void m01710_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -335,24 +335,24 @@ KERNEL_FQ void m01710_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -360,10 +360,10 @@ KERNEL_FQ void m01710_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01710_a0-pure.cl b/OpenCL/m01710_a0-pure.cl index 1a4f90a2b..acf297478 100644 --- a/OpenCL/m01710_a0-pure.cl +++ b/OpenCL/m01710_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m01710_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -88,10 +88,10 @@ KERNEL_FQ void m01710_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m01710_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01710_a1-optimized.cl b/OpenCL/m01710_a1-optimized.cl index 931142cae..c7779551c 100644 --- a/OpenCL/m01710_a1-optimized.cl +++ b/OpenCL/m01710_a1-optimized.cl @@ -159,24 +159,24 @@ KERNEL_FQ void m01710_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -393,24 +393,24 @@ KERNEL_FQ void m01710_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -418,10 +418,10 @@ KERNEL_FQ void m01710_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01710_a1-pure.cl b/OpenCL/m01710_a1-pure.cl index ac14c0b1f..58442464e 100644 --- a/OpenCL/m01710_a1-pure.cl +++ b/OpenCL/m01710_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m01710_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_ctx_t ctx0; @@ -84,23 +84,23 @@ KERNEL_FQ void m01710_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_ctx_t ctx0; diff --git a/OpenCL/m01710_a3-optimized.cl b/OpenCL/m01710_a3-optimized.cl index a82f949ac..031c8d35a 100644 --- a/OpenCL/m01710_a3-optimized.cl +++ b/OpenCL/m01710_a3-optimized.cl @@ -138,22 +138,22 @@ DECLSPEC void m01710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; switch_buffer_by_offset_le_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len); @@ -174,7 +174,7 @@ DECLSPEC void m01710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) w[14] |= hc_swap32_S (salt_buf3[2]); w[15] |= hc_swap32_S (salt_buf3[3]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -251,10 +251,10 @@ DECLSPEC void m01710s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -348,7 +348,7 @@ KERNEL_FQ void m01710_m04 (KERN_ATTR_VECTOR ()) * main */ - m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01710_m08 (KERN_ATTR_VECTOR ()) @@ -386,7 +386,7 @@ KERNEL_FQ void m01710_m08 (KERN_ATTR_VECTOR ()) * main */ - m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01710_m16 (KERN_ATTR_VECTOR ()) @@ -424,7 +424,7 @@ KERNEL_FQ void m01710_m16 (KERN_ATTR_VECTOR ()) * main */ - m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01710_s04 (KERN_ATTR_VECTOR ()) @@ -462,7 +462,7 @@ KERNEL_FQ void m01710_s04 (KERN_ATTR_VECTOR ()) * main */ - m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01710_s08 (KERN_ATTR_VECTOR ()) @@ -500,7 +500,7 @@ KERNEL_FQ void m01710_s08 (KERN_ATTR_VECTOR ()) * main */ - m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01710_s16 (KERN_ATTR_VECTOR ()) @@ -538,5 +538,5 @@ KERNEL_FQ void m01710_s16 (KERN_ATTR_VECTOR ()) * main */ - m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01710_a3-pure.cl b/OpenCL/m01710_a3-pure.cl index f275de2fc..9fe7dd7fd 100644 --- a/OpenCL/m01710_a3-pure.cl +++ b/OpenCL/m01710_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01710_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -97,10 +97,10 @@ KERNEL_FQ void m01710_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m01710_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01720_a0-optimized.cl b/OpenCL/m01720_a0-optimized.cl index c331365f1..03c365680 100644 --- a/OpenCL/m01720_a0-optimized.cl +++ b/OpenCL/m01720_a0-optimized.cl @@ -161,24 +161,24 @@ KERNEL_FQ void m01720_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -315,24 +315,24 @@ KERNEL_FQ void m01720_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -340,10 +340,10 @@ KERNEL_FQ void m01720_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01720_a0-pure.cl b/OpenCL/m01720_a0-pure.cl index 3397c31b6..accce0ea1 100644 --- a/OpenCL/m01720_a0-pure.cl +++ b/OpenCL/m01720_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m01720_mxx (KERN_ATTR_RULES ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -81,10 +81,10 @@ KERNEL_FQ void m01720_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -97,7 +97,7 @@ KERNEL_FQ void m01720_sxx (KERN_ATTR_RULES ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m01720_a1-optimized.cl b/OpenCL/m01720_a1-optimized.cl index aa93dc2c9..fd93cf79e 100644 --- a/OpenCL/m01720_a1-optimized.cl +++ b/OpenCL/m01720_a1-optimized.cl @@ -159,24 +159,24 @@ KERNEL_FQ void m01720_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -371,24 +371,24 @@ KERNEL_FQ void m01720_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -396,10 +396,10 @@ KERNEL_FQ void m01720_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01720_a1-pure.cl b/OpenCL/m01720_a1-pure.cl index 7ee48823b..4ad390a26 100644 --- a/OpenCL/m01720_a1-pure.cl +++ b/OpenCL/m01720_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m01720_mxx (KERN_ATTR_BASIC ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -75,10 +75,10 @@ KERNEL_FQ void m01720_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -89,7 +89,7 @@ KERNEL_FQ void m01720_sxx (KERN_ATTR_BASIC ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m01720_a3-optimized.cl b/OpenCL/m01720_a3-optimized.cl index 891634dd4..e3e878e79 100644 --- a/OpenCL/m01720_a3-optimized.cl +++ b/OpenCL/m01720_a3-optimized.cl @@ -138,24 +138,24 @@ DECLSPEC void m01720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -253,10 +253,10 @@ DECLSPEC void m01720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -268,24 +268,24 @@ DECLSPEC void m01720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -412,7 +412,7 @@ KERNEL_FQ void m01720_m04 (KERN_ATTR_BASIC ()) * main */ - m01720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01720_m08 (KERN_ATTR_BASIC ()) @@ -459,7 +459,7 @@ KERNEL_FQ void m01720_m08 (KERN_ATTR_BASIC ()) * main */ - m01720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01720_m16 (KERN_ATTR_BASIC ()) @@ -506,7 +506,7 @@ KERNEL_FQ void m01720_m16 (KERN_ATTR_BASIC ()) * main */ - m01720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01720_s04 (KERN_ATTR_BASIC ()) @@ -553,7 +553,7 @@ KERNEL_FQ void m01720_s04 (KERN_ATTR_BASIC ()) * main */ - m01720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01720_s08 (KERN_ATTR_BASIC ()) @@ -600,7 +600,7 @@ KERNEL_FQ void m01720_s08 (KERN_ATTR_BASIC ()) * main */ - m01720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01720_s16 (KERN_ATTR_BASIC ()) @@ -647,5 +647,5 @@ KERNEL_FQ void m01720_s16 (KERN_ATTR_BASIC ()) * main */ - m01720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01720_a3-pure.cl b/OpenCL/m01720_a3-pure.cl index c12c16a75..467813061 100644 --- a/OpenCL/m01720_a3-pure.cl +++ b/OpenCL/m01720_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m01720_mxx (KERN_ATTR_VECTOR ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -92,10 +92,10 @@ KERNEL_FQ void m01720_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -115,7 +115,7 @@ KERNEL_FQ void m01720_sxx (KERN_ATTR_VECTOR ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m01730_a0-optimized.cl b/OpenCL/m01730_a0-optimized.cl index f5da15e7f..7e59e14f0 100644 --- a/OpenCL/m01730_a0-optimized.cl +++ b/OpenCL/m01730_a0-optimized.cl @@ -161,24 +161,24 @@ KERNEL_FQ void m01730_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -340,24 +340,24 @@ KERNEL_FQ void m01730_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -365,10 +365,10 @@ KERNEL_FQ void m01730_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01730_a0-pure.cl b/OpenCL/m01730_a0-pure.cl index 2e6ee476a..1eb44963e 100644 --- a/OpenCL/m01730_a0-pure.cl +++ b/OpenCL/m01730_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m01730_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -88,10 +88,10 @@ KERNEL_FQ void m01730_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m01730_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01730_a1-optimized.cl b/OpenCL/m01730_a1-optimized.cl index f3cd8d89a..99fffaf7c 100644 --- a/OpenCL/m01730_a1-optimized.cl +++ b/OpenCL/m01730_a1-optimized.cl @@ -159,24 +159,24 @@ KERNEL_FQ void m01730_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -398,24 +398,24 @@ KERNEL_FQ void m01730_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -423,10 +423,10 @@ KERNEL_FQ void m01730_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01730_a1-pure.cl b/OpenCL/m01730_a1-pure.cl index 105807da5..43238b0a9 100644 --- a/OpenCL/m01730_a1-pure.cl +++ b/OpenCL/m01730_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m01730_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_ctx_t ctx0; @@ -84,23 +84,23 @@ KERNEL_FQ void m01730_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_ctx_t ctx0; diff --git a/OpenCL/m01730_a3-optimized.cl b/OpenCL/m01730_a3-optimized.cl index e00e5f4ae..bef298ec5 100644 --- a/OpenCL/m01730_a3-optimized.cl +++ b/OpenCL/m01730_a3-optimized.cl @@ -138,22 +138,22 @@ DECLSPEC void m01730m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; switch_buffer_by_offset_le_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len); @@ -174,7 +174,7 @@ DECLSPEC void m01730m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) w[14] |= hc_swap32_S (salt_buf3[2]); w[15] |= hc_swap32_S (salt_buf3[3]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -251,10 +251,10 @@ DECLSPEC void m01730s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -348,7 +348,7 @@ KERNEL_FQ void m01730_m04 (KERN_ATTR_VECTOR ()) * main */ - m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01730_m08 (KERN_ATTR_VECTOR ()) @@ -386,7 +386,7 @@ KERNEL_FQ void m01730_m08 (KERN_ATTR_VECTOR ()) * main */ - m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01730_m16 (KERN_ATTR_VECTOR ()) @@ -424,7 +424,7 @@ KERNEL_FQ void m01730_m16 (KERN_ATTR_VECTOR ()) * main */ - m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01730_s04 (KERN_ATTR_VECTOR ()) @@ -462,7 +462,7 @@ KERNEL_FQ void m01730_s04 (KERN_ATTR_VECTOR ()) * main */ - m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01730_s08 (KERN_ATTR_VECTOR ()) @@ -500,7 +500,7 @@ KERNEL_FQ void m01730_s08 (KERN_ATTR_VECTOR ()) * main */ - m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01730_s16 (KERN_ATTR_VECTOR ()) @@ -538,5 +538,5 @@ KERNEL_FQ void m01730_s16 (KERN_ATTR_VECTOR ()) * main */ - m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01730_a3-pure.cl b/OpenCL/m01730_a3-pure.cl index f319d97b4..511a32c1a 100644 --- a/OpenCL/m01730_a3-pure.cl +++ b/OpenCL/m01730_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01730_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -97,10 +97,10 @@ KERNEL_FQ void m01730_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m01730_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01740_a0-optimized.cl b/OpenCL/m01740_a0-optimized.cl index ee38662e8..c18340e6b 100644 --- a/OpenCL/m01740_a0-optimized.cl +++ b/OpenCL/m01740_a0-optimized.cl @@ -161,24 +161,24 @@ KERNEL_FQ void m01740_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -320,24 +320,24 @@ KERNEL_FQ void m01740_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -345,10 +345,10 @@ KERNEL_FQ void m01740_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01740_a0-pure.cl b/OpenCL/m01740_a0-pure.cl index 526a0d021..eab0e000c 100644 --- a/OpenCL/m01740_a0-pure.cl +++ b/OpenCL/m01740_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m01740_mxx (KERN_ATTR_RULES ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -81,10 +81,10 @@ KERNEL_FQ void m01740_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -97,7 +97,7 @@ KERNEL_FQ void m01740_sxx (KERN_ATTR_RULES ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m01740_a1-optimized.cl b/OpenCL/m01740_a1-optimized.cl index 0ae6984e0..c0fd01233 100644 --- a/OpenCL/m01740_a1-optimized.cl +++ b/OpenCL/m01740_a1-optimized.cl @@ -159,24 +159,24 @@ KERNEL_FQ void m01740_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -376,24 +376,24 @@ KERNEL_FQ void m01740_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -401,10 +401,10 @@ KERNEL_FQ void m01740_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01740_a1-pure.cl b/OpenCL/m01740_a1-pure.cl index dca49789a..6f8aab601 100644 --- a/OpenCL/m01740_a1-pure.cl +++ b/OpenCL/m01740_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m01740_mxx (KERN_ATTR_BASIC ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_utf16le_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -75,10 +75,10 @@ KERNEL_FQ void m01740_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -89,7 +89,7 @@ KERNEL_FQ void m01740_sxx (KERN_ATTR_BASIC ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_utf16le_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m01740_a3-optimized.cl b/OpenCL/m01740_a3-optimized.cl index 4b7b1d3df..ec0a84069 100644 --- a/OpenCL/m01740_a3-optimized.cl +++ b/OpenCL/m01740_a3-optimized.cl @@ -138,24 +138,24 @@ DECLSPEC void m01740m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -253,10 +253,10 @@ DECLSPEC void m01740s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -268,24 +268,24 @@ DECLSPEC void m01740s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -412,7 +412,7 @@ KERNEL_FQ void m01740_m04 (KERN_ATTR_BASIC ()) * main */ - m01740m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01740m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01740_m08 (KERN_ATTR_BASIC ()) @@ -459,7 +459,7 @@ KERNEL_FQ void m01740_m08 (KERN_ATTR_BASIC ()) * main */ - m01740m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01740m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01740_m16 (KERN_ATTR_BASIC ()) @@ -506,7 +506,7 @@ KERNEL_FQ void m01740_m16 (KERN_ATTR_BASIC ()) * main */ - m01740m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01740m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01740_s04 (KERN_ATTR_BASIC ()) @@ -553,7 +553,7 @@ KERNEL_FQ void m01740_s04 (KERN_ATTR_BASIC ()) * main */ - m01740s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01740s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01740_s08 (KERN_ATTR_BASIC ()) @@ -600,7 +600,7 @@ KERNEL_FQ void m01740_s08 (KERN_ATTR_BASIC ()) * main */ - m01740s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01740s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01740_s16 (KERN_ATTR_BASIC ()) @@ -647,5 +647,5 @@ KERNEL_FQ void m01740_s16 (KERN_ATTR_BASIC ()) * main */ - m01740s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01740s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01740_a3-pure.cl b/OpenCL/m01740_a3-pure.cl index f188a6108..f5f457423 100644 --- a/OpenCL/m01740_a3-pure.cl +++ b/OpenCL/m01740_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m01740_mxx (KERN_ATTR_VECTOR ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -92,10 +92,10 @@ KERNEL_FQ void m01740_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -115,7 +115,7 @@ KERNEL_FQ void m01740_sxx (KERN_ATTR_VECTOR ()) sha512_init (&ctx0); - sha512_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m01750_a0-optimized.cl b/OpenCL/m01750_a0-optimized.cl index 1ee143594..ad7ad6fbf 100644 --- a/OpenCL/m01750_a0-optimized.cl +++ b/OpenCL/m01750_a0-optimized.cl @@ -230,24 +230,24 @@ KERNEL_FQ void m01750_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -357,24 +357,24 @@ KERNEL_FQ void m01750_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -382,10 +382,10 @@ KERNEL_FQ void m01750_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01750_a0-pure.cl b/OpenCL/m01750_a0-pure.cl index f41391d60..cb990b529 100644 --- a/OpenCL/m01750_a0-pure.cl +++ b/OpenCL/m01750_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m01750_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -86,10 +86,10 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -98,13 +98,13 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01750_a1-optimized.cl b/OpenCL/m01750_a1-optimized.cl index 0e5cb2f29..df40b6b19 100644 --- a/OpenCL/m01750_a1-optimized.cl +++ b/OpenCL/m01750_a1-optimized.cl @@ -228,24 +228,24 @@ KERNEL_FQ void m01750_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -423,24 +423,24 @@ KERNEL_FQ void m01750_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -448,10 +448,10 @@ KERNEL_FQ void m01750_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01750_a1-pure.cl b/OpenCL/m01750_a1-pure.cl index fad3ad3aa..e0c7c36f4 100644 --- a/OpenCL/m01750_a1-pure.cl +++ b/OpenCL/m01750_a1-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01750_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -109,10 +109,10 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -128,13 +128,13 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01750_a3-optimized.cl b/OpenCL/m01750_a3-optimized.cl index 1a86075b4..358408cbe 100644 --- a/OpenCL/m01750_a3-optimized.cl +++ b/OpenCL/m01750_a3-optimized.cl @@ -207,24 +207,24 @@ DECLSPEC void m01750m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -317,24 +317,24 @@ DECLSPEC void m01750s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -342,10 +342,10 @@ DECLSPEC void m01750s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -465,7 +465,7 @@ KERNEL_FQ void m01750_m04 (KERN_ATTR_BASIC ()) * main */ - m01750m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01750m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01750_m08 (KERN_ATTR_BASIC ()) @@ -512,7 +512,7 @@ KERNEL_FQ void m01750_m08 (KERN_ATTR_BASIC ()) * main */ - m01750m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01750m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01750_m16 (KERN_ATTR_BASIC ()) @@ -559,7 +559,7 @@ KERNEL_FQ void m01750_m16 (KERN_ATTR_BASIC ()) * main */ - m01750m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01750m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01750_s04 (KERN_ATTR_BASIC ()) @@ -606,7 +606,7 @@ KERNEL_FQ void m01750_s04 (KERN_ATTR_BASIC ()) * main */ - m01750s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01750s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01750_s08 (KERN_ATTR_BASIC ()) @@ -653,7 +653,7 @@ KERNEL_FQ void m01750_s08 (KERN_ATTR_BASIC ()) * main */ - m01750s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01750s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01750_s16 (KERN_ATTR_BASIC ()) @@ -700,5 +700,5 @@ KERNEL_FQ void m01750_s16 (KERN_ATTR_BASIC ()) * main */ - m01750s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01750s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01750_a3-pure.cl b/OpenCL/m01750_a3-pure.cl index 3c5c79c1f..2dc5f74bf 100644 --- a/OpenCL/m01750_a3-pure.cl +++ b/OpenCL/m01750_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01750_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -95,10 +95,10 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -114,13 +114,13 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m01760_a0-optimized.cl b/OpenCL/m01760_a0-optimized.cl index 70d75335d..e72f51a1d 100644 --- a/OpenCL/m01760_a0-optimized.cl +++ b/OpenCL/m01760_a0-optimized.cl @@ -230,22 +230,22 @@ KERNEL_FQ void m01760_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -370,22 +370,22 @@ KERNEL_FQ void m01760_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -424,10 +424,10 @@ KERNEL_FQ void m01760_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01760_a0-pure.cl b/OpenCL/m01760_a0-pure.cl index b340a1ec9..1b06081ea 100644 --- a/OpenCL/m01760_a0-pure.cl +++ b/OpenCL/m01760_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m01760_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_hmac_ctx_t ctx0; @@ -88,10 +88,10 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_hmac_ctx_t ctx0; diff --git a/OpenCL/m01760_a1-optimized.cl b/OpenCL/m01760_a1-optimized.cl index c433e53df..7d6cfcedc 100644 --- a/OpenCL/m01760_a1-optimized.cl +++ b/OpenCL/m01760_a1-optimized.cl @@ -228,22 +228,22 @@ KERNEL_FQ void m01760_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -428,22 +428,22 @@ KERNEL_FQ void m01760_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -482,10 +482,10 @@ KERNEL_FQ void m01760_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m01760_a1-pure.cl b/OpenCL/m01760_a1-pure.cl index 485606097..2ecfc200e 100644 --- a/OpenCL/m01760_a1-pure.cl +++ b/OpenCL/m01760_a1-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01760_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_hmac_ctx_t ctx0; @@ -111,10 +111,10 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -130,13 +130,13 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_hmac_ctx_t ctx0; diff --git a/OpenCL/m01760_a3-optimized.cl b/OpenCL/m01760_a3-optimized.cl index 4768d83fb..d7de90585 100644 --- a/OpenCL/m01760_a3-optimized.cl +++ b/OpenCL/m01760_a3-optimized.cl @@ -207,22 +207,22 @@ DECLSPEC void m01760m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -315,22 +315,22 @@ DECLSPEC void m01760s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); /** * pads @@ -369,10 +369,10 @@ DECLSPEC void m01760s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -461,7 +461,7 @@ KERNEL_FQ void m01760_m04 (KERN_ATTR_BASIC ()) * main */ - m01760m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01760m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01760_m08 (KERN_ATTR_BASIC ()) @@ -508,7 +508,7 @@ KERNEL_FQ void m01760_m08 (KERN_ATTR_BASIC ()) * main */ - m01760m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01760m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01760_m16 (KERN_ATTR_BASIC ()) @@ -555,7 +555,7 @@ KERNEL_FQ void m01760_m16 (KERN_ATTR_BASIC ()) * main */ - m01760m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01760m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01760_s04 (KERN_ATTR_BASIC ()) @@ -602,7 +602,7 @@ KERNEL_FQ void m01760_s04 (KERN_ATTR_BASIC ()) * main */ - m01760s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01760s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01760_s08 (KERN_ATTR_BASIC ()) @@ -649,7 +649,7 @@ KERNEL_FQ void m01760_s08 (KERN_ATTR_BASIC ()) * main */ - m01760s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01760s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m01760_s16 (KERN_ATTR_BASIC ()) @@ -696,5 +696,5 @@ KERNEL_FQ void m01760_s16 (KERN_ATTR_BASIC ()) * main */ - m01760s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m01760s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m01760_a3-pure.cl b/OpenCL/m01760_a3-pure.cl index 3a59341b4..a154f6ec9 100644 --- a/OpenCL/m01760_a3-pure.cl +++ b/OpenCL/m01760_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m01760_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_hmac_ctx_vector_t ctx0; @@ -97,10 +97,10 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_hmac_ctx_vector_t ctx0; diff --git a/OpenCL/m01800-optimized.cl b/OpenCL/m01800-optimized.cl index 03c55bef6..4625d9a8c 100644 --- a/OpenCL/m01800-optimized.cl +++ b/OpenCL/m01800-optimized.cl @@ -196,12 +196,12 @@ KERNEL_FQ void m01800_init (KERN_ATTR_TMPS (sha512crypt_tmp_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; - u32 salt_len = salt_bufs[salt_pos].salt_len; + u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * buffers @@ -322,7 +322,7 @@ KERNEL_FQ void m01800_loop (KERN_ATTR_TMPS (sha512crypt_tmp_t)) l_s_bytes0[0] = tmps[gid].l_s_bytes[0]; l_s_bytes0[1] = tmps[gid].l_s_bytes[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 wpc_len[8]; diff --git a/OpenCL/m01800-pure.cl b/OpenCL/m01800-pure.cl index f57c22243..626ed1a3a 100644 --- a/OpenCL/m01800-pure.cl +++ b/OpenCL/m01800-pure.cl @@ -56,13 +56,13 @@ KERNEL_FQ void m01800_init (KERN_ATTR_TMPS (sha512crypt_tmp_t)) w[idx] = hc_swap32_S (w[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) @@ -325,7 +325,7 @@ KERNEL_FQ void m01800_loop (KERN_ATTR_TMPS (sha512crypt_tmp_t)) const u32 pw_len = pws[gid].pw_len; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 alt_result[32] = { 0 }; diff --git a/OpenCL/m02100-pure.cl b/OpenCL/m02100-pure.cl index 0d9e0e756..e9a3bd04e 100644 --- a/OpenCL/m02100-pure.cl +++ b/OpenCL/m02100-pure.cl @@ -28,6 +28,11 @@ typedef struct dcc2_tmp } dcc2_tmp_t; +DECLSPEC void sha1_hmac_update_global_utf16le_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +{ + sha1_update_global_utf16le_swap (&ctx->ipad, w, len); +} + DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; @@ -95,7 +100,7 @@ KERNEL_FQ void m02100_init (KERN_ATTR_TMPS (dcc2_tmp_t)) md4_ctx2.len = 16; - md4_update_global_utf16le (&md4_ctx2, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md4_update_global_utf16le (&md4_ctx2, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md4_final (&md4_ctx2); @@ -144,7 +149,7 @@ KERNEL_FQ void m02100_init (KERN_ATTR_TMPS (dcc2_tmp_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_utf16le_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_utf16le_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); w0[0] = 1; w0[1] = 0; diff --git a/OpenCL/m02400_a0-optimized.cl b/OpenCL/m02400_a0-optimized.cl index b030782b7..4370ca337 100644 --- a/OpenCL/m02400_a0-optimized.cl +++ b/OpenCL/m02400_a0-optimized.cl @@ -221,10 +221,10 @@ KERNEL_FQ void m02400_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02400_a1-optimized.cl b/OpenCL/m02400_a1-optimized.cl index 013184be7..4e8619477 100644 --- a/OpenCL/m02400_a1-optimized.cl +++ b/OpenCL/m02400_a1-optimized.cl @@ -283,10 +283,10 @@ KERNEL_FQ void m02400_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02400_a3-optimized.cl b/OpenCL/m02400_a3-optimized.cl index 2db8f1e56..b2d5ea5cc 100644 --- a/OpenCL/m02400_a3-optimized.cl +++ b/OpenCL/m02400_a3-optimized.cl @@ -354,10 +354,10 @@ DECLSPEC void m02400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -494,7 +494,7 @@ KERNEL_FQ void m02400_m04 (KERN_ATTR_VECTOR ()) * main */ - m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02400_m08 (KERN_ATTR_VECTOR ()) @@ -532,7 +532,7 @@ KERNEL_FQ void m02400_m08 (KERN_ATTR_VECTOR ()) * main */ - m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02400_m16 (KERN_ATTR_VECTOR ()) @@ -570,7 +570,7 @@ KERNEL_FQ void m02400_m16 (KERN_ATTR_VECTOR ()) * main */ - m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02400_s04 (KERN_ATTR_VECTOR ()) @@ -608,7 +608,7 @@ KERNEL_FQ void m02400_s04 (KERN_ATTR_VECTOR ()) * main */ - m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02400_s08 (KERN_ATTR_VECTOR ()) @@ -646,7 +646,7 @@ KERNEL_FQ void m02400_s08 (KERN_ATTR_VECTOR ()) * main */ - m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02400_s16 (KERN_ATTR_VECTOR ()) @@ -684,5 +684,5 @@ KERNEL_FQ void m02400_s16 (KERN_ATTR_VECTOR ()) * main */ - m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m02410_a0-optimized.cl b/OpenCL/m02410_a0-optimized.cl index d6254dcc0..5a660c261 100644 --- a/OpenCL/m02410_a0-optimized.cl +++ b/OpenCL/m02410_a0-optimized.cl @@ -55,7 +55,7 @@ KERNEL_FQ void m02410_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; salt_buf0[1] = 0; salt_buf0[2] = 0; salt_buf0[3] = 0; @@ -72,7 +72,7 @@ KERNEL_FQ void m02410_m04 (KERN_ATTR_RULES ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -303,7 +303,7 @@ KERNEL_FQ void m02410_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; salt_buf0[1] = 0; salt_buf0[2] = 0; salt_buf0[3] = 0; @@ -320,7 +320,7 @@ KERNEL_FQ void m02410_s04 (KERN_ATTR_RULES ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -328,10 +328,10 @@ KERNEL_FQ void m02410_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02410_a1-optimized.cl b/OpenCL/m02410_a1-optimized.cl index 594aaaf8b..7caee3a34 100644 --- a/OpenCL/m02410_a1-optimized.cl +++ b/OpenCL/m02410_a1-optimized.cl @@ -53,7 +53,7 @@ KERNEL_FQ void m02410_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; salt_buf0[1] = 0; salt_buf0[2] = 0; salt_buf0[3] = 0; @@ -70,7 +70,7 @@ KERNEL_FQ void m02410_m04 (KERN_ATTR_BASIC ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -361,7 +361,7 @@ KERNEL_FQ void m02410_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; salt_buf0[1] = 0; salt_buf0[2] = 0; salt_buf0[3] = 0; @@ -378,7 +378,7 @@ KERNEL_FQ void m02410_s04 (KERN_ATTR_BASIC ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -386,10 +386,10 @@ KERNEL_FQ void m02410_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02410_a3-optimized.cl b/OpenCL/m02410_a3-optimized.cl index cfa3ae2db..3615f5b27 100644 --- a/OpenCL/m02410_a3-optimized.cl +++ b/OpenCL/m02410_a3-optimized.cl @@ -32,7 +32,7 @@ DECLSPEC void m02410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; salt_buf0[1] = 0; salt_buf0[2] = 0; salt_buf0[3] = 0; @@ -49,7 +49,7 @@ DECLSPEC void m02410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; switch_buffer_by_offset_le_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len); @@ -296,7 +296,7 @@ DECLSPEC void m02410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; salt_buf0[1] = 0; salt_buf0[2] = 0; salt_buf0[3] = 0; @@ -313,7 +313,7 @@ DECLSPEC void m02410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; switch_buffer_by_offset_le_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len); @@ -452,10 +452,10 @@ DECLSPEC void m02410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -592,7 +592,7 @@ KERNEL_FQ void m02410_m04 (KERN_ATTR_VECTOR ()) * main */ - m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02410_m08 (KERN_ATTR_VECTOR ()) @@ -630,7 +630,7 @@ KERNEL_FQ void m02410_m08 (KERN_ATTR_VECTOR ()) * main */ - m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02410_m16 (KERN_ATTR_VECTOR ()) @@ -668,7 +668,7 @@ KERNEL_FQ void m02410_m16 (KERN_ATTR_VECTOR ()) * main */ - m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02410_s04 (KERN_ATTR_VECTOR ()) @@ -706,7 +706,7 @@ KERNEL_FQ void m02410_s04 (KERN_ATTR_VECTOR ()) * main */ - m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02410_s08 (KERN_ATTR_VECTOR ()) @@ -744,7 +744,7 @@ KERNEL_FQ void m02410_s08 (KERN_ATTR_VECTOR ()) * main */ - m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m02410_s16 (KERN_ATTR_VECTOR ()) @@ -782,5 +782,5 @@ KERNEL_FQ void m02410_s16 (KERN_ATTR_VECTOR ()) * main */ - m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m02500-pure.cl b/OpenCL/m02500-pure.cl index 95f97fb81..aadc503ec 100644 --- a/OpenCL/m02500-pure.cl +++ b/OpenCL/m02500-pure.cl @@ -154,7 +154,7 @@ KERNEL_FQ void m02500_init (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -310,7 +310,7 @@ KERNEL_FQ void m02500_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_eapol_t *wpa_eapol = &esalt_bufs[digest_cur]; @@ -468,7 +468,7 @@ KERNEL_FQ void m02500_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -495,7 +495,7 @@ KERNEL_FQ void m02500_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_eapol_t *wpa_eapol = &esalt_bufs[digest_cur]; @@ -648,7 +648,7 @@ KERNEL_FQ void m02500_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -715,7 +715,7 @@ KERNEL_FQ void m02500_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_eapol_t *wpa_eapol = &esalt_bufs[digest_cur]; @@ -938,7 +938,7 @@ KERNEL_FQ void m02500_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } diff --git a/OpenCL/m02501-pure.cl b/OpenCL/m02501-pure.cl index 43b035e10..fc140b9a7 100644 --- a/OpenCL/m02501-pure.cl +++ b/OpenCL/m02501-pure.cl @@ -180,7 +180,7 @@ KERNEL_FQ void m02501_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_eapol_t *wpa_eapol = &esalt_bufs[digest_cur]; @@ -338,7 +338,7 @@ KERNEL_FQ void m02501_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -365,7 +365,7 @@ KERNEL_FQ void m02501_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_eapol_t *wpa_eapol = &esalt_bufs[digest_cur]; @@ -518,7 +518,7 @@ KERNEL_FQ void m02501_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -581,7 +581,7 @@ KERNEL_FQ void m02501_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_eapol_t *wpa_eapol = &esalt_bufs[digest_cur]; @@ -804,7 +804,7 @@ KERNEL_FQ void m02501_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } diff --git a/OpenCL/m02610_a0-optimized.cl b/OpenCL/m02610_a0-optimized.cl index f0b9b8abb..b90f4a5da 100644 --- a/OpenCL/m02610_a0-optimized.cl +++ b/OpenCL/m02610_a0-optimized.cl @@ -84,12 +84,12 @@ KERNEL_FQ void m02610_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -101,7 +101,7 @@ KERNEL_FQ void m02610_m04 (KERN_ATTR_RULES ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -368,12 +368,12 @@ KERNEL_FQ void m02610_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -385,7 +385,7 @@ KERNEL_FQ void m02610_s04 (KERN_ATTR_RULES ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -393,10 +393,10 @@ KERNEL_FQ void m02610_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02610_a0-pure.cl b/OpenCL/m02610_a0-pure.cl index e8c750166..2bada9fa2 100644 --- a/OpenCL/m02610_a0-pure.cl +++ b/OpenCL/m02610_a0-pure.cl @@ -63,13 +63,13 @@ KERNEL_FQ void m02610_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -166,10 +166,10 @@ KERNEL_FQ void m02610_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -178,13 +178,13 @@ KERNEL_FQ void m02610_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m02610_a1-optimized.cl b/OpenCL/m02610_a1-optimized.cl index a32220ae6..8adbe4399 100644 --- a/OpenCL/m02610_a1-optimized.cl +++ b/OpenCL/m02610_a1-optimized.cl @@ -82,12 +82,12 @@ KERNEL_FQ void m02610_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -99,7 +99,7 @@ KERNEL_FQ void m02610_m04 (KERN_ATTR_BASIC ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -425,12 +425,12 @@ KERNEL_FQ void m02610_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -442,7 +442,7 @@ KERNEL_FQ void m02610_s04 (KERN_ATTR_BASIC ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -450,10 +450,10 @@ KERNEL_FQ void m02610_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02610_a1-pure.cl b/OpenCL/m02610_a1-pure.cl index 8c03417cf..a8e03d5f1 100644 --- a/OpenCL/m02610_a1-pure.cl +++ b/OpenCL/m02610_a1-pure.cl @@ -59,13 +59,13 @@ KERNEL_FQ void m02610_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -162,23 +162,23 @@ KERNEL_FQ void m02610_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m02610_a3-optimized.cl b/OpenCL/m02610_a3-optimized.cl index 4a5099318..e8a8b7757 100644 --- a/OpenCL/m02610_a3-optimized.cl +++ b/OpenCL/m02610_a3-optimized.cl @@ -44,12 +44,12 @@ DECLSPEC void m02610m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -61,7 +61,7 @@ DECLSPEC void m02610m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -302,12 +302,12 @@ DECLSPEC void m02610s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -319,7 +319,7 @@ DECLSPEC void m02610s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -327,10 +327,10 @@ DECLSPEC void m02610s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -625,7 +625,7 @@ KERNEL_FQ void m02610_m04 (KERN_ATTR_BASIC ()) * main */ - m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02610_m08 (KERN_ATTR_BASIC ()) @@ -695,7 +695,7 @@ KERNEL_FQ void m02610_m08 (KERN_ATTR_BASIC ()) * main */ - m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02610_m16 (KERN_ATTR_BASIC ()) @@ -765,7 +765,7 @@ KERNEL_FQ void m02610_m16 (KERN_ATTR_BASIC ()) * main */ - m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02610_s04 (KERN_ATTR_BASIC ()) @@ -835,7 +835,7 @@ KERNEL_FQ void m02610_s04 (KERN_ATTR_BASIC ()) * main */ - m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02610_s08 (KERN_ATTR_BASIC ()) @@ -905,7 +905,7 @@ KERNEL_FQ void m02610_s08 (KERN_ATTR_BASIC ()) * main */ - m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02610_s16 (KERN_ATTR_BASIC ()) @@ -975,5 +975,5 @@ KERNEL_FQ void m02610_s16 (KERN_ATTR_BASIC ()) * main */ - m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m02610_a3-pure.cl b/OpenCL/m02610_a3-pure.cl index 29b0d157a..cd69c59c3 100644 --- a/OpenCL/m02610_a3-pure.cl +++ b/OpenCL/m02610_a3-pure.cl @@ -68,13 +68,13 @@ KERNEL_FQ void m02610_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -175,10 +175,10 @@ KERNEL_FQ void m02610_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -194,13 +194,13 @@ KERNEL_FQ void m02610_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m02710_a0-optimized.cl b/OpenCL/m02710_a0-optimized.cl index 54e63878e..29fb94267 100644 --- a/OpenCL/m02710_a0-optimized.cl +++ b/OpenCL/m02710_a0-optimized.cl @@ -84,14 +84,14 @@ KERNEL_FQ void m02710_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -101,7 +101,7 @@ KERNEL_FQ void m02710_m04 (KERN_ATTR_RULES ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -453,14 +453,14 @@ KERNEL_FQ void m02710_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -470,7 +470,7 @@ KERNEL_FQ void m02710_s04 (KERN_ATTR_RULES ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -478,10 +478,10 @@ KERNEL_FQ void m02710_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02710_a1-optimized.cl b/OpenCL/m02710_a1-optimized.cl index 413d5c8e9..0c1a5e366 100644 --- a/OpenCL/m02710_a1-optimized.cl +++ b/OpenCL/m02710_a1-optimized.cl @@ -82,14 +82,14 @@ KERNEL_FQ void m02710_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -99,7 +99,7 @@ KERNEL_FQ void m02710_m04 (KERN_ATTR_BASIC ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -510,14 +510,14 @@ KERNEL_FQ void m02710_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -527,7 +527,7 @@ KERNEL_FQ void m02710_s04 (KERN_ATTR_BASIC ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -535,10 +535,10 @@ KERNEL_FQ void m02710_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02710_a3-optimized.cl b/OpenCL/m02710_a3-optimized.cl index 8c3528c5b..ea1992a00 100644 --- a/OpenCL/m02710_a3-optimized.cl +++ b/OpenCL/m02710_a3-optimized.cl @@ -44,14 +44,14 @@ DECLSPEC void m02710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -61,7 +61,7 @@ DECLSPEC void m02710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -387,14 +387,14 @@ DECLSPEC void m02710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -404,7 +404,7 @@ DECLSPEC void m02710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -412,10 +412,10 @@ DECLSPEC void m02710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -794,7 +794,7 @@ KERNEL_FQ void m02710_m04 (KERN_ATTR_BASIC ()) * main */ - m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02710_m08 (KERN_ATTR_BASIC ()) @@ -864,7 +864,7 @@ KERNEL_FQ void m02710_m08 (KERN_ATTR_BASIC ()) * main */ - m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02710_m16 (KERN_ATTR_BASIC ()) @@ -934,7 +934,7 @@ KERNEL_FQ void m02710_m16 (KERN_ATTR_BASIC ()) * main */ - m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02710_s04 (KERN_ATTR_BASIC ()) @@ -1004,7 +1004,7 @@ KERNEL_FQ void m02710_s04 (KERN_ATTR_BASIC ()) * main */ - m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02710_s08 (KERN_ATTR_BASIC ()) @@ -1074,7 +1074,7 @@ KERNEL_FQ void m02710_s08 (KERN_ATTR_BASIC ()) * main */ - m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02710_s16 (KERN_ATTR_BASIC ()) @@ -1144,5 +1144,5 @@ KERNEL_FQ void m02710_s16 (KERN_ATTR_BASIC ()) * main */ - m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m02810_a0-optimized.cl b/OpenCL/m02810_a0-optimized.cl index 577d620d6..ccbbb2689 100644 --- a/OpenCL/m02810_a0-optimized.cl +++ b/OpenCL/m02810_a0-optimized.cl @@ -84,14 +84,14 @@ KERNEL_FQ void m02810_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -452,14 +452,14 @@ KERNEL_FQ void m02810_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -475,10 +475,10 @@ KERNEL_FQ void m02810_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02810_a0-pure.cl b/OpenCL/m02810_a0-pure.cl index bec93ce7f..fa85193ac 100644 --- a/OpenCL/m02810_a0-pure.cl +++ b/OpenCL/m02810_a0-pure.cl @@ -69,7 +69,7 @@ KERNEL_FQ void m02810_mxx (KERN_ATTR_RULES ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } /** @@ -189,10 +189,10 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -207,7 +207,7 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_RULES ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } /** diff --git a/OpenCL/m02810_a1-optimized.cl b/OpenCL/m02810_a1-optimized.cl index ac48acf95..4d87332f9 100644 --- a/OpenCL/m02810_a1-optimized.cl +++ b/OpenCL/m02810_a1-optimized.cl @@ -82,14 +82,14 @@ KERNEL_FQ void m02810_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -509,14 +509,14 @@ KERNEL_FQ void m02810_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -532,10 +532,10 @@ KERNEL_FQ void m02810_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m02810_a1-pure.cl b/OpenCL/m02810_a1-pure.cl index b6dbd3f1e..6b5c0023d 100644 --- a/OpenCL/m02810_a1-pure.cl +++ b/OpenCL/m02810_a1-pure.cl @@ -65,7 +65,7 @@ KERNEL_FQ void m02810_mxx (KERN_ATTR_BASIC ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } md5_ctx_t ctx0; @@ -185,10 +185,10 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -201,7 +201,7 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_BASIC ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m02810_a3-optimized.cl b/OpenCL/m02810_a3-optimized.cl index 94df6ea7f..7d2899f9c 100644 --- a/OpenCL/m02810_a3-optimized.cl +++ b/OpenCL/m02810_a3-optimized.cl @@ -44,14 +44,14 @@ DECLSPEC void m02810m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -386,14 +386,14 @@ DECLSPEC void m02810s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -409,10 +409,10 @@ DECLSPEC void m02810s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -792,7 +792,7 @@ KERNEL_FQ void m02810_m04 (KERN_ATTR_BASIC ()) * main */ - m02810m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02810m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02810_m08 (KERN_ATTR_BASIC ()) @@ -862,7 +862,7 @@ KERNEL_FQ void m02810_m08 (KERN_ATTR_BASIC ()) * main */ - m02810m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02810m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02810_m16 (KERN_ATTR_BASIC ()) @@ -932,7 +932,7 @@ KERNEL_FQ void m02810_m16 (KERN_ATTR_BASIC ()) * main */ - m02810m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02810m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02810_s04 (KERN_ATTR_BASIC ()) @@ -1002,7 +1002,7 @@ KERNEL_FQ void m02810_s04 (KERN_ATTR_BASIC ()) * main */ - m02810s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02810s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02810_s08 (KERN_ATTR_BASIC ()) @@ -1072,7 +1072,7 @@ KERNEL_FQ void m02810_s08 (KERN_ATTR_BASIC ()) * main */ - m02810s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02810s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m02810_s16 (KERN_ATTR_BASIC ()) @@ -1142,5 +1142,5 @@ KERNEL_FQ void m02810_s16 (KERN_ATTR_BASIC ()) * main */ - m02810s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m02810s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m02810_a3-pure.cl b/OpenCL/m02810_a3-pure.cl index f6e4185fd..4ce6b49ba 100644 --- a/OpenCL/m02810_a3-pure.cl +++ b/OpenCL/m02810_a3-pure.cl @@ -74,7 +74,7 @@ KERNEL_FQ void m02810_mxx (KERN_ATTR_VECTOR ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } /** @@ -198,10 +198,10 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -223,7 +223,7 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_VECTOR ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } /** diff --git a/OpenCL/m03000_a0-pure.cl b/OpenCL/m03000_a0-pure.cl index f1652e046..6544361b1 100644 --- a/OpenCL/m03000_a0-pure.cl +++ b/OpenCL/m03000_a0-pure.cl @@ -631,8 +631,8 @@ KERNEL_FQ void m03000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m03000_a1-pure.cl b/OpenCL/m03000_a1-pure.cl index 9b7820579..fe86172aa 100644 --- a/OpenCL/m03000_a1-pure.cl +++ b/OpenCL/m03000_a1-pure.cl @@ -720,8 +720,8 @@ KERNEL_FQ void m03000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m03000_a3-pure.cl b/OpenCL/m03000_a3-pure.cl index 1f5a6afa8..1dff1dc51 100644 --- a/OpenCL/m03000_a3-pure.cl +++ b/OpenCL/m03000_a3-pure.cl @@ -2057,7 +2057,7 @@ KERNEL_FQ void m03000_mxx (KERN_ATTR_BITSLICE ()) { for (u32 d = 0; d < digests_cnt; d++) { - const u32 final_hash_pos = digests_offset + d; + const u32 final_hash_pos = DIGESTS_OFFSET + d; if (hashes_shown[final_hash_pos]) continue; diff --git a/OpenCL/m03100_a0-optimized.cl b/OpenCL/m03100_a0-optimized.cl index 282faed43..461f6bafa 100644 --- a/OpenCL/m03100_a0-optimized.cl +++ b/OpenCL/m03100_a0-optimized.cl @@ -93,16 +93,16 @@ KERNEL_FQ void m03100_m04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * main @@ -325,16 +325,16 @@ KERNEL_FQ void m03100_s04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -342,8 +342,8 @@ KERNEL_FQ void m03100_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m03100_a1-optimized.cl b/OpenCL/m03100_a1-optimized.cl index f1b90e745..fce90f6d8 100644 --- a/OpenCL/m03100_a1-optimized.cl +++ b/OpenCL/m03100_a1-optimized.cl @@ -91,16 +91,16 @@ KERNEL_FQ void m03100_m04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -383,16 +383,16 @@ KERNEL_FQ void m03100_s04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -400,8 +400,8 @@ KERNEL_FQ void m03100_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m03100_a3-optimized.cl b/OpenCL/m03100_a3-optimized.cl index 62e0fcada..ce6e79159 100644 --- a/OpenCL/m03100_a3-optimized.cl +++ b/OpenCL/m03100_a3-optimized.cl @@ -30,16 +30,16 @@ DECLSPEC void m03100m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 salt_word_len = (salt_len + pw_len) * 2; @@ -211,16 +211,16 @@ DECLSPEC void m03100s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 salt_word_len = (salt_len + pw_len) * 2; @@ -230,8 +230,8 @@ DECLSPEC void m03100s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -468,7 +468,7 @@ KERNEL_FQ void m03100_m04 (KERN_ATTR_VECTOR ()) * main */ - m03100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m03100_m08 (KERN_ATTR_VECTOR ()) @@ -551,7 +551,7 @@ KERNEL_FQ void m03100_m08 (KERN_ATTR_VECTOR ()) * main */ - m03100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m03100_m16 (KERN_ATTR_VECTOR ()) @@ -638,7 +638,7 @@ KERNEL_FQ void m03100_s04 (KERN_ATTR_VECTOR ()) * main */ - m03100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m03100_s08 (KERN_ATTR_VECTOR ()) @@ -721,7 +721,7 @@ KERNEL_FQ void m03100_s08 (KERN_ATTR_VECTOR ()) * main */ - m03100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m03100_s16 (KERN_ATTR_VECTOR ()) diff --git a/OpenCL/m03200-pure.cl b/OpenCL/m03200-pure.cl index 282e2d20b..98c54441a 100644 --- a/OpenCL/m03200-pure.cl +++ b/OpenCL/m03200-pure.cl @@ -448,10 +448,10 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m03200_init (KERN_ATTR_TMPS u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 P[18]; @@ -656,10 +656,10 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m03200_loop (KERN_ATTR_TMPS u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * main loop diff --git a/OpenCL/m03710_a0-optimized.cl b/OpenCL/m03710_a0-optimized.cl index 74ae66a6e..a27d7b63a 100644 --- a/OpenCL/m03710_a0-optimized.cl +++ b/OpenCL/m03710_a0-optimized.cl @@ -84,24 +84,24 @@ KERNEL_FQ void m03710_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = 32 + salt_len; @@ -399,24 +399,24 @@ KERNEL_FQ void m03710_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = 32 + salt_len; @@ -426,10 +426,10 @@ KERNEL_FQ void m03710_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m03710_a0-pure.cl b/OpenCL/m03710_a0-pure.cl index a8712e610..5bcb06a07 100644 --- a/OpenCL/m03710_a0-pure.cl +++ b/OpenCL/m03710_a0-pure.cl @@ -63,13 +63,13 @@ KERNEL_FQ void m03710_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -179,10 +179,10 @@ KERNEL_FQ void m03710_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -191,13 +191,13 @@ KERNEL_FQ void m03710_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m03710_a1-optimized.cl b/OpenCL/m03710_a1-optimized.cl index 633de2cc2..cb0ca8050 100644 --- a/OpenCL/m03710_a1-optimized.cl +++ b/OpenCL/m03710_a1-optimized.cl @@ -82,24 +82,24 @@ KERNEL_FQ void m03710_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = 32 + salt_len; @@ -456,24 +456,24 @@ KERNEL_FQ void m03710_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = 32 + salt_len; @@ -483,10 +483,10 @@ KERNEL_FQ void m03710_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m03710_a1-pure.cl b/OpenCL/m03710_a1-pure.cl index c77e07919..9ee3c5a9e 100644 --- a/OpenCL/m03710_a1-pure.cl +++ b/OpenCL/m03710_a1-pure.cl @@ -59,13 +59,13 @@ KERNEL_FQ void m03710_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -175,23 +175,23 @@ KERNEL_FQ void m03710_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m03710_a3-optimized.cl b/OpenCL/m03710_a3-optimized.cl index 27198dba5..4b62cb989 100644 --- a/OpenCL/m03710_a3-optimized.cl +++ b/OpenCL/m03710_a3-optimized.cl @@ -44,24 +44,24 @@ DECLSPEC void m03710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = 32 + salt_len; @@ -333,24 +333,24 @@ DECLSPEC void m03710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = 32 + salt_len; @@ -360,10 +360,10 @@ DECLSPEC void m03710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -686,7 +686,7 @@ KERNEL_FQ void m03710_m04 (KERN_ATTR_BASIC ()) * main */ - m03710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03710_m08 (KERN_ATTR_BASIC ()) @@ -756,7 +756,7 @@ KERNEL_FQ void m03710_m08 (KERN_ATTR_BASIC ()) * main */ - m03710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03710_m16 (KERN_ATTR_BASIC ()) @@ -826,7 +826,7 @@ KERNEL_FQ void m03710_m16 (KERN_ATTR_BASIC ()) * main */ - m03710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03710_s04 (KERN_ATTR_BASIC ()) @@ -896,7 +896,7 @@ KERNEL_FQ void m03710_s04 (KERN_ATTR_BASIC ()) * main */ - m03710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03710_s08 (KERN_ATTR_BASIC ()) @@ -966,7 +966,7 @@ KERNEL_FQ void m03710_s08 (KERN_ATTR_BASIC ()) * main */ - m03710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03710_s16 (KERN_ATTR_BASIC ()) @@ -1036,5 +1036,5 @@ KERNEL_FQ void m03710_s16 (KERN_ATTR_BASIC ()) * main */ - m03710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m03710_a3-pure.cl b/OpenCL/m03710_a3-pure.cl index 153265207..7168b6a67 100644 --- a/OpenCL/m03710_a3-pure.cl +++ b/OpenCL/m03710_a3-pure.cl @@ -68,13 +68,13 @@ KERNEL_FQ void m03710_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -188,10 +188,10 @@ KERNEL_FQ void m03710_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -207,13 +207,13 @@ KERNEL_FQ void m03710_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m03800_a0-optimized.cl b/OpenCL/m03800_a0-optimized.cl index 12cfd7139..0217ced72 100644 --- a/OpenCL/m03800_a0-optimized.cl +++ b/OpenCL/m03800_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m03800_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -294,24 +294,24 @@ KERNEL_FQ void m03800_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -319,10 +319,10 @@ KERNEL_FQ void m03800_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m03800_a0-pure.cl b/OpenCL/m03800_a0-pure.cl index 3fa962f59..a8938f7ee 100644 --- a/OpenCL/m03800_a0-pure.cl +++ b/OpenCL/m03800_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m03800_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -92,10 +92,10 @@ KERNEL_FQ void m03800_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -104,13 +104,13 @@ KERNEL_FQ void m03800_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m03800_a1-optimized.cl b/OpenCL/m03800_a1-optimized.cl index 28d317f5f..57dce81c5 100644 --- a/OpenCL/m03800_a1-optimized.cl +++ b/OpenCL/m03800_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m03800_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -352,24 +352,24 @@ KERNEL_FQ void m03800_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -377,10 +377,10 @@ KERNEL_FQ void m03800_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m03800_a1-pure.cl b/OpenCL/m03800_a1-pure.cl index ae1dd719b..43ce752f9 100644 --- a/OpenCL/m03800_a1-pure.cl +++ b/OpenCL/m03800_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m03800_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -86,23 +86,23 @@ KERNEL_FQ void m03800_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m03800_a3-optimized.cl b/OpenCL/m03800_a3-optimized.cl index e849f703e..f21b88389 100644 --- a/OpenCL/m03800_a3-optimized.cl +++ b/OpenCL/m03800_a3-optimized.cl @@ -32,46 +32,46 @@ DECLSPEC void m03800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; u32 salt_buf0_t[4]; u32 salt_buf1_t[4]; u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -256,46 +256,46 @@ DECLSPEC void m03800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; u32 salt_buf0_t[4]; u32 salt_buf1_t[4]; u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -328,10 +328,10 @@ DECLSPEC void m03800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -527,7 +527,7 @@ KERNEL_FQ void m03800_m04 (KERN_ATTR_BASIC ()) * main */ - m03800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m03800_m08 (KERN_ATTR_BASIC ()) @@ -580,7 +580,7 @@ KERNEL_FQ void m03800_m08 (KERN_ATTR_BASIC ()) * main */ - m03800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m03800_m16 (KERN_ATTR_BASIC ()) @@ -633,7 +633,7 @@ KERNEL_FQ void m03800_m16 (KERN_ATTR_BASIC ()) * main */ - m03800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m03800_s04 (KERN_ATTR_BASIC ()) @@ -686,7 +686,7 @@ KERNEL_FQ void m03800_s04 (KERN_ATTR_BASIC ()) * main */ - m03800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m03800_s08 (KERN_ATTR_BASIC ()) @@ -739,7 +739,7 @@ KERNEL_FQ void m03800_s08 (KERN_ATTR_BASIC ()) * main */ - m03800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m03800_s16 (KERN_ATTR_BASIC ()) @@ -792,5 +792,5 @@ KERNEL_FQ void m03800_s16 (KERN_ATTR_BASIC ()) * main */ - m03800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m03800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m03800_a3-pure.cl b/OpenCL/m03800_a3-pure.cl index e8189ccea..4a26acaa9 100644 --- a/OpenCL/m03800_a3-pure.cl +++ b/OpenCL/m03800_a3-pure.cl @@ -38,20 +38,20 @@ KERNEL_FQ void m03800_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -103,10 +103,10 @@ KERNEL_FQ void m03800_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -122,20 +122,20 @@ KERNEL_FQ void m03800_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m03910_a0-optimized.cl b/OpenCL/m03910_a0-optimized.cl index 0b052fdc3..b9b7c7741 100644 --- a/OpenCL/m03910_a0-optimized.cl +++ b/OpenCL/m03910_a0-optimized.cl @@ -84,14 +84,14 @@ KERNEL_FQ void m03910_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -452,14 +452,14 @@ KERNEL_FQ void m03910_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -475,10 +475,10 @@ KERNEL_FQ void m03910_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m03910_a0-pure.cl b/OpenCL/m03910_a0-pure.cl index ff8474f46..96bd71940 100644 --- a/OpenCL/m03910_a0-pure.cl +++ b/OpenCL/m03910_a0-pure.cl @@ -69,7 +69,7 @@ KERNEL_FQ void m03910_mxx (KERN_ATTR_RULES ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } /** @@ -189,10 +189,10 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -207,7 +207,7 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_RULES ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } /** diff --git a/OpenCL/m03910_a1-optimized.cl b/OpenCL/m03910_a1-optimized.cl index 57abab584..c82c512c4 100644 --- a/OpenCL/m03910_a1-optimized.cl +++ b/OpenCL/m03910_a1-optimized.cl @@ -82,14 +82,14 @@ KERNEL_FQ void m03910_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -509,14 +509,14 @@ KERNEL_FQ void m03910_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -532,10 +532,10 @@ KERNEL_FQ void m03910_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m03910_a1-pure.cl b/OpenCL/m03910_a1-pure.cl index 245041c93..ed7c8b483 100644 --- a/OpenCL/m03910_a1-pure.cl +++ b/OpenCL/m03910_a1-pure.cl @@ -65,7 +65,7 @@ KERNEL_FQ void m03910_mxx (KERN_ATTR_BASIC ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } md5_ctx_t ctx0; @@ -185,10 +185,10 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -201,7 +201,7 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_BASIC ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m03910_a3-optimized.cl b/OpenCL/m03910_a3-optimized.cl index 7c2d11816..085aa4177 100644 --- a/OpenCL/m03910_a3-optimized.cl +++ b/OpenCL/m03910_a3-optimized.cl @@ -44,14 +44,14 @@ DECLSPEC void m03910m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -386,14 +386,14 @@ DECLSPEC void m03910s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; salt_buf2[0] = 0; salt_buf2[1] = 0; salt_buf2[2] = 0; @@ -409,10 +409,10 @@ DECLSPEC void m03910s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -792,7 +792,7 @@ KERNEL_FQ void m03910_m04 (KERN_ATTR_BASIC ()) * main */ - m03910m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03910m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03910_m08 (KERN_ATTR_BASIC ()) @@ -862,7 +862,7 @@ KERNEL_FQ void m03910_m08 (KERN_ATTR_BASIC ()) * main */ - m03910m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03910m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03910_m16 (KERN_ATTR_BASIC ()) @@ -932,7 +932,7 @@ KERNEL_FQ void m03910_m16 (KERN_ATTR_BASIC ()) * main */ - m03910m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03910m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03910_s04 (KERN_ATTR_BASIC ()) @@ -1002,7 +1002,7 @@ KERNEL_FQ void m03910_s04 (KERN_ATTR_BASIC ()) * main */ - m03910s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03910s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03910_s08 (KERN_ATTR_BASIC ()) @@ -1072,7 +1072,7 @@ KERNEL_FQ void m03910_s08 (KERN_ATTR_BASIC ()) * main */ - m03910s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03910s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m03910_s16 (KERN_ATTR_BASIC ()) @@ -1142,5 +1142,5 @@ KERNEL_FQ void m03910_s16 (KERN_ATTR_BASIC ()) * main */ - m03910s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m03910s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m03910_a3-pure.cl b/OpenCL/m03910_a3-pure.cl index 31b13ca35..fa7b14275 100644 --- a/OpenCL/m03910_a3-pure.cl +++ b/OpenCL/m03910_a3-pure.cl @@ -74,7 +74,7 @@ KERNEL_FQ void m03910_mxx (KERN_ATTR_VECTOR ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } /** @@ -198,10 +198,10 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -223,7 +223,7 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_VECTOR ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf_pc[idx]; } /** diff --git a/OpenCL/m04010_a0-optimized.cl b/OpenCL/m04010_a0-optimized.cl index 96909c9b6..7b8f1c96e 100644 --- a/OpenCL/m04010_a0-optimized.cl +++ b/OpenCL/m04010_a0-optimized.cl @@ -84,24 +84,24 @@ KERNEL_FQ void m04010_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = 32 + salt_len; @@ -425,24 +425,24 @@ KERNEL_FQ void m04010_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = 32 + salt_len; @@ -452,10 +452,10 @@ KERNEL_FQ void m04010_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04010_a0-pure.cl b/OpenCL/m04010_a0-pure.cl index 4f81378c5..fd7b887d7 100644 --- a/OpenCL/m04010_a0-pure.cl +++ b/OpenCL/m04010_a0-pure.cl @@ -67,7 +67,7 @@ KERNEL_FQ void m04010_mxx (KERN_ATTR_RULES ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -170,10 +170,10 @@ KERNEL_FQ void m04010_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -186,7 +186,7 @@ KERNEL_FQ void m04010_sxx (KERN_ATTR_RULES ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m04010_a1-optimized.cl b/OpenCL/m04010_a1-optimized.cl index e7b0eae16..09e9122af 100644 --- a/OpenCL/m04010_a1-optimized.cl +++ b/OpenCL/m04010_a1-optimized.cl @@ -82,24 +82,24 @@ KERNEL_FQ void m04010_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 final_len = salt_len + 32; @@ -481,24 +481,24 @@ KERNEL_FQ void m04010_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 final_len = salt_len + 32; @@ -508,10 +508,10 @@ KERNEL_FQ void m04010_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04010_a1-pure.cl b/OpenCL/m04010_a1-pure.cl index 60eac950f..a19e50be7 100644 --- a/OpenCL/m04010_a1-pure.cl +++ b/OpenCL/m04010_a1-pure.cl @@ -63,7 +63,7 @@ KERNEL_FQ void m04010_mxx (KERN_ATTR_BASIC ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_ctx_t ctx0t = ctx0; @@ -166,10 +166,10 @@ KERNEL_FQ void m04010_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -180,7 +180,7 @@ KERNEL_FQ void m04010_sxx (KERN_ATTR_BASIC ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_ctx_t ctx0t = ctx0; diff --git a/OpenCL/m04010_a3-optimized.cl b/OpenCL/m04010_a3-optimized.cl index fab737d45..617d13dd2 100644 --- a/OpenCL/m04010_a3-optimized.cl +++ b/OpenCL/m04010_a3-optimized.cl @@ -44,24 +44,24 @@ DECLSPEC void m04010m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; const u32 final_len = salt_len + 32; @@ -350,10 +350,10 @@ DECLSPEC void m04010s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -365,24 +365,24 @@ DECLSPEC void m04010s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; const u32 final_len = salt_len + 32; @@ -726,7 +726,7 @@ KERNEL_FQ void m04010_m04 (KERN_ATTR_BASIC ()) * main */ - m04010m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04010m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04010_m08 (KERN_ATTR_BASIC ()) @@ -796,7 +796,7 @@ KERNEL_FQ void m04010_m08 (KERN_ATTR_BASIC ()) * main */ - m04010m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04010m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04010_m16 (KERN_ATTR_BASIC ()) @@ -866,7 +866,7 @@ KERNEL_FQ void m04010_m16 (KERN_ATTR_BASIC ()) * main */ - m04010m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04010m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04010_s04 (KERN_ATTR_BASIC ()) @@ -936,7 +936,7 @@ KERNEL_FQ void m04010_s04 (KERN_ATTR_BASIC ()) * main */ - m04010s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04010s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04010_s08 (KERN_ATTR_BASIC ()) @@ -1006,7 +1006,7 @@ KERNEL_FQ void m04010_s08 (KERN_ATTR_BASIC ()) * main */ - m04010s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04010s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04010_s16 (KERN_ATTR_BASIC ()) @@ -1076,5 +1076,5 @@ KERNEL_FQ void m04010_s16 (KERN_ATTR_BASIC ()) * main */ - m04010s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04010s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m04010_a3-pure.cl b/OpenCL/m04010_a3-pure.cl index bc5fddc8d..bbabba4ac 100644 --- a/OpenCL/m04010_a3-pure.cl +++ b/OpenCL/m04010_a3-pure.cl @@ -72,7 +72,7 @@ KERNEL_FQ void m04010_mxx (KERN_ATTR_VECTOR ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -183,10 +183,10 @@ KERNEL_FQ void m04010_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -206,7 +206,7 @@ KERNEL_FQ void m04010_sxx (KERN_ATTR_VECTOR ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m04110_a0-optimized.cl b/OpenCL/m04110_a0-optimized.cl index 9b32de16c..9756a3bee 100644 --- a/OpenCL/m04110_a0-optimized.cl +++ b/OpenCL/m04110_a0-optimized.cl @@ -84,24 +84,24 @@ KERNEL_FQ void m04110_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 final_len = salt_len + 32; // salt version 2: with 0x80 appended @@ -111,22 +111,22 @@ KERNEL_FQ void m04110_m04 (KERN_ATTR_RULES ()) u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; append_0x80_4x4_S (salt_buf0_t, salt_buf1_t, salt_buf2_t, salt_buf3_t, salt_len); @@ -470,24 +470,24 @@ KERNEL_FQ void m04110_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 final_len = salt_len + 32; // salt version 2: with 0x80 appended @@ -497,22 +497,22 @@ KERNEL_FQ void m04110_s04 (KERN_ATTR_RULES ()) u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; append_0x80_4x4_S (salt_buf0_t, salt_buf1_t, salt_buf2_t, salt_buf3_t, salt_len); @@ -522,10 +522,10 @@ KERNEL_FQ void m04110_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04110_a0-pure.cl b/OpenCL/m04110_a0-pure.cl index 12719e888..217d13dd2 100644 --- a/OpenCL/m04110_a0-pure.cl +++ b/OpenCL/m04110_a0-pure.cl @@ -63,13 +63,13 @@ KERNEL_FQ void m04110_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -183,10 +183,10 @@ KERNEL_FQ void m04110_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -195,13 +195,13 @@ KERNEL_FQ void m04110_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m04110_a1-optimized.cl b/OpenCL/m04110_a1-optimized.cl index be22bd1ea..3c76c9f34 100644 --- a/OpenCL/m04110_a1-optimized.cl +++ b/OpenCL/m04110_a1-optimized.cl @@ -82,24 +82,24 @@ KERNEL_FQ void m04110_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 final_len = salt_len + 32; // salt version 2: with 0x80 appended @@ -109,22 +109,22 @@ KERNEL_FQ void m04110_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; append_0x80_4x4_S (salt_buf0_t, salt_buf1_t, salt_buf2_t, salt_buf3_t, salt_len); @@ -528,24 +528,24 @@ KERNEL_FQ void m04110_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 final_len = salt_len + 32; // salt version 2: with 0x80 appended @@ -555,22 +555,22 @@ KERNEL_FQ void m04110_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; append_0x80_4x4_S (salt_buf0_t, salt_buf1_t, salt_buf2_t, salt_buf3_t, salt_len); @@ -580,10 +580,10 @@ KERNEL_FQ void m04110_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04110_a1-pure.cl b/OpenCL/m04110_a1-pure.cl index 2a2322a71..e8537a862 100644 --- a/OpenCL/m04110_a1-pure.cl +++ b/OpenCL/m04110_a1-pure.cl @@ -59,13 +59,13 @@ KERNEL_FQ void m04110_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -179,23 +179,23 @@ KERNEL_FQ void m04110_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m04110_a3-optimized.cl b/OpenCL/m04110_a3-optimized.cl index 1dcd04b03..cd71eca37 100644 --- a/OpenCL/m04110_a3-optimized.cl +++ b/OpenCL/m04110_a3-optimized.cl @@ -44,24 +44,24 @@ DECLSPEC void m04110m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; const u32 final_len = salt_len + 32; @@ -378,10 +378,10 @@ DECLSPEC void m04110s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -393,24 +393,24 @@ DECLSPEC void m04110s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; const u32 final_len = salt_len + 32; @@ -782,7 +782,7 @@ KERNEL_FQ void m04110_m04 (KERN_ATTR_BASIC ()) * main */ - m04110m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04110m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04110_m08 (KERN_ATTR_BASIC ()) @@ -852,7 +852,7 @@ KERNEL_FQ void m04110_m08 (KERN_ATTR_BASIC ()) * main */ - m04110m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04110m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04110_m16 (KERN_ATTR_BASIC ()) @@ -922,7 +922,7 @@ KERNEL_FQ void m04110_m16 (KERN_ATTR_BASIC ()) * main */ - m04110m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04110m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04110_s04 (KERN_ATTR_BASIC ()) @@ -992,7 +992,7 @@ KERNEL_FQ void m04110_s04 (KERN_ATTR_BASIC ()) * main */ - m04110s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04110s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04110_s08 (KERN_ATTR_BASIC ()) @@ -1062,7 +1062,7 @@ KERNEL_FQ void m04110_s08 (KERN_ATTR_BASIC ()) * main */ - m04110s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04110s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04110_s16 (KERN_ATTR_BASIC ()) @@ -1132,5 +1132,5 @@ KERNEL_FQ void m04110_s16 (KERN_ATTR_BASIC ()) * main */ - m04110s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04110s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m04110_a3-pure.cl b/OpenCL/m04110_a3-pure.cl index 490ecd667..a2a44b0aa 100644 --- a/OpenCL/m04110_a3-pure.cl +++ b/OpenCL/m04110_a3-pure.cl @@ -68,20 +68,20 @@ KERNEL_FQ void m04110_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -194,10 +194,10 @@ KERNEL_FQ void m04110_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -213,20 +213,20 @@ KERNEL_FQ void m04110_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m04310_a0-optimized.cl b/OpenCL/m04310_a0-optimized.cl index b8f7c10e7..64cee0788 100644 --- a/OpenCL/m04310_a0-optimized.cl +++ b/OpenCL/m04310_a0-optimized.cl @@ -84,12 +84,12 @@ KERNEL_FQ void m04310_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -101,7 +101,7 @@ KERNEL_FQ void m04310_m04 (KERN_ATTR_RULES ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -368,12 +368,12 @@ KERNEL_FQ void m04310_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -385,7 +385,7 @@ KERNEL_FQ void m04310_s04 (KERN_ATTR_RULES ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -393,10 +393,10 @@ KERNEL_FQ void m04310_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04310_a0-pure.cl b/OpenCL/m04310_a0-pure.cl index 67496d227..5e9ef9bdd 100644 --- a/OpenCL/m04310_a0-pure.cl +++ b/OpenCL/m04310_a0-pure.cl @@ -63,13 +63,13 @@ KERNEL_FQ void m04310_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -166,10 +166,10 @@ KERNEL_FQ void m04310_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -178,13 +178,13 @@ KERNEL_FQ void m04310_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m04310_a1-optimized.cl b/OpenCL/m04310_a1-optimized.cl index a78a21694..c43370749 100644 --- a/OpenCL/m04310_a1-optimized.cl +++ b/OpenCL/m04310_a1-optimized.cl @@ -82,12 +82,12 @@ KERNEL_FQ void m04310_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -99,7 +99,7 @@ KERNEL_FQ void m04310_m04 (KERN_ATTR_BASIC ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -425,12 +425,12 @@ KERNEL_FQ void m04310_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -442,7 +442,7 @@ KERNEL_FQ void m04310_s04 (KERN_ATTR_BASIC ()) salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -450,10 +450,10 @@ KERNEL_FQ void m04310_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04310_a1-pure.cl b/OpenCL/m04310_a1-pure.cl index 6b219b473..5da77d325 100644 --- a/OpenCL/m04310_a1-pure.cl +++ b/OpenCL/m04310_a1-pure.cl @@ -59,13 +59,13 @@ KERNEL_FQ void m04310_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -162,23 +162,23 @@ KERNEL_FQ void m04310_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m04310_a3-optimized.cl b/OpenCL/m04310_a3-optimized.cl index 4a8572373..8dea3f6b9 100644 --- a/OpenCL/m04310_a3-optimized.cl +++ b/OpenCL/m04310_a3-optimized.cl @@ -44,12 +44,12 @@ DECLSPEC void m04310m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -61,7 +61,7 @@ DECLSPEC void m04310m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -302,12 +302,12 @@ DECLSPEC void m04310s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[5]; salt_buf1[2] = 0; salt_buf1[3] = 0; salt_buf2[0] = 0; @@ -319,7 +319,7 @@ DECLSPEC void m04310s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -327,10 +327,10 @@ DECLSPEC void m04310s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -625,7 +625,7 @@ KERNEL_FQ void m04310_m04 (KERN_ATTR_BASIC ()) * main */ - m04310m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04310m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04310_m08 (KERN_ATTR_BASIC ()) @@ -695,7 +695,7 @@ KERNEL_FQ void m04310_m08 (KERN_ATTR_BASIC ()) * main */ - m04310m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04310m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04310_m16 (KERN_ATTR_BASIC ()) @@ -765,7 +765,7 @@ KERNEL_FQ void m04310_m16 (KERN_ATTR_BASIC ()) * main */ - m04310m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04310m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04310_s04 (KERN_ATTR_BASIC ()) @@ -835,7 +835,7 @@ KERNEL_FQ void m04310_s04 (KERN_ATTR_BASIC ()) * main */ - m04310s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04310s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04310_s08 (KERN_ATTR_BASIC ()) @@ -905,7 +905,7 @@ KERNEL_FQ void m04310_s08 (KERN_ATTR_BASIC ()) * main */ - m04310s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04310s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04310_s16 (KERN_ATTR_BASIC ()) @@ -975,5 +975,5 @@ KERNEL_FQ void m04310_s16 (KERN_ATTR_BASIC ()) * main */ - m04310s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04310s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m04310_a3-pure.cl b/OpenCL/m04310_a3-pure.cl index cd83bb46a..bf97c9321 100644 --- a/OpenCL/m04310_a3-pure.cl +++ b/OpenCL/m04310_a3-pure.cl @@ -68,13 +68,13 @@ KERNEL_FQ void m04310_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -175,10 +175,10 @@ KERNEL_FQ void m04310_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -194,13 +194,13 @@ KERNEL_FQ void m04310_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m04400_a0-optimized.cl b/OpenCL/m04400_a0-optimized.cl index b192a5859..39e3ea662 100644 --- a/OpenCL/m04400_a0-optimized.cl +++ b/OpenCL/m04400_a0-optimized.cl @@ -392,10 +392,10 @@ KERNEL_FQ void m04400_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04400_a0-pure.cl b/OpenCL/m04400_a0-pure.cl index 35ca3e386..ba41beb8a 100644 --- a/OpenCL/m04400_a0-pure.cl +++ b/OpenCL/m04400_a0-pure.cl @@ -161,10 +161,10 @@ KERNEL_FQ void m04400_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04400_a1-optimized.cl b/OpenCL/m04400_a1-optimized.cl index cbf0cfdf5..4c4df8b3a 100644 --- a/OpenCL/m04400_a1-optimized.cl +++ b/OpenCL/m04400_a1-optimized.cl @@ -448,10 +448,10 @@ KERNEL_FQ void m04400_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04400_a1-pure.cl b/OpenCL/m04400_a1-pure.cl index 7247f7b14..371a350e6 100644 --- a/OpenCL/m04400_a1-pure.cl +++ b/OpenCL/m04400_a1-pure.cl @@ -157,10 +157,10 @@ KERNEL_FQ void m04400_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04400_a3-optimized.cl b/OpenCL/m04400_a3-optimized.cl index 72aea5c55..3667e4ca2 100644 --- a/OpenCL/m04400_a3-optimized.cl +++ b/OpenCL/m04400_a3-optimized.cl @@ -303,10 +303,10 @@ DECLSPEC void m04400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -631,7 +631,7 @@ KERNEL_FQ void m04400_m04 (KERN_ATTR_BASIC ()) * main */ - m04400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04400_m08 (KERN_ATTR_BASIC ()) @@ -701,7 +701,7 @@ KERNEL_FQ void m04400_m08 (KERN_ATTR_BASIC ()) * main */ - m04400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04400_m16 (KERN_ATTR_BASIC ()) @@ -771,7 +771,7 @@ KERNEL_FQ void m04400_m16 (KERN_ATTR_BASIC ()) * main */ - m04400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04400_s04 (KERN_ATTR_BASIC ()) @@ -841,7 +841,7 @@ KERNEL_FQ void m04400_s04 (KERN_ATTR_BASIC ()) * main */ - m04400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04400_s08 (KERN_ATTR_BASIC ()) @@ -911,7 +911,7 @@ KERNEL_FQ void m04400_s08 (KERN_ATTR_BASIC ()) * main */ - m04400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04400_s16 (KERN_ATTR_BASIC ()) @@ -981,5 +981,5 @@ KERNEL_FQ void m04400_s16 (KERN_ATTR_BASIC ()) * main */ - m04400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m04400_a3-pure.cl b/OpenCL/m04400_a3-pure.cl index e3eb903f6..049733a00 100644 --- a/OpenCL/m04400_a3-pure.cl +++ b/OpenCL/m04400_a3-pure.cl @@ -170,10 +170,10 @@ KERNEL_FQ void m04400_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04500_a0-optimized.cl b/OpenCL/m04500_a0-optimized.cl index ba71bbcb8..c54d38971 100644 --- a/OpenCL/m04500_a0-optimized.cl +++ b/OpenCL/m04500_a0-optimized.cl @@ -418,10 +418,10 @@ KERNEL_FQ void m04500_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04500_a0-pure.cl b/OpenCL/m04500_a0-pure.cl index b3f207eaa..e4de5e3e5 100644 --- a/OpenCL/m04500_a0-pure.cl +++ b/OpenCL/m04500_a0-pure.cl @@ -160,10 +160,10 @@ KERNEL_FQ void m04500_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04500_a1-optimized.cl b/OpenCL/m04500_a1-optimized.cl index 6e58bb67a..75f380bbe 100644 --- a/OpenCL/m04500_a1-optimized.cl +++ b/OpenCL/m04500_a1-optimized.cl @@ -474,10 +474,10 @@ KERNEL_FQ void m04500_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04500_a1-pure.cl b/OpenCL/m04500_a1-pure.cl index 32b79fb03..cab4cee4c 100644 --- a/OpenCL/m04500_a1-pure.cl +++ b/OpenCL/m04500_a1-pure.cl @@ -156,10 +156,10 @@ KERNEL_FQ void m04500_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04500_a3-optimized.cl b/OpenCL/m04500_a3-optimized.cl index 0c79696db..8aca9f7bd 100644 --- a/OpenCL/m04500_a3-optimized.cl +++ b/OpenCL/m04500_a3-optimized.cl @@ -329,10 +329,10 @@ DECLSPEC void m04500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -690,7 +690,7 @@ KERNEL_FQ void m04500_m04 (KERN_ATTR_BASIC ()) * main */ - m04500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04500_m08 (KERN_ATTR_BASIC ()) @@ -760,7 +760,7 @@ KERNEL_FQ void m04500_m08 (KERN_ATTR_BASIC ()) * main */ - m04500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04500_m16 (KERN_ATTR_BASIC ()) @@ -830,7 +830,7 @@ KERNEL_FQ void m04500_m16 (KERN_ATTR_BASIC ()) * main */ - m04500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04500_s04 (KERN_ATTR_BASIC ()) @@ -900,7 +900,7 @@ KERNEL_FQ void m04500_s04 (KERN_ATTR_BASIC ()) * main */ - m04500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04500_s08 (KERN_ATTR_BASIC ()) @@ -970,7 +970,7 @@ KERNEL_FQ void m04500_s08 (KERN_ATTR_BASIC ()) * main */ - m04500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04500_s16 (KERN_ATTR_BASIC ()) @@ -1040,5 +1040,5 @@ KERNEL_FQ void m04500_s16 (KERN_ATTR_BASIC ()) * main */ - m04500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m04500_a3-pure.cl b/OpenCL/m04500_a3-pure.cl index 735f512c7..e1ad35a10 100644 --- a/OpenCL/m04500_a3-pure.cl +++ b/OpenCL/m04500_a3-pure.cl @@ -169,10 +169,10 @@ KERNEL_FQ void m04500_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04510_a0-optimized.cl b/OpenCL/m04510_a0-optimized.cl index fa94db9a7..bbcbb4cef 100644 --- a/OpenCL/m04510_a0-optimized.cl +++ b/OpenCL/m04510_a0-optimized.cl @@ -84,24 +84,24 @@ KERNEL_FQ void m04510_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -1083,34 +1083,34 @@ KERNEL_FQ void m04510_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest */ const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04510_a0-pure.cl b/OpenCL/m04510_a0-pure.cl index 2416f3b06..0f5b29315 100644 --- a/OpenCL/m04510_a0-pure.cl +++ b/OpenCL/m04510_a0-pure.cl @@ -63,13 +63,13 @@ KERNEL_FQ void m04510_mxx (KERN_ATTR_VECTOR ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -165,10 +165,10 @@ KERNEL_FQ void m04510_sxx (KERN_ATTR_RULES ()) */ const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -177,13 +177,13 @@ KERNEL_FQ void m04510_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m04510_a1-optimized.cl b/OpenCL/m04510_a1-optimized.cl index e714a6ca6..f074fd09c 100644 --- a/OpenCL/m04510_a1-optimized.cl +++ b/OpenCL/m04510_a1-optimized.cl @@ -82,24 +82,24 @@ KERNEL_FQ void m04510_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -1138,34 +1138,34 @@ KERNEL_FQ void m04510_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest */ const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04510_a1-pure.cl b/OpenCL/m04510_a1-pure.cl index a27486518..048061ec2 100644 --- a/OpenCL/m04510_a1-pure.cl +++ b/OpenCL/m04510_a1-pure.cl @@ -59,13 +59,13 @@ KERNEL_FQ void m04510_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; @@ -161,23 +161,23 @@ KERNEL_FQ void m04510_sxx (KERN_ATTR_BASIC ()) */ const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; diff --git a/OpenCL/m04510_a3-optimized.cl b/OpenCL/m04510_a3-optimized.cl index 34a2428c5..f6adfd732 100644 --- a/OpenCL/m04510_a3-optimized.cl +++ b/OpenCL/m04510_a3-optimized.cl @@ -44,24 +44,24 @@ DECLSPEC void m04510m (u32 * w0, u32 * w1, u32 * w2, u32 * w3, const u32 pw_len, u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -994,34 +994,34 @@ DECLSPEC void m04510s (u32 * w0, u32 * w1, u32 * w2, u32 * w3, const u32 pw_len, u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest */ const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -2016,7 +2016,7 @@ KERNEL_FQ void m04510_m04 (KERN_ATTR_BASIC ()) * main */ - m04510m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04510m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04510_m08 (KERN_ATTR_BASIC ()) @@ -2086,7 +2086,7 @@ KERNEL_FQ void m04510_m08 (KERN_ATTR_BASIC ()) * main */ - m04510m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04510m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04510_m16 (KERN_ATTR_BASIC ()) @@ -2156,7 +2156,7 @@ KERNEL_FQ void m04510_m16 (KERN_ATTR_BASIC ()) * main */ - m04510m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04510m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04510_s04 (KERN_ATTR_BASIC ()) @@ -2226,7 +2226,7 @@ KERNEL_FQ void m04510_s04 (KERN_ATTR_BASIC ()) * main */ - m04510s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04510s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04510_s08 (KERN_ATTR_BASIC ()) @@ -2296,7 +2296,7 @@ KERNEL_FQ void m04510_s08 (KERN_ATTR_BASIC ()) * main */ - m04510s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04510s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04510_s16 (KERN_ATTR_BASIC ()) @@ -2366,5 +2366,5 @@ KERNEL_FQ void m04510_s16 (KERN_ATTR_BASIC ()) * main */ - m04510s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04510s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m04510_a3-pure.cl b/OpenCL/m04510_a3-pure.cl index 592560efc..54acf026b 100644 --- a/OpenCL/m04510_a3-pure.cl +++ b/OpenCL/m04510_a3-pure.cl @@ -68,13 +68,13 @@ KERNEL_FQ void m04510_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -169,10 +169,10 @@ KERNEL_FQ void m04510_sxx (KERN_ATTR_VECTOR ()) */ const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -188,13 +188,13 @@ KERNEL_FQ void m04510_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m04520_a0-optimized.cl b/OpenCL/m04520_a0-optimized.cl index ffea45f02..06fa20da3 100644 --- a/OpenCL/m04520_a0-optimized.cl +++ b/OpenCL/m04520_a0-optimized.cl @@ -84,24 +84,24 @@ KERNEL_FQ void m04520_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -652,24 +652,24 @@ KERNEL_FQ void m04520_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -677,10 +677,10 @@ KERNEL_FQ void m04520_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04520_a0-pure.cl b/OpenCL/m04520_a0-pure.cl index 1c3aa88ea..dfb94bce1 100644 --- a/OpenCL/m04520_a0-pure.cl +++ b/OpenCL/m04520_a0-pure.cl @@ -67,7 +67,7 @@ KERNEL_FQ void m04520_mxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -175,10 +175,10 @@ KERNEL_FQ void m04520_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -191,7 +191,7 @@ KERNEL_FQ void m04520_sxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m04520_a1-optimized.cl b/OpenCL/m04520_a1-optimized.cl index 5758a6bd8..db348f706 100644 --- a/OpenCL/m04520_a1-optimized.cl +++ b/OpenCL/m04520_a1-optimized.cl @@ -82,24 +82,24 @@ KERNEL_FQ void m04520_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -708,24 +708,24 @@ KERNEL_FQ void m04520_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -733,10 +733,10 @@ KERNEL_FQ void m04520_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04520_a1-pure.cl b/OpenCL/m04520_a1-pure.cl index 1ef295b06..a4ebaed1c 100644 --- a/OpenCL/m04520_a1-pure.cl +++ b/OpenCL/m04520_a1-pure.cl @@ -63,7 +63,7 @@ KERNEL_FQ void m04520_mxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_ctx_t ctx1l; @@ -171,10 +171,10 @@ KERNEL_FQ void m04520_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -185,7 +185,7 @@ KERNEL_FQ void m04520_sxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_ctx_t ctx1l; diff --git a/OpenCL/m04520_a3-optimized.cl b/OpenCL/m04520_a3-optimized.cl index 0a40509bb..3190da297 100644 --- a/OpenCL/m04520_a3-optimized.cl +++ b/OpenCL/m04520_a3-optimized.cl @@ -44,24 +44,24 @@ DECLSPEC void m04520m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -563,24 +563,24 @@ DECLSPEC void m04520s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -588,10 +588,10 @@ DECLSPEC void m04520s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -1143,7 +1143,7 @@ KERNEL_FQ void m04520_m04 (KERN_ATTR_BASIC ()) * main */ - m04520m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04520m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04520_m08 (KERN_ATTR_BASIC ()) @@ -1213,7 +1213,7 @@ KERNEL_FQ void m04520_m08 (KERN_ATTR_BASIC ()) * main */ - m04520m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04520m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04520_m16 (KERN_ATTR_BASIC ()) @@ -1283,7 +1283,7 @@ KERNEL_FQ void m04520_m16 (KERN_ATTR_BASIC ()) * main */ - m04520m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04520m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04520_s04 (KERN_ATTR_BASIC ()) @@ -1353,7 +1353,7 @@ KERNEL_FQ void m04520_s04 (KERN_ATTR_BASIC ()) * main */ - m04520s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04520s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04520_s08 (KERN_ATTR_BASIC ()) @@ -1423,7 +1423,7 @@ KERNEL_FQ void m04520_s08 (KERN_ATTR_BASIC ()) * main */ - m04520s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04520s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04520_s16 (KERN_ATTR_BASIC ()) @@ -1493,5 +1493,5 @@ KERNEL_FQ void m04520_s16 (KERN_ATTR_BASIC ()) * main */ - m04520s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04520s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m04520_a3-pure.cl b/OpenCL/m04520_a3-pure.cl index 8f4564d77..b5e43b0c4 100644 --- a/OpenCL/m04520_a3-pure.cl +++ b/OpenCL/m04520_a3-pure.cl @@ -72,7 +72,7 @@ KERNEL_FQ void m04520_mxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -186,10 +186,10 @@ KERNEL_FQ void m04520_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -209,7 +209,7 @@ KERNEL_FQ void m04520_sxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m04700_a0-optimized.cl b/OpenCL/m04700_a0-optimized.cl index e6d1a2468..11f784fb8 100644 --- a/OpenCL/m04700_a0-optimized.cl +++ b/OpenCL/m04700_a0-optimized.cl @@ -375,10 +375,10 @@ KERNEL_FQ void m04700_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04700_a0-pure.cl b/OpenCL/m04700_a0-pure.cl index 9c586f214..6a505bdb5 100644 --- a/OpenCL/m04700_a0-pure.cl +++ b/OpenCL/m04700_a0-pure.cl @@ -156,10 +156,10 @@ KERNEL_FQ void m04700_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04700_a1-optimized.cl b/OpenCL/m04700_a1-optimized.cl index f3989d858..d72cbfb3e 100644 --- a/OpenCL/m04700_a1-optimized.cl +++ b/OpenCL/m04700_a1-optimized.cl @@ -428,10 +428,10 @@ KERNEL_FQ void m04700_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04700_a1-pure.cl b/OpenCL/m04700_a1-pure.cl index 93ae560bf..efb39f2d6 100644 --- a/OpenCL/m04700_a1-pure.cl +++ b/OpenCL/m04700_a1-pure.cl @@ -152,10 +152,10 @@ KERNEL_FQ void m04700_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04700_a3-optimized.cl b/OpenCL/m04700_a3-optimized.cl index 4b22f8887..2d3a34f10 100644 --- a/OpenCL/m04700_a3-optimized.cl +++ b/OpenCL/m04700_a3-optimized.cl @@ -300,10 +300,10 @@ DECLSPEC void m04700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -631,7 +631,7 @@ KERNEL_FQ void m04700_m04 (KERN_ATTR_BASIC ()) * main */ - m04700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04700_m08 (KERN_ATTR_BASIC ()) @@ -701,7 +701,7 @@ KERNEL_FQ void m04700_m08 (KERN_ATTR_BASIC ()) * main */ - m04700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04700_m16 (KERN_ATTR_BASIC ()) @@ -771,7 +771,7 @@ KERNEL_FQ void m04700_m16 (KERN_ATTR_BASIC ()) * main */ - m04700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04700_s04 (KERN_ATTR_BASIC ()) @@ -841,7 +841,7 @@ KERNEL_FQ void m04700_s04 (KERN_ATTR_BASIC ()) * main */ - m04700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04700_s08 (KERN_ATTR_BASIC ()) @@ -911,7 +911,7 @@ KERNEL_FQ void m04700_s08 (KERN_ATTR_BASIC ()) * main */ - m04700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04700_s16 (KERN_ATTR_BASIC ()) @@ -981,5 +981,5 @@ KERNEL_FQ void m04700_s16 (KERN_ATTR_BASIC ()) * main */ - m04700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m04700_a3-pure.cl b/OpenCL/m04700_a3-pure.cl index 9e6a668ef..943be5a92 100644 --- a/OpenCL/m04700_a3-pure.cl +++ b/OpenCL/m04700_a3-pure.cl @@ -165,10 +165,10 @@ KERNEL_FQ void m04700_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04710_a0-optimized.cl b/OpenCL/m04710_a0-optimized.cl index 14457b377..d97c8c208 100644 --- a/OpenCL/m04710_a0-optimized.cl +++ b/OpenCL/m04710_a0-optimized.cl @@ -85,24 +85,24 @@ KERNEL_FQ void m04710_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -783,24 +783,24 @@ KERNEL_FQ void m04710_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -808,10 +808,10 @@ KERNEL_FQ void m04710_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04710_a0-pure.cl b/OpenCL/m04710_a0-pure.cl index e11df4fd9..95f324751 100644 --- a/OpenCL/m04710_a0-pure.cl +++ b/OpenCL/m04710_a0-pure.cl @@ -64,13 +64,13 @@ KERNEL_FQ void m04710_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -181,10 +181,10 @@ KERNEL_FQ void m04710_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -193,13 +193,13 @@ KERNEL_FQ void m04710_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m04710_a1-optimized.cl b/OpenCL/m04710_a1-optimized.cl index 9acaac644..adc63acc7 100644 --- a/OpenCL/m04710_a1-optimized.cl +++ b/OpenCL/m04710_a1-optimized.cl @@ -83,24 +83,24 @@ KERNEL_FQ void m04710_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -836,24 +836,24 @@ KERNEL_FQ void m04710_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -861,10 +861,10 @@ KERNEL_FQ void m04710_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04710_a1-pure.cl b/OpenCL/m04710_a1-pure.cl index 50d7d3ddd..4db460c25 100644 --- a/OpenCL/m04710_a1-pure.cl +++ b/OpenCL/m04710_a1-pure.cl @@ -60,13 +60,13 @@ KERNEL_FQ void m04710_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } md5_ctx_t ctx0; @@ -177,23 +177,23 @@ KERNEL_FQ void m04710_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } md5_ctx_t ctx0; diff --git a/OpenCL/m04710_a3-optimized.cl b/OpenCL/m04710_a3-optimized.cl index 295c137c0..1f15824ec 100644 --- a/OpenCL/m04710_a3-optimized.cl +++ b/OpenCL/m04710_a3-optimized.cl @@ -45,24 +45,24 @@ DECLSPEC void m04710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -708,24 +708,24 @@ DECLSPEC void m04710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -733,10 +733,10 @@ DECLSPEC void m04710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -1441,7 +1441,7 @@ KERNEL_FQ void m04710_m04 (KERN_ATTR_BASIC ()) * main */ - m04710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04710_m08 (KERN_ATTR_BASIC ()) @@ -1511,7 +1511,7 @@ KERNEL_FQ void m04710_m08 (KERN_ATTR_BASIC ()) * main */ - m04710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04710_m16 (KERN_ATTR_BASIC ()) @@ -1581,7 +1581,7 @@ KERNEL_FQ void m04710_m16 (KERN_ATTR_BASIC ()) * main */ - m04710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04710_s04 (KERN_ATTR_BASIC ()) @@ -1651,7 +1651,7 @@ KERNEL_FQ void m04710_s04 (KERN_ATTR_BASIC ()) * main */ - m04710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04710_s08 (KERN_ATTR_BASIC ()) @@ -1721,7 +1721,7 @@ KERNEL_FQ void m04710_s08 (KERN_ATTR_BASIC ()) * main */ - m04710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m04710_s16 (KERN_ATTR_BASIC ()) @@ -1791,5 +1791,5 @@ KERNEL_FQ void m04710_s16 (KERN_ATTR_BASIC ()) * main */ - m04710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m04710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m04710_a3-pure.cl b/OpenCL/m04710_a3-pure.cl index 830ac303f..950c434d3 100644 --- a/OpenCL/m04710_a3-pure.cl +++ b/OpenCL/m04710_a3-pure.cl @@ -69,13 +69,13 @@ KERNEL_FQ void m04710_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -190,10 +190,10 @@ KERNEL_FQ void m04710_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -209,13 +209,13 @@ KERNEL_FQ void m04710_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[8] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m04800_a0-optimized.cl b/OpenCL/m04800_a0-optimized.cl index c58d89a00..d3c417df6 100644 --- a/OpenCL/m04800_a0-optimized.cl +++ b/OpenCL/m04800_a0-optimized.cl @@ -51,13 +51,13 @@ KERNEL_FQ void m04800_m04 (KERN_ATTR_RULES ()) u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -256,13 +256,13 @@ KERNEL_FQ void m04800_s04 (KERN_ATTR_RULES ()) u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -270,10 +270,10 @@ KERNEL_FQ void m04800_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04800_a0-pure.cl b/OpenCL/m04800_a0-pure.cl index 54c0bf973..bb4ecc961 100644 --- a/OpenCL/m04800_a0-pure.cl +++ b/OpenCL/m04800_a0-pure.cl @@ -33,20 +33,20 @@ KERNEL_FQ void m04800_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len - 1; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 1; u32 s[16] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; md5_ctx_t ctx0; md5_init (&ctx0); - ctx0.w0[0] = salt_bufs[salt_pos].salt_buf[4]; + ctx0.w0[0] = salt_bufs[SALT_POS].salt_buf[4]; ctx0.len = 1; @@ -94,10 +94,10 @@ KERNEL_FQ void m04800_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -106,20 +106,20 @@ KERNEL_FQ void m04800_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len - 1; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 1; u32 s[16] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; md5_ctx_t ctx0; md5_init (&ctx0); - ctx0.w0[0] = salt_bufs[salt_pos].salt_buf[4]; + ctx0.w0[0] = salt_bufs[SALT_POS].salt_buf[4]; ctx0.len = 1; diff --git a/OpenCL/m04800_a1-optimized.cl b/OpenCL/m04800_a1-optimized.cl index 4e2e0fe07..082796384 100644 --- a/OpenCL/m04800_a1-optimized.cl +++ b/OpenCL/m04800_a1-optimized.cl @@ -61,13 +61,13 @@ KERNEL_FQ void m04800_m04 (KERN_ATTR_BASIC ()) u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -326,13 +326,13 @@ KERNEL_FQ void m04800_s04 (KERN_ATTR_BASIC ()) u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -340,10 +340,10 @@ KERNEL_FQ void m04800_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04800_a1-pure.cl b/OpenCL/m04800_a1-pure.cl index 2a0de51c9..1e7f9fd93 100644 --- a/OpenCL/m04800_a1-pure.cl +++ b/OpenCL/m04800_a1-pure.cl @@ -29,20 +29,20 @@ KERNEL_FQ void m04800_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len - 1; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 1; u32 s[16] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; md5_ctx_t ctx0; md5_init (&ctx0); - ctx0.w0[0] = salt_bufs[salt_pos].salt_buf[4]; + ctx0.w0[0] = salt_bufs[SALT_POS].salt_buf[4]; ctx0.len = 1; @@ -88,30 +88,30 @@ KERNEL_FQ void m04800_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len - 1; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 1; u32 s[16] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; md5_ctx_t ctx0; md5_init (&ctx0); - ctx0.w0[0] = salt_bufs[salt_pos].salt_buf[4]; + ctx0.w0[0] = salt_bufs[SALT_POS].salt_buf[4]; ctx0.len = 1; diff --git a/OpenCL/m04800_a3-optimized.cl b/OpenCL/m04800_a3-optimized.cl index 98343c1dd..4d237db53 100644 --- a/OpenCL/m04800_a3-optimized.cl +++ b/OpenCL/m04800_a3-optimized.cl @@ -29,13 +29,13 @@ DECLSPEC void m04800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -213,13 +213,13 @@ DECLSPEC void m04800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -280,10 +280,10 @@ DECLSPEC void m04800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -447,7 +447,7 @@ KERNEL_FQ void m04800_m04 (KERN_ATTR_BASIC ()) * main */ - m04800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04800_m08 (KERN_ATTR_BASIC ()) @@ -500,7 +500,7 @@ KERNEL_FQ void m04800_m08 (KERN_ATTR_BASIC ()) * main */ - m04800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04800_m16 (KERN_ATTR_BASIC ()) @@ -553,7 +553,7 @@ KERNEL_FQ void m04800_m16 (KERN_ATTR_BASIC ()) * main */ - m04800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04800_s04 (KERN_ATTR_BASIC ()) @@ -606,7 +606,7 @@ KERNEL_FQ void m04800_s04 (KERN_ATTR_BASIC ()) * main */ - m04800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04800_s08 (KERN_ATTR_BASIC ()) @@ -659,7 +659,7 @@ KERNEL_FQ void m04800_s08 (KERN_ATTR_BASIC ()) * main */ - m04800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04800_s16 (KERN_ATTR_BASIC ()) @@ -712,5 +712,5 @@ KERNEL_FQ void m04800_s16 (KERN_ATTR_BASIC ()) * main */ - m04800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m04800_a3-pure.cl b/OpenCL/m04800_a3-pure.cl index a7a3fcf7b..2d942d46f 100644 --- a/OpenCL/m04800_a3-pure.cl +++ b/OpenCL/m04800_a3-pure.cl @@ -38,20 +38,20 @@ KERNEL_FQ void m04800_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len - 1; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 1; u32x s[16] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; md5_ctx_t ctx0; md5_init (&ctx0); - ctx0.w0[0] = salt_bufs[salt_pos].salt_buf[4]; + ctx0.w0[0] = salt_bufs[SALT_POS].salt_buf[4]; ctx0.len = 1; @@ -105,10 +105,10 @@ KERNEL_FQ void m04800_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -124,20 +124,20 @@ KERNEL_FQ void m04800_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len - 1; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 1; u32x s[16] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; md5_ctx_t ctx0; md5_init (&ctx0); - ctx0.w0[0] = salt_bufs[salt_pos].salt_buf[4]; + ctx0.w0[0] = salt_bufs[SALT_POS].salt_buf[4]; ctx0.len = 1; diff --git a/OpenCL/m04900_a0-optimized.cl b/OpenCL/m04900_a0-optimized.cl index d1e686ac5..08f0ea29d 100644 --- a/OpenCL/m04900_a0-optimized.cl +++ b/OpenCL/m04900_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m04900_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -335,24 +335,24 @@ KERNEL_FQ void m04900_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -360,10 +360,10 @@ KERNEL_FQ void m04900_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04900_a0-pure.cl b/OpenCL/m04900_a0-pure.cl index cab847cbf..80c707f88 100644 --- a/OpenCL/m04900_a0-pure.cl +++ b/OpenCL/m04900_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m04900_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; @@ -92,10 +92,10 @@ KERNEL_FQ void m04900_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -104,13 +104,13 @@ KERNEL_FQ void m04900_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; diff --git a/OpenCL/m04900_a1-optimized.cl b/OpenCL/m04900_a1-optimized.cl index d51a5f407..138cdc0fd 100644 --- a/OpenCL/m04900_a1-optimized.cl +++ b/OpenCL/m04900_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m04900_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -393,24 +393,24 @@ KERNEL_FQ void m04900_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -418,10 +418,10 @@ KERNEL_FQ void m04900_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m04900_a1-pure.cl b/OpenCL/m04900_a1-pure.cl index 357ba67bc..f3b20eb7c 100644 --- a/OpenCL/m04900_a1-pure.cl +++ b/OpenCL/m04900_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m04900_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; @@ -86,23 +86,23 @@ KERNEL_FQ void m04900_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; diff --git a/OpenCL/m04900_a3-optimized.cl b/OpenCL/m04900_a3-optimized.cl index 199e11ca4..767bcc13f 100644 --- a/OpenCL/m04900_a3-optimized.cl +++ b/OpenCL/m04900_a3-optimized.cl @@ -32,46 +32,46 @@ DECLSPEC void m04900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; u32 salt_buf0_t[4]; u32 salt_buf1_t[4]; u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -299,46 +299,46 @@ DECLSPEC void m04900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; u32 salt_buf0_t[4]; u32 salt_buf1_t[4]; u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -371,10 +371,10 @@ DECLSPEC void m04900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -619,7 +619,7 @@ KERNEL_FQ void m04900_m04 (KERN_ATTR_BASIC ()) * main */ - m04900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04900_m08 (KERN_ATTR_BASIC ()) @@ -672,7 +672,7 @@ KERNEL_FQ void m04900_m08 (KERN_ATTR_BASIC ()) * main */ - m04900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04900_m16 (KERN_ATTR_BASIC ()) @@ -725,7 +725,7 @@ KERNEL_FQ void m04900_m16 (KERN_ATTR_BASIC ()) * main */ - m04900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04900_s04 (KERN_ATTR_BASIC ()) @@ -778,7 +778,7 @@ KERNEL_FQ void m04900_s04 (KERN_ATTR_BASIC ()) * main */ - m04900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04900_s08 (KERN_ATTR_BASIC ()) @@ -831,7 +831,7 @@ KERNEL_FQ void m04900_s08 (KERN_ATTR_BASIC ()) * main */ - m04900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m04900_s16 (KERN_ATTR_BASIC ()) @@ -884,5 +884,5 @@ KERNEL_FQ void m04900_s16 (KERN_ATTR_BASIC ()) * main */ - m04900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m04900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m04900_a3-pure.cl b/OpenCL/m04900_a3-pure.cl index c9d731d86..c702a0800 100644 --- a/OpenCL/m04900_a3-pure.cl +++ b/OpenCL/m04900_a3-pure.cl @@ -38,20 +38,20 @@ KERNEL_FQ void m04900_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32 (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -103,10 +103,10 @@ KERNEL_FQ void m04900_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -122,20 +122,20 @@ KERNEL_FQ void m04900_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32 (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m05100_a0-optimized.cl b/OpenCL/m05100_a0-optimized.cl index 4790fef9b..c040ccf62 100644 --- a/OpenCL/m05100_a0-optimized.cl +++ b/OpenCL/m05100_a0-optimized.cl @@ -200,8 +200,8 @@ KERNEL_FQ void m05100_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m05100_a0-pure.cl b/OpenCL/m05100_a0-pure.cl index 41f3ce539..ad911801b 100644 --- a/OpenCL/m05100_a0-pure.cl +++ b/OpenCL/m05100_a0-pure.cl @@ -81,8 +81,8 @@ KERNEL_FQ void m05100_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m05100_a1-optimized.cl b/OpenCL/m05100_a1-optimized.cl index d3f20fdd0..4cf2ff369 100644 --- a/OpenCL/m05100_a1-optimized.cl +++ b/OpenCL/m05100_a1-optimized.cl @@ -253,8 +253,8 @@ KERNEL_FQ void m05100_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m05100_a1-pure.cl b/OpenCL/m05100_a1-pure.cl index 861e93519..9153c8162 100644 --- a/OpenCL/m05100_a1-pure.cl +++ b/OpenCL/m05100_a1-pure.cl @@ -77,8 +77,8 @@ KERNEL_FQ void m05100_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m05100_a3-optimized.cl b/OpenCL/m05100_a3-optimized.cl index 2c897959b..54ee788eb 100644 --- a/OpenCL/m05100_a3-optimized.cl +++ b/OpenCL/m05100_a3-optimized.cl @@ -164,8 +164,8 @@ DECLSPEC void m05100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -340,7 +340,7 @@ KERNEL_FQ void m05100_m04 (KERN_ATTR_BASIC ()) * main */ - m05100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05100_m08 (KERN_ATTR_BASIC ()) @@ -387,7 +387,7 @@ KERNEL_FQ void m05100_m08 (KERN_ATTR_BASIC ()) * main */ - m05100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05100_m16 (KERN_ATTR_BASIC ()) @@ -434,7 +434,7 @@ KERNEL_FQ void m05100_m16 (KERN_ATTR_BASIC ()) * main */ - m05100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05100_s04 (KERN_ATTR_BASIC ()) @@ -481,7 +481,7 @@ KERNEL_FQ void m05100_s04 (KERN_ATTR_BASIC ()) * main */ - m05100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05100_s08 (KERN_ATTR_BASIC ()) @@ -528,7 +528,7 @@ KERNEL_FQ void m05100_s08 (KERN_ATTR_BASIC ()) * main */ - m05100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05100_s16 (KERN_ATTR_BASIC ()) @@ -575,5 +575,5 @@ KERNEL_FQ void m05100_s16 (KERN_ATTR_BASIC ()) * main */ - m05100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m05100_a3-pure.cl b/OpenCL/m05100_a3-pure.cl index 02393f913..deb53ab42 100644 --- a/OpenCL/m05100_a3-pure.cl +++ b/OpenCL/m05100_a3-pure.cl @@ -90,8 +90,8 @@ KERNEL_FQ void m05100_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m05200-pure.cl b/OpenCL/m05200-pure.cl index 194b0fa02..59729f2e2 100644 --- a/OpenCL/m05200-pure.cl +++ b/OpenCL/m05200-pure.cl @@ -39,7 +39,7 @@ KERNEL_FQ void m05200_init (KERN_ATTR_TMPS (pwsafe3_tmp_t)) sha256_update_global_swap (&ctx, pws[gid].i, pws[gid].pw_len); - sha256_update_global_swap (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_final (&ctx); diff --git a/OpenCL/m05300_a0-optimized.cl b/OpenCL/m05300_a0-optimized.cl index 3897688e7..926197bcf 100644 --- a/OpenCL/m05300_a0-optimized.cl +++ b/OpenCL/m05300_a0-optimized.cl @@ -129,14 +129,14 @@ KERNEL_FQ void m05300_m04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -165,8 +165,8 @@ KERNEL_FQ void m05300_m04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * loop @@ -304,14 +304,14 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -340,8 +340,8 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * digest @@ -349,10 +349,10 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m05300_a0-pure.cl b/OpenCL/m05300_a0-pure.cl index 53d48ecaa..738f9ed4d 100644 --- a/OpenCL/m05300_a0-pure.cl +++ b/OpenCL/m05300_a0-pure.cl @@ -57,7 +57,7 @@ KERNEL_FQ void m05300_mxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) md5_hmac_init (&ctx0, tmp.i, tmp.pw_len); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); md5_hmac_final (&ctx0); @@ -87,7 +87,7 @@ KERNEL_FQ void m05300_mxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); md5_hmac_final (&ctx); @@ -117,10 +117,10 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -143,7 +143,7 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) md5_hmac_init (&ctx0, tmp.i, tmp.pw_len); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); md5_hmac_final (&ctx0); @@ -173,7 +173,7 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); md5_hmac_final (&ctx); diff --git a/OpenCL/m05300_a1-optimized.cl b/OpenCL/m05300_a1-optimized.cl index 5f75de929..8b301f010 100644 --- a/OpenCL/m05300_a1-optimized.cl +++ b/OpenCL/m05300_a1-optimized.cl @@ -127,14 +127,14 @@ KERNEL_FQ void m05300_m04 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -163,8 +163,8 @@ KERNEL_FQ void m05300_m04 (KERN_ATTR_ESALT (ikepsk_t)) * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * loop @@ -362,14 +362,14 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -398,8 +398,8 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_ESALT (ikepsk_t)) * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * digest @@ -407,10 +407,10 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m05300_a1-pure.cl b/OpenCL/m05300_a1-pure.cl index 39b917d91..2865649a5 100644 --- a/OpenCL/m05300_a1-pure.cl +++ b/OpenCL/m05300_a1-pure.cl @@ -80,7 +80,7 @@ KERNEL_FQ void m05300_mxx (KERN_ATTR_ESALT (ikepsk_t)) md5_hmac_init (&ctx0, c, pw_len + comb_len); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); md5_hmac_final (&ctx0); @@ -110,7 +110,7 @@ KERNEL_FQ void m05300_mxx (KERN_ATTR_ESALT (ikepsk_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); md5_hmac_final (&ctx); @@ -140,10 +140,10 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -191,7 +191,7 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_ESALT (ikepsk_t)) md5_hmac_init (&ctx0, c, pw_len + comb_len); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); md5_hmac_final (&ctx0); @@ -221,7 +221,7 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_ESALT (ikepsk_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); md5_hmac_final (&ctx); diff --git a/OpenCL/m05300_a3-optimized.cl b/OpenCL/m05300_a3-optimized.cl index 5735c7e80..fe0ea87ce 100644 --- a/OpenCL/m05300_a3-optimized.cl +++ b/OpenCL/m05300_a3-optimized.cl @@ -122,8 +122,8 @@ DECLSPEC void m05300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * loop @@ -269,8 +269,8 @@ DECLSPEC void m05300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * digest @@ -278,10 +278,10 @@ DECLSPEC void m05300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -433,14 +433,14 @@ KERNEL_FQ void m05300_m04 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -485,7 +485,7 @@ KERNEL_FQ void m05300_m04 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_m08 (KERN_ATTR_ESALT (ikepsk_t)) @@ -506,14 +506,14 @@ KERNEL_FQ void m05300_m08 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -558,7 +558,7 @@ KERNEL_FQ void m05300_m08 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_m16 (KERN_ATTR_ESALT (ikepsk_t)) @@ -579,14 +579,14 @@ KERNEL_FQ void m05300_m16 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -631,7 +631,7 @@ KERNEL_FQ void m05300_m16 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_s04 (KERN_ATTR_ESALT (ikepsk_t)) @@ -652,14 +652,14 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -704,7 +704,7 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_s08 (KERN_ATTR_ESALT (ikepsk_t)) @@ -725,14 +725,14 @@ KERNEL_FQ void m05300_s08 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -777,7 +777,7 @@ KERNEL_FQ void m05300_s08 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_s16 (KERN_ATTR_ESALT (ikepsk_t)) @@ -798,14 +798,14 @@ KERNEL_FQ void m05300_s16 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = esalt_bufs[digests_offset].nr_buf[i]; + s_nr_buf[i] = esalt_bufs[DIGESTS_OFFSET].nr_buf[i]; } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = esalt_bufs[digests_offset].msg_buf[i]; + s_msg_buf[i] = esalt_bufs[DIGESTS_OFFSET].msg_buf[i]; } SYNC_THREADS (); @@ -850,5 +850,5 @@ KERNEL_FQ void m05300_s16 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } diff --git a/OpenCL/m05300_a3-pure.cl b/OpenCL/m05300_a3-pure.cl index 76d6c0bc9..d32b8fce7 100644 --- a/OpenCL/m05300_a3-pure.cl +++ b/OpenCL/m05300_a3-pure.cl @@ -66,7 +66,7 @@ KERNEL_FQ void m05300_mxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) md5_hmac_init (&ctx0, w, pw_len); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); md5_hmac_final (&ctx0); @@ -96,7 +96,7 @@ KERNEL_FQ void m05300_mxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); md5_hmac_final (&ctx); @@ -126,10 +126,10 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -163,7 +163,7 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) md5_hmac_init (&ctx0, w, pw_len); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); md5_hmac_final (&ctx0); @@ -193,7 +193,7 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); md5_hmac_final (&ctx); diff --git a/OpenCL/m05400_a0-optimized.cl b/OpenCL/m05400_a0-optimized.cl index fe656c1cb..f75e22fd6 100644 --- a/OpenCL/m05400_a0-optimized.cl +++ b/OpenCL/m05400_a0-optimized.cl @@ -133,14 +133,14 @@ KERNEL_FQ void m05400_m04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -169,8 +169,8 @@ KERNEL_FQ void m05400_m04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * loop @@ -317,14 +317,14 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -353,8 +353,8 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * digest @@ -362,10 +362,10 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_RULES_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m05400_a0-pure.cl b/OpenCL/m05400_a0-pure.cl index f909c3846..be69544c2 100644 --- a/OpenCL/m05400_a0-pure.cl +++ b/OpenCL/m05400_a0-pure.cl @@ -57,7 +57,7 @@ KERNEL_FQ void m05400_mxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) sha1_hmac_init_swap (&ctx0, tmp.i, tmp.pw_len); - sha1_hmac_update_global_swap (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + sha1_hmac_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); sha1_hmac_final (&ctx0); @@ -87,7 +87,7 @@ KERNEL_FQ void m05400_mxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) sha1_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha1_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + sha1_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); sha1_hmac_final (&ctx); @@ -117,10 +117,10 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -143,7 +143,7 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) sha1_hmac_init_swap (&ctx0, tmp.i, tmp.pw_len); - sha1_hmac_update_global_swap (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + sha1_hmac_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); sha1_hmac_final (&ctx0); @@ -173,7 +173,7 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_RULES_ESALT (ikepsk_t)) sha1_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha1_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + sha1_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); sha1_hmac_final (&ctx); diff --git a/OpenCL/m05400_a1-optimized.cl b/OpenCL/m05400_a1-optimized.cl index b8b95ce91..41134867f 100644 --- a/OpenCL/m05400_a1-optimized.cl +++ b/OpenCL/m05400_a1-optimized.cl @@ -131,14 +131,14 @@ KERNEL_FQ void m05400_m04 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -167,8 +167,8 @@ KERNEL_FQ void m05400_m04 (KERN_ATTR_ESALT (ikepsk_t)) * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * loop @@ -383,14 +383,14 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -419,8 +419,8 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_ESALT (ikepsk_t)) * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * digest @@ -428,10 +428,10 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m05400_a1-pure.cl b/OpenCL/m05400_a1-pure.cl index f2d054bc6..5dbc18d5d 100644 --- a/OpenCL/m05400_a1-pure.cl +++ b/OpenCL/m05400_a1-pure.cl @@ -80,7 +80,7 @@ KERNEL_FQ void m05400_mxx (KERN_ATTR_ESALT (ikepsk_t)) sha1_hmac_init (&ctx0, c, pw_len + comb_len); - sha1_hmac_update_global_swap (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + sha1_hmac_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); sha1_hmac_final (&ctx0); @@ -110,7 +110,7 @@ KERNEL_FQ void m05400_mxx (KERN_ATTR_ESALT (ikepsk_t)) sha1_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha1_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + sha1_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); sha1_hmac_final (&ctx); @@ -140,10 +140,10 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -191,7 +191,7 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_ESALT (ikepsk_t)) sha1_hmac_init (&ctx0, c, pw_len + comb_len); - sha1_hmac_update_global_swap (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + sha1_hmac_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); sha1_hmac_final (&ctx0); @@ -221,7 +221,7 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_ESALT (ikepsk_t)) sha1_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha1_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + sha1_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); sha1_hmac_final (&ctx); diff --git a/OpenCL/m05400_a3-optimized.cl b/OpenCL/m05400_a3-optimized.cl index 7919d7a9a..196ab15b1 100644 --- a/OpenCL/m05400_a3-optimized.cl +++ b/OpenCL/m05400_a3-optimized.cl @@ -126,8 +126,8 @@ DECLSPEC void m05400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * loop @@ -273,8 +273,8 @@ DECLSPEC void m05400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 nr_len = esalt_bufs[digests_offset].nr_len; - const u32 msg_len = esalt_bufs[digests_offset].msg_len[5]; + const u32 nr_len = esalt_bufs[DIGESTS_OFFSET].nr_len; + const u32 msg_len = esalt_bufs[DIGESTS_OFFSET].msg_len[5]; /** * digest @@ -282,10 +282,10 @@ DECLSPEC void m05400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -437,14 +437,14 @@ KERNEL_FQ void m05400_m04 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -489,7 +489,7 @@ KERNEL_FQ void m05400_m04 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_m08 (KERN_ATTR_ESALT (ikepsk_t)) @@ -510,14 +510,14 @@ KERNEL_FQ void m05400_m08 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -562,7 +562,7 @@ KERNEL_FQ void m05400_m08 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_m16 (KERN_ATTR_ESALT (ikepsk_t)) @@ -583,14 +583,14 @@ KERNEL_FQ void m05400_m16 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -635,7 +635,7 @@ KERNEL_FQ void m05400_m16 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_s04 (KERN_ATTR_ESALT (ikepsk_t)) @@ -656,14 +656,14 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -708,7 +708,7 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_s08 (KERN_ATTR_ESALT (ikepsk_t)) @@ -729,14 +729,14 @@ KERNEL_FQ void m05400_s08 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -781,7 +781,7 @@ KERNEL_FQ void m05400_s08 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_s16 (KERN_ATTR_ESALT (ikepsk_t)) @@ -802,14 +802,14 @@ KERNEL_FQ void m05400_s16 (KERN_ATTR_ESALT (ikepsk_t)) for (u32 i = lid; i < 16; i += lsz) { - s_nr_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].nr_buf[i]); + s_nr_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].nr_buf[i]); } LOCAL_VK u32 s_msg_buf[128]; for (u32 i = lid; i < 128; i += lsz) { - s_msg_buf[i] = hc_swap32_S (esalt_bufs[digests_offset].msg_buf[i]); + s_msg_buf[i] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].msg_buf[i]); } SYNC_THREADS (); @@ -854,5 +854,5 @@ KERNEL_FQ void m05400_s16 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_msg_buf, s_nr_buf); + m05400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_msg_buf, s_nr_buf); } diff --git a/OpenCL/m05400_a3-pure.cl b/OpenCL/m05400_a3-pure.cl index 8e4c63305..f00dc0131 100644 --- a/OpenCL/m05400_a3-pure.cl +++ b/OpenCL/m05400_a3-pure.cl @@ -66,7 +66,7 @@ KERNEL_FQ void m05400_mxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) sha1_hmac_init (&ctx0, w, pw_len); - sha1_hmac_update_global_swap (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + sha1_hmac_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); sha1_hmac_final (&ctx0); @@ -96,7 +96,7 @@ KERNEL_FQ void m05400_mxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) sha1_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha1_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + sha1_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); sha1_hmac_final (&ctx); @@ -126,10 +126,10 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -163,7 +163,7 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) sha1_hmac_init (&ctx0, w, pw_len); - sha1_hmac_update_global_swap (&ctx0, esalt_bufs[digests_offset].nr_buf, esalt_bufs[digests_offset].nr_len); + sha1_hmac_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].nr_buf, esalt_bufs[DIGESTS_OFFSET].nr_len); sha1_hmac_final (&ctx0); @@ -193,7 +193,7 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) sha1_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha1_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].msg_buf, esalt_bufs[digests_offset].msg_len[5]); + sha1_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].msg_buf, esalt_bufs[DIGESTS_OFFSET].msg_len[5]); sha1_hmac_final (&ctx); diff --git a/OpenCL/m05500_a0-optimized.cl b/OpenCL/m05500_a0-optimized.cl index 03dfe4f7a..544accf22 100644 --- a/OpenCL/m05500_a0-optimized.cl +++ b/OpenCL/m05500_a0-optimized.cl @@ -575,9 +575,9 @@ KERNEL_FQ void m05500_m04 (KERN_ATTR_RULES ()) * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; u32 data[2]; @@ -797,9 +797,9 @@ KERNEL_FQ void m05500_s04 (KERN_ATTR_RULES ()) * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * digest @@ -807,10 +807,10 @@ KERNEL_FQ void m05500_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m05500_a0-pure.cl b/OpenCL/m05500_a0-pure.cl index ac9c30f35..a42e6a468 100644 --- a/OpenCL/m05500_a0-pure.cl +++ b/OpenCL/m05500_a0-pure.cl @@ -557,9 +557,9 @@ KERNEL_FQ void m05500_mxx (KERN_ATTR_RULES ()) * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * base @@ -692,19 +692,19 @@ KERNEL_FQ void m05500_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * base diff --git a/OpenCL/m05500_a1-optimized.cl b/OpenCL/m05500_a1-optimized.cl index 39a7ed212..0a720cb9e 100644 --- a/OpenCL/m05500_a1-optimized.cl +++ b/OpenCL/m05500_a1-optimized.cl @@ -573,9 +573,9 @@ KERNEL_FQ void m05500_m04 (KERN_ATTR_BASIC ()) * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * loop @@ -848,9 +848,9 @@ KERNEL_FQ void m05500_s04 (KERN_ATTR_BASIC ()) * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * digest @@ -858,10 +858,10 @@ KERNEL_FQ void m05500_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m05500_a1-pure.cl b/OpenCL/m05500_a1-pure.cl index c53e12357..4d652308e 100644 --- a/OpenCL/m05500_a1-pure.cl +++ b/OpenCL/m05500_a1-pure.cl @@ -555,9 +555,9 @@ KERNEL_FQ void m05500_mxx (KERN_ATTR_BASIC ()) * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * base @@ -688,19 +688,19 @@ KERNEL_FQ void m05500_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * base diff --git a/OpenCL/m05500_a3-optimized.cl b/OpenCL/m05500_a3-optimized.cl index a52b1cc7c..52c7dd0eb 100644 --- a/OpenCL/m05500_a3-optimized.cl +++ b/OpenCL/m05500_a3-optimized.cl @@ -513,9 +513,9 @@ DECLSPEC void m05500m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * loop @@ -670,9 +670,9 @@ DECLSPEC void m05500s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * digest @@ -680,10 +680,10 @@ DECLSPEC void m05500s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -913,7 +913,7 @@ KERNEL_FQ void m05500_m04 (KERN_ATTR_VECTOR ()) * main */ - m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05500_m08 (KERN_ATTR_VECTOR ()) @@ -996,7 +996,7 @@ KERNEL_FQ void m05500_m08 (KERN_ATTR_VECTOR ()) * main */ - m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05500_m16 (KERN_ATTR_VECTOR ()) @@ -1079,7 +1079,7 @@ KERNEL_FQ void m05500_m16 (KERN_ATTR_VECTOR ()) * main */ - m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05500_s04 (KERN_ATTR_VECTOR ()) @@ -1162,7 +1162,7 @@ KERNEL_FQ void m05500_s04 (KERN_ATTR_VECTOR ()) * main */ - m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05500_s08 (KERN_ATTR_VECTOR ()) @@ -1245,7 +1245,7 @@ KERNEL_FQ void m05500_s08 (KERN_ATTR_VECTOR ()) * main */ - m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m05500_s16 (KERN_ATTR_VECTOR ()) @@ -1328,5 +1328,5 @@ KERNEL_FQ void m05500_s16 (KERN_ATTR_VECTOR ()) * main */ - m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m05500_a3-pure.cl b/OpenCL/m05500_a3-pure.cl index e691330cd..efa2405ae 100644 --- a/OpenCL/m05500_a3-pure.cl +++ b/OpenCL/m05500_a3-pure.cl @@ -555,9 +555,9 @@ KERNEL_FQ void m05500_mxx (KERN_ATTR_VECTOR ()) * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * base @@ -701,19 +701,19 @@ KERNEL_FQ void m05500_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * salt */ - const u32 s0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 s1 = salt_bufs[salt_pos].salt_buf[1]; - const u32 s2 = salt_bufs[salt_pos].salt_buf[2]; + const u32 s0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 s1 = salt_bufs[SALT_POS].salt_buf[1]; + const u32 s2 = salt_bufs[SALT_POS].salt_buf[2]; /** * base diff --git a/OpenCL/m05600_a0-optimized.cl b/OpenCL/m05600_a0-optimized.cl index d0eef25cd..f854f1b57 100644 --- a/OpenCL/m05600_a0-optimized.cl +++ b/OpenCL/m05600_a0-optimized.cl @@ -132,25 +132,25 @@ KERNEL_FQ void m05600_m04 (KERN_ATTR_RULES_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); if (gid >= gid_max) return; - const u32 userdomain_len = esalt_bufs[digests_offset].user_len - + esalt_bufs[digests_offset].domain_len; + const u32 userdomain_len = esalt_bufs[DIGESTS_OFFSET].user_len + + esalt_bufs[DIGESTS_OFFSET].domain_len; - const u32 chall_len = esalt_bufs[digests_offset].srvchall_len - + esalt_bufs[digests_offset].clichall_len; + const u32 chall_len = esalt_bufs[DIGESTS_OFFSET].srvchall_len + + esalt_bufs[DIGESTS_OFFSET].clichall_len; /** * base @@ -371,25 +371,25 @@ KERNEL_FQ void m05600_s04 (KERN_ATTR_RULES_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); if (gid >= gid_max) return; - const u32 userdomain_len = esalt_bufs[digests_offset].user_len - + esalt_bufs[digests_offset].domain_len; + const u32 userdomain_len = esalt_bufs[DIGESTS_OFFSET].user_len + + esalt_bufs[DIGESTS_OFFSET].domain_len; - const u32 chall_len = esalt_bufs[digests_offset].srvchall_len - + esalt_bufs[digests_offset].clichall_len; + const u32 chall_len = esalt_bufs[DIGESTS_OFFSET].srvchall_len + + esalt_bufs[DIGESTS_OFFSET].clichall_len; /** * base @@ -415,10 +415,10 @@ KERNEL_FQ void m05600_s04 (KERN_ATTR_RULES_ESALT (netntlm_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m05600_a0-pure.cl b/OpenCL/m05600_a0-pure.cl index 25d56067f..00c1101ef 100644 --- a/OpenCL/m05600_a0-pure.cl +++ b/OpenCL/m05600_a0-pure.cl @@ -90,7 +90,7 @@ KERNEL_FQ void m05600_mxx (KERN_ATTR_RULES_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx0, w0, w1, w2, w3); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].userdomain_buf, esalt_bufs[digests_offset].user_len + esalt_bufs[digests_offset].domain_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].userdomain_buf, esalt_bufs[DIGESTS_OFFSET].user_len + esalt_bufs[DIGESTS_OFFSET].domain_len); md5_hmac_final (&ctx0); @@ -115,7 +115,7 @@ KERNEL_FQ void m05600_mxx (KERN_ATTR_RULES_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].chall_buf, esalt_bufs[digests_offset].srvchall_len + esalt_bufs[digests_offset].clichall_len); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].chall_buf, esalt_bufs[DIGESTS_OFFSET].srvchall_len + esalt_bufs[DIGESTS_OFFSET].clichall_len); md5_hmac_final (&ctx); @@ -145,10 +145,10 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_RULES_ESALT (netntlm_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -201,7 +201,7 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_RULES_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx0, w0, w1, w2, w3); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].userdomain_buf, esalt_bufs[digests_offset].user_len + esalt_bufs[digests_offset].domain_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].userdomain_buf, esalt_bufs[DIGESTS_OFFSET].user_len + esalt_bufs[DIGESTS_OFFSET].domain_len); md5_hmac_final (&ctx0); @@ -226,7 +226,7 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_RULES_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].chall_buf, esalt_bufs[digests_offset].srvchall_len + esalt_bufs[digests_offset].clichall_len); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].chall_buf, esalt_bufs[DIGESTS_OFFSET].srvchall_len + esalt_bufs[DIGESTS_OFFSET].clichall_len); md5_hmac_final (&ctx); diff --git a/OpenCL/m05600_a1-optimized.cl b/OpenCL/m05600_a1-optimized.cl index dec67ea96..ded594bcd 100644 --- a/OpenCL/m05600_a1-optimized.cl +++ b/OpenCL/m05600_a1-optimized.cl @@ -130,25 +130,25 @@ KERNEL_FQ void m05600_m04 (KERN_ATTR_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); if (gid >= gid_max) return; - const u32 userdomain_len = esalt_bufs[digests_offset].user_len - + esalt_bufs[digests_offset].domain_len; + const u32 userdomain_len = esalt_bufs[DIGESTS_OFFSET].user_len + + esalt_bufs[DIGESTS_OFFSET].domain_len; - const u32 chall_len = esalt_bufs[digests_offset].srvchall_len - + esalt_bufs[digests_offset].clichall_len; + const u32 chall_len = esalt_bufs[DIGESTS_OFFSET].srvchall_len + + esalt_bufs[DIGESTS_OFFSET].clichall_len; /** * base @@ -427,25 +427,25 @@ KERNEL_FQ void m05600_s04 (KERN_ATTR_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); if (gid >= gid_max) return; - const u32 userdomain_len = esalt_bufs[digests_offset].user_len - + esalt_bufs[digests_offset].domain_len; + const u32 userdomain_len = esalt_bufs[DIGESTS_OFFSET].user_len + + esalt_bufs[DIGESTS_OFFSET].domain_len; - const u32 chall_len = esalt_bufs[digests_offset].srvchall_len - + esalt_bufs[digests_offset].clichall_len; + const u32 chall_len = esalt_bufs[DIGESTS_OFFSET].srvchall_len + + esalt_bufs[DIGESTS_OFFSET].clichall_len; /** * base @@ -471,10 +471,10 @@ KERNEL_FQ void m05600_s04 (KERN_ATTR_ESALT (netntlm_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m05600_a1-pure.cl b/OpenCL/m05600_a1-pure.cl index 91ea91a53..cc30a2715 100644 --- a/OpenCL/m05600_a1-pure.cl +++ b/OpenCL/m05600_a1-pure.cl @@ -86,7 +86,7 @@ KERNEL_FQ void m05600_mxx (KERN_ATTR_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx0, w0, w1, w2, w3); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].userdomain_buf, esalt_bufs[digests_offset].user_len + esalt_bufs[digests_offset].domain_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].userdomain_buf, esalt_bufs[DIGESTS_OFFSET].user_len + esalt_bufs[DIGESTS_OFFSET].domain_len); md5_hmac_final (&ctx0); @@ -111,7 +111,7 @@ KERNEL_FQ void m05600_mxx (KERN_ATTR_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].chall_buf, esalt_bufs[digests_offset].srvchall_len + esalt_bufs[digests_offset].clichall_len); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].chall_buf, esalt_bufs[DIGESTS_OFFSET].srvchall_len + esalt_bufs[DIGESTS_OFFSET].clichall_len); md5_hmac_final (&ctx); @@ -141,10 +141,10 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_ESALT (netntlm_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -195,7 +195,7 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx0, w0, w1, w2, w3); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].userdomain_buf, esalt_bufs[digests_offset].user_len + esalt_bufs[digests_offset].domain_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].userdomain_buf, esalt_bufs[DIGESTS_OFFSET].user_len + esalt_bufs[DIGESTS_OFFSET].domain_len); md5_hmac_final (&ctx0); @@ -220,7 +220,7 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].chall_buf, esalt_bufs[digests_offset].srvchall_len + esalt_bufs[digests_offset].clichall_len); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].chall_buf, esalt_bufs[DIGESTS_OFFSET].srvchall_len + esalt_bufs[DIGESTS_OFFSET].clichall_len); md5_hmac_final (&ctx); diff --git a/OpenCL/m05600_a3-optimized.cl b/OpenCL/m05600_a3-optimized.cl index 1706db730..541be42ba 100644 --- a/OpenCL/m05600_a3-optimized.cl +++ b/OpenCL/m05600_a3-optimized.cl @@ -125,11 +125,11 @@ DECLSPEC void m05600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * prepare */ - const u32 userdomain_len = esalt_bufs[digests_offset].user_len - + esalt_bufs[digests_offset].domain_len; + const u32 userdomain_len = esalt_bufs[DIGESTS_OFFSET].user_len + + esalt_bufs[DIGESTS_OFFSET].domain_len; - const u32 chall_len = esalt_bufs[digests_offset].srvchall_len - + esalt_bufs[digests_offset].clichall_len; + const u32 chall_len = esalt_bufs[DIGESTS_OFFSET].srvchall_len + + esalt_bufs[DIGESTS_OFFSET].clichall_len; /** * loop @@ -331,11 +331,11 @@ DECLSPEC void m05600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * prepare */ - const u32 userdomain_len = esalt_bufs[digests_offset].user_len - + esalt_bufs[digests_offset].domain_len; + const u32 userdomain_len = esalt_bufs[DIGESTS_OFFSET].user_len + + esalt_bufs[DIGESTS_OFFSET].domain_len; - const u32 chall_len = esalt_bufs[digests_offset].srvchall_len - + esalt_bufs[digests_offset].clichall_len; + const u32 chall_len = esalt_bufs[DIGESTS_OFFSET].srvchall_len + + esalt_bufs[DIGESTS_OFFSET].clichall_len; /** * digest @@ -343,10 +343,10 @@ DECLSPEC void m05600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -554,14 +554,14 @@ KERNEL_FQ void m05600_m04 (KERN_ATTR_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); @@ -606,7 +606,7 @@ KERNEL_FQ void m05600_m04 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_userdomain_buf, s_chall_buf); + m05600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_m08 (KERN_ATTR_ESALT (netntlm_t)) @@ -627,14 +627,14 @@ KERNEL_FQ void m05600_m08 (KERN_ATTR_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); @@ -679,7 +679,7 @@ KERNEL_FQ void m05600_m08 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_userdomain_buf, s_chall_buf); + m05600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_m16 (KERN_ATTR_ESALT (netntlm_t)) @@ -700,14 +700,14 @@ KERNEL_FQ void m05600_m16 (KERN_ATTR_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); @@ -752,7 +752,7 @@ KERNEL_FQ void m05600_m16 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_userdomain_buf, s_chall_buf); + m05600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_s04 (KERN_ATTR_ESALT (netntlm_t)) @@ -773,14 +773,14 @@ KERNEL_FQ void m05600_s04 (KERN_ATTR_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); @@ -825,7 +825,7 @@ KERNEL_FQ void m05600_s04 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_userdomain_buf, s_chall_buf); + m05600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_s08 (KERN_ATTR_ESALT (netntlm_t)) @@ -846,14 +846,14 @@ KERNEL_FQ void m05600_s08 (KERN_ATTR_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); @@ -898,7 +898,7 @@ KERNEL_FQ void m05600_s08 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_userdomain_buf, s_chall_buf); + m05600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_s16 (KERN_ATTR_ESALT (netntlm_t)) @@ -919,14 +919,14 @@ KERNEL_FQ void m05600_s16 (KERN_ATTR_ESALT (netntlm_t)) for (u32 i = lid; i < 64; i += lsz) { - s_userdomain_buf[i] = esalt_bufs[digests_offset].userdomain_buf[i]; + s_userdomain_buf[i] = esalt_bufs[DIGESTS_OFFSET].userdomain_buf[i]; } LOCAL_VK u32 s_chall_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_chall_buf[i] = esalt_bufs[digests_offset].chall_buf[i]; + s_chall_buf[i] = esalt_bufs[DIGESTS_OFFSET].chall_buf[i]; } SYNC_THREADS (); @@ -971,5 +971,5 @@ KERNEL_FQ void m05600_s16 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_userdomain_buf, s_chall_buf); + m05600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_userdomain_buf, s_chall_buf); } diff --git a/OpenCL/m05600_a3-pure.cl b/OpenCL/m05600_a3-pure.cl index 7f102a56f..324e131e6 100644 --- a/OpenCL/m05600_a3-pure.cl +++ b/OpenCL/m05600_a3-pure.cl @@ -99,7 +99,7 @@ KERNEL_FQ void m05600_mxx (KERN_ATTR_VECTOR_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx0, w0, w1, w2, w3); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].userdomain_buf, esalt_bufs[digests_offset].user_len + esalt_bufs[digests_offset].domain_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].userdomain_buf, esalt_bufs[DIGESTS_OFFSET].user_len + esalt_bufs[DIGESTS_OFFSET].domain_len); md5_hmac_final (&ctx0); @@ -124,7 +124,7 @@ KERNEL_FQ void m05600_mxx (KERN_ATTR_VECTOR_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].chall_buf, esalt_bufs[digests_offset].srvchall_len + esalt_bufs[digests_offset].clichall_len); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].chall_buf, esalt_bufs[DIGESTS_OFFSET].srvchall_len + esalt_bufs[DIGESTS_OFFSET].clichall_len); md5_hmac_final (&ctx); @@ -154,10 +154,10 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_VECTOR_ESALT (netntlm_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -221,7 +221,7 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_VECTOR_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx0, w0, w1, w2, w3); - md5_hmac_update_global (&ctx0, esalt_bufs[digests_offset].userdomain_buf, esalt_bufs[digests_offset].user_len + esalt_bufs[digests_offset].domain_len); + md5_hmac_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].userdomain_buf, esalt_bufs[DIGESTS_OFFSET].user_len + esalt_bufs[DIGESTS_OFFSET].domain_len); md5_hmac_final (&ctx0); @@ -246,7 +246,7 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_VECTOR_ESALT (netntlm_t)) md5_hmac_init_64 (&ctx, w0, w1, w2, w3); - md5_hmac_update_global (&ctx, esalt_bufs[digests_offset].chall_buf, esalt_bufs[digests_offset].srvchall_len + esalt_bufs[digests_offset].clichall_len); + md5_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].chall_buf, esalt_bufs[DIGESTS_OFFSET].srvchall_len + esalt_bufs[DIGESTS_OFFSET].clichall_len); md5_hmac_final (&ctx); diff --git a/OpenCL/m05800-optimized.cl b/OpenCL/m05800-optimized.cl index 4de73c5ab..b247b05e0 100644 --- a/OpenCL/m05800-optimized.cl +++ b/OpenCL/m05800-optimized.cl @@ -2220,15 +2220,15 @@ KERNEL_FQ void m05800_init (KERN_ATTR_TMPS (androidpin_tmp_t)) * salt */ - u32 salt_len = salt_bufs[salt_pos].salt_len; + u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; /** * init @@ -2338,15 +2338,15 @@ KERNEL_FQ void m05800_loop (KERN_ATTR_TMPS (androidpin_tmp_t)) * salt */ - u32 salt_len = salt_bufs[salt_pos].salt_len; + u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; /** * loop diff --git a/OpenCL/m05800-pure.cl b/OpenCL/m05800-pure.cl index 6e6f0d14c..3ba49b52e 100644 --- a/OpenCL/m05800-pure.cl +++ b/OpenCL/m05800-pure.cl @@ -2095,7 +2095,7 @@ KERNEL_FQ void m05800_init (KERN_ATTR_TMPS (androidpin_tmp_t)) sha1_update_global_swap (&ctx, pws[gid].i, pws[gid].pw_len); - sha1_update_global_swap (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_final (&ctx); @@ -2146,13 +2146,13 @@ KERNEL_FQ void m05800_loop (KERN_ATTR_TMPS (androidpin_tmp_t)) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } u32 digest[5]; diff --git a/OpenCL/m06000_a0-optimized.cl b/OpenCL/m06000_a0-optimized.cl index 87ef31990..fac50293b 100644 --- a/OpenCL/m06000_a0-optimized.cl +++ b/OpenCL/m06000_a0-optimized.cl @@ -147,10 +147,10 @@ KERNEL_FQ void m06000_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06000_a0-pure.cl b/OpenCL/m06000_a0-pure.cl index d25b558ae..e4513fd7b 100644 --- a/OpenCL/m06000_a0-pure.cl +++ b/OpenCL/m06000_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m06000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06000_a1-optimized.cl b/OpenCL/m06000_a1-optimized.cl index 05934117d..374e54bee 100644 --- a/OpenCL/m06000_a1-optimized.cl +++ b/OpenCL/m06000_a1-optimized.cl @@ -203,10 +203,10 @@ KERNEL_FQ void m06000_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06000_a1-pure.cl b/OpenCL/m06000_a1-pure.cl index 1eda2781d..2e095778a 100644 --- a/OpenCL/m06000_a1-pure.cl +++ b/OpenCL/m06000_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m06000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06000_a3-optimized.cl b/OpenCL/m06000_a3-optimized.cl index fab740436..0b88557b3 100644 --- a/OpenCL/m06000_a3-optimized.cl +++ b/OpenCL/m06000_a3-optimized.cl @@ -92,10 +92,10 @@ DECLSPEC void m06000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -191,7 +191,7 @@ KERNEL_FQ void m06000_m04 (KERN_ATTR_BASIC ()) * main */ - m06000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m06000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m06000_m08 (KERN_ATTR_BASIC ()) @@ -238,7 +238,7 @@ KERNEL_FQ void m06000_m08 (KERN_ATTR_BASIC ()) * main */ - m06000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m06000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m06000_m16 (KERN_ATTR_BASIC ()) @@ -285,7 +285,7 @@ KERNEL_FQ void m06000_m16 (KERN_ATTR_BASIC ()) * main */ - m06000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m06000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m06000_s04 (KERN_ATTR_BASIC ()) @@ -332,7 +332,7 @@ KERNEL_FQ void m06000_s04 (KERN_ATTR_BASIC ()) * main */ - m06000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m06000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m06000_s08 (KERN_ATTR_BASIC ()) @@ -379,7 +379,7 @@ KERNEL_FQ void m06000_s08 (KERN_ATTR_BASIC ()) * main */ - m06000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m06000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m06000_s16 (KERN_ATTR_BASIC ()) @@ -426,5 +426,5 @@ KERNEL_FQ void m06000_s16 (KERN_ATTR_BASIC ()) * main */ - m06000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m06000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m06000_a3-pure.cl b/OpenCL/m06000_a3-pure.cl index 3fbbaca59..292f8cb89 100644 --- a/OpenCL/m06000_a3-pure.cl +++ b/OpenCL/m06000_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m06000_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06100_a0-optimized.cl b/OpenCL/m06100_a0-optimized.cl index 51d05c983..4d18ffa9c 100644 --- a/OpenCL/m06100_a0-optimized.cl +++ b/OpenCL/m06100_a0-optimized.cl @@ -242,10 +242,10 @@ KERNEL_FQ void m06100_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06100_a0-pure.cl b/OpenCL/m06100_a0-pure.cl index a6e8cf2e8..db9b6b775 100644 --- a/OpenCL/m06100_a0-pure.cl +++ b/OpenCL/m06100_a0-pure.cl @@ -163,10 +163,10 @@ KERNEL_FQ void m06100_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06100_a1-optimized.cl b/OpenCL/m06100_a1-optimized.cl index 55ec3dcaf..0f09db30a 100644 --- a/OpenCL/m06100_a1-optimized.cl +++ b/OpenCL/m06100_a1-optimized.cl @@ -298,10 +298,10 @@ KERNEL_FQ void m06100_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06100_a1-pure.cl b/OpenCL/m06100_a1-pure.cl index 4863fc2e5..51e895a36 100644 --- a/OpenCL/m06100_a1-pure.cl +++ b/OpenCL/m06100_a1-pure.cl @@ -159,10 +159,10 @@ KERNEL_FQ void m06100_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06100_a3-optimized.cl b/OpenCL/m06100_a3-optimized.cl index f1d4204f5..64f1db547 100644 --- a/OpenCL/m06100_a3-optimized.cl +++ b/OpenCL/m06100_a3-optimized.cl @@ -103,10 +103,10 @@ DECLSPEC void m06100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -261,7 +261,7 @@ KERNEL_FQ void m06100_m04 (KERN_ATTR_BASIC ()) * main */ - m06100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); + m06100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } KERNEL_FQ void m06100_m08 (KERN_ATTR_BASIC ()) @@ -356,7 +356,7 @@ KERNEL_FQ void m06100_m08 (KERN_ATTR_BASIC ()) * main */ - m06100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); + m06100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } KERNEL_FQ void m06100_m16 (KERN_ATTR_BASIC ()) @@ -455,7 +455,7 @@ KERNEL_FQ void m06100_s04 (KERN_ATTR_BASIC ()) * main */ - m06100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); + m06100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } KERNEL_FQ void m06100_s08 (KERN_ATTR_BASIC ()) @@ -550,7 +550,7 @@ KERNEL_FQ void m06100_s08 (KERN_ATTR_BASIC ()) * main */ - m06100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); + m06100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } KERNEL_FQ void m06100_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m06100_a3-pure.cl b/OpenCL/m06100_a3-pure.cl index 14851dc2b..75cda9773 100644 --- a/OpenCL/m06100_a3-pure.cl +++ b/OpenCL/m06100_a3-pure.cl @@ -172,10 +172,10 @@ KERNEL_FQ void m06100_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06211-pure.cl b/OpenCL/m06211-pure.cl index 62e9dd236..5b69e9299 100644 --- a/OpenCL/m06211-pure.cl +++ b/OpenCL/m06211-pure.cl @@ -91,13 +91,13 @@ KERNEL_FQ void m06211_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -134,22 +134,22 @@ KERNEL_FQ void m06211_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); ripemd160_hmac_ctx_t ripemd160_hmac_ctx; @@ -167,7 +167,7 @@ KERNEL_FQ void m06211_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) tmps[gid].opad[3] = ripemd160_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = ripemd160_hmac_ctx.opad.h[4]; - ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 16; i += 5, j += 1) { @@ -378,7 +378,7 @@ KERNEL_FQ void m06211_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -386,7 +386,7 @@ KERNEL_FQ void m06211_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -394,7 +394,7 @@ KERNEL_FQ void m06211_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06212-pure.cl b/OpenCL/m06212-pure.cl index f8b2665b7..91472f768 100644 --- a/OpenCL/m06212-pure.cl +++ b/OpenCL/m06212-pure.cl @@ -91,13 +91,13 @@ KERNEL_FQ void m06212_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -134,22 +134,22 @@ KERNEL_FQ void m06212_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); ripemd160_hmac_ctx_t ripemd160_hmac_ctx; @@ -167,7 +167,7 @@ KERNEL_FQ void m06212_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) tmps[gid].opad[3] = ripemd160_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = ripemd160_hmac_ctx.opad.h[4]; - ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 32; i += 5, j += 1) { @@ -378,7 +378,7 @@ KERNEL_FQ void m06212_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -386,7 +386,7 @@ KERNEL_FQ void m06212_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -394,7 +394,7 @@ KERNEL_FQ void m06212_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -424,7 +424,7 @@ KERNEL_FQ void m06212_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -432,7 +432,7 @@ KERNEL_FQ void m06212_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -440,7 +440,7 @@ KERNEL_FQ void m06212_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06213-pure.cl b/OpenCL/m06213-pure.cl index 310e6fe40..77a436b0a 100644 --- a/OpenCL/m06213-pure.cl +++ b/OpenCL/m06213-pure.cl @@ -91,13 +91,13 @@ KERNEL_FQ void m06213_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -134,22 +134,22 @@ KERNEL_FQ void m06213_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); ripemd160_hmac_ctx_t ripemd160_hmac_ctx; @@ -167,7 +167,7 @@ KERNEL_FQ void m06213_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) tmps[gid].opad[3] = ripemd160_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = ripemd160_hmac_ctx.opad.h[4]; - ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 48; i += 5, j += 1) { @@ -378,7 +378,7 @@ KERNEL_FQ void m06213_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -386,7 +386,7 @@ KERNEL_FQ void m06213_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -394,7 +394,7 @@ KERNEL_FQ void m06213_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -424,7 +424,7 @@ KERNEL_FQ void m06213_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -432,7 +432,7 @@ KERNEL_FQ void m06213_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -440,7 +440,7 @@ KERNEL_FQ void m06213_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -470,7 +470,7 @@ KERNEL_FQ void m06213_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -478,7 +478,7 @@ KERNEL_FQ void m06213_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06221-pure.cl b/OpenCL/m06221-pure.cl index 83bead7bf..bcfd2e90a 100644 --- a/OpenCL/m06221-pure.cl +++ b/OpenCL/m06221-pure.cl @@ -113,13 +113,13 @@ KERNEL_FQ void m06221_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -176,22 +176,22 @@ KERNEL_FQ void m06221_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -248,7 +248,7 @@ KERNEL_FQ void m06221_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -522,7 +522,7 @@ KERNEL_FQ void m06221_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -530,7 +530,7 @@ KERNEL_FQ void m06221_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -538,7 +538,7 @@ KERNEL_FQ void m06221_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06222-pure.cl b/OpenCL/m06222-pure.cl index e243eedce..4e5b257bf 100644 --- a/OpenCL/m06222-pure.cl +++ b/OpenCL/m06222-pure.cl @@ -113,13 +113,13 @@ KERNEL_FQ void m06222_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -176,22 +176,22 @@ KERNEL_FQ void m06222_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -248,7 +248,7 @@ KERNEL_FQ void m06222_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 16; i += 8, j += 1) { @@ -522,7 +522,7 @@ KERNEL_FQ void m06222_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -530,7 +530,7 @@ KERNEL_FQ void m06222_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -538,7 +538,7 @@ KERNEL_FQ void m06222_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -568,7 +568,7 @@ KERNEL_FQ void m06222_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -576,7 +576,7 @@ KERNEL_FQ void m06222_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -584,7 +584,7 @@ KERNEL_FQ void m06222_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06223-pure.cl b/OpenCL/m06223-pure.cl index 58591daa3..f9c41f8bd 100644 --- a/OpenCL/m06223-pure.cl +++ b/OpenCL/m06223-pure.cl @@ -113,13 +113,13 @@ KERNEL_FQ void m06223_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -176,22 +176,22 @@ KERNEL_FQ void m06223_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -248,7 +248,7 @@ KERNEL_FQ void m06223_init (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 24; i += 8, j += 1) { @@ -522,7 +522,7 @@ KERNEL_FQ void m06223_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -530,7 +530,7 @@ KERNEL_FQ void m06223_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -538,7 +538,7 @@ KERNEL_FQ void m06223_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -568,7 +568,7 @@ KERNEL_FQ void m06223_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -576,7 +576,7 @@ KERNEL_FQ void m06223_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -584,7 +584,7 @@ KERNEL_FQ void m06223_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -614,7 +614,7 @@ KERNEL_FQ void m06223_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -622,7 +622,7 @@ KERNEL_FQ void m06223_comp (KERN_ATTR_TMPS_ESALT (tc64_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06231-pure.cl b/OpenCL/m06231-pure.cl index 302f6d735..15ce42c02 100644 --- a/OpenCL/m06231-pure.cl +++ b/OpenCL/m06231-pure.cl @@ -151,13 +151,13 @@ KERNEL_FQ void m06231_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -236,22 +236,22 @@ KERNEL_FQ void m06231_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -308,7 +308,7 @@ KERNEL_FQ void m06231_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) tmps[gid].opad[14] = whirlpool_hmac_ctx.opad.h[14]; tmps[gid].opad[15] = whirlpool_hmac_ctx.opad.h[15]; - whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 16; i += 16, j += 1) { @@ -662,7 +662,7 @@ KERNEL_FQ void m06231_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -670,7 +670,7 @@ KERNEL_FQ void m06231_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -678,7 +678,7 @@ KERNEL_FQ void m06231_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06232-pure.cl b/OpenCL/m06232-pure.cl index a547273e0..cf7509fe2 100644 --- a/OpenCL/m06232-pure.cl +++ b/OpenCL/m06232-pure.cl @@ -151,13 +151,13 @@ KERNEL_FQ void m06232_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -236,22 +236,22 @@ KERNEL_FQ void m06232_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -308,7 +308,7 @@ KERNEL_FQ void m06232_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) tmps[gid].opad[14] = whirlpool_hmac_ctx.opad.h[14]; tmps[gid].opad[15] = whirlpool_hmac_ctx.opad.h[15]; - whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 32; i += 16, j += 1) { @@ -662,7 +662,7 @@ KERNEL_FQ void m06232_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -670,7 +670,7 @@ KERNEL_FQ void m06232_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -678,7 +678,7 @@ KERNEL_FQ void m06232_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -708,7 +708,7 @@ KERNEL_FQ void m06232_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -716,7 +716,7 @@ KERNEL_FQ void m06232_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -724,7 +724,7 @@ KERNEL_FQ void m06232_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06233-pure.cl b/OpenCL/m06233-pure.cl index b7737d0b4..782a9d61b 100644 --- a/OpenCL/m06233-pure.cl +++ b/OpenCL/m06233-pure.cl @@ -151,13 +151,13 @@ KERNEL_FQ void m06233_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -236,22 +236,22 @@ KERNEL_FQ void m06233_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -308,7 +308,7 @@ KERNEL_FQ void m06233_init (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) tmps[gid].opad[14] = whirlpool_hmac_ctx.opad.h[14]; tmps[gid].opad[15] = whirlpool_hmac_ctx.opad.h[15]; - whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 48; i += 16, j += 1) { @@ -662,7 +662,7 @@ KERNEL_FQ void m06233_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -670,7 +670,7 @@ KERNEL_FQ void m06233_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -678,7 +678,7 @@ KERNEL_FQ void m06233_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -708,7 +708,7 @@ KERNEL_FQ void m06233_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -716,7 +716,7 @@ KERNEL_FQ void m06233_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -724,7 +724,7 @@ KERNEL_FQ void m06233_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -754,7 +754,7 @@ KERNEL_FQ void m06233_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -762,7 +762,7 @@ KERNEL_FQ void m06233_comp (KERN_ATTR_TMPS_ESALT (tc_tmp_t, tc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06300-optimized.cl b/OpenCL/m06300-optimized.cl index fe57526b5..c3d320c95 100644 --- a/OpenCL/m06300-optimized.cl +++ b/OpenCL/m06300-optimized.cl @@ -580,10 +580,10 @@ KERNEL_FQ void m06300_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * init @@ -747,10 +747,10 @@ KERNEL_FQ void m06300_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest diff --git a/OpenCL/m06300-pure.cl b/OpenCL/m06300-pure.cl index ec654ab6d..ecdf09703 100644 --- a/OpenCL/m06300-pure.cl +++ b/OpenCL/m06300-pure.cl @@ -45,13 +45,13 @@ KERNEL_FQ void m06300_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -145,13 +145,13 @@ KERNEL_FQ void m06300_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m06400-pure.cl b/OpenCL/m06400-pure.cl index 82d30025c..790a25ce1 100644 --- a/OpenCL/m06400-pure.cl +++ b/OpenCL/m06400-pure.cl @@ -101,7 +101,7 @@ KERNEL_FQ void m06400_init (KERN_ATTR_TMPS (sha256aix_tmp_t)) tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { diff --git a/OpenCL/m06500-pure.cl b/OpenCL/m06500-pure.cl index e2e8452e8..6d75313ce 100644 --- a/OpenCL/m06500-pure.cl +++ b/OpenCL/m06500-pure.cl @@ -117,7 +117,7 @@ KERNEL_FQ void m06500_init (KERN_ATTR_TMPS (sha512aix_tmp_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); u32 w0[4]; u32 w1[4]; diff --git a/OpenCL/m06600-pure.cl b/OpenCL/m06600-pure.cl index db4906812..f0494946c 100644 --- a/OpenCL/m06600-pure.cl +++ b/OpenCL/m06600-pure.cl @@ -95,10 +95,10 @@ KERNEL_FQ void m06600_init (KERN_ATTR_TMPS (agilekey_tmp_t)) u32 s[16] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; - sha1_hmac_update_swap (&sha1_hmac_ctx, s, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_swap (&sha1_hmac_ctx, s, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 4; i += 5, j += 1) { @@ -294,18 +294,18 @@ KERNEL_FQ void m06600_comp (KERN_ATTR_TMPS (agilekey_tmp_t)) const u32 iv[4] = { - salt_bufs[salt_pos].salt_buf[ 4], - salt_bufs[salt_pos].salt_buf[ 5], - salt_bufs[salt_pos].salt_buf[ 6], - salt_bufs[salt_pos].salt_buf[ 7] + salt_bufs[SALT_POS].salt_buf[ 4], + salt_bufs[SALT_POS].salt_buf[ 5], + salt_bufs[SALT_POS].salt_buf[ 6], + salt_bufs[SALT_POS].salt_buf[ 7] }; const u32 data[4] = { - salt_bufs[salt_pos].salt_buf[ 8], - salt_bufs[salt_pos].salt_buf[ 9], - salt_bufs[salt_pos].salt_buf[10], - salt_bufs[salt_pos].salt_buf[11] + salt_bufs[SALT_POS].salt_buf[ 8], + salt_bufs[SALT_POS].salt_buf[ 9], + salt_bufs[SALT_POS].salt_buf[10], + salt_bufs[SALT_POS].salt_buf[11] }; /** diff --git a/OpenCL/m06700-pure.cl b/OpenCL/m06700-pure.cl index df9d16f1e..68ed6941f 100644 --- a/OpenCL/m06700-pure.cl +++ b/OpenCL/m06700-pure.cl @@ -89,7 +89,7 @@ KERNEL_FQ void m06700_init (KERN_ATTR_TMPS (sha1aix_tmp_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 4; i += 5, j += 1) { diff --git a/OpenCL/m06800-pure.cl b/OpenCL/m06800-pure.cl index a2e95556f..9fb03b660 100644 --- a/OpenCL/m06800-pure.cl +++ b/OpenCL/m06800-pure.cl @@ -102,7 +102,7 @@ KERNEL_FQ void m06800_init (KERN_ATTR_TMPS (lastpass_tmp_t)) tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -337,10 +337,10 @@ KERNEL_FQ void m06800_comp (KERN_ATTR_TMPS (lastpass_tmp_t)) { const u32 data[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3], + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3], }; #define KEYLEN 60 @@ -353,14 +353,14 @@ KERNEL_FQ void m06800_comp (KERN_ATTR_TMPS (lastpass_tmp_t)) AES256_decrypt (ks, data, out, s_td0, s_td1, s_td2, s_td3, s_td4); - u32 salt_len = salt_bufs[salt_pos].salt_len; + u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; out[0] = hc_swap32_S (out[0]); out[1] = hc_swap32_S (out[1]); @@ -374,9 +374,9 @@ KERNEL_FQ void m06800_comp (KERN_ATTR_TMPS (lastpass_tmp_t)) && (out[2] == salt_buf[2]) && (out[3] == salt_buf[3])) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m06900_a0-optimized.cl b/OpenCL/m06900_a0-optimized.cl index 5d42eb2ae..b8abcb7e0 100644 --- a/OpenCL/m06900_a0-optimized.cl +++ b/OpenCL/m06900_a0-optimized.cl @@ -966,10 +966,10 @@ KERNEL_FQ void m06900_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06900_a1-optimized.cl b/OpenCL/m06900_a1-optimized.cl index 60fed6359..760133c95 100644 --- a/OpenCL/m06900_a1-optimized.cl +++ b/OpenCL/m06900_a1-optimized.cl @@ -1018,10 +1018,10 @@ KERNEL_FQ void m06900_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m06900_a3-optimized.cl b/OpenCL/m06900_a3-optimized.cl index a0f576783..4fa77218a 100644 --- a/OpenCL/m06900_a3-optimized.cl +++ b/OpenCL/m06900_a3-optimized.cl @@ -885,10 +885,10 @@ DECLSPEC void m06900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -1122,7 +1122,7 @@ KERNEL_FQ void m06900_m04 (KERN_ATTR_BASIC ()) * main */ - m06900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_tables); + m06900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_tables); } KERNEL_FQ void m06900_m08 (KERN_ATTR_BASIC ()) @@ -1191,7 +1191,7 @@ KERNEL_FQ void m06900_m08 (KERN_ATTR_BASIC ()) * main */ - m06900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_tables); + m06900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_tables); } KERNEL_FQ void m06900_m16 (KERN_ATTR_BASIC ()) @@ -1264,7 +1264,7 @@ KERNEL_FQ void m06900_s04 (KERN_ATTR_BASIC ()) * main */ - m06900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_tables); + m06900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_tables); } KERNEL_FQ void m06900_s08 (KERN_ATTR_BASIC ()) @@ -1333,7 +1333,7 @@ KERNEL_FQ void m06900_s08 (KERN_ATTR_BASIC ()) * main */ - m06900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_tables); + m06900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_tables); } KERNEL_FQ void m06900_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m07000_a0-optimized.cl b/OpenCL/m07000_a0-optimized.cl index b2f6f66a9..584ca64cb 100644 --- a/OpenCL/m07000_a0-optimized.cl +++ b/OpenCL/m07000_a0-optimized.cl @@ -52,12 +52,12 @@ KERNEL_FQ void m07000_m04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = 12; // salt_bufs[salt_pos].salt_len; + const u32 salt_len = 12; // salt_bufs[SALT_POS].salt_len; const u32 magic_len = 24; /** @@ -314,12 +314,12 @@ KERNEL_FQ void m07000_s04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = 12; // salt_bufs[salt_pos].salt_len; + const u32 salt_len = 12; // salt_bufs[SALT_POS].salt_len; const u32 magic_len = 24; /** @@ -328,10 +328,10 @@ KERNEL_FQ void m07000_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m07000_a0-pure.cl b/OpenCL/m07000_a0-pure.cl index f3bb57959..7d2a1dea4 100644 --- a/OpenCL/m07000_a0-pure.cl +++ b/OpenCL/m07000_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m07000_mxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -109,10 +109,10 @@ KERNEL_FQ void m07000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -125,7 +125,7 @@ KERNEL_FQ void m07000_sxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m07000_a1-optimized.cl b/OpenCL/m07000_a1-optimized.cl index a5c914433..c701f3590 100644 --- a/OpenCL/m07000_a1-optimized.cl +++ b/OpenCL/m07000_a1-optimized.cl @@ -50,12 +50,12 @@ KERNEL_FQ void m07000_m04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = 12; // salt_bufs[salt_pos].salt_len; + const u32 salt_len = 12; // salt_bufs[SALT_POS].salt_len; const u32 magic_len = 24; /** @@ -372,12 +372,12 @@ KERNEL_FQ void m07000_s04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = 12; // salt_bufs[salt_pos].salt_len; + const u32 salt_len = 12; // salt_bufs[SALT_POS].salt_len; const u32 magic_len = 24; /** @@ -386,10 +386,10 @@ KERNEL_FQ void m07000_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m07000_a1-pure.cl b/OpenCL/m07000_a1-pure.cl index f6f43d72c..b37981505 100644 --- a/OpenCL/m07000_a1-pure.cl +++ b/OpenCL/m07000_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m07000_mxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -103,10 +103,10 @@ KERNEL_FQ void m07000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -117,7 +117,7 @@ KERNEL_FQ void m07000_sxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m07000_a3-optimized.cl b/OpenCL/m07000_a3-optimized.cl index 0ab3f796e..50d6198be 100644 --- a/OpenCL/m07000_a3-optimized.cl +++ b/OpenCL/m07000_a3-optimized.cl @@ -32,9 +32,9 @@ DECLSPEC void m07000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); salt_buf0[3] = 0; salt_buf1[0] = 0; salt_buf1[1] = 0; @@ -49,7 +49,7 @@ DECLSPEC void m07000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = 12; // salt_bufs[salt_pos].salt_len; + const u32 salt_len = 12; // salt_bufs[SALT_POS].salt_len; u32 magic_buf0[4]; u32 magic_buf1[4]; @@ -299,9 +299,9 @@ DECLSPEC void m07000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); salt_buf0[3] = 0; salt_buf1[0] = 0; salt_buf1[1] = 0; @@ -316,7 +316,7 @@ DECLSPEC void m07000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = 0; salt_buf3[3] = 0; - const u32 salt_len = 12; // salt_bufs[salt_pos].salt_len; + const u32 salt_len = 12; // salt_bufs[SALT_POS].salt_len; u32 magic_buf0[4]; u32 magic_buf1[4]; @@ -373,10 +373,10 @@ DECLSPEC void m07000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -619,7 +619,7 @@ KERNEL_FQ void m07000_m04 (KERN_ATTR_BASIC ()) * main */ - m07000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07000_m08 (KERN_ATTR_BASIC ()) @@ -672,7 +672,7 @@ KERNEL_FQ void m07000_m08 (KERN_ATTR_BASIC ()) * main */ - m07000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07000_m16 (KERN_ATTR_BASIC ()) @@ -725,7 +725,7 @@ KERNEL_FQ void m07000_m16 (KERN_ATTR_BASIC ()) * main */ - m07000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07000_s04 (KERN_ATTR_BASIC ()) @@ -778,7 +778,7 @@ KERNEL_FQ void m07000_s04 (KERN_ATTR_BASIC ()) * main */ - m07000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07000_s08 (KERN_ATTR_BASIC ()) @@ -831,7 +831,7 @@ KERNEL_FQ void m07000_s08 (KERN_ATTR_BASIC ()) * main */ - m07000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07000_s16 (KERN_ATTR_BASIC ()) @@ -884,5 +884,5 @@ KERNEL_FQ void m07000_s16 (KERN_ATTR_BASIC ()) * main */ - m07000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m07000_a3-pure.cl b/OpenCL/m07000_a3-pure.cl index aca25c9df..fe7d65f61 100644 --- a/OpenCL/m07000_a3-pure.cl +++ b/OpenCL/m07000_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m07000_mxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -120,10 +120,10 @@ KERNEL_FQ void m07000_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -143,7 +143,7 @@ KERNEL_FQ void m07000_sxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m07100-pure.cl b/OpenCL/m07100-pure.cl index 2cee7e0b0..0d8ab017c 100644 --- a/OpenCL/m07100-pure.cl +++ b/OpenCL/m07100-pure.cl @@ -123,7 +123,7 @@ KERNEL_FQ void m07100_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, pbkdf2_sh tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { diff --git a/OpenCL/m07300_a0-optimized.cl b/OpenCL/m07300_a0-optimized.cl index 2deb27bac..402f18fd5 100644 --- a/OpenCL/m07300_a0-optimized.cl +++ b/OpenCL/m07300_a0-optimized.cl @@ -130,7 +130,7 @@ KERNEL_FQ void m07300_m04 (KERN_ATTR_RULES_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -155,7 +155,7 @@ KERNEL_FQ void m07300_m04 (KERN_ATTR_RULES_ESALT (rakp_t)) * salt */ - const u32 esalt_len = esalt_bufs[digests_offset].salt_len; + const u32 esalt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * loop @@ -266,7 +266,7 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_RULES_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -291,7 +291,7 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_RULES_ESALT (rakp_t)) * salt */ - const u32 esalt_len = esalt_bufs[digests_offset].salt_len; + const u32 esalt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * digest @@ -299,10 +299,10 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_RULES_ESALT (rakp_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m07300_a0-pure.cl b/OpenCL/m07300_a0-pure.cl index 582e6e7c8..bd816bc42 100644 --- a/OpenCL/m07300_a0-pure.cl +++ b/OpenCL/m07300_a0-pure.cl @@ -54,7 +54,7 @@ KERNEL_FQ void m07300_mxx (KERN_ATTR_RULES_ESALT (rakp_t)) sha1_hmac_init_swap (&ctx, tmp.i, tmp.pw_len); - sha1_hmac_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha1_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha1_hmac_final (&ctx); @@ -84,10 +84,10 @@ KERNEL_FQ void m07300_sxx (KERN_ATTR_RULES_ESALT (rakp_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -110,7 +110,7 @@ KERNEL_FQ void m07300_sxx (KERN_ATTR_RULES_ESALT (rakp_t)) sha1_hmac_init_swap (&ctx, tmp.i, tmp.pw_len); - sha1_hmac_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha1_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha1_hmac_final (&ctx); diff --git a/OpenCL/m07300_a1-optimized.cl b/OpenCL/m07300_a1-optimized.cl index 21e1e0d2f..b77899bed 100644 --- a/OpenCL/m07300_a1-optimized.cl +++ b/OpenCL/m07300_a1-optimized.cl @@ -128,7 +128,7 @@ KERNEL_FQ void m07300_m04 (KERN_ATTR_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -153,7 +153,7 @@ KERNEL_FQ void m07300_m04 (KERN_ATTR_ESALT (rakp_t)) * salt */ - const u32 esalt_len = esalt_bufs[digests_offset].salt_len; + const u32 esalt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * loop @@ -332,7 +332,7 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -357,7 +357,7 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_ESALT (rakp_t)) * salt */ - const u32 esalt_len = esalt_bufs[digests_offset].salt_len; + const u32 esalt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * digest @@ -365,10 +365,10 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_ESALT (rakp_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m07300_a1-pure.cl b/OpenCL/m07300_a1-pure.cl index 8771d4d7a..253be0230 100644 --- a/OpenCL/m07300_a1-pure.cl +++ b/OpenCL/m07300_a1-pure.cl @@ -77,7 +77,7 @@ KERNEL_FQ void m07300_mxx (KERN_ATTR_ESALT (rakp_t)) sha1_hmac_init (&ctx, c, pw_len + comb_len); - sha1_hmac_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha1_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha1_hmac_final (&ctx); @@ -107,10 +107,10 @@ KERNEL_FQ void m07300_sxx (KERN_ATTR_ESALT (rakp_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -158,7 +158,7 @@ KERNEL_FQ void m07300_sxx (KERN_ATTR_ESALT (rakp_t)) sha1_hmac_init (&ctx, c, pw_len + comb_len); - sha1_hmac_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha1_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha1_hmac_final (&ctx); diff --git a/OpenCL/m07300_a3-optimized.cl b/OpenCL/m07300_a3-optimized.cl index a8a2904a7..b3609e5e4 100644 --- a/OpenCL/m07300_a3-optimized.cl +++ b/OpenCL/m07300_a3-optimized.cl @@ -123,7 +123,7 @@ DECLSPEC void m07300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 esalt_len = esalt_bufs[digests_offset].salt_len; + const u32 esalt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * loop @@ -233,7 +233,7 @@ DECLSPEC void m07300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 esalt_len = esalt_bufs[digests_offset].salt_len; + const u32 esalt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * digest @@ -241,10 +241,10 @@ DECLSPEC void m07300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -360,7 +360,7 @@ KERNEL_FQ void m07300_m04 (KERN_ATTR_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -405,7 +405,7 @@ KERNEL_FQ void m07300_m04 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_esalt_buf); + m07300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_esalt_buf); } KERNEL_FQ void m07300_m08 (KERN_ATTR_ESALT (rakp_t)) @@ -426,7 +426,7 @@ KERNEL_FQ void m07300_m08 (KERN_ATTR_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -471,7 +471,7 @@ KERNEL_FQ void m07300_m08 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_esalt_buf); + m07300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_esalt_buf); } KERNEL_FQ void m07300_m16 (KERN_ATTR_ESALT (rakp_t)) @@ -492,7 +492,7 @@ KERNEL_FQ void m07300_m16 (KERN_ATTR_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -537,7 +537,7 @@ KERNEL_FQ void m07300_m16 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_esalt_buf); + m07300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_esalt_buf); } KERNEL_FQ void m07300_s04 (KERN_ATTR_ESALT (rakp_t)) @@ -558,7 +558,7 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -603,7 +603,7 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_esalt_buf); + m07300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_esalt_buf); } KERNEL_FQ void m07300_s08 (KERN_ATTR_ESALT (rakp_t)) @@ -624,7 +624,7 @@ KERNEL_FQ void m07300_s08 (KERN_ATTR_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -669,7 +669,7 @@ KERNEL_FQ void m07300_s08 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_esalt_buf); + m07300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_esalt_buf); } KERNEL_FQ void m07300_s16 (KERN_ATTR_ESALT (rakp_t)) @@ -690,7 +690,7 @@ KERNEL_FQ void m07300_s16 (KERN_ATTR_ESALT (rakp_t)) for (u32 i = lid; i < 128; i += lsz) { - s_esalt_buf[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt_buf[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -735,5 +735,5 @@ KERNEL_FQ void m07300_s16 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, s_esalt_buf); + m07300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, s_esalt_buf); } diff --git a/OpenCL/m07300_a3-pure.cl b/OpenCL/m07300_a3-pure.cl index d8ef2e43c..66e507b06 100644 --- a/OpenCL/m07300_a3-pure.cl +++ b/OpenCL/m07300_a3-pure.cl @@ -63,7 +63,7 @@ KERNEL_FQ void m07300_mxx (KERN_ATTR_VECTOR_ESALT (rakp_t)) sha1_hmac_init (&ctx, w, pw_len); - sha1_hmac_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha1_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha1_hmac_final (&ctx); @@ -93,10 +93,10 @@ KERNEL_FQ void m07300_sxx (KERN_ATTR_VECTOR_ESALT (rakp_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -130,7 +130,7 @@ KERNEL_FQ void m07300_sxx (KERN_ATTR_VECTOR_ESALT (rakp_t)) sha1_hmac_init (&ctx, w, pw_len); - sha1_hmac_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha1_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha1_hmac_final (&ctx); diff --git a/OpenCL/m07400-optimized.cl b/OpenCL/m07400-optimized.cl index d8d0393ed..df1f3478f 100644 --- a/OpenCL/m07400-optimized.cl +++ b/OpenCL/m07400-optimized.cl @@ -1154,13 +1154,13 @@ KERNEL_FQ void m07400_init (KERN_ATTR_TMPS (sha256crypt_tmp_t)) u32 salt_buf[5]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); - const u32 salt_len = MIN (salt_bufs[salt_pos].salt_len, 20); + const u32 salt_len = MIN (salt_bufs[SALT_POS].salt_len, 20); /** * buffers @@ -1519,7 +1519,7 @@ KERNEL_FQ void m07400_loop (KERN_ATTR_TMPS (sha256crypt_tmp_t)) alt_result[6] = tmps[gid].alt_result[6]; alt_result[7] = tmps[gid].alt_result[7]; - const u32 salt_len = MIN (salt_bufs[salt_pos].salt_len, 20); + const u32 salt_len = MIN (salt_bufs[SALT_POS].salt_len, 20); // just an optimization diff --git a/OpenCL/m07400-pure.cl b/OpenCL/m07400-pure.cl index 08cfee875..861cbceb7 100644 --- a/OpenCL/m07400-pure.cl +++ b/OpenCL/m07400-pure.cl @@ -52,13 +52,13 @@ KERNEL_FQ void m07400_init (KERN_ATTR_TMPS (sha256crypt_tmp_t)) w[idx] = hc_swap32_S (w[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) @@ -273,7 +273,7 @@ KERNEL_FQ void m07400_loop (KERN_ATTR_TMPS (sha256crypt_tmp_t)) const u32 pw_len = pws[gid].pw_len; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 alt_result[16] = { 0 }; diff --git a/OpenCL/m07500_a0-optimized.cl b/OpenCL/m07500_a0-optimized.cl index 60c658a0a..2ee1a980d 100644 --- a/OpenCL/m07500_a0-optimized.cl +++ b/OpenCL/m07500_a0-optimized.cl @@ -431,21 +431,21 @@ KERNEL_FQ void m07500_m04 (KERN_ATTR_RULES_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; /** * shared @@ -485,9 +485,9 @@ KERNEL_FQ void m07500_m04 (KERN_ATTR_RULES_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, tmp, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -537,21 +537,21 @@ KERNEL_FQ void m07500_s04 (KERN_ATTR_RULES_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; /** * shared @@ -591,9 +591,9 @@ KERNEL_FQ void m07500_s04 (KERN_ATTR_RULES_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, tmp, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m07500_a0-pure.cl b/OpenCL/m07500_a0-pure.cl index a26f705c1..7aab83068 100644 --- a/OpenCL/m07500_a0-pure.cl +++ b/OpenCL/m07500_a0-pure.cl @@ -302,21 +302,21 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_RULES_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; /** * loop @@ -342,9 +342,9 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_RULES_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, digest, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -373,21 +373,21 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_RULES_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; /** * loop @@ -413,9 +413,9 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_RULES_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, digest, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m07500_a1-optimized.cl b/OpenCL/m07500_a1-optimized.cl index ddcc7a51a..b29fa42cd 100644 --- a/OpenCL/m07500_a1-optimized.cl +++ b/OpenCL/m07500_a1-optimized.cl @@ -429,21 +429,21 @@ KERNEL_FQ void m07500_m04 (KERN_ATTR_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; /** * shared @@ -533,9 +533,9 @@ KERNEL_FQ void m07500_m04 (KERN_ATTR_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, tmp, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -585,21 +585,21 @@ KERNEL_FQ void m07500_s04 (KERN_ATTR_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; /** * shared @@ -689,9 +689,9 @@ KERNEL_FQ void m07500_s04 (KERN_ATTR_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, tmp, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m07500_a1-pure.cl b/OpenCL/m07500_a1-pure.cl index 4a812ac9e..f843ced12 100644 --- a/OpenCL/m07500_a1-pure.cl +++ b/OpenCL/m07500_a1-pure.cl @@ -298,21 +298,21 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; md4_ctx_t ctx0; @@ -338,9 +338,9 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, digest, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -367,21 +367,21 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; md4_ctx_t ctx0; @@ -407,9 +407,9 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, digest, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m07500_a3-optimized.cl b/OpenCL/m07500_a3-optimized.cl index 68e154486..2bb5398a3 100644 --- a/OpenCL/m07500_a3-optimized.cl +++ b/OpenCL/m07500_a3-optimized.cl @@ -408,21 +408,21 @@ DECLSPEC void m07500 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; /** * loop @@ -475,9 +475,9 @@ DECLSPEC void m07500 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 if (decrypt_and_check (rc4_key, tmp, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -532,7 +532,7 @@ KERNEL_FQ void m07500_m04 (KERN_ATTR_ESALT (krb5pa_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m07500 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07500 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07500_m08 (KERN_ATTR_ESALT (krb5pa_t)) @@ -584,7 +584,7 @@ KERNEL_FQ void m07500_m08 (KERN_ATTR_ESALT (krb5pa_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m07500 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07500 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07500_m16 (KERN_ATTR_ESALT (krb5pa_t)) @@ -640,7 +640,7 @@ KERNEL_FQ void m07500_s04 (KERN_ATTR_ESALT (krb5pa_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m07500 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07500 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07500_s08 (KERN_ATTR_ESALT (krb5pa_t)) @@ -692,7 +692,7 @@ KERNEL_FQ void m07500_s08 (KERN_ATTR_ESALT (krb5pa_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m07500 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07500 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07500_s16 (KERN_ATTR_ESALT (krb5pa_t)) diff --git a/OpenCL/m07500_a3-pure.cl b/OpenCL/m07500_a3-pure.cl index e6a6c4b01..79792aa16 100644 --- a/OpenCL/m07500_a3-pure.cl +++ b/OpenCL/m07500_a3-pure.cl @@ -294,10 +294,10 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -319,21 +319,21 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; /** * loop @@ -363,9 +363,9 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, digest, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -388,10 +388,10 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -413,21 +413,21 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; u32 timestamp_ct[8]; - timestamp_ct[0] = esalt_bufs[digests_offset].timestamp[0]; - timestamp_ct[1] = esalt_bufs[digests_offset].timestamp[1]; - timestamp_ct[2] = esalt_bufs[digests_offset].timestamp[2]; - timestamp_ct[3] = esalt_bufs[digests_offset].timestamp[3]; - timestamp_ct[4] = esalt_bufs[digests_offset].timestamp[4]; - timestamp_ct[5] = esalt_bufs[digests_offset].timestamp[5]; - timestamp_ct[6] = esalt_bufs[digests_offset].timestamp[6]; - timestamp_ct[7] = esalt_bufs[digests_offset].timestamp[7]; + timestamp_ct[0] = esalt_bufs[DIGESTS_OFFSET].timestamp[0]; + timestamp_ct[1] = esalt_bufs[DIGESTS_OFFSET].timestamp[1]; + timestamp_ct[2] = esalt_bufs[DIGESTS_OFFSET].timestamp[2]; + timestamp_ct[3] = esalt_bufs[DIGESTS_OFFSET].timestamp[3]; + timestamp_ct[4] = esalt_bufs[DIGESTS_OFFSET].timestamp[4]; + timestamp_ct[5] = esalt_bufs[DIGESTS_OFFSET].timestamp[5]; + timestamp_ct[6] = esalt_bufs[DIGESTS_OFFSET].timestamp[6]; + timestamp_ct[7] = esalt_bufs[DIGESTS_OFFSET].timestamp[7]; /** * loop @@ -457,9 +457,9 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) if (decrypt_and_check (rc4_key, digest, timestamp_ct) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m07700_a0-optimized.cl b/OpenCL/m07700_a0-optimized.cl index c509a4865..81a69e83e 100644 --- a/OpenCL/m07700_a0-optimized.cl +++ b/OpenCL/m07700_a0-optimized.cl @@ -189,12 +189,12 @@ KERNEL_FQ void m07700_m04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); @@ -353,12 +353,12 @@ KERNEL_FQ void m07700_s04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); @@ -370,8 +370,8 @@ KERNEL_FQ void m07700_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m07700_a1-optimized.cl b/OpenCL/m07700_a1-optimized.cl index 672662349..9431d66a6 100644 --- a/OpenCL/m07700_a1-optimized.cl +++ b/OpenCL/m07700_a1-optimized.cl @@ -187,12 +187,12 @@ KERNEL_FQ void m07700_m04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); @@ -394,12 +394,12 @@ KERNEL_FQ void m07700_s04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); @@ -411,8 +411,8 @@ KERNEL_FQ void m07700_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m07700_a3-optimized.cl b/OpenCL/m07700_a3-optimized.cl index 0e4175444..0f76627a6 100644 --- a/OpenCL/m07700_a3-optimized.cl +++ b/OpenCL/m07700_a3-optimized.cl @@ -160,15 +160,15 @@ DECLSPEC void m07700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[3]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); salt_buf0[2] = sapb_trans (salt_buf0[2]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s0[4]; u32 s1[4]; @@ -285,15 +285,15 @@ DECLSPEC void m07700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[3]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); salt_buf0[2] = sapb_trans (salt_buf0[2]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s0[4]; u32 s1[4]; @@ -329,8 +329,8 @@ DECLSPEC void m07700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -454,7 +454,7 @@ KERNEL_FQ void m07700_m04 (KERN_ATTR_BASIC ()) * main */ - m07700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07700_m08 (KERN_ATTR_BASIC ()) @@ -507,7 +507,7 @@ KERNEL_FQ void m07700_m08 (KERN_ATTR_BASIC ()) * main */ - m07700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07700_m16 (KERN_ATTR_BASIC ()) @@ -564,7 +564,7 @@ KERNEL_FQ void m07700_s04 (KERN_ATTR_BASIC ()) * main */ - m07700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07700_s08 (KERN_ATTR_BASIC ()) @@ -617,7 +617,7 @@ KERNEL_FQ void m07700_s08 (KERN_ATTR_BASIC ()) * main */ - m07700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07700_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m07701_a0-optimized.cl b/OpenCL/m07701_a0-optimized.cl index de26d7478..b530785a7 100644 --- a/OpenCL/m07701_a0-optimized.cl +++ b/OpenCL/m07701_a0-optimized.cl @@ -189,12 +189,12 @@ KERNEL_FQ void m07701_m04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); @@ -353,12 +353,12 @@ KERNEL_FQ void m07701_s04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); @@ -370,8 +370,8 @@ KERNEL_FQ void m07701_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m07701_a1-optimized.cl b/OpenCL/m07701_a1-optimized.cl index f10f8c782..e1ae00412 100644 --- a/OpenCL/m07701_a1-optimized.cl +++ b/OpenCL/m07701_a1-optimized.cl @@ -187,12 +187,12 @@ KERNEL_FQ void m07701_m04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); @@ -394,12 +394,12 @@ KERNEL_FQ void m07701_s04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); @@ -411,8 +411,8 @@ KERNEL_FQ void m07701_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m07701_a3-optimized.cl b/OpenCL/m07701_a3-optimized.cl index 2e314990a..a2fa0d081 100644 --- a/OpenCL/m07701_a3-optimized.cl +++ b/OpenCL/m07701_a3-optimized.cl @@ -160,15 +160,15 @@ DECLSPEC void m07701m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[3]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); salt_buf0[2] = sapb_trans (salt_buf0[2]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s0[4]; u32 s1[4]; @@ -285,15 +285,15 @@ DECLSPEC void m07701s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[3]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; salt_buf0[0] = sapb_trans (salt_buf0[0]); salt_buf0[1] = sapb_trans (salt_buf0[1]); salt_buf0[2] = sapb_trans (salt_buf0[2]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s0[4]; u32 s1[4]; @@ -329,8 +329,8 @@ DECLSPEC void m07701s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -454,7 +454,7 @@ KERNEL_FQ void m07701_m04 (KERN_ATTR_BASIC ()) * main */ - m07701m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07701m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07701_m08 (KERN_ATTR_BASIC ()) @@ -507,7 +507,7 @@ KERNEL_FQ void m07701_m08 (KERN_ATTR_BASIC ()) * main */ - m07701m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07701m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07701_m16 (KERN_ATTR_BASIC ()) @@ -564,7 +564,7 @@ KERNEL_FQ void m07701_s04 (KERN_ATTR_BASIC ()) * main */ - m07701s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07701s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07701_s08 (KERN_ATTR_BASIC ()) @@ -617,7 +617,7 @@ KERNEL_FQ void m07701_s08 (KERN_ATTR_BASIC ()) * main */ - m07701s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07701s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07701_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m07800_a0-optimized.cl b/OpenCL/m07800_a0-optimized.cl index 7dab142cb..023ac8ac3 100644 --- a/OpenCL/m07800_a0-optimized.cl +++ b/OpenCL/m07800_a0-optimized.cl @@ -90,16 +90,16 @@ KERNEL_FQ void m07800_m04 (KERN_ATTR_RULES ()) u32 salt_buf[8]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf[5] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf[6] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf[7] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf[5] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf[6] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf[7] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -342,16 +342,16 @@ KERNEL_FQ void m07800_s04 (KERN_ATTR_RULES ()) u32 salt_buf[8]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf[5] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf[6] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf[7] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf[5] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf[6] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf[7] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -359,10 +359,10 @@ KERNEL_FQ void m07800_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m07800_a1-optimized.cl b/OpenCL/m07800_a1-optimized.cl index 0ce766c16..89bb92749 100644 --- a/OpenCL/m07800_a1-optimized.cl +++ b/OpenCL/m07800_a1-optimized.cl @@ -88,16 +88,16 @@ KERNEL_FQ void m07800_m04 (KERN_ATTR_BASIC ()) u32 salt_buf[8]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf[5] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf[6] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf[7] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf[5] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf[6] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf[7] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -400,16 +400,16 @@ KERNEL_FQ void m07800_s04 (KERN_ATTR_BASIC ()) u32 salt_buf[8]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf[5] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf[6] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf[7] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf[5] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf[6] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf[7] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -417,10 +417,10 @@ KERNEL_FQ void m07800_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m07800_a3-optimized.cl b/OpenCL/m07800_a3-optimized.cl index 4ee34d3dc..0bc73951d 100644 --- a/OpenCL/m07800_a3-optimized.cl +++ b/OpenCL/m07800_a3-optimized.cl @@ -67,16 +67,16 @@ DECLSPEC void m07800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[8]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf[5] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf[6] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf[7] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf[5] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf[6] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf[7] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s0[4]; u32 s1[4]; @@ -287,16 +287,16 @@ DECLSPEC void m07800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[8]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf[5] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf[6] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf[7] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf[5] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf[6] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf[7] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s0[4]; u32 s1[4]; @@ -330,10 +330,10 @@ DECLSPEC void m07800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -554,7 +554,7 @@ KERNEL_FQ void m07800_m04 (KERN_ATTR_BASIC ()) * main */ - m07800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07800_m08 (KERN_ATTR_BASIC ()) @@ -607,7 +607,7 @@ KERNEL_FQ void m07800_m08 (KERN_ATTR_BASIC ()) * main */ - m07800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07800_m16 (KERN_ATTR_BASIC ()) @@ -664,7 +664,7 @@ KERNEL_FQ void m07800_s04 (KERN_ATTR_BASIC ()) * main */ - m07800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07800_s08 (KERN_ATTR_BASIC ()) @@ -717,7 +717,7 @@ KERNEL_FQ void m07800_s08 (KERN_ATTR_BASIC ()) * main */ - m07800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07800_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m07801_a0-optimized.cl b/OpenCL/m07801_a0-optimized.cl index 13059adfe..b8dbe05ab 100644 --- a/OpenCL/m07801_a0-optimized.cl +++ b/OpenCL/m07801_a0-optimized.cl @@ -90,16 +90,16 @@ KERNEL_FQ void m07801_m04 (KERN_ATTR_RULES ()) u32 salt_buf[8]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf[5] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf[6] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf[7] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf[5] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf[6] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf[7] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -342,16 +342,16 @@ KERNEL_FQ void m07801_s04 (KERN_ATTR_RULES ()) u32 salt_buf[8]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf[5] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf[6] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf[7] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf[5] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf[6] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf[7] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -359,10 +359,10 @@ KERNEL_FQ void m07801_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m07801_a1-optimized.cl b/OpenCL/m07801_a1-optimized.cl index ef836a019..ca30ad236 100644 --- a/OpenCL/m07801_a1-optimized.cl +++ b/OpenCL/m07801_a1-optimized.cl @@ -88,16 +88,16 @@ KERNEL_FQ void m07801_m04 (KERN_ATTR_BASIC ()) u32 salt_buf[8]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf[5] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf[6] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf[7] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf[5] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf[6] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf[7] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -400,16 +400,16 @@ KERNEL_FQ void m07801_s04 (KERN_ATTR_BASIC ()) u32 salt_buf[8]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf[5] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf[6] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf[7] = salt_bufs[salt_pos].salt_buf[7]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf[5] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf[6] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf[7] = salt_bufs[SALT_POS].salt_buf[7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -417,10 +417,10 @@ KERNEL_FQ void m07801_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m07801_a3-optimized.cl b/OpenCL/m07801_a3-optimized.cl index 59bc222cd..b2fc638f5 100644 --- a/OpenCL/m07801_a3-optimized.cl +++ b/OpenCL/m07801_a3-optimized.cl @@ -67,16 +67,16 @@ DECLSPEC void m07801m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[8]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf[5] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf[6] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf[7] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf[5] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf[6] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf[7] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s0[4]; u32 s1[4]; @@ -287,16 +287,16 @@ DECLSPEC void m07801s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[8]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); - salt_buf[5] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[5]); - salt_buf[6] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[6]); - salt_buf[7] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[7]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); + salt_buf[5] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[5]); + salt_buf[6] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[6]); + salt_buf[7] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[7]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s0[4]; u32 s1[4]; @@ -330,10 +330,10 @@ DECLSPEC void m07801s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -554,7 +554,7 @@ KERNEL_FQ void m07801_m04 (KERN_ATTR_BASIC ()) * main */ - m07801m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07801m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07801_m08 (KERN_ATTR_BASIC ()) @@ -607,7 +607,7 @@ KERNEL_FQ void m07801_m08 (KERN_ATTR_BASIC ()) * main */ - m07801m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07801m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07801_m16 (KERN_ATTR_BASIC ()) @@ -664,7 +664,7 @@ KERNEL_FQ void m07801_s04 (KERN_ATTR_BASIC ()) * main */ - m07801s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07801s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07801_s08 (KERN_ATTR_BASIC ()) @@ -717,7 +717,7 @@ KERNEL_FQ void m07801_s08 (KERN_ATTR_BASIC ()) * main */ - m07801s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m07801s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m07801_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m07900-pure.cl b/OpenCL/m07900-pure.cl index 0d33a1644..3563d8d2d 100644 --- a/OpenCL/m07900-pure.cl +++ b/OpenCL/m07900-pure.cl @@ -34,7 +34,7 @@ KERNEL_FQ void m07900_init (KERN_ATTR_TMPS (drupal7_tmp_t)) sha512_init (&ctx); - sha512_update_global_swap (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_swap (&ctx, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m08000_a0-optimized.cl b/OpenCL/m08000_a0-optimized.cl index 310bebbeb..495e6fde6 100644 --- a/OpenCL/m08000_a0-optimized.cl +++ b/OpenCL/m08000_a0-optimized.cl @@ -232,9 +232,9 @@ KERNEL_FQ void m08000_m04 (KERN_ATTR_RULES ()) * salt */ - const u32 salt_buf0 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - const u32 salt_buf1 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - const u32 salt_buf2 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80 + const u32 salt_buf0 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + const u32 salt_buf1 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + const u32 salt_buf2 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); // 0x80 /** * precompute final msg blocks @@ -403,9 +403,9 @@ KERNEL_FQ void m08000_s04 (KERN_ATTR_RULES ()) * salt */ - const u32 salt_buf0 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - const u32 salt_buf1 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - const u32 salt_buf2 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80 + const u32 salt_buf0 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + const u32 salt_buf1 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + const u32 salt_buf2 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); // 0x80 /** * precompute final msg blocks @@ -476,10 +476,10 @@ KERNEL_FQ void m08000_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08000_a1-optimized.cl b/OpenCL/m08000_a1-optimized.cl index 89ea42a57..93406b2e5 100644 --- a/OpenCL/m08000_a1-optimized.cl +++ b/OpenCL/m08000_a1-optimized.cl @@ -230,9 +230,9 @@ KERNEL_FQ void m08000_m04 (KERN_ATTR_BASIC ()) * salt */ - const u32 salt_buf0 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - const u32 salt_buf1 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - const u32 salt_buf2 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80 + const u32 salt_buf0 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + const u32 salt_buf1 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + const u32 salt_buf2 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); // 0x80 /** * precompute final msg blocks @@ -455,9 +455,9 @@ KERNEL_FQ void m08000_s04 (KERN_ATTR_BASIC ()) * salt */ - const u32 salt_buf0 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - const u32 salt_buf1 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - const u32 salt_buf2 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80 + const u32 salt_buf0 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + const u32 salt_buf1 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + const u32 salt_buf2 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); // 0x80 /** * precompute final msg blocks @@ -528,10 +528,10 @@ KERNEL_FQ void m08000_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08000_a3-optimized.cl b/OpenCL/m08000_a3-optimized.cl index fa76a3b72..de2cedd33 100644 --- a/OpenCL/m08000_a3-optimized.cl +++ b/OpenCL/m08000_a3-optimized.cl @@ -230,9 +230,9 @@ DECLSPEC void m08000m (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 * salt */ - const u32 salt_buf0 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - const u32 salt_buf1 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - const u32 salt_buf2 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80 + const u32 salt_buf0 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + const u32 salt_buf1 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + const u32 salt_buf2 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); // 0x80 /** * precompute final msg blocks @@ -352,9 +352,9 @@ DECLSPEC void m08000s (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 * salt */ - const u32 salt_buf0 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - const u32 salt_buf1 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - const u32 salt_buf2 = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80 + const u32 salt_buf0 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + const u32 salt_buf1 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + const u32 salt_buf2 = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); // 0x80 /** * precompute final msg blocks @@ -427,10 +427,10 @@ DECLSPEC void m08000s (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -508,7 +508,7 @@ KERNEL_FQ void m08000_m04 (KERN_ATTR_VECTOR ()) * main */ - m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08000_m08 (KERN_ATTR_VECTOR ()) @@ -547,7 +547,7 @@ KERNEL_FQ void m08000_m08 (KERN_ATTR_VECTOR ()) * main */ - m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08000_m16 (KERN_ATTR_VECTOR ()) @@ -586,7 +586,7 @@ KERNEL_FQ void m08000_m16 (KERN_ATTR_VECTOR ()) * main */ - m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08000_s04 (KERN_ATTR_VECTOR ()) @@ -625,7 +625,7 @@ KERNEL_FQ void m08000_s04 (KERN_ATTR_VECTOR ()) * main */ - m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08000_s08 (KERN_ATTR_VECTOR ()) @@ -664,7 +664,7 @@ KERNEL_FQ void m08000_s08 (KERN_ATTR_VECTOR ()) * main */ - m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08000_s16 (KERN_ATTR_VECTOR ()) @@ -703,5 +703,5 @@ KERNEL_FQ void m08000_s16 (KERN_ATTR_VECTOR ()) * main */ - m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m08100_a0-optimized.cl b/OpenCL/m08100_a0-optimized.cl index 95b650849..1173405bd 100644 --- a/OpenCL/m08100_a0-optimized.cl +++ b/OpenCL/m08100_a0-optimized.cl @@ -52,10 +52,10 @@ KERNEL_FQ void m08100_m04 (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -264,10 +264,10 @@ KERNEL_FQ void m08100_s04 (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -275,10 +275,10 @@ KERNEL_FQ void m08100_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08100_a0-pure.cl b/OpenCL/m08100_a0-pure.cl index d76790540..93bd8b4c5 100644 --- a/OpenCL/m08100_a0-pure.cl +++ b/OpenCL/m08100_a0-pure.cl @@ -39,7 +39,7 @@ KERNEL_FQ void m08100_mxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -85,10 +85,10 @@ KERNEL_FQ void m08100_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -103,7 +103,7 @@ KERNEL_FQ void m08100_sxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m08100_a1-optimized.cl b/OpenCL/m08100_a1-optimized.cl index ccd25c064..7e1407f65 100644 --- a/OpenCL/m08100_a1-optimized.cl +++ b/OpenCL/m08100_a1-optimized.cl @@ -50,10 +50,10 @@ KERNEL_FQ void m08100_m04 (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -61,10 +61,10 @@ KERNEL_FQ void m08100_m04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -333,10 +333,10 @@ KERNEL_FQ void m08100_s04 (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -344,10 +344,10 @@ KERNEL_FQ void m08100_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08100_a1-pure.cl b/OpenCL/m08100_a1-pure.cl index f67f51120..9fabe00bb 100644 --- a/OpenCL/m08100_a1-pure.cl +++ b/OpenCL/m08100_a1-pure.cl @@ -35,7 +35,7 @@ KERNEL_FQ void m08100_mxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -80,10 +80,10 @@ KERNEL_FQ void m08100_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -96,7 +96,7 @@ KERNEL_FQ void m08100_sxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m08100_a3-optimized.cl b/OpenCL/m08100_a3-optimized.cl index 4e2f5e8ad..2f31d38d7 100644 --- a/OpenCL/m08100_a3-optimized.cl +++ b/OpenCL/m08100_a3-optimized.cl @@ -29,10 +29,10 @@ DECLSPEC void m08100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -190,10 +190,10 @@ DECLSPEC void m08100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -203,10 +203,10 @@ DECLSPEC void m08100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -418,7 +418,7 @@ KERNEL_FQ void m08100_m04 (KERN_ATTR_BASIC ()) * main */ - m08100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08100_m08 (KERN_ATTR_BASIC ()) @@ -490,7 +490,7 @@ KERNEL_FQ void m08100_m08 (KERN_ATTR_BASIC ()) * main */ - m08100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08100_m16 (KERN_ATTR_BASIC ()) @@ -577,7 +577,7 @@ KERNEL_FQ void m08100_m16 (KERN_ATTR_BASIC ()) * main */ - m08100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08100_s04 (KERN_ATTR_BASIC ()) @@ -641,7 +641,7 @@ KERNEL_FQ void m08100_s04 (KERN_ATTR_BASIC ()) * main */ - m08100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08100_s08 (KERN_ATTR_BASIC ()) @@ -713,7 +713,7 @@ KERNEL_FQ void m08100_s08 (KERN_ATTR_BASIC ()) * main */ - m08100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08100_s16 (KERN_ATTR_BASIC ()) @@ -800,5 +800,5 @@ KERNEL_FQ void m08100_s16 (KERN_ATTR_BASIC ()) * main */ - m08100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m08100_a3-pure.cl b/OpenCL/m08100_a3-pure.cl index 3d5208ad3..13d9eecc5 100644 --- a/OpenCL/m08100_a3-pure.cl +++ b/OpenCL/m08100_a3-pure.cl @@ -44,7 +44,7 @@ KERNEL_FQ void m08100_mxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -96,10 +96,10 @@ KERNEL_FQ void m08100_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -121,7 +121,7 @@ KERNEL_FQ void m08100_sxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m08200-pure.cl b/OpenCL/m08200-pure.cl index 96429c223..b80368fef 100644 --- a/OpenCL/m08200-pure.cl +++ b/OpenCL/m08200-pure.cl @@ -125,7 +125,7 @@ KERNEL_FQ void m08200_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, cloudkey_ tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -361,7 +361,7 @@ KERNEL_FQ void m08200_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, cloudkey_ sha256_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha256_hmac_update_global (&ctx, esalt_bufs[digests_offset].data_buf, esalt_bufs[digests_offset].data_len); + sha256_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].data_buf, esalt_bufs[DIGESTS_OFFSET].data_len); sha256_hmac_final (&ctx); diff --git a/OpenCL/m08300_a0-optimized.cl b/OpenCL/m08300_a0-optimized.cl index 89a3ed2e6..32476fae3 100644 --- a/OpenCL/m08300_a0-optimized.cl +++ b/OpenCL/m08300_a0-optimized.cl @@ -207,35 +207,35 @@ KERNEL_FQ void m08300_m04 (KERN_ATTR_RULES ()) * salt */ - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 domain_buf0[4]; u32 domain_buf1[4]; - domain_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[ 0]; - domain_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[ 1]; - domain_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[ 2]; - domain_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[ 3]; - domain_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[ 4]; - domain_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[ 5]; - domain_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[ 6]; + domain_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[ 0]; + domain_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[ 1]; + domain_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[ 2]; + domain_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[ 3]; + domain_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[ 4]; + domain_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[ 5]; + domain_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[ 6]; domain_buf1[3] = 0; - const u32 domain_len = salt_bufs[salt_pos].salt_len_pc; + const u32 domain_len = salt_bufs[SALT_POS].salt_len_pc; /** * loop @@ -499,35 +499,35 @@ KERNEL_FQ void m08300_s04 (KERN_ATTR_RULES ()) * salt */ - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 domain_buf0[4]; u32 domain_buf1[4]; - domain_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[ 0]; - domain_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[ 1]; - domain_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[ 2]; - domain_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[ 3]; - domain_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[ 4]; - domain_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[ 5]; - domain_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[ 6]; + domain_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[ 0]; + domain_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[ 1]; + domain_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[ 2]; + domain_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[ 3]; + domain_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[ 4]; + domain_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[ 5]; + domain_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[ 6]; domain_buf1[3] = 0; - const u32 domain_len = salt_bufs[salt_pos].salt_len_pc; + const u32 domain_len = salt_bufs[SALT_POS].salt_len_pc; /** * digest @@ -535,10 +535,10 @@ KERNEL_FQ void m08300_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08300_a0-pure.cl b/OpenCL/m08300_a0-pure.cl index 66d4cea99..22bf13f07 100644 --- a/OpenCL/m08300_a0-pure.cl +++ b/OpenCL/m08300_a0-pure.cl @@ -33,25 +33,25 @@ KERNEL_FQ void m08300_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } - const u32 salt_len_pc = salt_bufs[salt_pos].salt_len_pc; + const u32 salt_len_pc = salt_bufs[SALT_POS].salt_len_pc; u32 s_pc[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len_pc; i += 4, idx += 1) { - s_pc[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[idx]); + s_pc[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[idx]); } - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; /** * loop @@ -165,10 +165,10 @@ KERNEL_FQ void m08300_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -177,25 +177,25 @@ KERNEL_FQ void m08300_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } - const u32 salt_len_pc = salt_bufs[salt_pos].salt_len_pc; + const u32 salt_len_pc = salt_bufs[SALT_POS].salt_len_pc; u32 s_pc[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len_pc; i += 4, idx += 1) { - s_pc[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[idx]); + s_pc[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[idx]); } - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; /** * loop diff --git a/OpenCL/m08300_a1-optimized.cl b/OpenCL/m08300_a1-optimized.cl index 4789dc7fb..ba093e4bc 100644 --- a/OpenCL/m08300_a1-optimized.cl +++ b/OpenCL/m08300_a1-optimized.cl @@ -205,35 +205,35 @@ KERNEL_FQ void m08300_m04 (KERN_ATTR_BASIC ()) * salt */ - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 domain_buf0[4]; u32 domain_buf1[4]; - domain_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[ 0]; - domain_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[ 1]; - domain_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[ 2]; - domain_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[ 3]; - domain_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[ 4]; - domain_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[ 5]; - domain_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[ 6]; + domain_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[ 0]; + domain_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[ 1]; + domain_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[ 2]; + domain_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[ 3]; + domain_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[ 4]; + domain_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[ 5]; + domain_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[ 6]; domain_buf1[3] = 0; - const u32 domain_len = salt_bufs[salt_pos].salt_len_pc; + const u32 domain_len = salt_bufs[SALT_POS].salt_len_pc; /** * loop @@ -557,35 +557,35 @@ KERNEL_FQ void m08300_s04 (KERN_ATTR_BASIC ()) * salt */ - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 domain_buf0[4]; u32 domain_buf1[4]; - domain_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[ 0]; - domain_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[ 1]; - domain_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[ 2]; - domain_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[ 3]; - domain_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[ 4]; - domain_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[ 5]; - domain_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[ 6]; + domain_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[ 0]; + domain_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[ 1]; + domain_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[ 2]; + domain_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[ 3]; + domain_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[ 4]; + domain_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[ 5]; + domain_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[ 6]; domain_buf1[3] = 0; - const u32 domain_len = salt_bufs[salt_pos].salt_len_pc; + const u32 domain_len = salt_bufs[SALT_POS].salt_len_pc; /** * digest @@ -593,10 +593,10 @@ KERNEL_FQ void m08300_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08300_a1-pure.cl b/OpenCL/m08300_a1-pure.cl index 28e356148..6121ef370 100644 --- a/OpenCL/m08300_a1-pure.cl +++ b/OpenCL/m08300_a1-pure.cl @@ -65,25 +65,25 @@ KERNEL_FQ void m08300_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } - const u32 salt_len_pc = salt_bufs[salt_pos].salt_len_pc; + const u32 salt_len_pc = salt_bufs[SALT_POS].salt_len_pc; u32 s_pc[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len_pc; i += 4, idx += 1) { - s_pc[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[idx]); + s_pc[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[idx]); } - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; /** * loop @@ -184,35 +184,35 @@ KERNEL_FQ void m08300_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } - const u32 salt_len_pc = salt_bufs[salt_pos].salt_len_pc; + const u32 salt_len_pc = salt_bufs[SALT_POS].salt_len_pc; u32 s_pc[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len_pc; i += 4, idx += 1) { - s_pc[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[idx]); + s_pc[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[idx]); } - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; /** * loop diff --git a/OpenCL/m08300_a3-optimized.cl b/OpenCL/m08300_a3-optimized.cl index 15146fd92..d24d9f5c8 100644 --- a/OpenCL/m08300_a3-optimized.cl +++ b/OpenCL/m08300_a3-optimized.cl @@ -180,35 +180,35 @@ DECLSPEC void m08300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 domain_buf0[4]; u32 domain_buf1[4]; - domain_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 0]); - domain_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 1]); - domain_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 2]); - domain_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 3]); - domain_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 4]); - domain_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 5]); - domain_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 6]); + domain_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 0]); + domain_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 1]); + domain_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 2]); + domain_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 3]); + domain_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 4]); + domain_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 5]); + domain_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 6]); domain_buf1[3] = 0; - const u32 domain_len = salt_bufs[salt_pos].salt_len_pc; + const u32 domain_len = salt_bufs[SALT_POS].salt_len_pc; u32 s0[4]; u32 s1[4]; @@ -419,35 +419,35 @@ DECLSPEC void m08300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 domain_buf0[4]; u32 domain_buf1[4]; - domain_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 0]); - domain_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 1]); - domain_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 2]); - domain_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 3]); - domain_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 4]); - domain_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 5]); - domain_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf_pc[ 6]); + domain_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 0]); + domain_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 1]); + domain_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 2]); + domain_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 3]); + domain_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 4]); + domain_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 5]); + domain_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf_pc[ 6]); domain_buf1[3] = 0; - const u32 domain_len = salt_bufs[salt_pos].salt_len_pc; + const u32 domain_len = salt_bufs[SALT_POS].salt_len_pc; u32 s0[4]; u32 s1[4]; @@ -532,10 +532,10 @@ DECLSPEC void m08300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -701,7 +701,7 @@ KERNEL_FQ void m08300_m04 (KERN_ATTR_BASIC ()) * main */ - m08300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08300_m08 (KERN_ATTR_BASIC ()) @@ -748,7 +748,7 @@ KERNEL_FQ void m08300_m08 (KERN_ATTR_BASIC ()) * main */ - m08300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08300_m16 (KERN_ATTR_BASIC ()) @@ -795,7 +795,7 @@ KERNEL_FQ void m08300_m16 (KERN_ATTR_BASIC ()) * main */ - m08300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08300_s04 (KERN_ATTR_BASIC ()) @@ -842,7 +842,7 @@ KERNEL_FQ void m08300_s04 (KERN_ATTR_BASIC ()) * main */ - m08300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08300_s08 (KERN_ATTR_BASIC ()) @@ -889,7 +889,7 @@ KERNEL_FQ void m08300_s08 (KERN_ATTR_BASIC ()) * main */ - m08300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08300_s16 (KERN_ATTR_BASIC ()) @@ -936,5 +936,5 @@ KERNEL_FQ void m08300_s16 (KERN_ATTR_BASIC ()) * main */ - m08300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m08300_a3-pure.cl b/OpenCL/m08300_a3-pure.cl index b9ed4525c..0e157d02b 100644 --- a/OpenCL/m08300_a3-pure.cl +++ b/OpenCL/m08300_a3-pure.cl @@ -49,25 +49,25 @@ KERNEL_FQ void m08300_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32 (salt_bufs[SALT_POS].salt_buf[idx]); } - const u32 salt_len_pc = salt_bufs[salt_pos].salt_len_pc; + const u32 salt_len_pc = salt_bufs[SALT_POS].salt_len_pc; u32x s_pc[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len_pc; i += 4, idx += 1) { - s_pc[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf_pc[idx]); + s_pc[idx] = hc_swap32 (salt_bufs[SALT_POS].salt_buf_pc[idx]); } - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; /** * loop @@ -215,10 +215,10 @@ KERNEL_FQ void m08300_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -234,25 +234,25 @@ KERNEL_FQ void m08300_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32 (salt_bufs[SALT_POS].salt_buf[idx]); } - const u32 salt_len_pc = salt_bufs[salt_pos].salt_len_pc; + const u32 salt_len_pc = salt_bufs[SALT_POS].salt_len_pc; u32x s_pc[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len_pc; i += 4, idx += 1) { - s_pc[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf_pc[idx]); + s_pc[idx] = hc_swap32 (salt_bufs[SALT_POS].salt_buf_pc[idx]); } - const u32 salt_iter = salt_bufs[salt_pos].salt_iter; + const u32 salt_iter = salt_bufs[SALT_POS].salt_iter; /** * loop diff --git a/OpenCL/m08400_a0-optimized.cl b/OpenCL/m08400_a0-optimized.cl index ea97818be..1136ea98a 100644 --- a/OpenCL/m08400_a0-optimized.cl +++ b/OpenCL/m08400_a0-optimized.cl @@ -83,20 +83,20 @@ KERNEL_FQ void m08400_m04 (KERN_ATTR_RULES ()) u32 salt_buf1[4]; u32 salt_buf2[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); salt_buf2[2] = 0; salt_buf2[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -337,20 +337,20 @@ KERNEL_FQ void m08400_s04 (KERN_ATTR_RULES ()) u32 salt_buf1[4]; u32 salt_buf2[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); salt_buf2[2] = 0; salt_buf2[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -358,10 +358,10 @@ KERNEL_FQ void m08400_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08400_a0-pure.cl b/OpenCL/m08400_a0-pure.cl index b88e9aa8a..05a6b46a8 100644 --- a/OpenCL/m08400_a0-pure.cl +++ b/OpenCL/m08400_a0-pure.cl @@ -67,7 +67,7 @@ KERNEL_FQ void m08400_mxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -214,10 +214,10 @@ KERNEL_FQ void m08400_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -230,7 +230,7 @@ KERNEL_FQ void m08400_sxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m08400_a1-optimized.cl b/OpenCL/m08400_a1-optimized.cl index 5d1ef435c..854c20c74 100644 --- a/OpenCL/m08400_a1-optimized.cl +++ b/OpenCL/m08400_a1-optimized.cl @@ -81,20 +81,20 @@ KERNEL_FQ void m08400_m04 (KERN_ATTR_BASIC ()) u32 salt_buf1[4]; u32 salt_buf2[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); salt_buf2[2] = 0; salt_buf2[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -393,20 +393,20 @@ KERNEL_FQ void m08400_s04 (KERN_ATTR_BASIC ()) u32 salt_buf1[4]; u32 salt_buf2[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); salt_buf2[2] = 0; salt_buf2[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -414,10 +414,10 @@ KERNEL_FQ void m08400_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08400_a1-pure.cl b/OpenCL/m08400_a1-pure.cl index b799d8faf..d5d16e165 100644 --- a/OpenCL/m08400_a1-pure.cl +++ b/OpenCL/m08400_a1-pure.cl @@ -63,7 +63,7 @@ KERNEL_FQ void m08400_mxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_ctx_t ctx1l; @@ -210,10 +210,10 @@ KERNEL_FQ void m08400_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -224,7 +224,7 @@ KERNEL_FQ void m08400_sxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_ctx_t ctx1l; diff --git a/OpenCL/m08400_a3-optimized.cl b/OpenCL/m08400_a3-optimized.cl index 96afc5f8a..4a7dbaeca 100644 --- a/OpenCL/m08400_a3-optimized.cl +++ b/OpenCL/m08400_a3-optimized.cl @@ -43,20 +43,20 @@ DECLSPEC void m08400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf1[4]; u32 salt_buf2[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); salt_buf2[2] = 0; salt_buf2[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -253,20 +253,20 @@ DECLSPEC void m08400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf1[4]; u32 salt_buf2[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); salt_buf2[2] = 0; salt_buf2[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -274,10 +274,10 @@ DECLSPEC void m08400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -525,7 +525,7 @@ KERNEL_FQ void m08400_m04 (KERN_ATTR_BASIC ()) * main */ - m08400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m08400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m08400_m08 (KERN_ATTR_BASIC ()) @@ -595,7 +595,7 @@ KERNEL_FQ void m08400_m08 (KERN_ATTR_BASIC ()) * main */ - m08400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m08400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m08400_m16 (KERN_ATTR_BASIC ()) @@ -665,7 +665,7 @@ KERNEL_FQ void m08400_m16 (KERN_ATTR_BASIC ()) * main */ - m08400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m08400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m08400_s04 (KERN_ATTR_BASIC ()) @@ -735,7 +735,7 @@ KERNEL_FQ void m08400_s04 (KERN_ATTR_BASIC ()) * main */ - m08400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m08400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m08400_s08 (KERN_ATTR_BASIC ()) @@ -805,7 +805,7 @@ KERNEL_FQ void m08400_s08 (KERN_ATTR_BASIC ()) * main */ - m08400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m08400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m08400_s16 (KERN_ATTR_BASIC ()) @@ -875,5 +875,5 @@ KERNEL_FQ void m08400_s16 (KERN_ATTR_BASIC ()) * main */ - m08400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m08400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m08400_a3-pure.cl b/OpenCL/m08400_a3-pure.cl index 0e224662d..1797a78af 100644 --- a/OpenCL/m08400_a3-pure.cl +++ b/OpenCL/m08400_a3-pure.cl @@ -72,7 +72,7 @@ KERNEL_FQ void m08400_mxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -227,10 +227,10 @@ KERNEL_FQ void m08400_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -250,7 +250,7 @@ KERNEL_FQ void m08400_sxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m08500_a0-pure.cl b/OpenCL/m08500_a0-pure.cl index 03f57c0ad..852b9756f 100644 --- a/OpenCL/m08500_a0-pure.cl +++ b/OpenCL/m08500_a0-pure.cl @@ -576,8 +576,8 @@ KERNEL_FQ void m08500_mxx (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * main @@ -674,8 +674,8 @@ KERNEL_FQ void m08500_sxx (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * digest @@ -683,8 +683,8 @@ KERNEL_FQ void m08500_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m08500_a1-pure.cl b/OpenCL/m08500_a1-pure.cl index 2ca27bd1f..24dd5b61e 100644 --- a/OpenCL/m08500_a1-pure.cl +++ b/OpenCL/m08500_a1-pure.cl @@ -586,8 +586,8 @@ KERNEL_FQ void m08500_mxx (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * loop @@ -742,8 +742,8 @@ KERNEL_FQ void m08500_sxx (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * digest @@ -751,8 +751,8 @@ KERNEL_FQ void m08500_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m08500_a3-pure.cl b/OpenCL/m08500_a3-pure.cl index 36f27f2fd..6477bb0a7 100644 --- a/OpenCL/m08500_a3-pure.cl +++ b/OpenCL/m08500_a3-pure.cl @@ -535,8 +535,8 @@ DECLSPEC void m08500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * loop @@ -598,8 +598,8 @@ DECLSPEC void m08500s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * digest @@ -607,8 +607,8 @@ DECLSPEC void m08500s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -729,7 +729,7 @@ KERNEL_FQ void m08500_mxx (KERN_ATTR_VECTOR ()) * main */ - m08500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08500_sxx (KERN_ATTR_VECTOR ()) @@ -803,5 +803,5 @@ KERNEL_FQ void m08500_sxx (KERN_ATTR_VECTOR ()) * main */ - m08500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m08600_a0-pure.cl b/OpenCL/m08600_a0-pure.cl index 1098de8f3..989ec6b52 100644 --- a/OpenCL/m08600_a0-pure.cl +++ b/OpenCL/m08600_a0-pure.cl @@ -366,10 +366,10 @@ KERNEL_FQ void m08600_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08600_a1-pure.cl b/OpenCL/m08600_a1-pure.cl index 8d92c046f..10e0b42e8 100644 --- a/OpenCL/m08600_a1-pure.cl +++ b/OpenCL/m08600_a1-pure.cl @@ -436,10 +436,10 @@ KERNEL_FQ void m08600_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08600_a3-pure.cl b/OpenCL/m08600_a3-pure.cl index 58550b5c1..4b9cfa0fa 100644 --- a/OpenCL/m08600_a3-pure.cl +++ b/OpenCL/m08600_a3-pure.cl @@ -330,10 +330,10 @@ DECLSPEC void m08600s (LOCAL_AS u32 *s_lotus_magic_table, u32 *w, const u32 pw_l const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -422,7 +422,7 @@ KERNEL_FQ void m08600_mxx (KERN_ATTR_VECTOR ()) * main */ - m08600m (s_lotus_magic_table, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08600m (s_lotus_magic_table, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08600_sxx (KERN_ATTR_VECTOR ()) @@ -479,5 +479,5 @@ KERNEL_FQ void m08600_sxx (KERN_ATTR_VECTOR ()) * main */ - m08600s (s_lotus_magic_table, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08600s (s_lotus_magic_table, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m08700_a0-optimized.cl b/OpenCL/m08700_a0-optimized.cl index 65d34fdb9..d78f517a2 100644 --- a/OpenCL/m08700_a0-optimized.cl +++ b/OpenCL/m08700_a0-optimized.cl @@ -360,8 +360,8 @@ KERNEL_FQ void m08700_m04 (KERN_ATTR_RULES ()) * salt */ - const u32 salt0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 salt1 = (salt_bufs[salt_pos].salt_buf[1] & 0xff) | '(' << 8; + const u32 salt0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 salt1 = (salt_bufs[SALT_POS].salt_buf[1] & 0xff) | '(' << 8; /** * loop @@ -547,8 +547,8 @@ KERNEL_FQ void m08700_s04 (KERN_ATTR_RULES ()) * salt */ - const u32 salt0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 salt1 = (salt_bufs[salt_pos].salt_buf[1] & 0xff) | '(' << 8; + const u32 salt0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 salt1 = (salt_bufs[SALT_POS].salt_buf[1] & 0xff) | '(' << 8; /** * digest @@ -556,10 +556,10 @@ KERNEL_FQ void m08700_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08700_a1-optimized.cl b/OpenCL/m08700_a1-optimized.cl index 745475445..d5b40d7f7 100644 --- a/OpenCL/m08700_a1-optimized.cl +++ b/OpenCL/m08700_a1-optimized.cl @@ -358,8 +358,8 @@ KERNEL_FQ void m08700_m04 (KERN_ATTR_BASIC ()) * salt */ - const u32 salt0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 salt1 = (salt_bufs[salt_pos].salt_buf[1] & 0xff) | '(' << 8; + const u32 salt0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 salt1 = (salt_bufs[SALT_POS].salt_buf[1] & 0xff) | '(' << 8; /** * loop @@ -605,8 +605,8 @@ KERNEL_FQ void m08700_s04 (KERN_ATTR_BASIC ()) * salt */ - const u32 salt0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 salt1 = (salt_bufs[salt_pos].salt_buf[1] & 0xff) | '(' << 8; + const u32 salt0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 salt1 = (salt_bufs[SALT_POS].salt_buf[1] & 0xff) | '(' << 8; /** * digest @@ -614,10 +614,10 @@ KERNEL_FQ void m08700_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m08700_a3-optimized.cl b/OpenCL/m08700_a3-optimized.cl index 2a13fd3d8..89e343646 100644 --- a/OpenCL/m08700_a3-optimized.cl +++ b/OpenCL/m08700_a3-optimized.cl @@ -335,8 +335,8 @@ DECLSPEC void m08700m (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2as * salt */ - const u32 salt0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 salt1 = (salt_bufs[salt_pos].salt_buf[1] & 0xff) | '(' << 8; + const u32 salt0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 salt1 = (salt_bufs[SALT_POS].salt_buf[1] & 0xff) | '(' << 8; /** * loop @@ -468,8 +468,8 @@ DECLSPEC void m08700s (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2as * salt */ - const u32 salt0 = salt_bufs[salt_pos].salt_buf[0]; - const u32 salt1 = (salt_bufs[salt_pos].salt_buf[1] & 0xff) | '(' << 8; + const u32 salt0 = salt_bufs[SALT_POS].salt_buf[0]; + const u32 salt1 = (salt_bufs[SALT_POS].salt_buf[1] & 0xff) | '(' << 8; /** * digest @@ -477,10 +477,10 @@ DECLSPEC void m08700s (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2as const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -644,7 +644,7 @@ KERNEL_FQ void m08700_m04 (KERN_ATTR_VECTOR ()) * main */ - m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08700_m08 (KERN_ATTR_VECTOR ()) @@ -712,7 +712,7 @@ KERNEL_FQ void m08700_m08 (KERN_ATTR_VECTOR ()) * main */ - m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08700_m16 (KERN_ATTR_VECTOR ()) @@ -780,7 +780,7 @@ KERNEL_FQ void m08700_m16 (KERN_ATTR_VECTOR ()) * main */ - m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08700_s04 (KERN_ATTR_VECTOR ()) @@ -848,7 +848,7 @@ KERNEL_FQ void m08700_s04 (KERN_ATTR_VECTOR ()) * main */ - m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08700_s08 (KERN_ATTR_VECTOR ()) @@ -916,7 +916,7 @@ KERNEL_FQ void m08700_s08 (KERN_ATTR_VECTOR ()) * main */ - m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m08700_s16 (KERN_ATTR_VECTOR ()) @@ -984,5 +984,5 @@ KERNEL_FQ void m08700_s16 (KERN_ATTR_VECTOR ()) * main */ - m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m08800-pure.cl b/OpenCL/m08800-pure.cl index faf8d729c..0d1949aa8 100644 --- a/OpenCL/m08800-pure.cl +++ b/OpenCL/m08800-pure.cl @@ -94,7 +94,7 @@ KERNEL_FQ void m08800_init (KERN_ATTR_TMPS_ESALT (androidfde_tmp_t, androidfde_t tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -303,10 +303,10 @@ KERNEL_FQ void m08800_comp (KERN_ATTR_TMPS_ESALT (androidfde_tmp_t, androidfde_t u32 data[4]; - data[0] = digests_buf[digests_offset].digest_buf[0]; - data[1] = digests_buf[digests_offset].digest_buf[1]; - data[2] = digests_buf[digests_offset].digest_buf[2]; - data[3] = digests_buf[digests_offset].digest_buf[3]; + data[0] = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + data[1] = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + data[2] = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + data[3] = digests_buf[DIGESTS_OFFSET].digest_buf[3]; u32 out[4]; @@ -383,10 +383,10 @@ KERNEL_FQ void m08800_comp (KERN_ATTR_TMPS_ESALT (androidfde_tmp_t, androidfde_t // 3. decrypt real data, xor essiv afterwards - data[0] = esalt_bufs[digests_offset].data[0]; - data[1] = esalt_bufs[digests_offset].data[1]; - data[2] = esalt_bufs[digests_offset].data[2]; - data[3] = esalt_bufs[digests_offset].data[3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[3]; iv[0] = essiv[0]; iv[1] = essiv[1]; @@ -415,9 +415,9 @@ KERNEL_FQ void m08800_comp (KERN_ATTR_TMPS_ESALT (androidfde_tmp_t, androidfde_t // MSDOS5.0 if ((r0 == 0x4f44534d) && (r1 == 0x302e3553)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } } } @@ -445,15 +445,15 @@ KERNEL_FQ void m08800_comp (KERN_ATTR_TMPS_ESALT (androidfde_tmp_t, androidfde_t for (u32 i = 4; i < 16; i += 4) { - data[0] = esalt_bufs[digests_offset].data[256 + i + 0]; - data[1] = esalt_bufs[digests_offset].data[256 + i + 1]; - data[2] = esalt_bufs[digests_offset].data[256 + i + 2]; - data[3] = esalt_bufs[digests_offset].data[256 + i + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[256 + i + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[256 + i + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[256 + i + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[256 + i + 3]; - iv[0] = esalt_bufs[digests_offset].data[256 + i + 0 - 4]; - iv[1] = esalt_bufs[digests_offset].data[256 + i + 1 - 4]; - iv[2] = esalt_bufs[digests_offset].data[256 + i + 2 - 4]; - iv[3] = esalt_bufs[digests_offset].data[256 + i + 3 - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[256 + i + 0 - 4]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[256 + i + 1 - 4]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[256 + i + 2 - 4]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[256 + i + 3 - 4]; AES128_decrypt (ks, data, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -474,9 +474,9 @@ KERNEL_FQ void m08800_comp (KERN_ATTR_TMPS_ESALT (androidfde_tmp_t, androidfde_t if ((r[5] < 2) && (r[6] < 16) && ((r[14] & 0xffff) == 0xEF53)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m08900-pure.cl b/OpenCL/m08900-pure.cl index 706f7f2e4..cb0077e17 100644 --- a/OpenCL/m08900-pure.cl +++ b/OpenCL/m08900-pure.cl @@ -285,7 +285,7 @@ KERNEL_FQ void m08900_init (KERN_ATTR_TMPS (scrypt_tmp_t)) sha256_hmac_init_global_swap (&sha256_hmac_ctx, pws[gid].i, pws[gid].pw_len); - sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1, k = 0; i < SCRYPT_CNT; i += 8, j += 1, k += 2) { diff --git a/OpenCL/m09000-pure.cl b/OpenCL/m09000-pure.cl index 15db9287b..737adde4e 100644 --- a/OpenCL/m09000-pure.cl +++ b/OpenCL/m09000-pure.cl @@ -404,12 +404,12 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m09000_init (KERN_ATTR_TMPS * salt */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; /** * initial sha1 diff --git a/OpenCL/m09100-pure.cl b/OpenCL/m09100-pure.cl index 14ab60f9e..83de82773 100644 --- a/OpenCL/m09100-pure.cl +++ b/OpenCL/m09100-pure.cl @@ -518,10 +518,10 @@ KERNEL_FQ void m09100_init (KERN_ATTR_TMPS (lotus8_tmp_t)) u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; const u32 salt0 = salt_buf0[0]; const u32 salt1 = (salt_buf0[1] & 0xff) | ('(' << 8); @@ -655,7 +655,7 @@ KERNEL_FQ void m09100_init (KERN_ATTR_TMPS (lotus8_tmp_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 2; i += 5, j += 1) { diff --git a/OpenCL/m09400-pure.cl b/OpenCL/m09400-pure.cl index 2ee3a6844..fef3cfd6c 100644 --- a/OpenCL/m09400-pure.cl +++ b/OpenCL/m09400-pure.cl @@ -47,7 +47,7 @@ KERNEL_FQ void m09400_init (KERN_ATTR_TMPS_ESALT (office2007_tmp_t, office2007_t sha1_init (&ctx); - sha1_update_global (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_utf16le_swap (&ctx, pws[gid].i, pws[gid].pw_len); @@ -274,10 +274,10 @@ KERNEL_FQ void m09400_comp (KERN_ATTR_TMPS_ESALT (office2007_tmp_t, office2007_t u32 verifier[4]; - verifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - verifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - verifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - verifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + verifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + verifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + verifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + verifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; u32 data[4]; diff --git a/OpenCL/m09500-pure.cl b/OpenCL/m09500-pure.cl index 77b1d8e55..92f2f88d3 100644 --- a/OpenCL/m09500-pure.cl +++ b/OpenCL/m09500-pure.cl @@ -45,7 +45,7 @@ KERNEL_FQ void m09500_init (KERN_ATTR_TMPS_ESALT (office2010_tmp_t, office2010_t sha1_init (&ctx); - sha1_update_global (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_utf16le_swap (&ctx, pws[gid].i, pws[gid].pw_len); @@ -271,7 +271,7 @@ KERNEL_FQ void m09500_comp (KERN_ATTR_TMPS_ESALT (office2010_tmp_t, office2010_t AES128_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); - const u32 digest_cur = digests_offset + loop_pos; + const u32 digest_cur = DIGESTS_OFFSET + loop_pos; u32 data[4]; @@ -285,10 +285,10 @@ KERNEL_FQ void m09500_comp (KERN_ATTR_TMPS_ESALT (office2010_tmp_t, office2010_t AES128_decrypt (ks, data, out, s_td0, s_td1, s_td2, s_td3, s_td4); - out[0] ^= salt_bufs[salt_pos].salt_buf[0]; - out[1] ^= salt_bufs[salt_pos].salt_buf[1]; - out[2] ^= salt_bufs[salt_pos].salt_buf[2]; - out[3] ^= salt_bufs[salt_pos].salt_buf[3]; + out[0] ^= salt_bufs[SALT_POS].salt_buf[0]; + out[1] ^= salt_bufs[SALT_POS].salt_buf[1]; + out[2] ^= salt_bufs[SALT_POS].salt_buf[2]; + out[3] ^= salt_bufs[SALT_POS].salt_buf[3]; // do a sha1 of the result @@ -331,10 +331,10 @@ KERNEL_FQ void m09500_comp (KERN_ATTR_TMPS_ESALT (office2010_tmp_t, office2010_t AES128_set_encrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3); - data[0] = digest[0] ^ salt_bufs[salt_pos].salt_buf[0]; - data[1] = digest[1] ^ salt_bufs[salt_pos].salt_buf[1]; - data[2] = digest[2] ^ salt_bufs[salt_pos].salt_buf[2]; - data[3] = digest[3] ^ salt_bufs[salt_pos].salt_buf[3]; + data[0] = digest[0] ^ salt_bufs[SALT_POS].salt_buf[0]; + data[1] = digest[1] ^ salt_bufs[SALT_POS].salt_buf[1]; + data[2] = digest[2] ^ salt_bufs[SALT_POS].salt_buf[2]; + data[3] = digest[3] ^ salt_bufs[SALT_POS].salt_buf[3]; AES128_encrypt (ks, data, out, s_te0, s_te1, s_te2, s_te3, s_te4); diff --git a/OpenCL/m09600-pure.cl b/OpenCL/m09600-pure.cl index dd1520040..3f1acd393 100644 --- a/OpenCL/m09600-pure.cl +++ b/OpenCL/m09600-pure.cl @@ -45,7 +45,7 @@ KERNEL_FQ void m09600_init (KERN_ATTR_TMPS_ESALT (office2013_tmp_t, office2013_t sha512_init (&ctx); - sha512_update_global (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_utf16le_swap (&ctx, pws[gid].i, pws[gid].pw_len); @@ -368,7 +368,7 @@ KERNEL_FQ void m09600_comp (KERN_ATTR_TMPS_ESALT (office2013_tmp_t, office2013_t AES256_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); - const u32 digest_cur = digests_offset + loop_pos; + const u32 digest_cur = DIGESTS_OFFSET + loop_pos; u32 data[4]; @@ -381,10 +381,10 @@ KERNEL_FQ void m09600_comp (KERN_ATTR_TMPS_ESALT (office2013_tmp_t, office2013_t AES256_decrypt (ks, data, out, s_td0, s_td1, s_td2, s_td3, s_td4); - out[0] ^= salt_bufs[salt_pos].salt_buf[0]; - out[1] ^= salt_bufs[salt_pos].salt_buf[1]; - out[2] ^= salt_bufs[salt_pos].salt_buf[2]; - out[3] ^= salt_bufs[salt_pos].salt_buf[3]; + out[0] ^= salt_bufs[SALT_POS].salt_buf[0]; + out[1] ^= salt_bufs[SALT_POS].salt_buf[1]; + out[2] ^= salt_bufs[SALT_POS].salt_buf[2]; + out[3] ^= salt_bufs[SALT_POS].salt_buf[3]; // do a sha512 of the result @@ -447,10 +447,10 @@ KERNEL_FQ void m09600_comp (KERN_ATTR_TMPS_ESALT (office2013_tmp_t, office2013_t AES256_set_encrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3); - data[0] = h32_from_64_S (digest[0]) ^ salt_bufs[salt_pos].salt_buf[0]; - data[1] = l32_from_64_S (digest[0]) ^ salt_bufs[salt_pos].salt_buf[1]; - data[2] = h32_from_64_S (digest[1]) ^ salt_bufs[salt_pos].salt_buf[2]; - data[3] = l32_from_64_S (digest[1]) ^ salt_bufs[salt_pos].salt_buf[3]; + data[0] = h32_from_64_S (digest[0]) ^ salt_bufs[SALT_POS].salt_buf[0]; + data[1] = l32_from_64_S (digest[0]) ^ salt_bufs[SALT_POS].salt_buf[1]; + data[2] = h32_from_64_S (digest[1]) ^ salt_bufs[SALT_POS].salt_buf[2]; + data[3] = l32_from_64_S (digest[1]) ^ salt_bufs[SALT_POS].salt_buf[3]; AES256_encrypt (ks, data, out, s_te0, s_te1, s_te2, s_te3, s_te4); diff --git a/OpenCL/m09700_a0-optimized.cl b/OpenCL/m09700_a0-optimized.cl index dbbbf4b55..2f61ea2ef 100644 --- a/OpenCL/m09700_a0-optimized.cl +++ b/OpenCL/m09700_a0-optimized.cl @@ -537,10 +537,10 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt @@ -548,10 +548,10 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -724,10 +724,10 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt @@ -735,10 +735,10 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -746,10 +746,10 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09700_a1-optimized.cl b/OpenCL/m09700_a1-optimized.cl index 1c3a59809..1f4c9d141 100644 --- a/OpenCL/m09700_a1-optimized.cl +++ b/OpenCL/m09700_a1-optimized.cl @@ -535,10 +535,10 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_ESALT (oldoffice01_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt @@ -546,10 +546,10 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_ESALT (oldoffice01_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -780,10 +780,10 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_ESALT (oldoffice01_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt @@ -791,10 +791,10 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_ESALT (oldoffice01_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -802,10 +802,10 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_ESALT (oldoffice01_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09700_a3-optimized.cl b/OpenCL/m09700_a3-optimized.cl index 38819cc95..bd4f07ee0 100644 --- a/OpenCL/m09700_a3-optimized.cl +++ b/OpenCL/m09700_a3-optimized.cl @@ -165,10 +165,10 @@ DECLSPEC void m09700m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 salt_buf_t0[4]; - salt_buf_t0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf_t0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf_t0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf_t0[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf_t0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf_t0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf_t0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf_t0[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 salt_buf_t1[5]; @@ -200,10 +200,10 @@ DECLSPEC void m09700m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -571,10 +571,10 @@ DECLSPEC void m09700s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 salt_buf_t0[4]; - salt_buf_t0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf_t0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf_t0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf_t0[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf_t0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf_t0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf_t0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf_t0[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 salt_buf_t1[5]; @@ -606,10 +606,10 @@ DECLSPEC void m09700s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -617,10 +617,10 @@ DECLSPEC void m09700s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -1014,7 +1014,7 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09700m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09700m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09700_m08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -1063,7 +1063,7 @@ KERNEL_FQ void m09700_m08 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09700m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09700m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09700_m16 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -1116,7 +1116,7 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09700s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09700s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09700_s08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -1165,7 +1165,7 @@ KERNEL_FQ void m09700_s08 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09700s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09700s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09700_s16 (KERN_ATTR_ESALT (oldoffice01_t)) diff --git a/OpenCL/m09710_a0-optimized.cl b/OpenCL/m09710_a0-optimized.cl index 4359393f5..3c3b49de5 100644 --- a/OpenCL/m09710_a0-optimized.cl +++ b/OpenCL/m09710_a0-optimized.cl @@ -193,10 +193,10 @@ KERNEL_FQ void m09710_m04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -331,10 +331,10 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -342,10 +342,10 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09710_a1-optimized.cl b/OpenCL/m09710_a1-optimized.cl index fa905ed7c..80625f90c 100644 --- a/OpenCL/m09710_a1-optimized.cl +++ b/OpenCL/m09710_a1-optimized.cl @@ -191,10 +191,10 @@ KERNEL_FQ void m09710_m04 (KERN_ATTR_ESALT (oldoffice01_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -375,10 +375,10 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_ESALT (oldoffice01_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -386,10 +386,10 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_ESALT (oldoffice01_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09710_a3-optimized.cl b/OpenCL/m09710_a3-optimized.cl index ae9bd0383..763826790 100644 --- a/OpenCL/m09710_a3-optimized.cl +++ b/OpenCL/m09710_a3-optimized.cl @@ -168,10 +168,10 @@ DECLSPEC void m09710m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -277,10 +277,10 @@ DECLSPEC void m09710s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -288,10 +288,10 @@ DECLSPEC void m09710s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -423,7 +423,7 @@ KERNEL_FQ void m09710_m04 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09710m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09710m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09710_m08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -480,7 +480,7 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09710s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09710s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09710_s08 (KERN_ATTR_ESALT (oldoffice01_t)) diff --git a/OpenCL/m09720_a0-optimized.cl b/OpenCL/m09720_a0-optimized.cl index e661620af..2e457ebe4 100644 --- a/OpenCL/m09720_a0-optimized.cl +++ b/OpenCL/m09720_a0-optimized.cl @@ -405,10 +405,10 @@ KERNEL_FQ void m09720_m04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * loop @@ -511,10 +511,10 @@ KERNEL_FQ void m09720_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * digest @@ -522,8 +522,8 @@ KERNEL_FQ void m09720_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m09720_a1-optimized.cl b/OpenCL/m09720_a1-optimized.cl index d1eabb20c..e5184f1a5 100644 --- a/OpenCL/m09720_a1-optimized.cl +++ b/OpenCL/m09720_a1-optimized.cl @@ -403,10 +403,10 @@ KERNEL_FQ void m09720_m04 (KERN_ATTR_ESALT (oldoffice01_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * loop @@ -559,10 +559,10 @@ KERNEL_FQ void m09720_s04 (KERN_ATTR_ESALT (oldoffice01_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * digest @@ -570,8 +570,8 @@ KERNEL_FQ void m09720_s04 (KERN_ATTR_ESALT (oldoffice01_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m09720_a3-optimized.cl b/OpenCL/m09720_a3-optimized.cl index 7da20ed6f..938c81532 100644 --- a/OpenCL/m09720_a3-optimized.cl +++ b/OpenCL/m09720_a3-optimized.cl @@ -382,10 +382,10 @@ DECLSPEC void m09720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * loop @@ -472,10 +472,10 @@ DECLSPEC void m09720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * digest @@ -483,8 +483,8 @@ DECLSPEC void m09720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -603,7 +603,7 @@ KERNEL_FQ void m09720_m04 (KERN_ATTR_ESALT (oldoffice01_t)) * main */ - m09720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09720_m08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -650,7 +650,7 @@ KERNEL_FQ void m09720_m08 (KERN_ATTR_ESALT (oldoffice01_t)) * main */ - m09720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09720m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09720_m16 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -701,7 +701,7 @@ KERNEL_FQ void m09720_s04 (KERN_ATTR_ESALT (oldoffice01_t)) * main */ - m09720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09720_s08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -748,7 +748,7 @@ KERNEL_FQ void m09720_s08 (KERN_ATTR_ESALT (oldoffice01_t)) * main */ - m09720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09720s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09720_s16 (KERN_ATTR_ESALT (oldoffice01_t)) diff --git a/OpenCL/m09800_a0-optimized.cl b/OpenCL/m09800_a0-optimized.cl index 3257c0cbb..1aba657ed 100644 --- a/OpenCL/m09800_a0-optimized.cl +++ b/OpenCL/m09800_a0-optimized.cl @@ -197,23 +197,23 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt */ - const u32 version = esalt_bufs[digests_offset].version; + const u32 version = esalt_bufs[DIGESTS_OFFSET].version; u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -345,11 +345,11 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) // initial compare - int digest_pos = find_hash (out, digests_cnt, &digests_buf[digests_offset]); + int digest_pos = find_hash (out, digests_cnt, &digests_buf[DIGESTS_OFFSET]); if (digest_pos == -1) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -389,10 +389,10 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; j = rc4_next_16 (rc4_key, 0, 0, secondBlockData, out); @@ -406,10 +406,10 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -424,11 +424,11 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if (null_bytes < MIN_NULL_BYTES) continue; } - const u32 final_hash_pos = digests_offset + digest_pos; + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); } } } @@ -485,23 +485,23 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt */ - const u32 version = esalt_bufs[digests_offset].version; + const u32 version = esalt_bufs[DIGESTS_OFFSET].version; u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -509,10 +509,10 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -650,7 +650,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if (out[2] != search[2]) continue; if (out[3] != search[3]) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -690,10 +690,10 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; j = rc4_next_16 (rc4_key, 0, 0, secondBlockData, out); @@ -707,10 +707,10 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -725,9 +725,9 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if (null_bytes < MIN_NULL_BYTES) continue; } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m09800_a1-optimized.cl b/OpenCL/m09800_a1-optimized.cl index 891d7ca67..b2e328aab 100644 --- a/OpenCL/m09800_a1-optimized.cl +++ b/OpenCL/m09800_a1-optimized.cl @@ -195,23 +195,23 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt */ - const u32 version = esalt_bufs[digests_offset].version; + const u32 version = esalt_bufs[DIGESTS_OFFSET].version; u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -393,11 +393,11 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) // initial compare - int digest_pos = find_hash (out, digests_cnt, &digests_buf[digests_offset]); + int digest_pos = find_hash (out, digests_cnt, &digests_buf[DIGESTS_OFFSET]); if (digest_pos == -1) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -437,10 +437,10 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; j = rc4_next_16 (rc4_key, 0, 0, secondBlockData, out); @@ -454,10 +454,10 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -472,11 +472,11 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) if (null_bytes < MIN_NULL_BYTES) continue; } - const u32 final_hash_pos = digests_offset + digest_pos; + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); } } } @@ -533,23 +533,23 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt */ - const u32 version = esalt_bufs[digests_offset].version; + const u32 version = esalt_bufs[DIGESTS_OFFSET].version; u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -557,10 +557,10 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -748,7 +748,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) if (out[2] != search[2]) continue; if (out[3] != search[3]) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -788,10 +788,10 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; j = rc4_next_16 (rc4_key, 0, 0, secondBlockData, out); @@ -805,10 +805,10 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -823,9 +823,9 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) if (null_bytes < MIN_NULL_BYTES) continue; } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m09800_a3-optimized.cl b/OpenCL/m09800_a3-optimized.cl index 8315abfdf..18d8ac712 100644 --- a/OpenCL/m09800_a3-optimized.cl +++ b/OpenCL/m09800_a3-optimized.cl @@ -169,23 +169,23 @@ DECLSPEC void m09800m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt */ - const u32 version = esalt_bufs[digests_offset].version; + const u32 version = esalt_bufs[DIGESTS_OFFSET].version; u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -316,11 +316,11 @@ DECLSPEC void m09800m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 // initial compare - int digest_pos = find_hash (out, digests_cnt, &digests_buf[digests_offset]); + int digest_pos = find_hash (out, digests_cnt, &digests_buf[DIGESTS_OFFSET]); if (digest_pos == -1) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -360,10 +360,10 @@ DECLSPEC void m09800m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; j = rc4_next_16 (rc4_key, 0, 0, secondBlockData, out); @@ -377,10 +377,10 @@ DECLSPEC void m09800m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -395,11 +395,11 @@ DECLSPEC void m09800m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if (null_bytes < MIN_NULL_BYTES) continue; } - const u32 final_hash_pos = digests_offset + digest_pos; + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); } } } @@ -425,23 +425,23 @@ DECLSPEC void m09800s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * esalt */ - const u32 version = esalt_bufs[digests_offset].version; + const u32 version = esalt_bufs[DIGESTS_OFFSET].version; u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -449,10 +449,10 @@ DECLSPEC void m09800s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -589,7 +589,7 @@ DECLSPEC void m09800s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if (out[2] != search[2]) continue; if (out[3] != search[3]) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -629,10 +629,10 @@ DECLSPEC void m09800s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; j = rc4_next_16 (rc4_key, 0, 0, secondBlockData, out); @@ -646,10 +646,10 @@ DECLSPEC void m09800s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -664,9 +664,9 @@ DECLSPEC void m09800s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if (null_bytes < MIN_NULL_BYTES) continue; } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -717,7 +717,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09800m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09800m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09800_m08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -766,7 +766,7 @@ KERNEL_FQ void m09800_m08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09800m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09800m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09800_m16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -815,7 +815,7 @@ KERNEL_FQ void m09800_m16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09800m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09800m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -864,7 +864,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09800s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09800s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09800_s08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -913,7 +913,7 @@ KERNEL_FQ void m09800_s08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09800s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09800s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09800_s16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -962,5 +962,5 @@ KERNEL_FQ void m09800_s16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09800s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09800s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m09810_a0-optimized.cl b/OpenCL/m09810_a0-optimized.cl index 3b911251c..3bea210e6 100644 --- a/OpenCL/m09810_a0-optimized.cl +++ b/OpenCL/m09810_a0-optimized.cl @@ -195,10 +195,10 @@ KERNEL_FQ void m09810_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -320,10 +320,10 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -331,10 +331,10 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09810_a1-optimized.cl b/OpenCL/m09810_a1-optimized.cl index b488cdf49..5766aa8f3 100644 --- a/OpenCL/m09810_a1-optimized.cl +++ b/OpenCL/m09810_a1-optimized.cl @@ -193,10 +193,10 @@ KERNEL_FQ void m09810_m04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -364,10 +364,10 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -375,10 +375,10 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_ESALT (oldoffice34_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09810_a3-optimized.cl b/OpenCL/m09810_a3-optimized.cl index 760dcb932..b14397185 100644 --- a/OpenCL/m09810_a3-optimized.cl +++ b/OpenCL/m09810_a3-optimized.cl @@ -170,10 +170,10 @@ DECLSPEC void m09810m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * loop @@ -264,10 +264,10 @@ DECLSPEC void m09810s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 encryptedVerifier[4]; - encryptedVerifier[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - encryptedVerifier[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - encryptedVerifier[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - encryptedVerifier[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + encryptedVerifier[0] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[0]; + encryptedVerifier[1] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[1]; + encryptedVerifier[2] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[2]; + encryptedVerifier[3] = esalt_bufs[DIGESTS_OFFSET].encryptedVerifier[3]; /** * digest @@ -275,10 +275,10 @@ DECLSPEC void m09810s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -395,7 +395,7 @@ KERNEL_FQ void m09810_m04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09810m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09810m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09810_m08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -444,7 +444,7 @@ KERNEL_FQ void m09810_m08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09810m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09810m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09810_m16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -493,7 +493,7 @@ KERNEL_FQ void m09810_m16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09810m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09810m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09810_s04 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -542,7 +542,7 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09810s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09810s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09810_s08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -591,7 +591,7 @@ KERNEL_FQ void m09810_s08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09810s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09810s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09810_s16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -640,5 +640,5 @@ KERNEL_FQ void m09810_s16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09810s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09810s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m09820_a0-optimized.cl b/OpenCL/m09820_a0-optimized.cl index 3f4bfeb2b..99ff2da70 100644 --- a/OpenCL/m09820_a0-optimized.cl +++ b/OpenCL/m09820_a0-optimized.cl @@ -197,10 +197,10 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * loop @@ -287,11 +287,11 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) // initial compare - int digest_pos = find_hash (digest, digests_cnt, &digests_buf[digests_offset]); + int digest_pos = find_hash (digest, digests_cnt, &digests_buf[DIGESTS_OFFSET]); if (digest_pos == -1) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -331,10 +331,10 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; u32 out[4]; @@ -350,10 +350,10 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -368,11 +368,11 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if (null_bytes < MIN_NULL_BYTES) continue; } - const u32 final_hash_pos = digests_offset + digest_pos; + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); } } } @@ -429,10 +429,10 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * digest @@ -440,8 +440,8 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -534,7 +534,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if (digest[0] != search[0]) continue; if (digest[1] != search[1]) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -574,10 +574,10 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; u32 out[4]; @@ -593,10 +593,10 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -611,9 +611,9 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) if (null_bytes < MIN_NULL_BYTES) continue; } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m09820_a1-optimized.cl b/OpenCL/m09820_a1-optimized.cl index bedc61bb8..62b602cdf 100644 --- a/OpenCL/m09820_a1-optimized.cl +++ b/OpenCL/m09820_a1-optimized.cl @@ -195,10 +195,10 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * loop @@ -335,11 +335,11 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) // initial compare - int digest_pos = find_hash (digest, digests_cnt, &digests_buf[digests_offset]); + int digest_pos = find_hash (digest, digests_cnt, &digests_buf[DIGESTS_OFFSET]); if (digest_pos == -1) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -379,10 +379,10 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; u32 out[4]; @@ -398,10 +398,10 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -416,11 +416,11 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) if (null_bytes < MIN_NULL_BYTES) continue; } - const u32 final_hash_pos = digests_offset + digest_pos; + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); } } } @@ -477,10 +477,10 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * digest @@ -488,8 +488,8 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -632,7 +632,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) if (digest[0] != search[0]) continue; if (digest[1] != search[1]) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -672,10 +672,10 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; u32 out[4]; @@ -691,10 +691,10 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -709,9 +709,9 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) if (null_bytes < MIN_NULL_BYTES) continue; } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m09820_a3-optimized.cl b/OpenCL/m09820_a3-optimized.cl index a0c0a568d..73453df76 100644 --- a/OpenCL/m09820_a3-optimized.cl +++ b/OpenCL/m09820_a3-optimized.cl @@ -172,10 +172,10 @@ DECLSPEC void m09820m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * loop @@ -259,11 +259,11 @@ DECLSPEC void m09820m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 // initial compare - int digest_pos = find_hash (digest, digests_cnt, &digests_buf[digests_offset]); + int digest_pos = find_hash (digest, digests_cnt, &digests_buf[DIGESTS_OFFSET]); if (digest_pos == -1) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -303,10 +303,10 @@ DECLSPEC void m09820m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; u32 out[4]; @@ -322,10 +322,10 @@ DECLSPEC void m09820m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -340,11 +340,11 @@ DECLSPEC void m09820m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if (null_bytes < MIN_NULL_BYTES) continue; } - const u32 final_hash_pos = digests_offset + digest_pos; + const u32 final_hash_pos = DIGESTS_OFFSET + digest_pos; if (atomic_inc (&hashes_shown[final_hash_pos]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, final_hash_pos, gid, il_pos, 0, 0); } } } @@ -370,10 +370,10 @@ DECLSPEC void m09820s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 salt_buf[4]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; /** * digest @@ -381,8 +381,8 @@ DECLSPEC void m09820s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -472,7 +472,7 @@ DECLSPEC void m09820s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if (digest[0] != search[0]) continue; if (digest[1] != search[1]) continue; - if (esalt_bufs[digests_offset].secondBlockLen != 0) + if (esalt_bufs[DIGESTS_OFFSET].secondBlockLen != 0) { w0[0] = pass_hash[0]; w0[1] = pass_hash[1]; @@ -512,10 +512,10 @@ DECLSPEC void m09820s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 secondBlockData[4]; - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[0]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[1]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[2]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[3]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[0]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[1]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[2]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[3]; u32 out[4]; @@ -531,10 +531,10 @@ DECLSPEC void m09820s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if ((out[k] & 0xff000000) == 0) null_bytes++; } - secondBlockData[0] = esalt_bufs[digests_offset].secondBlockData[4]; - secondBlockData[1] = esalt_bufs[digests_offset].secondBlockData[5]; - secondBlockData[2] = esalt_bufs[digests_offset].secondBlockData[6]; - secondBlockData[3] = esalt_bufs[digests_offset].secondBlockData[7]; + secondBlockData[0] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[4]; + secondBlockData[1] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[5]; + secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[6]; + secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET].secondBlockData[7]; rc4_next_16 (rc4_key, 16, j, secondBlockData, out); @@ -549,9 +549,9 @@ DECLSPEC void m09820s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 if (null_bytes < MIN_NULL_BYTES) continue; } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -602,7 +602,7 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09820m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09820m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09820_m08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -651,7 +651,7 @@ KERNEL_FQ void m09820_m08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09820m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09820m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09820_m16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -700,7 +700,7 @@ KERNEL_FQ void m09820_m16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09820m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09820m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -749,7 +749,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09820s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09820s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09820_s08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -798,7 +798,7 @@ KERNEL_FQ void m09820_s08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09820s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09820s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09820_s16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -847,5 +847,5 @@ KERNEL_FQ void m09820_s16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m09820s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09820s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m09900_a0-optimized.cl b/OpenCL/m09900_a0-optimized.cl index 3c4cf10ff..8072178fe 100644 --- a/OpenCL/m09900_a0-optimized.cl +++ b/OpenCL/m09900_a0-optimized.cl @@ -286,10 +286,10 @@ KERNEL_FQ void m09900_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09900_a0-pure.cl b/OpenCL/m09900_a0-pure.cl index 04347dfc9..1d15473f5 100644 --- a/OpenCL/m09900_a0-pure.cl +++ b/OpenCL/m09900_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m09900_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09900_a1-optimized.cl b/OpenCL/m09900_a1-optimized.cl index 07f62d547..78edebb4d 100644 --- a/OpenCL/m09900_a1-optimized.cl +++ b/OpenCL/m09900_a1-optimized.cl @@ -344,10 +344,10 @@ KERNEL_FQ void m09900_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09900_a1-pure.cl b/OpenCL/m09900_a1-pure.cl index 367aa5755..febd833c3 100644 --- a/OpenCL/m09900_a1-pure.cl +++ b/OpenCL/m09900_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m09900_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m09900_a3-optimized.cl b/OpenCL/m09900_a3-optimized.cl index e0145b106..d8ec338d2 100644 --- a/OpenCL/m09900_a3-optimized.cl +++ b/OpenCL/m09900_a3-optimized.cl @@ -408,10 +408,10 @@ DECLSPEC void m09900s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -626,7 +626,7 @@ KERNEL_FQ void m09900_m04 (KERN_ATTR_VECTOR ()) * main */ - m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09900_m08 (KERN_ATTR_VECTOR ()) @@ -664,7 +664,7 @@ KERNEL_FQ void m09900_m08 (KERN_ATTR_VECTOR ()) * main */ - m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09900_m16 (KERN_ATTR_VECTOR ()) @@ -702,7 +702,7 @@ KERNEL_FQ void m09900_m16 (KERN_ATTR_VECTOR ()) * main */ - m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09900_s04 (KERN_ATTR_VECTOR ()) @@ -740,7 +740,7 @@ KERNEL_FQ void m09900_s04 (KERN_ATTR_VECTOR ()) * main */ - m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09900_s08 (KERN_ATTR_VECTOR ()) @@ -778,7 +778,7 @@ KERNEL_FQ void m09900_s08 (KERN_ATTR_VECTOR ()) * main */ - m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m09900_s16 (KERN_ATTR_VECTOR ()) @@ -816,5 +816,5 @@ KERNEL_FQ void m09900_s16 (KERN_ATTR_VECTOR ()) * main */ - m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m09900_a3-pure.cl b/OpenCL/m09900_a3-pure.cl index df6e1f55f..04d91452f 100644 --- a/OpenCL/m09900_a3-pure.cl +++ b/OpenCL/m09900_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m09900_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10100_a0-optimized.cl b/OpenCL/m10100_a0-optimized.cl index 593fb98fe..8ca806e8f 100644 --- a/OpenCL/m10100_a0-optimized.cl +++ b/OpenCL/m10100_a0-optimized.cl @@ -71,10 +71,10 @@ KERNEL_FQ void m10100_m04 (KERN_ATTR_RULES ()) u64x v2p = SIPHASHM_2; u64x v3p = SIPHASHM_3; - v0p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v1p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - v2p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v3p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); + v0p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v1p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); + v2p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v3p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); /** * loop @@ -198,10 +198,10 @@ KERNEL_FQ void m10100_s04 (KERN_ATTR_RULES ()) u64x v2p = SIPHASHM_2; u64x v3p = SIPHASHM_3; - v0p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v1p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - v2p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v3p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); + v0p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v1p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); + v2p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v3p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); /** * digest @@ -209,8 +209,8 @@ KERNEL_FQ void m10100_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m10100_a1-optimized.cl b/OpenCL/m10100_a1-optimized.cl index b18e584ca..867272b53 100644 --- a/OpenCL/m10100_a1-optimized.cl +++ b/OpenCL/m10100_a1-optimized.cl @@ -69,10 +69,10 @@ KERNEL_FQ void m10100_m04 (KERN_ATTR_BASIC ()) u64x v2p = SIPHASHM_2; u64x v3p = SIPHASHM_3; - v0p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v1p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - v2p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v3p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); + v0p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v1p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); + v2p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v3p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); /** * loop @@ -256,10 +256,10 @@ KERNEL_FQ void m10100_s04 (KERN_ATTR_BASIC ()) u64x v2p = SIPHASHM_2; u64x v3p = SIPHASHM_3; - v0p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v1p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - v2p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v3p ^= hl32_to_64 (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); + v0p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v1p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); + v2p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v3p ^= hl32_to_64 (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); /** * digest @@ -267,8 +267,8 @@ KERNEL_FQ void m10100_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m10100_a3-optimized.cl b/OpenCL/m10100_a3-optimized.cl index c3269014b..b39c87657 100644 --- a/OpenCL/m10100_a3-optimized.cl +++ b/OpenCL/m10100_a3-optimized.cl @@ -47,10 +47,10 @@ DECLSPEC void m10100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u64 v2p = SIPHASHM_2; u64 v3p = SIPHASHM_3; - v0p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v1p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - v2p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v3p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); + v0p ^= hl32_to_64_S (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v1p ^= hl32_to_64_S (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); + v2p ^= hl32_to_64_S (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v3p ^= hl32_to_64_S (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); switch (pw_len / 8) { @@ -141,10 +141,10 @@ DECLSPEC void m10100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u64 v2p = SIPHASHM_2; u64 v3p = SIPHASHM_3; - v0p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v1p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - v2p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); - v3p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); + v0p ^= hl32_to_64_S (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v1p ^= hl32_to_64_S (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); + v2p ^= hl32_to_64_S (salt_bufs[SALT_POS].salt_buf[1], salt_bufs[SALT_POS].salt_buf[0]); + v3p ^= hl32_to_64_S (salt_bufs[SALT_POS].salt_buf[3], salt_bufs[SALT_POS].salt_buf[2]); switch (pw_len / 8) { @@ -160,8 +160,8 @@ DECLSPEC void m10100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -264,7 +264,7 @@ KERNEL_FQ void m10100_m04 (KERN_ATTR_VECTOR ()) * main */ - m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10100_m08 (KERN_ATTR_VECTOR ()) @@ -302,7 +302,7 @@ KERNEL_FQ void m10100_m08 (KERN_ATTR_VECTOR ()) * main */ - m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10100_m16 (KERN_ATTR_VECTOR ()) @@ -340,7 +340,7 @@ KERNEL_FQ void m10100_m16 (KERN_ATTR_VECTOR ()) * main */ - m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10100_s04 (KERN_ATTR_VECTOR ()) @@ -378,7 +378,7 @@ KERNEL_FQ void m10100_s04 (KERN_ATTR_VECTOR ()) * main */ - m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10100_s08 (KERN_ATTR_VECTOR ()) @@ -416,7 +416,7 @@ KERNEL_FQ void m10100_s08 (KERN_ATTR_VECTOR ()) * main */ - m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10100_s16 (KERN_ATTR_VECTOR ()) @@ -454,5 +454,5 @@ KERNEL_FQ void m10100_s16 (KERN_ATTR_VECTOR ()) * main */ - m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m10300-pure.cl b/OpenCL/m10300-pure.cl index dc9b31e26..58bae327f 100644 --- a/OpenCL/m10300-pure.cl +++ b/OpenCL/m10300-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m10300_init (KERN_ATTR_TMPS (saph_sha1_tmp_t)) sha1_update_global_swap (&ctx, pws[gid].i, pws[gid].pw_len); - sha1_update_global_swap (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_final (&ctx); diff --git a/OpenCL/m10400_a0-optimized.cl b/OpenCL/m10400_a0-optimized.cl index 55332396a..e03b51930 100644 --- a/OpenCL/m10400_a0-optimized.cl +++ b/OpenCL/m10400_a0-optimized.cl @@ -202,23 +202,23 @@ KERNEL_FQ void m10400_m04 (KERN_ATTR_RULES_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * loop @@ -378,23 +378,23 @@ KERNEL_FQ void m10400_s04 (KERN_ATTR_RULES_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * digest @@ -402,10 +402,10 @@ KERNEL_FQ void m10400_s04 (KERN_ATTR_RULES_ESALT (pdf_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10400_a1-optimized.cl b/OpenCL/m10400_a1-optimized.cl index c10d184ca..9f6f0bd71 100644 --- a/OpenCL/m10400_a1-optimized.cl +++ b/OpenCL/m10400_a1-optimized.cl @@ -200,23 +200,23 @@ KERNEL_FQ void m10400_m04 (KERN_ATTR_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * loop @@ -436,23 +436,23 @@ KERNEL_FQ void m10400_s04 (KERN_ATTR_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * digest @@ -460,10 +460,10 @@ KERNEL_FQ void m10400_s04 (KERN_ATTR_ESALT (pdf_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10400_a3-optimized.cl b/OpenCL/m10400_a3-optimized.cl index 49eaac162..5dea59403 100644 --- a/OpenCL/m10400_a3-optimized.cl +++ b/OpenCL/m10400_a3-optimized.cl @@ -177,23 +177,23 @@ DECLSPEC void m10400m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; u32 p0[4]; u32 p1[4]; @@ -343,23 +343,23 @@ DECLSPEC void m10400s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; u32 p0[4]; u32 p1[4]; @@ -408,10 +408,10 @@ DECLSPEC void m10400s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -546,7 +546,7 @@ KERNEL_FQ void m10400_m04 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10400m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10400m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10400_m08 (KERN_ATTR_ESALT (pdf_t)) @@ -595,7 +595,7 @@ KERNEL_FQ void m10400_m08 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10400m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10400m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10400_m16 (KERN_ATTR_ESALT (pdf_t)) @@ -644,7 +644,7 @@ KERNEL_FQ void m10400_m16 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10400m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10400m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10400_s04 (KERN_ATTR_ESALT (pdf_t)) @@ -693,7 +693,7 @@ KERNEL_FQ void m10400_s04 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10400s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10400s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10400_s08 (KERN_ATTR_ESALT (pdf_t)) @@ -742,7 +742,7 @@ KERNEL_FQ void m10400_s08 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10400s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10400s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10400_s16 (KERN_ATTR_ESALT (pdf_t)) @@ -791,5 +791,5 @@ KERNEL_FQ void m10400_s16 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10400s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10400s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m10410_a0-optimized.cl b/OpenCL/m10410_a0-optimized.cl index d91c72621..05a449314 100644 --- a/OpenCL/m10410_a0-optimized.cl +++ b/OpenCL/m10410_a0-optimized.cl @@ -273,10 +273,10 @@ KERNEL_FQ void m10410_s04 (KERN_ATTR_RULES_ESALT (pdf_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10410_a1-optimized.cl b/OpenCL/m10410_a1-optimized.cl index 8e9c1fef6..083365c96 100644 --- a/OpenCL/m10410_a1-optimized.cl +++ b/OpenCL/m10410_a1-optimized.cl @@ -200,23 +200,23 @@ KERNEL_FQ void m10410_m04 (KERN_ATTR_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * loop @@ -342,23 +342,23 @@ KERNEL_FQ void m10410_s04 (KERN_ATTR_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * digest @@ -366,10 +366,10 @@ KERNEL_FQ void m10410_s04 (KERN_ATTR_ESALT (pdf_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10410_a3-optimized.cl b/OpenCL/m10410_a3-optimized.cl index cef243a5c..09b756e7c 100644 --- a/OpenCL/m10410_a3-optimized.cl +++ b/OpenCL/m10410_a3-optimized.cl @@ -220,10 +220,10 @@ DECLSPEC void m10410s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u3 const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -300,7 +300,7 @@ KERNEL_FQ void m10410_m04 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10410m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10410m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10410_m08 (KERN_ATTR_ESALT (pdf_t)) @@ -349,7 +349,7 @@ KERNEL_FQ void m10410_m08 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10410m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10410m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10410_m16 (KERN_ATTR_ESALT (pdf_t)) @@ -398,7 +398,7 @@ KERNEL_FQ void m10410_m16 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10410m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10410m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10410_s04 (KERN_ATTR_ESALT (pdf_t)) @@ -447,7 +447,7 @@ KERNEL_FQ void m10410_s04 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10410s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10410s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10410_s08 (KERN_ATTR_ESALT (pdf_t)) @@ -496,7 +496,7 @@ KERNEL_FQ void m10410_s08 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10410s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10410s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10410_s16 (KERN_ATTR_ESALT (pdf_t)) @@ -545,5 +545,5 @@ KERNEL_FQ void m10410_s16 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK RC4_KEY rc4_keys[64]; - m10410s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10410s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m10420_a0-optimized.cl b/OpenCL/m10420_a0-optimized.cl index 799be19d9..ea4ba1794 100644 --- a/OpenCL/m10420_a0-optimized.cl +++ b/OpenCL/m10420_a0-optimized.cl @@ -85,23 +85,23 @@ KERNEL_FQ void m10420_m04 (KERN_ATTR_RULES_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * loop @@ -246,23 +246,23 @@ KERNEL_FQ void m10420_s04 (KERN_ATTR_RULES_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * digest @@ -270,8 +270,8 @@ KERNEL_FQ void m10420_s04 (KERN_ATTR_RULES_ESALT (pdf_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m10420_a1-optimized.cl b/OpenCL/m10420_a1-optimized.cl index 9f9f26a7f..2f41cefa1 100644 --- a/OpenCL/m10420_a1-optimized.cl +++ b/OpenCL/m10420_a1-optimized.cl @@ -83,23 +83,23 @@ KERNEL_FQ void m10420_m04 (KERN_ATTR_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * loop @@ -304,23 +304,23 @@ KERNEL_FQ void m10420_s04 (KERN_ATTR_ESALT (pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; /** * digest @@ -328,8 +328,8 @@ KERNEL_FQ void m10420_s04 (KERN_ATTR_ESALT (pdf_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m10420_a3-optimized.cl b/OpenCL/m10420_a3-optimized.cl index 7162048c0..77db44040 100644 --- a/OpenCL/m10420_a3-optimized.cl +++ b/OpenCL/m10420_a3-optimized.cl @@ -62,23 +62,23 @@ DECLSPEC void m10420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; u32 p0[4]; u32 p1[4]; @@ -215,23 +215,23 @@ DECLSPEC void m10420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[4]; - id_buf[0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; u32 p0[4]; u32 p1[4]; @@ -280,8 +280,8 @@ DECLSPEC void m10420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; @@ -409,7 +409,7 @@ KERNEL_FQ void m10420_m04 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10420_m08 (KERN_ATTR_ESALT (pdf_t)) @@ -456,7 +456,7 @@ KERNEL_FQ void m10420_m08 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10420_m16 (KERN_ATTR_ESALT (pdf_t)) @@ -503,7 +503,7 @@ KERNEL_FQ void m10420_m16 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10420m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10420_s04 (KERN_ATTR_ESALT (pdf_t)) @@ -550,7 +550,7 @@ KERNEL_FQ void m10420_s04 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10420_s08 (KERN_ATTR_ESALT (pdf_t)) @@ -597,7 +597,7 @@ KERNEL_FQ void m10420_s08 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10420_s16 (KERN_ATTR_ESALT (pdf_t)) @@ -644,5 +644,5 @@ KERNEL_FQ void m10420_s16 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10420s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m10500-pure.cl b/OpenCL/m10500-pure.cl index 51ee73127..329488d9c 100644 --- a/OpenCL/m10500-pure.cl +++ b/OpenCL/m10500-pure.cl @@ -220,48 +220,48 @@ KERNEL_FQ void m10500_init (KERN_ATTR_TMPS_ESALT (pdf14_tmp_t, pdf_t)) u32 o_buf[8]; - o_buf[0] = esalt_bufs[digests_offset].o_buf[0]; - o_buf[1] = esalt_bufs[digests_offset].o_buf[1]; - o_buf[2] = esalt_bufs[digests_offset].o_buf[2]; - o_buf[3] = esalt_bufs[digests_offset].o_buf[3]; - o_buf[4] = esalt_bufs[digests_offset].o_buf[4]; - o_buf[5] = esalt_bufs[digests_offset].o_buf[5]; - o_buf[6] = esalt_bufs[digests_offset].o_buf[6]; - o_buf[7] = esalt_bufs[digests_offset].o_buf[7]; + o_buf[0] = esalt_bufs[DIGESTS_OFFSET].o_buf[0]; + o_buf[1] = esalt_bufs[DIGESTS_OFFSET].o_buf[1]; + o_buf[2] = esalt_bufs[DIGESTS_OFFSET].o_buf[2]; + o_buf[3] = esalt_bufs[DIGESTS_OFFSET].o_buf[3]; + o_buf[4] = esalt_bufs[DIGESTS_OFFSET].o_buf[4]; + o_buf[5] = esalt_bufs[DIGESTS_OFFSET].o_buf[5]; + o_buf[6] = esalt_bufs[DIGESTS_OFFSET].o_buf[6]; + o_buf[7] = esalt_bufs[DIGESTS_OFFSET].o_buf[7]; - u32 P = esalt_bufs[digests_offset].P; + u32 P = esalt_bufs[DIGESTS_OFFSET].P; u32 id_buf[12]; - id_buf[ 0] = esalt_bufs[digests_offset].id_buf[0]; - id_buf[ 1] = esalt_bufs[digests_offset].id_buf[1]; - id_buf[ 2] = esalt_bufs[digests_offset].id_buf[2]; - id_buf[ 3] = esalt_bufs[digests_offset].id_buf[3]; + id_buf[ 0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[ 1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[ 2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[ 3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; - id_buf[ 4] = esalt_bufs[digests_offset].id_buf[4]; - id_buf[ 5] = esalt_bufs[digests_offset].id_buf[5]; - id_buf[ 6] = esalt_bufs[digests_offset].id_buf[6]; - id_buf[ 7] = esalt_bufs[digests_offset].id_buf[7]; + id_buf[ 4] = esalt_bufs[DIGESTS_OFFSET].id_buf[4]; + id_buf[ 5] = esalt_bufs[DIGESTS_OFFSET].id_buf[5]; + id_buf[ 6] = esalt_bufs[DIGESTS_OFFSET].id_buf[6]; + id_buf[ 7] = esalt_bufs[DIGESTS_OFFSET].id_buf[7]; id_buf[ 8] = 0; id_buf[ 9] = 0; id_buf[10] = 0; id_buf[11] = 0; - u32 id_len = esalt_bufs[digests_offset].id_len; + u32 id_len = esalt_bufs[DIGESTS_OFFSET].id_len; u32 id_len4 = id_len / 4; u32 rc4data[2]; - rc4data[0] = esalt_bufs[digests_offset].rc4data[0]; - rc4data[1] = esalt_bufs[digests_offset].rc4data[1]; + rc4data[0] = esalt_bufs[DIGESTS_OFFSET].rc4data[0]; + rc4data[1] = esalt_bufs[DIGESTS_OFFSET].rc4data[1]; u32 final_length = 68 + id_len; u32 w11 = 0x80; u32 w12 = 0; - if (esalt_bufs[digests_offset].enc_md != 1) + if (esalt_bufs[DIGESTS_OFFSET].enc_md != 1) { w11 = 0xffffffff; w12 = 0x80; diff --git a/OpenCL/m10700-optimized.cl b/OpenCL/m10700-optimized.cl index a44924c28..bf311a22e 100644 --- a/OpenCL/m10700-optimized.cl +++ b/OpenCL/m10700-optimized.cl @@ -566,7 +566,7 @@ KERNEL_FQ void m10700_init (KERN_ATTR_TMPS_ESALT (pdf17l8_tmp_t, pdf_t)) sha256_update_global_swap (&ctx, pws[gid].i, pws[gid].pw_len); - sha256_update_global_swap (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_final (&ctx); diff --git a/OpenCL/m10700-pure.cl b/OpenCL/m10700-pure.cl index 7351d5c7a..901b04a91 100644 --- a/OpenCL/m10700-pure.cl +++ b/OpenCL/m10700-pure.cl @@ -1181,7 +1181,7 @@ KERNEL_FQ void m10700_init (KERN_ATTR_TMPS_ESALT (pdf17l8_tmp_t, pdf_t)) sha256_update_global_swap (&ctx, pws[gid].i, pws[gid].pw_len); - sha256_update_global_swap (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_final (&ctx); diff --git a/OpenCL/m10800_a0-optimized.cl b/OpenCL/m10800_a0-optimized.cl index 396b389a6..b4fc83464 100644 --- a/OpenCL/m10800_a0-optimized.cl +++ b/OpenCL/m10800_a0-optimized.cl @@ -259,10 +259,10 @@ KERNEL_FQ void m10800_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10800_a0-pure.cl b/OpenCL/m10800_a0-pure.cl index ec46261db..429ab7d0c 100644 --- a/OpenCL/m10800_a0-pure.cl +++ b/OpenCL/m10800_a0-pure.cl @@ -77,10 +77,10 @@ KERNEL_FQ void m10800_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10800_a1-optimized.cl b/OpenCL/m10800_a1-optimized.cl index 11aa95dbd..5ae9309cd 100644 --- a/OpenCL/m10800_a1-optimized.cl +++ b/OpenCL/m10800_a1-optimized.cl @@ -315,10 +315,10 @@ KERNEL_FQ void m10800_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10800_a1-pure.cl b/OpenCL/m10800_a1-pure.cl index 0f5b7abeb..c49711d20 100644 --- a/OpenCL/m10800_a1-pure.cl +++ b/OpenCL/m10800_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m10800_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10800_a3-optimized.cl b/OpenCL/m10800_a3-optimized.cl index cef22d51f..c88072358 100644 --- a/OpenCL/m10800_a3-optimized.cl +++ b/OpenCL/m10800_a3-optimized.cl @@ -200,10 +200,10 @@ DECLSPEC void m10800s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -297,7 +297,7 @@ KERNEL_FQ void m10800_m04 (KERN_ATTR_VECTOR ()) * main */ - m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10800_m08 (KERN_ATTR_VECTOR ()) @@ -335,7 +335,7 @@ KERNEL_FQ void m10800_m08 (KERN_ATTR_VECTOR ()) * main */ - m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10800_m16 (KERN_ATTR_VECTOR ()) @@ -373,7 +373,7 @@ KERNEL_FQ void m10800_m16 (KERN_ATTR_VECTOR ()) * main */ - m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10800_s04 (KERN_ATTR_VECTOR ()) @@ -411,7 +411,7 @@ KERNEL_FQ void m10800_s04 (KERN_ATTR_VECTOR ()) * main */ - m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10800_s08 (KERN_ATTR_VECTOR ()) @@ -449,7 +449,7 @@ KERNEL_FQ void m10800_s08 (KERN_ATTR_VECTOR ()) * main */ - m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m10800_s16 (KERN_ATTR_VECTOR ()) @@ -487,5 +487,5 @@ KERNEL_FQ void m10800_s16 (KERN_ATTR_VECTOR ()) * main */ - m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m10800_a3-pure.cl b/OpenCL/m10800_a3-pure.cl index 8c2fe7138..0ebe66dc1 100644 --- a/OpenCL/m10800_a3-pure.cl +++ b/OpenCL/m10800_a3-pure.cl @@ -86,10 +86,10 @@ KERNEL_FQ void m10800_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m10900-pure.cl b/OpenCL/m10900-pure.cl index b2fb8bacc..6e5b70b57 100644 --- a/OpenCL/m10900-pure.cl +++ b/OpenCL/m10900-pure.cl @@ -107,7 +107,7 @@ KERNEL_FQ void m10900_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sh tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { diff --git a/OpenCL/m11000_a0-optimized.cl b/OpenCL/m11000_a0-optimized.cl index b569c506b..003701a1a 100644 --- a/OpenCL/m11000_a0-optimized.cl +++ b/OpenCL/m11000_a0-optimized.cl @@ -55,24 +55,24 @@ KERNEL_FQ void m11000_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -352,24 +352,24 @@ KERNEL_FQ void m11000_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -377,10 +377,10 @@ KERNEL_FQ void m11000_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11000_a0-pure.cl b/OpenCL/m11000_a0-pure.cl index 9e44e7173..796c229eb 100644 --- a/OpenCL/m11000_a0-pure.cl +++ b/OpenCL/m11000_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m11000_mxx (KERN_ATTR_RULES ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -81,10 +81,10 @@ KERNEL_FQ void m11000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -97,7 +97,7 @@ KERNEL_FQ void m11000_sxx (KERN_ATTR_RULES ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m11000_a1-optimized.cl b/OpenCL/m11000_a1-optimized.cl index d41899d96..ecbda3c11 100644 --- a/OpenCL/m11000_a1-optimized.cl +++ b/OpenCL/m11000_a1-optimized.cl @@ -53,24 +53,24 @@ KERNEL_FQ void m11000_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -408,24 +408,24 @@ KERNEL_FQ void m11000_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -433,10 +433,10 @@ KERNEL_FQ void m11000_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11000_a1-pure.cl b/OpenCL/m11000_a1-pure.cl index c51d23374..e4bff8799 100644 --- a/OpenCL/m11000_a1-pure.cl +++ b/OpenCL/m11000_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m11000_mxx (KERN_ATTR_BASIC ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_update_global (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -75,10 +75,10 @@ KERNEL_FQ void m11000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -89,7 +89,7 @@ KERNEL_FQ void m11000_sxx (KERN_ATTR_BASIC ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_update_global (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m11000_a3-optimized.cl b/OpenCL/m11000_a3-optimized.cl index 357af7a59..b621ce502 100644 --- a/OpenCL/m11000_a3-optimized.cl +++ b/OpenCL/m11000_a3-optimized.cl @@ -32,24 +32,24 @@ DECLSPEC void m11000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -297,24 +297,24 @@ DECLSPEC void m11000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -324,10 +324,10 @@ DECLSPEC void m11000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -600,7 +600,7 @@ KERNEL_FQ void m11000_m04 (KERN_ATTR_BASIC ()) * main */ - m11000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11000_m08 (KERN_ATTR_BASIC ()) @@ -647,7 +647,7 @@ KERNEL_FQ void m11000_m08 (KERN_ATTR_BASIC ()) * main */ - m11000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11000_m16 (KERN_ATTR_BASIC ()) @@ -694,7 +694,7 @@ KERNEL_FQ void m11000_m16 (KERN_ATTR_BASIC ()) * main */ - m11000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11000m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11000_s04 (KERN_ATTR_BASIC ()) @@ -741,7 +741,7 @@ KERNEL_FQ void m11000_s04 (KERN_ATTR_BASIC ()) * main */ - m11000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11000_s08 (KERN_ATTR_BASIC ()) @@ -788,7 +788,7 @@ KERNEL_FQ void m11000_s08 (KERN_ATTR_BASIC ()) * main */ - m11000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11000_s16 (KERN_ATTR_BASIC ()) @@ -835,5 +835,5 @@ KERNEL_FQ void m11000_s16 (KERN_ATTR_BASIC ()) * main */ - m11000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11000s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m11000_a3-pure.cl b/OpenCL/m11000_a3-pure.cl index 00f90f8b7..dd55a73bc 100644 --- a/OpenCL/m11000_a3-pure.cl +++ b/OpenCL/m11000_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m11000_mxx (KERN_ATTR_VECTOR ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -92,10 +92,10 @@ KERNEL_FQ void m11000_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -115,7 +115,7 @@ KERNEL_FQ void m11000_sxx (KERN_ATTR_VECTOR ()) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m11100_a0-optimized.cl b/OpenCL/m11100_a0-optimized.cl index c0e12f986..4541b6af8 100644 --- a/OpenCL/m11100_a0-optimized.cl +++ b/OpenCL/m11100_a0-optimized.cl @@ -81,7 +81,7 @@ KERNEL_FQ void m11100_m04 (KERN_ATTR_RULES ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; /** * salt @@ -90,16 +90,16 @@ KERNEL_FQ void m11100_m04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * loop @@ -415,7 +415,7 @@ KERNEL_FQ void m11100_s04 (KERN_ATTR_RULES ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; /** * salt @@ -424,16 +424,16 @@ KERNEL_FQ void m11100_s04 (KERN_ATTR_RULES ()) u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * digest @@ -441,10 +441,10 @@ KERNEL_FQ void m11100_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11100_a0-pure.cl b/OpenCL/m11100_a0-pure.cl index c01fe3983..ded0500db 100644 --- a/OpenCL/m11100_a0-pure.cl +++ b/OpenCL/m11100_a0-pure.cl @@ -63,21 +63,21 @@ KERNEL_FQ void m11100_mxx (KERN_ATTR_RULES ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * base @@ -209,10 +209,10 @@ KERNEL_FQ void m11100_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -221,21 +221,21 @@ KERNEL_FQ void m11100_sxx (KERN_ATTR_RULES ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * base diff --git a/OpenCL/m11100_a1-optimized.cl b/OpenCL/m11100_a1-optimized.cl index 1ee64d6d7..59dff625e 100644 --- a/OpenCL/m11100_a1-optimized.cl +++ b/OpenCL/m11100_a1-optimized.cl @@ -79,7 +79,7 @@ KERNEL_FQ void m11100_m04 (KERN_ATTR_BASIC ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; /** * salt @@ -88,16 +88,16 @@ KERNEL_FQ void m11100_m04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * loop @@ -473,7 +473,7 @@ KERNEL_FQ void m11100_s04 (KERN_ATTR_BASIC ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; /** * salt @@ -482,16 +482,16 @@ KERNEL_FQ void m11100_s04 (KERN_ATTR_BASIC ()) u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * digest @@ -499,10 +499,10 @@ KERNEL_FQ void m11100_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11100_a1-pure.cl b/OpenCL/m11100_a1-pure.cl index 29b085050..fde1e82cd 100644 --- a/OpenCL/m11100_a1-pure.cl +++ b/OpenCL/m11100_a1-pure.cl @@ -61,21 +61,21 @@ KERNEL_FQ void m11100_mxx (KERN_ATTR_BASIC ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * base @@ -205,10 +205,10 @@ KERNEL_FQ void m11100_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -217,21 +217,21 @@ KERNEL_FQ void m11100_sxx (KERN_ATTR_BASIC ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * base diff --git a/OpenCL/m11100_a3-optimized.cl b/OpenCL/m11100_a3-optimized.cl index 58a49c9aa..8853241aa 100644 --- a/OpenCL/m11100_a3-optimized.cl +++ b/OpenCL/m11100_a3-optimized.cl @@ -41,7 +41,7 @@ DECLSPEC void m11100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; /** * salt @@ -50,16 +50,16 @@ DECLSPEC void m11100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; u32 s0[4]; u32 s1[4]; @@ -346,7 +346,7 @@ DECLSPEC void m11100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; /** * salt @@ -355,16 +355,16 @@ DECLSPEC void m11100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; u32 s0[4]; u32 s1[4]; @@ -415,10 +415,10 @@ DECLSPEC void m11100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -718,7 +718,7 @@ KERNEL_FQ void m11100_m04 (KERN_ATTR_BASIC ()) * main */ - m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m11100_m08 (KERN_ATTR_BASIC ()) @@ -788,7 +788,7 @@ KERNEL_FQ void m11100_m08 (KERN_ATTR_BASIC ()) * main */ - m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m11100_m16 (KERN_ATTR_BASIC ()) @@ -858,7 +858,7 @@ KERNEL_FQ void m11100_m16 (KERN_ATTR_BASIC ()) * main */ - m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m11100_s04 (KERN_ATTR_BASIC ()) @@ -928,7 +928,7 @@ KERNEL_FQ void m11100_s04 (KERN_ATTR_BASIC ()) * main */ - m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m11100_s08 (KERN_ATTR_BASIC ()) @@ -998,7 +998,7 @@ KERNEL_FQ void m11100_s08 (KERN_ATTR_BASIC ()) * main */ - m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m11100_s16 (KERN_ATTR_BASIC ()) @@ -1068,5 +1068,5 @@ KERNEL_FQ void m11100_s16 (KERN_ATTR_BASIC ()) * main */ - m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m11100_a3-pure.cl b/OpenCL/m11100_a3-pure.cl index de5089ebc..a1a4791ca 100644 --- a/OpenCL/m11100_a3-pure.cl +++ b/OpenCL/m11100_a3-pure.cl @@ -61,21 +61,21 @@ KERNEL_FQ void m11100_mxx (KERN_ATTR_VECTOR ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * base @@ -248,10 +248,10 @@ KERNEL_FQ void m11100_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -260,21 +260,21 @@ KERNEL_FQ void m11100_sxx (KERN_ATTR_VECTOR ()) u32 challenge; - challenge = salt_bufs[salt_pos].salt_buf[0]; + challenge = salt_bufs[SALT_POS].salt_buf[0]; u32 salt_buf0[4]; u32 salt_buf1[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[1]; // not a bug, see challenge - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[4]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[5]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[6]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[7]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[8]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[1]; // not a bug, see challenge + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[4]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[5]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[6]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[7]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[8]; - const u32 salt_len = salt_bufs[salt_pos].salt_len - 4; + const u32 salt_len = salt_bufs[SALT_POS].salt_len - 4; /** * base diff --git a/OpenCL/m11200_a0-optimized.cl b/OpenCL/m11200_a0-optimized.cl index f3f09585a..08e819b49 100644 --- a/OpenCL/m11200_a0-optimized.cl +++ b/OpenCL/m11200_a0-optimized.cl @@ -52,11 +52,11 @@ KERNEL_FQ void m11200_m04 (KERN_ATTR_RULES ()) u32 salt_buf[5]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); /** * loop @@ -514,11 +514,11 @@ KERNEL_FQ void m11200_s04 (KERN_ATTR_RULES ()) u32 salt_buf[5]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); /** * digest @@ -526,10 +526,10 @@ KERNEL_FQ void m11200_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11200_a0-pure.cl b/OpenCL/m11200_a0-pure.cl index c89b16362..d0e734a28 100644 --- a/OpenCL/m11200_a0-pure.cl +++ b/OpenCL/m11200_a0-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m11200_mxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -149,10 +149,10 @@ KERNEL_FQ void m11200_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -165,7 +165,7 @@ KERNEL_FQ void m11200_sxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m11200_a1-optimized.cl b/OpenCL/m11200_a1-optimized.cl index 62dda9028..dfbfddb4b 100644 --- a/OpenCL/m11200_a1-optimized.cl +++ b/OpenCL/m11200_a1-optimized.cl @@ -50,11 +50,11 @@ KERNEL_FQ void m11200_m04 (KERN_ATTR_BASIC ()) u32 salt_buf[5]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); /** * loop @@ -570,11 +570,11 @@ KERNEL_FQ void m11200_s04 (KERN_ATTR_BASIC ()) u32 salt_buf[5]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); /** * digest @@ -582,10 +582,10 @@ KERNEL_FQ void m11200_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11200_a1-pure.cl b/OpenCL/m11200_a1-pure.cl index 173c3a127..7d07d1594 100644 --- a/OpenCL/m11200_a1-pure.cl +++ b/OpenCL/m11200_a1-pure.cl @@ -33,7 +33,7 @@ KERNEL_FQ void m11200_mxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_ctx_t ctx2l; @@ -145,10 +145,10 @@ KERNEL_FQ void m11200_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -159,7 +159,7 @@ KERNEL_FQ void m11200_sxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_ctx_t ctx2l; diff --git a/OpenCL/m11200_a3-optimized.cl b/OpenCL/m11200_a3-optimized.cl index 7f012eaa7..6b5c77f30 100644 --- a/OpenCL/m11200_a3-optimized.cl +++ b/OpenCL/m11200_a3-optimized.cl @@ -29,11 +29,11 @@ DECLSPEC void m11200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[5]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); /** * loop @@ -459,11 +459,11 @@ DECLSPEC void m11200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf[5]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); - salt_buf[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[3]); - salt_buf[4] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[4]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); + salt_buf[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[3]); + salt_buf[4] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[4]); /** * digest @@ -471,10 +471,10 @@ DECLSPEC void m11200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -934,7 +934,7 @@ KERNEL_FQ void m11200_m04 (KERN_ATTR_BASIC ()) * main */ - m11200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11200_m08 (KERN_ATTR_BASIC ()) @@ -985,7 +985,7 @@ KERNEL_FQ void m11200_m08 (KERN_ATTR_BASIC ()) * main */ - m11200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11200_m16 (KERN_ATTR_BASIC ()) @@ -1036,7 +1036,7 @@ KERNEL_FQ void m11200_m16 (KERN_ATTR_BASIC ()) * main */ - m11200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11200_s04 (KERN_ATTR_BASIC ()) @@ -1087,7 +1087,7 @@ KERNEL_FQ void m11200_s04 (KERN_ATTR_BASIC ()) * main */ - m11200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11200_s08 (KERN_ATTR_BASIC ()) @@ -1138,7 +1138,7 @@ KERNEL_FQ void m11200_s08 (KERN_ATTR_BASIC ()) * main */ - m11200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11200_s16 (KERN_ATTR_BASIC ()) @@ -1189,5 +1189,5 @@ KERNEL_FQ void m11200_s16 (KERN_ATTR_BASIC ()) * main */ - m11200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m11200_a3-pure.cl b/OpenCL/m11200_a3-pure.cl index 76bb6a866..ad6c840db 100644 --- a/OpenCL/m11200_a3-pure.cl +++ b/OpenCL/m11200_a3-pure.cl @@ -54,7 +54,7 @@ KERNEL_FQ void m11200_mxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -172,10 +172,10 @@ KERNEL_FQ void m11200_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -195,7 +195,7 @@ KERNEL_FQ void m11200_sxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m11300-pure.cl b/OpenCL/m11300-pure.cl index a9f33476e..b3c1eccd8 100644 --- a/OpenCL/m11300-pure.cl +++ b/OpenCL/m11300-pure.cl @@ -105,7 +105,7 @@ KERNEL_FQ void m11300_init (KERN_ATTR_TMPS_ESALT (bitcoin_wallet_tmp_t, bitcoin_ sha512_update_global_swap (&ctx, pws[gid].i, pws[gid].pw_len); - sha512_update_global_swap (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_final (&ctx); @@ -298,7 +298,7 @@ KERNEL_FQ void m11300_comp (KERN_ATTR_TMPS_ESALT (bitcoin_wallet_tmp_t, bitcoin_ const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; #define KEYLEN 60 @@ -353,7 +353,7 @@ KERNEL_FQ void m11300_comp (KERN_ATTR_TMPS_ESALT (bitcoin_wallet_tmp_t, bitcoin_ { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } diff --git a/OpenCL/m11400_a0-pure.cl b/OpenCL/m11400_a0-pure.cl index ef1074fe1..28324ca23 100644 --- a/OpenCL/m11400_a0-pure.cl +++ b/OpenCL/m11400_a0-pure.cl @@ -77,7 +77,7 @@ KERNEL_FQ void m11400_mxx (KERN_ATTR_RULES_ESALT (sip_t)) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -123,7 +123,7 @@ KERNEL_FQ void m11400_mxx (KERN_ATTR_RULES_ESALT (sip_t)) ctx.len = 32; - md5_update_global (&ctx, esalt_bufs[digests_offset].esalt_buf, esalt_bufs[digests_offset].esalt_len); + md5_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].esalt_buf, esalt_bufs[DIGESTS_OFFSET].esalt_len); md5_final (&ctx); @@ -171,10 +171,10 @@ KERNEL_FQ void m11400_sxx (KERN_ATTR_RULES_ESALT (sip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -187,7 +187,7 @@ KERNEL_FQ void m11400_sxx (KERN_ATTR_RULES_ESALT (sip_t)) md5_init (&ctx0); - md5_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -233,7 +233,7 @@ KERNEL_FQ void m11400_sxx (KERN_ATTR_RULES_ESALT (sip_t)) ctx.len = 32; - md5_update_global (&ctx, esalt_bufs[digests_offset].esalt_buf, esalt_bufs[digests_offset].esalt_len); + md5_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].esalt_buf, esalt_bufs[DIGESTS_OFFSET].esalt_len); md5_final (&ctx); diff --git a/OpenCL/m11400_a1-pure.cl b/OpenCL/m11400_a1-pure.cl index 85cdc5ee6..dcdaf8369 100644 --- a/OpenCL/m11400_a1-pure.cl +++ b/OpenCL/m11400_a1-pure.cl @@ -73,7 +73,7 @@ KERNEL_FQ void m11400_mxx (KERN_ATTR_ESALT (sip_t)) md5_init (&ctx0); - md5_update_global (&ctx0, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + md5_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); md5_update_global (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -117,7 +117,7 @@ KERNEL_FQ void m11400_mxx (KERN_ATTR_ESALT (sip_t)) ctx.len = 32; - md5_update_global (&ctx, esalt_bufs[digests_offset].esalt_buf, esalt_bufs[digests_offset].esalt_len); + md5_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].esalt_buf, esalt_bufs[DIGESTS_OFFSET].esalt_len); md5_final (&ctx); @@ -165,10 +165,10 @@ KERNEL_FQ void m11400_sxx (KERN_ATTR_ESALT (sip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -179,7 +179,7 @@ KERNEL_FQ void m11400_sxx (KERN_ATTR_ESALT (sip_t)) md5_init (&ctx0); - md5_update_global (&ctx0, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + md5_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); md5_update_global (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -223,7 +223,7 @@ KERNEL_FQ void m11400_sxx (KERN_ATTR_ESALT (sip_t)) ctx.len = 32; - md5_update_global (&ctx, esalt_bufs[digests_offset].esalt_buf, esalt_bufs[digests_offset].esalt_len); + md5_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].esalt_buf, esalt_bufs[DIGESTS_OFFSET].esalt_len); md5_final (&ctx); diff --git a/OpenCL/m11400_a3-pure.cl b/OpenCL/m11400_a3-pure.cl index b933c43d9..ae8e68fbf 100644 --- a/OpenCL/m11400_a3-pure.cl +++ b/OpenCL/m11400_a3-pure.cl @@ -78,20 +78,20 @@ KERNEL_FQ void m11400_mxx (KERN_ATTR_VECTOR_ESALT (sip_t)) w[idx] = pws[gid].i[idx]; } - const u32 esalt_len = esalt_bufs[digests_offset].esalt_len; + const u32 esalt_len = esalt_bufs[DIGESTS_OFFSET].esalt_len; u32x esalt_buf[256] = { 0 }; for (u32 i = 0, idx = 0; i < esalt_len; i += 4, idx += 1) { - esalt_buf[idx] = esalt_bufs[digests_offset].esalt_buf[idx]; + esalt_buf[idx] = esalt_bufs[DIGESTS_OFFSET].esalt_buf[idx]; } md5_ctx_t ctx0; md5_init (&ctx0); - md5_update_global (&ctx0, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + md5_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); /** * loop @@ -191,10 +191,10 @@ KERNEL_FQ void m11400_sxx (KERN_ATTR_VECTOR_ESALT (sip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -210,20 +210,20 @@ KERNEL_FQ void m11400_sxx (KERN_ATTR_VECTOR_ESALT (sip_t)) w[idx] = pws[gid].i[idx]; } - const u32 esalt_len = esalt_bufs[digests_offset].esalt_len; + const u32 esalt_len = esalt_bufs[DIGESTS_OFFSET].esalt_len; u32x esalt_buf[256] = { 0 }; for (u32 i = 0, idx = 0; i < esalt_len; i += 4, idx += 1) { - esalt_buf[idx] = esalt_bufs[digests_offset].esalt_buf[idx]; + esalt_buf[idx] = esalt_bufs[DIGESTS_OFFSET].esalt_buf[idx]; } md5_ctx_t ctx0; md5_init (&ctx0); - md5_update_global (&ctx0, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + md5_update_global (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); /** * loop diff --git a/OpenCL/m11500_a0-optimized.cl b/OpenCL/m11500_a0-optimized.cl index 6992b41ce..99358fc11 100644 --- a/OpenCL/m11500_a0-optimized.cl +++ b/OpenCL/m11500_a0-optimized.cl @@ -169,7 +169,7 @@ KERNEL_FQ void m11500_m04 (KERN_ATTR_RULES ()) * salt */ - const u32 iv = salt_bufs[salt_pos].salt_buf[0]; + const u32 iv = salt_bufs[SALT_POS].salt_buf[0]; /** * loop @@ -257,7 +257,7 @@ KERNEL_FQ void m11500_s04 (KERN_ATTR_RULES ()) * salt */ - const u32 iv = salt_bufs[salt_pos].salt_buf[0]; + const u32 iv = salt_bufs[SALT_POS].salt_buf[0]; /** * digest @@ -265,7 +265,7 @@ KERNEL_FQ void m11500_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 diff --git a/OpenCL/m11500_a1-optimized.cl b/OpenCL/m11500_a1-optimized.cl index c46bbad0e..81a1dab49 100644 --- a/OpenCL/m11500_a1-optimized.cl +++ b/OpenCL/m11500_a1-optimized.cl @@ -167,7 +167,7 @@ KERNEL_FQ void m11500_m04 (KERN_ATTR_BASIC ()) * salt */ - const u32 iv = salt_bufs[salt_pos].salt_buf[0]; + const u32 iv = salt_bufs[SALT_POS].salt_buf[0]; /** * loop @@ -315,7 +315,7 @@ KERNEL_FQ void m11500_s04 (KERN_ATTR_BASIC ()) * salt */ - const u32 iv = salt_bufs[salt_pos].salt_buf[0]; + const u32 iv = salt_bufs[SALT_POS].salt_buf[0]; /** * digest @@ -323,7 +323,7 @@ KERNEL_FQ void m11500_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 diff --git a/OpenCL/m11500_a3-optimized.cl b/OpenCL/m11500_a3-optimized.cl index c83433d30..71dd72ac1 100644 --- a/OpenCL/m11500_a3-optimized.cl +++ b/OpenCL/m11500_a3-optimized.cl @@ -146,7 +146,7 @@ DECLSPEC void m11500m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) * salt */ - const u32 iv = salt_bufs[salt_pos].salt_buf[0]; + const u32 iv = salt_bufs[SALT_POS].salt_buf[0]; /** * loop @@ -204,7 +204,7 @@ DECLSPEC void m11500s (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) * salt */ - const u32 iv = salt_bufs[salt_pos].salt_buf[0]; + const u32 iv = salt_bufs[SALT_POS].salt_buf[0]; /** * digest @@ -212,7 +212,7 @@ DECLSPEC void m11500s (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 @@ -296,7 +296,7 @@ KERNEL_FQ void m11500_m04 (KERN_ATTR_BASIC ()) * main */ - m11500m (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11500m (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11500_m08 (KERN_ATTR_BASIC ()) @@ -334,7 +334,7 @@ KERNEL_FQ void m11500_m08 (KERN_ATTR_BASIC ()) * main */ - m11500m (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11500m (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11500_m16 (KERN_ATTR_BASIC ()) @@ -372,7 +372,7 @@ KERNEL_FQ void m11500_m16 (KERN_ATTR_BASIC ()) * main */ - m11500m (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11500m (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11500_s04 (KERN_ATTR_BASIC ()) @@ -410,7 +410,7 @@ KERNEL_FQ void m11500_s04 (KERN_ATTR_BASIC ()) * main */ - m11500s (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11500s (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11500_s08 (KERN_ATTR_BASIC ()) @@ -448,7 +448,7 @@ KERNEL_FQ void m11500_s08 (KERN_ATTR_BASIC ()) * main */ - m11500s (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11500s (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11500_s16 (KERN_ATTR_BASIC ()) @@ -486,5 +486,5 @@ KERNEL_FQ void m11500_s16 (KERN_ATTR_BASIC ()) * main */ - m11500s (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11500s (w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m11600-optimized.cl b/OpenCL/m11600-optimized.cl index 835522f44..0f8f77a3e 100644 --- a/OpenCL/m11600-optimized.cl +++ b/OpenCL/m11600-optimized.cl @@ -245,9 +245,9 @@ KERNEL_FQ void m11600_comp (KERN_ATTR_TMPS_HOOKS (seven_zip_tmp_t, seven_zip_hoo if (hooks[gid].hook_success == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m11600-pure.cl b/OpenCL/m11600-pure.cl index 481deb161..670caea19 100644 --- a/OpenCL/m11600-pure.cl +++ b/OpenCL/m11600-pure.cl @@ -346,9 +346,9 @@ KERNEL_FQ void m11600_comp (KERN_ATTR_TMPS_HOOKS (seven_zip_tmp_t, seven_zip_hoo if (hooks[gid].hook_success == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m11700_a0-optimized.cl b/OpenCL/m11700_a0-optimized.cl index 984257bab..5962c37a5 100644 --- a/OpenCL/m11700_a0-optimized.cl +++ b/OpenCL/m11700_a0-optimized.cl @@ -301,10 +301,10 @@ KERNEL_FQ void m11700_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11700_a0-pure.cl b/OpenCL/m11700_a0-pure.cl index 30476e4de..c4285aba6 100644 --- a/OpenCL/m11700_a0-pure.cl +++ b/OpenCL/m11700_a0-pure.cl @@ -135,10 +135,10 @@ KERNEL_FQ void m11700_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11700_a1-optimized.cl b/OpenCL/m11700_a1-optimized.cl index 7d9d4bbe3..edfdaae9c 100644 --- a/OpenCL/m11700_a1-optimized.cl +++ b/OpenCL/m11700_a1-optimized.cl @@ -357,10 +357,10 @@ KERNEL_FQ void m11700_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11700_a1-pure.cl b/OpenCL/m11700_a1-pure.cl index 703f3a2b8..a1402e355 100644 --- a/OpenCL/m11700_a1-pure.cl +++ b/OpenCL/m11700_a1-pure.cl @@ -131,10 +131,10 @@ KERNEL_FQ void m11700_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11700_a3-optimized.cl b/OpenCL/m11700_a3-optimized.cl index 92afd2fd3..c704a0313 100644 --- a/OpenCL/m11700_a3-optimized.cl +++ b/OpenCL/m11700_a3-optimized.cl @@ -174,10 +174,10 @@ DECLSPEC void m11700s (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_le const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -315,7 +315,7 @@ KERNEL_FQ void m11700_m04 (KERN_ATTR_BASIC ()) * main */ - m11700m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11700m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11700_m08 (KERN_ATTR_BASIC ()) @@ -379,7 +379,7 @@ KERNEL_FQ void m11700_m08 (KERN_ATTR_BASIC ()) * main */ - m11700m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11700m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11700_m16 (KERN_ATTR_BASIC ()) @@ -443,7 +443,7 @@ KERNEL_FQ void m11700_m16 (KERN_ATTR_BASIC ()) * main */ - m11700m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11700m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11700_s04 (KERN_ATTR_BASIC ()) @@ -507,7 +507,7 @@ KERNEL_FQ void m11700_s04 (KERN_ATTR_BASIC ()) * main */ - m11700s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11700s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11700_s08 (KERN_ATTR_BASIC ()) @@ -571,7 +571,7 @@ KERNEL_FQ void m11700_s08 (KERN_ATTR_BASIC ()) * main */ - m11700s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11700s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11700_s16 (KERN_ATTR_BASIC ()) @@ -635,5 +635,5 @@ KERNEL_FQ void m11700_s16 (KERN_ATTR_BASIC ()) * main */ - m11700s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11700s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m11700_a3-pure.cl b/OpenCL/m11700_a3-pure.cl index e37e72a1b..cac414c4b 100644 --- a/OpenCL/m11700_a3-pure.cl +++ b/OpenCL/m11700_a3-pure.cl @@ -144,10 +144,10 @@ KERNEL_FQ void m11700_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11750_a0-pure.cl b/OpenCL/m11750_a0-pure.cl index d7286cf90..0a652e3b7 100644 --- a/OpenCL/m11750_a0-pure.cl +++ b/OpenCL/m11750_a0-pure.cl @@ -62,13 +62,13 @@ KERNEL_FQ void m11750_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -144,10 +144,10 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -156,13 +156,13 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m11750_a1-pure.cl b/OpenCL/m11750_a1-pure.cl index c2499b6fe..197326cc3 100644 --- a/OpenCL/m11750_a1-pure.cl +++ b/OpenCL/m11750_a1-pure.cl @@ -67,13 +67,13 @@ KERNEL_FQ void m11750_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -167,10 +167,10 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -186,13 +186,13 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m11750_a3-pure.cl b/OpenCL/m11750_a3-pure.cl index 6d0d5eeae..feefbbf3f 100644 --- a/OpenCL/m11750_a3-pure.cl +++ b/OpenCL/m11750_a3-pure.cl @@ -67,13 +67,13 @@ KERNEL_FQ void m11750_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -153,10 +153,10 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -172,13 +172,13 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m11760_a0-pure.cl b/OpenCL/m11760_a0-pure.cl index b7759a991..0f75dc13c 100644 --- a/OpenCL/m11760_a0-pure.cl +++ b/OpenCL/m11760_a0-pure.cl @@ -62,13 +62,13 @@ KERNEL_FQ void m11760_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog256_hmac_ctx_t ctx0; @@ -146,10 +146,10 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -158,13 +158,13 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog256_hmac_ctx_t ctx0; diff --git a/OpenCL/m11760_a1-pure.cl b/OpenCL/m11760_a1-pure.cl index d123d394c..a08541a42 100644 --- a/OpenCL/m11760_a1-pure.cl +++ b/OpenCL/m11760_a1-pure.cl @@ -67,13 +67,13 @@ KERNEL_FQ void m11760_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog256_hmac_ctx_t ctx0; @@ -169,10 +169,10 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -188,13 +188,13 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog256_hmac_ctx_t ctx0; diff --git a/OpenCL/m11760_a3-pure.cl b/OpenCL/m11760_a3-pure.cl index 3738364d3..e4f039ee3 100644 --- a/OpenCL/m11760_a3-pure.cl +++ b/OpenCL/m11760_a3-pure.cl @@ -67,13 +67,13 @@ KERNEL_FQ void m11760_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog256_hmac_ctx_vector_t ctx0; @@ -155,10 +155,10 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -174,13 +174,13 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog256_hmac_ctx_vector_t ctx0; diff --git a/OpenCL/m11800_a0-optimized.cl b/OpenCL/m11800_a0-optimized.cl index 233a39593..669cfa83c 100644 --- a/OpenCL/m11800_a0-optimized.cl +++ b/OpenCL/m11800_a0-optimized.cl @@ -301,10 +301,10 @@ KERNEL_FQ void m11800_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11800_a0-pure.cl b/OpenCL/m11800_a0-pure.cl index 724ccac23..56f03bc57 100644 --- a/OpenCL/m11800_a0-pure.cl +++ b/OpenCL/m11800_a0-pure.cl @@ -135,10 +135,10 @@ KERNEL_FQ void m11800_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11800_a1-optimized.cl b/OpenCL/m11800_a1-optimized.cl index 4e082982c..2fd5d57c4 100644 --- a/OpenCL/m11800_a1-optimized.cl +++ b/OpenCL/m11800_a1-optimized.cl @@ -357,10 +357,10 @@ KERNEL_FQ void m11800_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11800_a1-pure.cl b/OpenCL/m11800_a1-pure.cl index 449d8d6e7..c69949fc7 100644 --- a/OpenCL/m11800_a1-pure.cl +++ b/OpenCL/m11800_a1-pure.cl @@ -131,10 +131,10 @@ KERNEL_FQ void m11800_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11800_a3-optimized.cl b/OpenCL/m11800_a3-optimized.cl index 77d8a99aa..40799ff69 100644 --- a/OpenCL/m11800_a3-optimized.cl +++ b/OpenCL/m11800_a3-optimized.cl @@ -174,10 +174,10 @@ DECLSPEC void m11800s (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_le const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -315,7 +315,7 @@ KERNEL_FQ void m11800_m04 (KERN_ATTR_BASIC ()) * main */ - m11800m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11800m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11800_m08 (KERN_ATTR_BASIC ()) @@ -379,7 +379,7 @@ KERNEL_FQ void m11800_m08 (KERN_ATTR_BASIC ()) * main */ - m11800m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11800m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11800_m16 (KERN_ATTR_BASIC ()) @@ -443,7 +443,7 @@ KERNEL_FQ void m11800_m16 (KERN_ATTR_BASIC ()) * main */ - m11800m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11800m (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11800_s04 (KERN_ATTR_BASIC ()) @@ -507,7 +507,7 @@ KERNEL_FQ void m11800_s04 (KERN_ATTR_BASIC ()) * main */ - m11800s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11800s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11800_s08 (KERN_ATTR_BASIC ()) @@ -571,7 +571,7 @@ KERNEL_FQ void m11800_s08 (KERN_ATTR_BASIC ()) * main */ - m11800s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11800s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m11800_s16 (KERN_ATTR_BASIC ()) @@ -635,5 +635,5 @@ KERNEL_FQ void m11800_s16 (KERN_ATTR_BASIC ()) * main */ - m11800s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m11800s (s_sbob_sl64, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m11800_a3-pure.cl b/OpenCL/m11800_a3-pure.cl index 101d13daa..bfab52c6c 100644 --- a/OpenCL/m11800_a3-pure.cl +++ b/OpenCL/m11800_a3-pure.cl @@ -144,10 +144,10 @@ KERNEL_FQ void m11800_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m11850_a0-pure.cl b/OpenCL/m11850_a0-pure.cl index 8182969d4..12154271f 100644 --- a/OpenCL/m11850_a0-pure.cl +++ b/OpenCL/m11850_a0-pure.cl @@ -62,13 +62,13 @@ KERNEL_FQ void m11850_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -144,10 +144,10 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -156,13 +156,13 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m11850_a1-pure.cl b/OpenCL/m11850_a1-pure.cl index 6fd6ad1d9..8d9c11239 100644 --- a/OpenCL/m11850_a1-pure.cl +++ b/OpenCL/m11850_a1-pure.cl @@ -67,13 +67,13 @@ KERNEL_FQ void m11850_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -167,10 +167,10 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -186,13 +186,13 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m11850_a3-pure.cl b/OpenCL/m11850_a3-pure.cl index e17e32cb6..7dbfc2f60 100644 --- a/OpenCL/m11850_a3-pure.cl +++ b/OpenCL/m11850_a3-pure.cl @@ -67,13 +67,13 @@ KERNEL_FQ void m11850_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -153,10 +153,10 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -172,13 +172,13 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m11860_a0-pure.cl b/OpenCL/m11860_a0-pure.cl index 5f89f576f..b5e46cbc0 100644 --- a/OpenCL/m11860_a0-pure.cl +++ b/OpenCL/m11860_a0-pure.cl @@ -62,13 +62,13 @@ KERNEL_FQ void m11860_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog512_hmac_ctx_t ctx0; @@ -146,10 +146,10 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -158,13 +158,13 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog512_hmac_ctx_t ctx0; diff --git a/OpenCL/m11860_a1-pure.cl b/OpenCL/m11860_a1-pure.cl index 8a14bfa14..25ec1e242 100644 --- a/OpenCL/m11860_a1-pure.cl +++ b/OpenCL/m11860_a1-pure.cl @@ -67,13 +67,13 @@ KERNEL_FQ void m11860_mxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog512_hmac_ctx_t ctx0; @@ -169,10 +169,10 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -188,13 +188,13 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_BASIC ()) w[idx] = hc_swap32_S (pws[gid].i[idx]); } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog512_hmac_ctx_t ctx0; diff --git a/OpenCL/m11860_a3-pure.cl b/OpenCL/m11860_a3-pure.cl index e8d57aff9..fd41c9349 100644 --- a/OpenCL/m11860_a3-pure.cl +++ b/OpenCL/m11860_a3-pure.cl @@ -67,13 +67,13 @@ KERNEL_FQ void m11860_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog512_hmac_ctx_vector_t ctx0; @@ -155,10 +155,10 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -174,13 +174,13 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } streebog512_hmac_ctx_vector_t ctx0; diff --git a/OpenCL/m11900-pure.cl b/OpenCL/m11900-pure.cl index 4fdac642d..34bbf962d 100644 --- a/OpenCL/m11900-pure.cl +++ b/OpenCL/m11900-pure.cl @@ -91,7 +91,7 @@ KERNEL_FQ void m11900_init (KERN_ATTR_TMPS_ESALT (pbkdf2_md5_tmp_t, pbkdf2_md5_t tmps[gid].opad[2] = md5_hmac_ctx.opad.h[2]; tmps[gid].opad[3] = md5_hmac_ctx.opad.h[3]; - md5_hmac_update_global (&md5_hmac_ctx, esalt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + md5_hmac_update_global (&md5_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 4; i += 4, j += 1) { diff --git a/OpenCL/m12000-pure.cl b/OpenCL/m12000-pure.cl index 4a2d4f176..8c0b790ae 100644 --- a/OpenCL/m12000-pure.cl +++ b/OpenCL/m12000-pure.cl @@ -95,7 +95,7 @@ KERNEL_FQ void m12000_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, pbkdf2_sha1 tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 4; i += 5, j += 1) { diff --git a/OpenCL/m12200-pure.cl b/OpenCL/m12200-pure.cl index 2e73aa0db..abd3b685c 100644 --- a/OpenCL/m12200-pure.cl +++ b/OpenCL/m12200-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m12200_init (KERN_ATTR_TMPS (ecryptfs_tmp_t)) sha512_init (&ctx); - sha512_update_global (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_swap (&ctx, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m12300-pure.cl b/OpenCL/m12300-pure.cl index ae92645e7..8bfd2bd5f 100644 --- a/OpenCL/m12300-pure.cl +++ b/OpenCL/m12300-pure.cl @@ -117,7 +117,7 @@ KERNEL_FQ void m12300_init (KERN_ATTR_TMPS (oraclet_tmp_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global (&sha512_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); u32 w0[4]; u32 w1[4]; @@ -421,7 +421,7 @@ KERNEL_FQ void m12300_comp (KERN_ATTR_TMPS (oraclet_tmp_t)) sha512_update_128 (&ctx, w0, w1, w2, w3, w4, w5, w6, w7, 64); - sha512_update_global (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_final (&ctx); diff --git a/OpenCL/m12400-pure.cl b/OpenCL/m12400-pure.cl index 41b0adf6f..c39cc46e4 100644 --- a/OpenCL/m12400-pure.cl +++ b/OpenCL/m12400-pure.cl @@ -722,7 +722,7 @@ KERNEL_FQ void m12400_loop (KERN_ATTR_TMPS (bsdicrypt_tmp_t)) iv[0] = tmps[gid].iv[0]; iv[1] = tmps[gid].iv[1]; - const u32 mask = salt_bufs[salt_pos].salt_buf[0]; + const u32 mask = salt_bufs[SALT_POS].salt_buf[0]; _des_crypt_encrypt (iv, mask, loop_cnt, Kc, Kd, s_SPtrans); diff --git a/OpenCL/m12500-optimized.cl b/OpenCL/m12500-optimized.cl index d26d6719b..cc26814e3 100644 --- a/OpenCL/m12500-optimized.cl +++ b/OpenCL/m12500-optimized.cl @@ -66,8 +66,8 @@ KERNEL_FQ void m12500_loop (KERN_ATTR_TMPS (rar3_tmp_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; const u32 salt_len = 8; @@ -354,10 +354,10 @@ KERNEL_FQ void m12500_comp (KERN_ATTR_TMPS (rar3_tmp_t)) u32 data[4]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; u32 out[4]; @@ -384,8 +384,8 @@ KERNEL_FQ void m12500_comp (KERN_ATTR_TMPS (rar3_tmp_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; //const u32 salt_len = 8; diff --git a/OpenCL/m12500-pure.cl b/OpenCL/m12500-pure.cl index 66da61886..30700d89c 100644 --- a/OpenCL/m12500-pure.cl +++ b/OpenCL/m12500-pure.cl @@ -804,8 +804,8 @@ KERNEL_FQ void m12500_init (KERN_ATTR_TMPS (rar3_tmp_t)) u32 salt_buf[3]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); // swap needed due to -O kernel - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); // swap needed due to -O kernel + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); salt_buf[2] = 0; // switch buffer by offset (can only be 0 or 2 because of utf16): @@ -1067,10 +1067,10 @@ KERNEL_FQ void m12500_comp (KERN_ATTR_TMPS (rar3_tmp_t)) u32 data[4]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; u32 out[4]; diff --git a/OpenCL/m12600_a0-optimized.cl b/OpenCL/m12600_a0-optimized.cl index afc21b471..f5c69c943 100644 --- a/OpenCL/m12600_a0-optimized.cl +++ b/OpenCL/m12600_a0-optimized.cl @@ -82,14 +82,14 @@ KERNEL_FQ void m12600_m04 (KERN_ATTR_RULES ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * loop @@ -422,14 +422,14 @@ KERNEL_FQ void m12600_s04 (KERN_ATTR_RULES ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * digest @@ -437,10 +437,10 @@ KERNEL_FQ void m12600_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m12600_a0-pure.cl b/OpenCL/m12600_a0-pure.cl index 7222b668b..5fcc2dc33 100644 --- a/OpenCL/m12600_a0-pure.cl +++ b/OpenCL/m12600_a0-pure.cl @@ -64,14 +64,14 @@ KERNEL_FQ void m12600_mxx (KERN_ATTR_RULES ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * base @@ -200,10 +200,10 @@ KERNEL_FQ void m12600_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -212,14 +212,14 @@ KERNEL_FQ void m12600_sxx (KERN_ATTR_RULES ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * base diff --git a/OpenCL/m12600_a1-optimized.cl b/OpenCL/m12600_a1-optimized.cl index fe78a19cc..3a92cc7a9 100644 --- a/OpenCL/m12600_a1-optimized.cl +++ b/OpenCL/m12600_a1-optimized.cl @@ -80,14 +80,14 @@ KERNEL_FQ void m12600_m04 (KERN_ATTR_BASIC ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * loop @@ -478,14 +478,14 @@ KERNEL_FQ void m12600_s04 (KERN_ATTR_BASIC ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * digest @@ -493,10 +493,10 @@ KERNEL_FQ void m12600_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m12600_a1-pure.cl b/OpenCL/m12600_a1-pure.cl index c861a06df..24c232758 100644 --- a/OpenCL/m12600_a1-pure.cl +++ b/OpenCL/m12600_a1-pure.cl @@ -62,14 +62,14 @@ KERNEL_FQ void m12600_mxx (KERN_ATTR_BASIC ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * base @@ -196,10 +196,10 @@ KERNEL_FQ void m12600_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -208,14 +208,14 @@ KERNEL_FQ void m12600_sxx (KERN_ATTR_BASIC ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * base diff --git a/OpenCL/m12600_a3-optimized.cl b/OpenCL/m12600_a3-optimized.cl index 88310a835..5fb0e3985 100644 --- a/OpenCL/m12600_a3-optimized.cl +++ b/OpenCL/m12600_a3-optimized.cl @@ -42,14 +42,14 @@ DECLSPEC void m12600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * loop @@ -333,14 +333,14 @@ DECLSPEC void m12600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * digest @@ -348,10 +348,10 @@ DECLSPEC void m12600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -691,7 +691,7 @@ KERNEL_FQ void m12600_m04 (KERN_ATTR_BASIC ()) * main */ - m12600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m12600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m12600_m08 (KERN_ATTR_BASIC ()) @@ -761,7 +761,7 @@ KERNEL_FQ void m12600_m08 (KERN_ATTR_BASIC ()) * main */ - m12600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m12600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m12600_m16 (KERN_ATTR_BASIC ()) @@ -831,7 +831,7 @@ KERNEL_FQ void m12600_m16 (KERN_ATTR_BASIC ()) * main */ - m12600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m12600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m12600_s04 (KERN_ATTR_BASIC ()) @@ -901,7 +901,7 @@ KERNEL_FQ void m12600_s04 (KERN_ATTR_BASIC ()) * main */ - m12600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m12600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m12600_s08 (KERN_ATTR_BASIC ()) @@ -971,7 +971,7 @@ KERNEL_FQ void m12600_s08 (KERN_ATTR_BASIC ()) * main */ - m12600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m12600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m12600_s16 (KERN_ATTR_BASIC ()) @@ -1041,5 +1041,5 @@ KERNEL_FQ void m12600_s16 (KERN_ATTR_BASIC ()) * main */ - m12600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m12600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m12600_a3-pure.cl b/OpenCL/m12600_a3-pure.cl index 880a9adc4..b3fc1c8a4 100644 --- a/OpenCL/m12600_a3-pure.cl +++ b/OpenCL/m12600_a3-pure.cl @@ -62,14 +62,14 @@ KERNEL_FQ void m12600_mxx (KERN_ATTR_VECTOR ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * base @@ -209,10 +209,10 @@ KERNEL_FQ void m12600_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -221,14 +221,14 @@ KERNEL_FQ void m12600_sxx (KERN_ATTR_VECTOR ()) u32 pc256[8]; - pc256[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - pc256[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - pc256[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - pc256[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - pc256[4] = salt_bufs[salt_pos].salt_buf_pc[4]; - pc256[5] = salt_bufs[salt_pos].salt_buf_pc[5]; - pc256[6] = salt_bufs[salt_pos].salt_buf_pc[6]; - pc256[7] = salt_bufs[salt_pos].salt_buf_pc[7]; + pc256[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + pc256[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + pc256[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + pc256[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + pc256[4] = salt_bufs[SALT_POS].salt_buf_pc[4]; + pc256[5] = salt_bufs[SALT_POS].salt_buf_pc[5]; + pc256[6] = salt_bufs[SALT_POS].salt_buf_pc[6]; + pc256[7] = salt_bufs[SALT_POS].salt_buf_pc[7]; /** * base diff --git a/OpenCL/m12700-pure.cl b/OpenCL/m12700-pure.cl index 8a4cd983a..77a6bacd1 100644 --- a/OpenCL/m12700-pure.cl +++ b/OpenCL/m12700-pure.cl @@ -109,10 +109,10 @@ KERNEL_FQ void m12700_init (KERN_ATTR_TMPS (mywallet_tmp_t)) u32 w2[4]; u32 w3[4]; - w0[0] = salt_bufs[salt_pos].salt_buf[0]; - w0[1] = salt_bufs[salt_pos].salt_buf[1]; - w0[2] = salt_bufs[salt_pos].salt_buf[2]; - w0[3] = salt_bufs[salt_pos].salt_buf[3]; + w0[0] = salt_bufs[SALT_POS].salt_buf[0]; + w0[1] = salt_bufs[SALT_POS].salt_buf[1]; + w0[2] = salt_bufs[SALT_POS].salt_buf[2]; + w0[3] = salt_bufs[SALT_POS].salt_buf[3]; w1[0] = 0; w1[1] = 0; w1[2] = 0; @@ -334,10 +334,10 @@ KERNEL_FQ void m12700_comp (KERN_ATTR_TMPS (mywallet_tmp_t)) u32 iv[4]; - iv[0] = salt_bufs[salt_pos].salt_buf[0]; - iv[1] = salt_bufs[salt_pos].salt_buf[1]; - iv[2] = salt_bufs[salt_pos].salt_buf[2]; - iv[3] = salt_bufs[salt_pos].salt_buf[3]; + iv[0] = salt_bufs[SALT_POS].salt_buf[0]; + iv[1] = salt_bufs[SALT_POS].salt_buf[1]; + iv[2] = salt_bufs[SALT_POS].salt_buf[2]; + iv[3] = salt_bufs[SALT_POS].salt_buf[3]; // decrypted data should be a JSON string consisting only of ASCII chars (0x09-0x7e) @@ -345,10 +345,10 @@ KERNEL_FQ void m12700_comp (KERN_ATTR_TMPS (mywallet_tmp_t)) { u32 data[4]; - data[0] = salt_bufs[salt_pos].salt_buf[i + 0]; - data[1] = salt_bufs[salt_pos].salt_buf[i + 1]; - data[2] = salt_bufs[salt_pos].salt_buf[i + 2]; - data[3] = salt_bufs[salt_pos].salt_buf[i + 3]; + data[0] = salt_bufs[SALT_POS].salt_buf[i + 0]; + data[1] = salt_bufs[SALT_POS].salt_buf[i + 1]; + data[2] = salt_bufs[SALT_POS].salt_buf[i + 2]; + data[3] = salt_bufs[SALT_POS].salt_buf[i + 3]; u32 out[4]; @@ -370,10 +370,10 @@ KERNEL_FQ void m12700_comp (KERN_ATTR_TMPS (mywallet_tmp_t)) iv[3] = data[3]; } - const u32 r0 = salt_bufs[salt_pos].salt_buf[4]; - const u32 r1 = salt_bufs[salt_pos].salt_buf[5]; - const u32 r2 = salt_bufs[salt_pos].salt_buf[6]; - const u32 r3 = salt_bufs[salt_pos].salt_buf[7]; + const u32 r0 = salt_bufs[SALT_POS].salt_buf[4]; + const u32 r1 = salt_bufs[SALT_POS].salt_buf[5]; + const u32 r2 = salt_bufs[SALT_POS].salt_buf[6]; + const u32 r3 = salt_bufs[SALT_POS].salt_buf[7]; #define il_pos 0 diff --git a/OpenCL/m12800-pure.cl b/OpenCL/m12800-pure.cl index 702932163..2906291a5 100644 --- a/OpenCL/m12800-pure.cl +++ b/OpenCL/m12800-pure.cl @@ -196,7 +196,7 @@ KERNEL_FQ void m12800_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sh tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { diff --git a/OpenCL/m12900-pure.cl b/OpenCL/m12900-pure.cl index b575ad561..95f4e7085 100644 --- a/OpenCL/m12900-pure.cl +++ b/OpenCL/m12900-pure.cl @@ -112,10 +112,10 @@ KERNEL_FQ void m12900_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sh u32 w2[4]; u32 w3[4]; - w0[0] = salt_bufs[salt_pos].salt_buf[0]; - w0[1] = salt_bufs[salt_pos].salt_buf[1]; - w0[2] = salt_bufs[salt_pos].salt_buf[2]; - w0[3] = salt_bufs[salt_pos].salt_buf[3]; + w0[0] = salt_bufs[SALT_POS].salt_buf[0]; + w0[1] = salt_bufs[SALT_POS].salt_buf[1]; + w0[2] = salt_bufs[SALT_POS].salt_buf[2]; + w0[3] = salt_bufs[SALT_POS].salt_buf[3]; w1[0] = 0; w1[1] = 0; w1[2] = 0; @@ -320,14 +320,14 @@ KERNEL_FQ void m12900_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sh sha256_hmac_init_64 (&ctx, w0, w1, w2, w3); - w0[0] = salt_bufs[salt_pos].salt_buf[ 4]; - w0[1] = salt_bufs[salt_pos].salt_buf[ 5]; - w0[2] = salt_bufs[salt_pos].salt_buf[ 6]; - w0[3] = salt_bufs[salt_pos].salt_buf[ 7]; - w1[0] = salt_bufs[salt_pos].salt_buf[ 8]; - w1[1] = salt_bufs[salt_pos].salt_buf[ 9]; - w1[2] = salt_bufs[salt_pos].salt_buf[10]; - w1[3] = salt_bufs[salt_pos].salt_buf[11]; + w0[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + w0[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + w0[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + w0[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + w1[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + w1[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + w1[2] = salt_bufs[SALT_POS].salt_buf[10]; + w1[3] = salt_bufs[SALT_POS].salt_buf[11]; w2[0] = 0; w2[1] = 0; w2[2] = 0; diff --git a/OpenCL/m13000-pure.cl b/OpenCL/m13000-pure.cl index 993fdba1d..578f67d47 100644 --- a/OpenCL/m13000-pure.cl +++ b/OpenCL/m13000-pure.cl @@ -101,7 +101,7 @@ KERNEL_FQ void m13000_init (KERN_ATTR_TMPS (pbkdf2_sha256_tmp_t)) tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global (&sha256_hmac_ctx, salt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global (&sha256_hmac_ctx, salt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { diff --git a/OpenCL/m13100_a0-optimized.cl b/OpenCL/m13100_a0-optimized.cl index b9465f730..7aa5723aa 100644 --- a/OpenCL/m13100_a0-optimized.cl +++ b/OpenCL/m13100_a0-optimized.cl @@ -620,10 +620,10 @@ KERNEL_FQ void m13100_m04 (KERN_ATTR_RULES_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -655,11 +655,11 @@ KERNEL_FQ void m13100_m04 (KERN_ATTR_RULES_ESALT (krb5tgs_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -718,10 +718,10 @@ KERNEL_FQ void m13100_s04 (KERN_ATTR_RULES_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -753,11 +753,11 @@ KERNEL_FQ void m13100_s04 (KERN_ATTR_RULES_ESALT (krb5tgs_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m13100_a0-pure.cl b/OpenCL/m13100_a0-pure.cl index 7a41226ef..c0cf5a92b 100644 --- a/OpenCL/m13100_a0-pure.cl +++ b/OpenCL/m13100_a0-pure.cl @@ -410,10 +410,10 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_RULES_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -439,11 +439,11 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_RULES_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -472,10 +472,10 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_RULES_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -501,11 +501,11 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_RULES_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m13100_a1-optimized.cl b/OpenCL/m13100_a1-optimized.cl index a548a7bf1..fb7c16f54 100644 --- a/OpenCL/m13100_a1-optimized.cl +++ b/OpenCL/m13100_a1-optimized.cl @@ -617,10 +617,10 @@ KERNEL_FQ void m13100_m04 (KERN_ATTR_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -702,11 +702,11 @@ KERNEL_FQ void m13100_m04 (KERN_ATTR_ESALT (krb5tgs_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -764,10 +764,10 @@ KERNEL_FQ void m13100_s04 (KERN_ATTR_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -849,11 +849,11 @@ KERNEL_FQ void m13100_s04 (KERN_ATTR_ESALT (krb5tgs_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m13100_a1-pure.cl b/OpenCL/m13100_a1-pure.cl index a8d0098b3..0e43f21c3 100644 --- a/OpenCL/m13100_a1-pure.cl +++ b/OpenCL/m13100_a1-pure.cl @@ -406,10 +406,10 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; md4_ctx_t ctx0; @@ -435,11 +435,11 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -466,10 +466,10 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; md4_ctx_t ctx0; @@ -495,11 +495,11 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m13100_a3-optimized.cl b/OpenCL/m13100_a3-optimized.cl index 6079988b0..924e44beb 100644 --- a/OpenCL/m13100_a3-optimized.cl +++ b/OpenCL/m13100_a3-optimized.cl @@ -588,10 +588,10 @@ DECLSPEC void m13100 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -622,11 +622,11 @@ DECLSPEC void m13100 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -681,7 +681,7 @@ KERNEL_FQ void m13100_m04 (KERN_ATTR_ESALT (krb5tgs_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m13100 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13100 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13100_m08 (KERN_ATTR_ESALT (krb5tgs_t)) @@ -733,7 +733,7 @@ KERNEL_FQ void m13100_m08 (KERN_ATTR_ESALT (krb5tgs_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m13100 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13100 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13100_m16 (KERN_ATTR_ESALT (krb5tgs_t)) @@ -789,7 +789,7 @@ KERNEL_FQ void m13100_s04 (KERN_ATTR_ESALT (krb5tgs_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m13100 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13100 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13100_s08 (KERN_ATTR_ESALT (krb5tgs_t)) @@ -841,7 +841,7 @@ KERNEL_FQ void m13100_s08 (KERN_ATTR_ESALT (krb5tgs_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m13100 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13100 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13100_s16 (KERN_ATTR_ESALT (krb5tgs_t)) diff --git a/OpenCL/m13100_a3-pure.cl b/OpenCL/m13100_a3-pure.cl index 25e60e0c5..99eb540a4 100644 --- a/OpenCL/m13100_a3-pure.cl +++ b/OpenCL/m13100_a3-pure.cl @@ -415,10 +415,10 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_VECTOR_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -448,11 +448,11 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_VECTOR_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -488,10 +488,10 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_VECTOR_ESALT (krb5tgs_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -521,11 +521,11 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_VECTOR_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m13200-pure.cl b/OpenCL/m13200-pure.cl index 68e7d6048..4c0429984 100644 --- a/OpenCL/m13200-pure.cl +++ b/OpenCL/m13200-pure.cl @@ -51,10 +51,10 @@ KERNEL_FQ void m13200_init (KERN_ATTR_TMPS (axcrypt_tmp_t)) KEK[4] = ctx.h[4]; /* hash XOR salt is KEK, used as key for AES wrapping routine */ - tmps[gid].KEK[0] = KEK[0] ^ salt_bufs[salt_pos].salt_buf[0]; - tmps[gid].KEK[1] = KEK[1] ^ salt_bufs[salt_pos].salt_buf[1]; - tmps[gid].KEK[2] = KEK[2] ^ salt_bufs[salt_pos].salt_buf[2]; - tmps[gid].KEK[3] = KEK[3] ^ salt_bufs[salt_pos].salt_buf[3]; + tmps[gid].KEK[0] = KEK[0] ^ salt_bufs[SALT_POS].salt_buf[0]; + tmps[gid].KEK[1] = KEK[1] ^ salt_bufs[SALT_POS].salt_buf[1]; + tmps[gid].KEK[2] = KEK[2] ^ salt_bufs[SALT_POS].salt_buf[2]; + tmps[gid].KEK[3] = KEK[3] ^ salt_bufs[SALT_POS].salt_buf[3]; /** * salt_buf[0..3] is salt @@ -62,14 +62,14 @@ KERNEL_FQ void m13200_init (KERN_ATTR_TMPS (axcrypt_tmp_t)) */ /* set lsb */ - tmps[gid].lsb[0] = salt_bufs[salt_pos].salt_buf[6]; - tmps[gid].lsb[1] = salt_bufs[salt_pos].salt_buf[7]; - tmps[gid].lsb[2] = salt_bufs[salt_pos].salt_buf[8]; - tmps[gid].lsb[3] = salt_bufs[salt_pos].salt_buf[9]; + tmps[gid].lsb[0] = salt_bufs[SALT_POS].salt_buf[6]; + tmps[gid].lsb[1] = salt_bufs[SALT_POS].salt_buf[7]; + tmps[gid].lsb[2] = salt_bufs[SALT_POS].salt_buf[8]; + tmps[gid].lsb[3] = salt_bufs[SALT_POS].salt_buf[9]; /* set msb */ - tmps[gid].cipher[0] = salt_bufs[salt_pos].salt_buf[4]; - tmps[gid].cipher[1] = salt_bufs[salt_pos].salt_buf[5]; + tmps[gid].cipher[0] = salt_bufs[SALT_POS].salt_buf[4]; + tmps[gid].cipher[1] = salt_bufs[SALT_POS].salt_buf[5]; tmps[gid].cipher[2] = 0; tmps[gid].cipher[3] = 0; } @@ -168,7 +168,7 @@ KERNEL_FQ void m13200_loop (KERN_ATTR_TMPS (axcrypt_tmp_t)) AES128_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); - const u32 wrapping_rounds = salt_bufs[salt_pos].salt_iter - 1; + const u32 wrapping_rounds = salt_bufs[SALT_POS].salt_iter - 1; /* custom AES un-wrapping loop */ for (u32 i = 0, j = wrapping_rounds - loop_pos; i < loop_cnt; i++, j--) @@ -227,9 +227,9 @@ KERNEL_FQ void m13200_comp (KERN_ATTR_TMPS (axcrypt_tmp_t)) if (tmps[gid].cipher[0] == 0xa6a6a6a6 && tmps[gid].cipher[1] == 0xa6a6a6a6) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m13300_a0-optimized.cl b/OpenCL/m13300_a0-optimized.cl index 8fb4398ad..a77534064 100644 --- a/OpenCL/m13300_a0-optimized.cl +++ b/OpenCL/m13300_a0-optimized.cl @@ -239,10 +239,10 @@ KERNEL_FQ void m13300_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13300_a0-pure.cl b/OpenCL/m13300_a0-pure.cl index 7e91986fa..9946bcfe7 100644 --- a/OpenCL/m13300_a0-pure.cl +++ b/OpenCL/m13300_a0-pure.cl @@ -79,10 +79,10 @@ KERNEL_FQ void m13300_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13300_a1-optimized.cl b/OpenCL/m13300_a1-optimized.cl index 450a66cf2..a664357f4 100644 --- a/OpenCL/m13300_a1-optimized.cl +++ b/OpenCL/m13300_a1-optimized.cl @@ -295,10 +295,10 @@ KERNEL_FQ void m13300_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13300_a1-pure.cl b/OpenCL/m13300_a1-pure.cl index 106027d74..3c6101371 100644 --- a/OpenCL/m13300_a1-pure.cl +++ b/OpenCL/m13300_a1-pure.cl @@ -75,10 +75,10 @@ KERNEL_FQ void m13300_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13300_a3-optimized.cl b/OpenCL/m13300_a3-optimized.cl index 2b3f91812..2c120924e 100644 --- a/OpenCL/m13300_a3-optimized.cl +++ b/OpenCL/m13300_a3-optimized.cl @@ -361,10 +361,10 @@ DECLSPEC void m13300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -563,7 +563,7 @@ KERNEL_FQ void m13300_m04 (KERN_ATTR_VECTOR ()) * main */ - m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13300_m08 (KERN_ATTR_VECTOR ()) @@ -601,7 +601,7 @@ KERNEL_FQ void m13300_m08 (KERN_ATTR_VECTOR ()) * main */ - m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13300_m16 (KERN_ATTR_VECTOR ()) @@ -639,7 +639,7 @@ KERNEL_FQ void m13300_m16 (KERN_ATTR_VECTOR ()) * main */ - m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13300_s04 (KERN_ATTR_VECTOR ()) @@ -677,7 +677,7 @@ KERNEL_FQ void m13300_s04 (KERN_ATTR_VECTOR ()) * main */ - m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13300_s08 (KERN_ATTR_VECTOR ()) @@ -715,7 +715,7 @@ KERNEL_FQ void m13300_s08 (KERN_ATTR_VECTOR ()) * main */ - m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13300_s16 (KERN_ATTR_VECTOR ()) @@ -753,5 +753,5 @@ KERNEL_FQ void m13300_s16 (KERN_ATTR_VECTOR ()) * main */ - m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m13300_a3-pure.cl b/OpenCL/m13300_a3-pure.cl index 924c4165a..8ee4224a2 100644 --- a/OpenCL/m13300_a3-pure.cl +++ b/OpenCL/m13300_a3-pure.cl @@ -88,10 +88,10 @@ KERNEL_FQ void m13300_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13400-pure.cl b/OpenCL/m13400-pure.cl index 1ad66422f..fc726be84 100644 --- a/OpenCL/m13400-pure.cl +++ b/OpenCL/m13400-pure.cl @@ -74,7 +74,7 @@ KERNEL_FQ void m13400_init (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) digest[6] = ctx.h[6]; digest[7] = ctx.h[7]; - if (esalt_bufs[digests_offset].version == 2 && esalt_bufs[digests_offset].keyfile_len == 0) + if (esalt_bufs[DIGESTS_OFFSET].version == 2 && esalt_bufs[DIGESTS_OFFSET].keyfile_len == 0) { u32 w0[4]; u32 w1[4]; @@ -114,7 +114,7 @@ KERNEL_FQ void m13400_init (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) digest[7] = ctx.h[7]; } - if (esalt_bufs[digests_offset].keyfile_len != 0) + if (esalt_bufs[DIGESTS_OFFSET].keyfile_len != 0) { u32 w0[4]; u32 w1[4]; @@ -129,14 +129,14 @@ KERNEL_FQ void m13400_init (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) w1[1] = digest[5]; w1[2] = digest[6]; w1[3] = digest[7]; - w2[0] = esalt_bufs[digests_offset].keyfile[0]; - w2[1] = esalt_bufs[digests_offset].keyfile[1]; - w2[2] = esalt_bufs[digests_offset].keyfile[2]; - w2[3] = esalt_bufs[digests_offset].keyfile[3]; - w3[0] = esalt_bufs[digests_offset].keyfile[4]; - w3[1] = esalt_bufs[digests_offset].keyfile[5]; - w3[2] = esalt_bufs[digests_offset].keyfile[6]; - w3[3] = esalt_bufs[digests_offset].keyfile[7]; + w2[0] = esalt_bufs[DIGESTS_OFFSET].keyfile[0]; + w2[1] = esalt_bufs[DIGESTS_OFFSET].keyfile[1]; + w2[2] = esalt_bufs[DIGESTS_OFFSET].keyfile[2]; + w2[3] = esalt_bufs[DIGESTS_OFFSET].keyfile[3]; + w3[0] = esalt_bufs[DIGESTS_OFFSET].keyfile[4]; + w3[1] = esalt_bufs[DIGESTS_OFFSET].keyfile[5]; + w3[2] = esalt_bufs[DIGESTS_OFFSET].keyfile[6]; + w3[3] = esalt_bufs[DIGESTS_OFFSET].keyfile[7]; sha256_init (&ctx); @@ -209,14 +209,14 @@ KERNEL_FQ void m13400_loop (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) u32 ukey[8]; - ukey[0] = esalt_bufs[digests_offset].transf_random_seed[0]; - ukey[1] = esalt_bufs[digests_offset].transf_random_seed[1]; - ukey[2] = esalt_bufs[digests_offset].transf_random_seed[2]; - ukey[3] = esalt_bufs[digests_offset].transf_random_seed[3]; - ukey[4] = esalt_bufs[digests_offset].transf_random_seed[4]; - ukey[5] = esalt_bufs[digests_offset].transf_random_seed[5]; - ukey[6] = esalt_bufs[digests_offset].transf_random_seed[6]; - ukey[7] = esalt_bufs[digests_offset].transf_random_seed[7]; + ukey[0] = esalt_bufs[DIGESTS_OFFSET].transf_random_seed[0]; + ukey[1] = esalt_bufs[DIGESTS_OFFSET].transf_random_seed[1]; + ukey[2] = esalt_bufs[DIGESTS_OFFSET].transf_random_seed[2]; + ukey[3] = esalt_bufs[DIGESTS_OFFSET].transf_random_seed[3]; + ukey[4] = esalt_bufs[DIGESTS_OFFSET].transf_random_seed[4]; + ukey[5] = esalt_bufs[DIGESTS_OFFSET].transf_random_seed[5]; + ukey[6] = esalt_bufs[DIGESTS_OFFSET].transf_random_seed[6]; + ukey[7] = esalt_bufs[DIGESTS_OFFSET].transf_random_seed[7]; #define KEYLEN 60 @@ -356,12 +356,12 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) /* ...then hash final_random_seed | output */ - if (esalt_bufs[digests_offset].version == 1) + if (esalt_bufs[DIGESTS_OFFSET].version == 1) { - w0[0] = esalt_bufs[digests_offset].final_random_seed[0]; - w0[1] = esalt_bufs[digests_offset].final_random_seed[1]; - w0[2] = esalt_bufs[digests_offset].final_random_seed[2]; - w0[3] = esalt_bufs[digests_offset].final_random_seed[3]; + w0[0] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[0]; + w0[1] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[1]; + w0[2] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[2]; + w0[3] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[3]; w1[0] = digest[0]; w1[1] = digest[1]; w1[2] = digest[2]; @@ -392,14 +392,14 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) } else { - w0[0] = esalt_bufs[digests_offset].final_random_seed[0]; - w0[1] = esalt_bufs[digests_offset].final_random_seed[1]; - w0[2] = esalt_bufs[digests_offset].final_random_seed[2]; - w0[3] = esalt_bufs[digests_offset].final_random_seed[3]; - w1[0] = esalt_bufs[digests_offset].final_random_seed[4]; - w1[1] = esalt_bufs[digests_offset].final_random_seed[5]; - w1[2] = esalt_bufs[digests_offset].final_random_seed[6]; - w1[3] = esalt_bufs[digests_offset].final_random_seed[7]; + w0[0] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[0]; + w0[1] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[1]; + w0[2] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[2]; + w0[3] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[3]; + w1[0] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[4]; + w1[1] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[5]; + w1[2] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[6]; + w1[3] = esalt_bufs[DIGESTS_OFFSET].final_random_seed[7]; w2[0] = digest[0]; w2[1] = digest[1]; w2[2] = digest[2]; @@ -429,23 +429,23 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].enc_iv[0]; - iv[1] = esalt_bufs[digests_offset].enc_iv[1]; - iv[2] = esalt_bufs[digests_offset].enc_iv[2]; - iv[3] = esalt_bufs[digests_offset].enc_iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].enc_iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].enc_iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].enc_iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].enc_iv[3]; u32 r0 = 0; u32 r1 = 0; u32 r2 = 0; u32 r3 = 0; - if (esalt_bufs[digests_offset].version == 1) + if (esalt_bufs[DIGESTS_OFFSET].version == 1) { sha256_ctx_t ctx; sha256_init (&ctx); - if (esalt_bufs[digests_offset].algorithm == 1) + if (esalt_bufs[DIGESTS_OFFSET].algorithm == 1) { /* Construct final Twofish key */ u32 sk[4]; @@ -467,7 +467,7 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) iv[2] = hc_swap32_S (iv[2]); iv[3] = hc_swap32_S (iv[3]); - u32 contents_len = esalt_bufs[digests_offset].contents_len; + u32 contents_len = esalt_bufs[DIGESTS_OFFSET].contents_len; u32 contents_pos; u32 contents_off; @@ -478,10 +478,10 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) { u32 data[4]; - data[0] = esalt_bufs[digests_offset].contents[contents_off + 0]; - data[1] = esalt_bufs[digests_offset].contents[contents_off + 1]; - data[2] = esalt_bufs[digests_offset].contents[contents_off + 2]; - data[3] = esalt_bufs[digests_offset].contents[contents_off + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 3]; data[0] = hc_swap32_S (data[0]); data[1] = hc_swap32_S (data[1]); @@ -524,10 +524,10 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) u32 data[4]; - data[0] = esalt_bufs[digests_offset].contents[contents_off + 0]; - data[1] = esalt_bufs[digests_offset].contents[contents_off + 1]; - data[2] = esalt_bufs[digests_offset].contents[contents_off + 2]; - data[3] = esalt_bufs[digests_offset].contents[contents_off + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 3]; data[0] = hc_swap32_S (data[0]); data[1] = hc_swap32_S (data[1]); @@ -578,7 +578,7 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) AES256_set_decrypt_key (ks, digest, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); - u32 contents_len = esalt_bufs[digests_offset].contents_len; + u32 contents_len = esalt_bufs[DIGESTS_OFFSET].contents_len; u32 contents_pos; u32 contents_off; @@ -587,10 +587,10 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) { u32 data[4]; - data[0] = esalt_bufs[digests_offset].contents[contents_off + 0]; - data[1] = esalt_bufs[digests_offset].contents[contents_off + 1]; - data[2] = esalt_bufs[digests_offset].contents[contents_off + 2]; - data[3] = esalt_bufs[digests_offset].contents[contents_off + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 3]; u32 out[4]; @@ -623,10 +623,10 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) u32 data[4]; - data[0] = esalt_bufs[digests_offset].contents[contents_off + 0]; - data[1] = esalt_bufs[digests_offset].contents[contents_off + 1]; - data[2] = esalt_bufs[digests_offset].contents[contents_off + 2]; - data[3] = esalt_bufs[digests_offset].contents[contents_off + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].contents[contents_off + 3]; u32 out[4]; @@ -677,10 +677,10 @@ KERNEL_FQ void m13400_comp (KERN_ATTR_TMPS_ESALT (keepass_tmp_t, keepass_t)) u32 data[4]; - data[0] = esalt_bufs[digests_offset].contents_hash[0]; - data[1] = esalt_bufs[digests_offset].contents_hash[1]; - data[2] = esalt_bufs[digests_offset].contents_hash[2]; - data[3] = esalt_bufs[digests_offset].contents_hash[3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].contents_hash[0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].contents_hash[1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].contents_hash[2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].contents_hash[3]; u32 out[4]; diff --git a/OpenCL/m13500_a0-optimized.cl b/OpenCL/m13500_a0-optimized.cl index 11f1c1805..4c9967028 100644 --- a/OpenCL/m13500_a0-optimized.cl +++ b/OpenCL/m13500_a0-optimized.cl @@ -61,41 +61,41 @@ KERNEL_FQ void m13500_m04 (KERN_ATTR_RULES_ESALT (pstoken_t)) * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; const u32 pc_offset4 = pc_offset * 4; u32 pc_digest[5]; - pc_digest[0] = esalt_bufs[digests_offset].pc_digest[0]; - pc_digest[1] = esalt_bufs[digests_offset].pc_digest[1]; - pc_digest[2] = esalt_bufs[digests_offset].pc_digest[2]; - pc_digest[3] = esalt_bufs[digests_offset].pc_digest[3]; - pc_digest[4] = esalt_bufs[digests_offset].pc_digest[4]; + pc_digest[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + pc_digest[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + pc_digest[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + pc_digest[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + pc_digest[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; u32 salt_buf0[4]; u32 salt_buf1[4]; u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - salt_buf0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - salt_buf0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - salt_buf0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - salt_buf1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - salt_buf1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - salt_buf1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - salt_buf1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - salt_buf2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - salt_buf2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - salt_buf2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - salt_buf2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - salt_buf3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - salt_buf3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - salt_buf3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - salt_buf3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + salt_buf0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + salt_buf0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + salt_buf0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + salt_buf0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + salt_buf1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + salt_buf1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + salt_buf1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + salt_buf1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + salt_buf2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + salt_buf2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + salt_buf2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + salt_buf2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + salt_buf3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + salt_buf3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + salt_buf3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + salt_buf3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - const u32 salt_len = esalt_bufs[digests_offset].salt_len; + const u32 salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * loop @@ -486,41 +486,41 @@ KERNEL_FQ void m13500_s04 (KERN_ATTR_RULES_ESALT (pstoken_t)) * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; const u32 pc_offset4 = pc_offset * 4; u32 pc_digest[5]; - pc_digest[0] = esalt_bufs[digests_offset].pc_digest[0]; - pc_digest[1] = esalt_bufs[digests_offset].pc_digest[1]; - pc_digest[2] = esalt_bufs[digests_offset].pc_digest[2]; - pc_digest[3] = esalt_bufs[digests_offset].pc_digest[3]; - pc_digest[4] = esalt_bufs[digests_offset].pc_digest[4]; + pc_digest[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + pc_digest[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + pc_digest[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + pc_digest[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + pc_digest[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; u32 salt_buf0[4]; u32 salt_buf1[4]; u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - salt_buf0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - salt_buf0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - salt_buf0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - salt_buf1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - salt_buf1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - salt_buf1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - salt_buf1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - salt_buf2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - salt_buf2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - salt_buf2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - salt_buf2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - salt_buf3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - salt_buf3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - salt_buf3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - salt_buf3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + salt_buf0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + salt_buf0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + salt_buf0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + salt_buf0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + salt_buf1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + salt_buf1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + salt_buf1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + salt_buf1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + salt_buf2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + salt_buf2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + salt_buf2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + salt_buf2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + salt_buf3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + salt_buf3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + salt_buf3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + salt_buf3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - const u32 salt_len = esalt_bufs[digests_offset].salt_len; + const u32 salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * digest @@ -528,10 +528,10 @@ KERNEL_FQ void m13500_s04 (KERN_ATTR_RULES_ESALT (pstoken_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13500_a0-pure.cl b/OpenCL/m13500_a0-pure.cl index b8102e111..e58051aaa 100644 --- a/OpenCL/m13500_a0-pure.cl +++ b/OpenCL/m13500_a0-pure.cl @@ -41,34 +41,34 @@ KERNEL_FQ void m13500_mxx (KERN_ATTR_RULES_ESALT (pstoken_t)) * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; sha1_ctx_t ctx0; - ctx0.h[0] = esalt_bufs[digests_offset].pc_digest[0]; - ctx0.h[1] = esalt_bufs[digests_offset].pc_digest[1]; - ctx0.h[2] = esalt_bufs[digests_offset].pc_digest[2]; - ctx0.h[3] = esalt_bufs[digests_offset].pc_digest[3]; - ctx0.h[4] = esalt_bufs[digests_offset].pc_digest[4]; + ctx0.h[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + ctx0.h[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + ctx0.h[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + ctx0.h[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + ctx0.h[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; - ctx0.w0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - ctx0.w0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - ctx0.w0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - ctx0.w0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - ctx0.w1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - ctx0.w1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - ctx0.w1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - ctx0.w1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - ctx0.w2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - ctx0.w2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - ctx0.w2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - ctx0.w2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - ctx0.w3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - ctx0.w3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - ctx0.w3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - ctx0.w3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + ctx0.w0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + ctx0.w0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + ctx0.w0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + ctx0.w0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + ctx0.w1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + ctx0.w1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + ctx0.w1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + ctx0.w1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + ctx0.w2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + ctx0.w2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + ctx0.w2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + ctx0.w2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + ctx0.w3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + ctx0.w3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + ctx0.w3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + ctx0.w3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - ctx0.len = esalt_bufs[digests_offset].salt_len; + ctx0.len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * base @@ -118,44 +118,44 @@ KERNEL_FQ void m13500_sxx (KERN_ATTR_RULES_ESALT (pstoken_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; sha1_ctx_t ctx0; - ctx0.h[0] = esalt_bufs[digests_offset].pc_digest[0]; - ctx0.h[1] = esalt_bufs[digests_offset].pc_digest[1]; - ctx0.h[2] = esalt_bufs[digests_offset].pc_digest[2]; - ctx0.h[3] = esalt_bufs[digests_offset].pc_digest[3]; - ctx0.h[4] = esalt_bufs[digests_offset].pc_digest[4]; + ctx0.h[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + ctx0.h[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + ctx0.h[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + ctx0.h[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + ctx0.h[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; - ctx0.w0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - ctx0.w0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - ctx0.w0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - ctx0.w0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - ctx0.w1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - ctx0.w1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - ctx0.w1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - ctx0.w1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - ctx0.w2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - ctx0.w2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - ctx0.w2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - ctx0.w2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - ctx0.w3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - ctx0.w3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - ctx0.w3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - ctx0.w3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + ctx0.w0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + ctx0.w0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + ctx0.w0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + ctx0.w0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + ctx0.w1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + ctx0.w1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + ctx0.w1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + ctx0.w1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + ctx0.w2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + ctx0.w2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + ctx0.w2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + ctx0.w2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + ctx0.w3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + ctx0.w3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + ctx0.w3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + ctx0.w3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - ctx0.len = esalt_bufs[digests_offset].salt_len; + ctx0.len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * base diff --git a/OpenCL/m13500_a1-optimized.cl b/OpenCL/m13500_a1-optimized.cl index 1df3d887a..0f6002f55 100644 --- a/OpenCL/m13500_a1-optimized.cl +++ b/OpenCL/m13500_a1-optimized.cl @@ -59,41 +59,41 @@ KERNEL_FQ void m13500_m04 (KERN_ATTR_ESALT (pstoken_t)) * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; const u32 pc_offset4 = pc_offset * 4; u32 pc_digest[5]; - pc_digest[0] = esalt_bufs[digests_offset].pc_digest[0]; - pc_digest[1] = esalt_bufs[digests_offset].pc_digest[1]; - pc_digest[2] = esalt_bufs[digests_offset].pc_digest[2]; - pc_digest[3] = esalt_bufs[digests_offset].pc_digest[3]; - pc_digest[4] = esalt_bufs[digests_offset].pc_digest[4]; + pc_digest[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + pc_digest[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + pc_digest[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + pc_digest[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + pc_digest[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; u32 salt_buf0[4]; u32 salt_buf1[4]; u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - salt_buf0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - salt_buf0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - salt_buf0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - salt_buf1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - salt_buf1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - salt_buf1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - salt_buf1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - salt_buf2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - salt_buf2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - salt_buf2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - salt_buf2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - salt_buf3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - salt_buf3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - salt_buf3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - salt_buf3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + salt_buf0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + salt_buf0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + salt_buf0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + salt_buf0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + salt_buf1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + salt_buf1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + salt_buf1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + salt_buf1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + salt_buf2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + salt_buf2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + salt_buf2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + salt_buf2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + salt_buf3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + salt_buf3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + salt_buf3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + salt_buf3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - const u32 salt_len = esalt_bufs[digests_offset].salt_len; + const u32 salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * loop @@ -536,41 +536,41 @@ KERNEL_FQ void m13500_s04 (KERN_ATTR_ESALT (pstoken_t)) * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; const u32 pc_offset4 = pc_offset * 4; u32 pc_digest[5]; - pc_digest[0] = esalt_bufs[digests_offset].pc_digest[0]; - pc_digest[1] = esalt_bufs[digests_offset].pc_digest[1]; - pc_digest[2] = esalt_bufs[digests_offset].pc_digest[2]; - pc_digest[3] = esalt_bufs[digests_offset].pc_digest[3]; - pc_digest[4] = esalt_bufs[digests_offset].pc_digest[4]; + pc_digest[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + pc_digest[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + pc_digest[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + pc_digest[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + pc_digest[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; u32 salt_buf0[4]; u32 salt_buf1[4]; u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - salt_buf0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - salt_buf0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - salt_buf0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - salt_buf1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - salt_buf1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - salt_buf1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - salt_buf1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - salt_buf2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - salt_buf2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - salt_buf2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - salt_buf2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - salt_buf3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - salt_buf3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - salt_buf3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - salt_buf3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + salt_buf0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + salt_buf0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + salt_buf0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + salt_buf0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + salt_buf1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + salt_buf1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + salt_buf1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + salt_buf1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + salt_buf2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + salt_buf2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + salt_buf2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + salt_buf2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + salt_buf3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + salt_buf3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + salt_buf3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + salt_buf3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - const u32 salt_len = esalt_bufs[digests_offset].salt_len; + const u32 salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * digest @@ -578,10 +578,10 @@ KERNEL_FQ void m13500_s04 (KERN_ATTR_ESALT (pstoken_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13500_a1-pure.cl b/OpenCL/m13500_a1-pure.cl index 8443f38ca..88e647f8a 100644 --- a/OpenCL/m13500_a1-pure.cl +++ b/OpenCL/m13500_a1-pure.cl @@ -39,34 +39,34 @@ KERNEL_FQ void m13500_mxx (KERN_ATTR_ESALT (pstoken_t)) * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; sha1_ctx_t ctx0; - ctx0.h[0] = esalt_bufs[digests_offset].pc_digest[0]; - ctx0.h[1] = esalt_bufs[digests_offset].pc_digest[1]; - ctx0.h[2] = esalt_bufs[digests_offset].pc_digest[2]; - ctx0.h[3] = esalt_bufs[digests_offset].pc_digest[3]; - ctx0.h[4] = esalt_bufs[digests_offset].pc_digest[4]; + ctx0.h[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + ctx0.h[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + ctx0.h[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + ctx0.h[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + ctx0.h[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; - ctx0.w0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - ctx0.w0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - ctx0.w0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - ctx0.w0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - ctx0.w1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - ctx0.w1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - ctx0.w1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - ctx0.w1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - ctx0.w2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - ctx0.w2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - ctx0.w2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - ctx0.w2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - ctx0.w3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - ctx0.w3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - ctx0.w3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - ctx0.w3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + ctx0.w0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + ctx0.w0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + ctx0.w0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + ctx0.w0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + ctx0.w1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + ctx0.w1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + ctx0.w1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + ctx0.w1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + ctx0.w2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + ctx0.w2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + ctx0.w2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + ctx0.w2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + ctx0.w3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + ctx0.w3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + ctx0.w3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + ctx0.w3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - ctx0.len = esalt_bufs[digests_offset].salt_len; + ctx0.len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * base @@ -112,44 +112,44 @@ KERNEL_FQ void m13500_sxx (KERN_ATTR_ESALT (pstoken_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; sha1_ctx_t ctx0; - ctx0.h[0] = esalt_bufs[digests_offset].pc_digest[0]; - ctx0.h[1] = esalt_bufs[digests_offset].pc_digest[1]; - ctx0.h[2] = esalt_bufs[digests_offset].pc_digest[2]; - ctx0.h[3] = esalt_bufs[digests_offset].pc_digest[3]; - ctx0.h[4] = esalt_bufs[digests_offset].pc_digest[4]; + ctx0.h[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + ctx0.h[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + ctx0.h[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + ctx0.h[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + ctx0.h[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; - ctx0.w0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - ctx0.w0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - ctx0.w0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - ctx0.w0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - ctx0.w1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - ctx0.w1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - ctx0.w1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - ctx0.w1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - ctx0.w2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - ctx0.w2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - ctx0.w2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - ctx0.w2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - ctx0.w3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - ctx0.w3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - ctx0.w3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - ctx0.w3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + ctx0.w0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + ctx0.w0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + ctx0.w0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + ctx0.w0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + ctx0.w1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + ctx0.w1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + ctx0.w1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + ctx0.w1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + ctx0.w2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + ctx0.w2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + ctx0.w2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + ctx0.w2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + ctx0.w3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + ctx0.w3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + ctx0.w3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + ctx0.w3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - ctx0.len = esalt_bufs[digests_offset].salt_len; + ctx0.len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * base diff --git a/OpenCL/m13500_a3-optimized.cl b/OpenCL/m13500_a3-optimized.cl index ce33398f5..07a068d63 100644 --- a/OpenCL/m13500_a3-optimized.cl +++ b/OpenCL/m13500_a3-optimized.cl @@ -38,41 +38,41 @@ DECLSPEC void m13500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; const u32 pc_offset4 = pc_offset * 4; u32 pc_digest[5]; - pc_digest[0] = esalt_bufs[digests_offset].pc_digest[0]; - pc_digest[1] = esalt_bufs[digests_offset].pc_digest[1]; - pc_digest[2] = esalt_bufs[digests_offset].pc_digest[2]; - pc_digest[3] = esalt_bufs[digests_offset].pc_digest[3]; - pc_digest[4] = esalt_bufs[digests_offset].pc_digest[4]; + pc_digest[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + pc_digest[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + pc_digest[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + pc_digest[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + pc_digest[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; u32 salt_buf0[4]; u32 salt_buf1[4]; u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - salt_buf0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - salt_buf0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - salt_buf0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - salt_buf1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - salt_buf1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - salt_buf1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - salt_buf1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - salt_buf2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - salt_buf2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - salt_buf2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - salt_buf2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - salt_buf3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - salt_buf3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - salt_buf3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - salt_buf3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + salt_buf0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + salt_buf0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + salt_buf0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + salt_buf0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + salt_buf1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + salt_buf1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + salt_buf1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + salt_buf1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + salt_buf2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + salt_buf2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + salt_buf2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + salt_buf2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + salt_buf3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + salt_buf3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + salt_buf3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + salt_buf3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - const u32 salt_len = esalt_bufs[digests_offset].salt_len; + const u32 salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -431,41 +431,41 @@ DECLSPEC void m13500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; const u32 pc_offset4 = pc_offset * 4; u32 pc_digest[5]; - pc_digest[0] = esalt_bufs[digests_offset].pc_digest[0]; - pc_digest[1] = esalt_bufs[digests_offset].pc_digest[1]; - pc_digest[2] = esalt_bufs[digests_offset].pc_digest[2]; - pc_digest[3] = esalt_bufs[digests_offset].pc_digest[3]; - pc_digest[4] = esalt_bufs[digests_offset].pc_digest[4]; + pc_digest[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + pc_digest[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + pc_digest[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + pc_digest[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + pc_digest[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; u32 salt_buf0[4]; u32 salt_buf1[4]; u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - salt_buf0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - salt_buf0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - salt_buf0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - salt_buf1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - salt_buf1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - salt_buf1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - salt_buf1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - salt_buf2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - salt_buf2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - salt_buf2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - salt_buf2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - salt_buf3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - salt_buf3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - salt_buf3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - salt_buf3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + salt_buf0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + salt_buf0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + salt_buf0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + salt_buf0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + salt_buf1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + salt_buf1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + salt_buf1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + salt_buf1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + salt_buf2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + salt_buf2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + salt_buf2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + salt_buf2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + salt_buf3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + salt_buf3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + salt_buf3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + salt_buf3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - const u32 salt_len = esalt_bufs[digests_offset].salt_len; + const u32 salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -475,10 +475,10 @@ DECLSPEC void m13500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -867,7 +867,7 @@ KERNEL_FQ void m13500_m04 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13500_m08 (KERN_ATTR_ESALT (pstoken_t)) @@ -914,7 +914,7 @@ KERNEL_FQ void m13500_m08 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13500_m16 (KERN_ATTR_ESALT (pstoken_t)) @@ -961,7 +961,7 @@ KERNEL_FQ void m13500_m16 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13500_s04 (KERN_ATTR_ESALT (pstoken_t)) @@ -1008,7 +1008,7 @@ KERNEL_FQ void m13500_s04 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13500_s08 (KERN_ATTR_ESALT (pstoken_t)) @@ -1055,7 +1055,7 @@ KERNEL_FQ void m13500_s08 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13500_s16 (KERN_ATTR_ESALT (pstoken_t)) @@ -1102,5 +1102,5 @@ KERNEL_FQ void m13500_s16 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m13500_a3-pure.cl b/OpenCL/m13500_a3-pure.cl index 19865585b..d396318f8 100644 --- a/OpenCL/m13500_a3-pure.cl +++ b/OpenCL/m13500_a3-pure.cl @@ -39,34 +39,34 @@ KERNEL_FQ void m13500_mxx (KERN_ATTR_VECTOR_ESALT (pstoken_t)) * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; sha1_ctx_t ctx0; - ctx0.h[0] = esalt_bufs[digests_offset].pc_digest[0]; - ctx0.h[1] = esalt_bufs[digests_offset].pc_digest[1]; - ctx0.h[2] = esalt_bufs[digests_offset].pc_digest[2]; - ctx0.h[3] = esalt_bufs[digests_offset].pc_digest[3]; - ctx0.h[4] = esalt_bufs[digests_offset].pc_digest[4]; + ctx0.h[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + ctx0.h[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + ctx0.h[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + ctx0.h[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + ctx0.h[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; - ctx0.w0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - ctx0.w0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - ctx0.w0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - ctx0.w0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - ctx0.w1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - ctx0.w1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - ctx0.w1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - ctx0.w1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - ctx0.w2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - ctx0.w2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - ctx0.w2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - ctx0.w2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - ctx0.w3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - ctx0.w3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - ctx0.w3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - ctx0.w3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + ctx0.w0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + ctx0.w0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + ctx0.w0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + ctx0.w0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + ctx0.w1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + ctx0.w1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + ctx0.w1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + ctx0.w1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + ctx0.w2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + ctx0.w2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + ctx0.w2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + ctx0.w2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + ctx0.w3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + ctx0.w3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + ctx0.w3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + ctx0.w3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - ctx0.len = esalt_bufs[digests_offset].salt_len; + ctx0.len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * base @@ -129,44 +129,44 @@ KERNEL_FQ void m13500_sxx (KERN_ATTR_VECTOR_ESALT (pstoken_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * salt */ - const u32 pc_offset = esalt_bufs[digests_offset].pc_offset; + const u32 pc_offset = esalt_bufs[DIGESTS_OFFSET].pc_offset; sha1_ctx_t ctx0; - ctx0.h[0] = esalt_bufs[digests_offset].pc_digest[0]; - ctx0.h[1] = esalt_bufs[digests_offset].pc_digest[1]; - ctx0.h[2] = esalt_bufs[digests_offset].pc_digest[2]; - ctx0.h[3] = esalt_bufs[digests_offset].pc_digest[3]; - ctx0.h[4] = esalt_bufs[digests_offset].pc_digest[4]; + ctx0.h[0] = esalt_bufs[DIGESTS_OFFSET].pc_digest[0]; + ctx0.h[1] = esalt_bufs[DIGESTS_OFFSET].pc_digest[1]; + ctx0.h[2] = esalt_bufs[DIGESTS_OFFSET].pc_digest[2]; + ctx0.h[3] = esalt_bufs[DIGESTS_OFFSET].pc_digest[3]; + ctx0.h[4] = esalt_bufs[DIGESTS_OFFSET].pc_digest[4]; - ctx0.w0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 0]); - ctx0.w0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 1]); - ctx0.w0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 2]); - ctx0.w0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 3]); - ctx0.w1[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 4]); - ctx0.w1[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 5]); - ctx0.w1[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 6]); - ctx0.w1[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 7]); - ctx0.w2[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 8]); - ctx0.w2[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 9]); - ctx0.w2[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 10]); - ctx0.w2[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 11]); - ctx0.w3[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 12]); - ctx0.w3[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 13]); - ctx0.w3[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 14]); - ctx0.w3[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[pc_offset + 15]); + ctx0.w0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 0]); + ctx0.w0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 1]); + ctx0.w0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 2]); + ctx0.w0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 3]); + ctx0.w1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 4]); + ctx0.w1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 5]); + ctx0.w1[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 6]); + ctx0.w1[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 7]); + ctx0.w2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 8]); + ctx0.w2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 9]); + ctx0.w2[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 10]); + ctx0.w2[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 11]); + ctx0.w3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 12]); + ctx0.w3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 13]); + ctx0.w3[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 14]); + ctx0.w3[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[pc_offset + 15]); - ctx0.len = esalt_bufs[digests_offset].salt_len; + ctx0.len = esalt_bufs[DIGESTS_OFFSET].salt_len; /** * base diff --git a/OpenCL/m13600-pure.cl b/OpenCL/m13600-pure.cl index 3de444bdb..1e0ff6d1c 100644 --- a/OpenCL/m13600-pure.cl +++ b/OpenCL/m13600-pure.cl @@ -110,10 +110,10 @@ KERNEL_FQ void m13600_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, zip2_t)) u32 w2[4]; u32 w3[4]; - w0[0] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[0]); - w0[1] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[1]); - w0[2] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[2]); - w0[3] = hc_swap32_S (esalt_bufs[digests_offset].salt_buf[3]); + w0[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[0]); + w0[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[1]); + w0[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[2]); + w0[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt_buf[3]); w1[0] = 0; w1[1] = 0; w1[2] = 0; @@ -127,9 +127,9 @@ KERNEL_FQ void m13600_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, zip2_t)) w3[2] = 0; w3[3] = 0; - sha1_hmac_update_64 (&sha1_hmac_ctx, w0, w1, w2, w3, esalt_bufs[digests_offset].salt_len); + sha1_hmac_update_64 (&sha1_hmac_ctx, w0, w1, w2, w3, esalt_bufs[DIGESTS_OFFSET].salt_len); - const u32 mode = esalt_bufs[digests_offset].mode; + const u32 mode = esalt_bufs[DIGESTS_OFFSET].mode; int iter_start; int iter_stop; @@ -209,9 +209,9 @@ KERNEL_FQ void m13600_loop (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, zip2_t)) opad[3] = packv (tmps, opad, gid, 3); opad[4] = packv (tmps, opad, gid, 4); - const u32 verify_bytes = esalt_bufs[digests_offset].verify_bytes; + const u32 verify_bytes = esalt_bufs[DIGESTS_OFFSET].verify_bytes; - const u32 mode = esalt_bufs[digests_offset].mode; + const u32 mode = esalt_bufs[DIGESTS_OFFSET].mode; int iter_start; int iter_stop; @@ -314,7 +314,7 @@ KERNEL_FQ void m13600_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, zip2_t)) const u64 lid = get_local_id (0); - const u32 mode = esalt_bufs[digests_offset].mode; + const u32 mode = esalt_bufs[DIGESTS_OFFSET].mode; u32 iter_start; u32 iter_stop; @@ -365,7 +365,7 @@ KERNEL_FQ void m13600_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, zip2_t)) sha1_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha1_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].data_buf, esalt_bufs[digests_offset].data_len); + sha1_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].data_buf, esalt_bufs[DIGESTS_OFFSET].data_len); sha1_hmac_final (&ctx); diff --git a/OpenCL/m13711-pure.cl b/OpenCL/m13711-pure.cl index 52ebd1c3a..e39c71e54 100644 --- a/OpenCL/m13711-pure.cl +++ b/OpenCL/m13711-pure.cl @@ -133,13 +133,13 @@ KERNEL_FQ void m13711_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -176,22 +176,22 @@ KERNEL_FQ void m13711_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); ripemd160_hmac_ctx_t ripemd160_hmac_ctx; @@ -209,7 +209,7 @@ KERNEL_FQ void m13711_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) tmps[gid].opad[3] = ripemd160_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = ripemd160_hmac_ctx.opad.h[4]; - ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 16; i += 5, j += 1) { @@ -261,9 +261,9 @@ KERNEL_FQ void m13711_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -514,7 +514,7 @@ KERNEL_FQ void m13711_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -523,7 +523,7 @@ KERNEL_FQ void m13711_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13712-pure.cl b/OpenCL/m13712-pure.cl index c7e3d4b30..3caeedaa1 100644 --- a/OpenCL/m13712-pure.cl +++ b/OpenCL/m13712-pure.cl @@ -184,13 +184,13 @@ KERNEL_FQ void m13712_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -227,22 +227,22 @@ KERNEL_FQ void m13712_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); ripemd160_hmac_ctx_t ripemd160_hmac_ctx; @@ -260,7 +260,7 @@ KERNEL_FQ void m13712_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) tmps[gid].opad[3] = ripemd160_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = ripemd160_hmac_ctx.opad.h[4]; - ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 32; i += 5, j += 1) { @@ -312,9 +312,9 @@ KERNEL_FQ void m13712_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -570,7 +570,7 @@ KERNEL_FQ void m13712_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -579,7 +579,7 @@ KERNEL_FQ void m13712_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -587,7 +587,7 @@ KERNEL_FQ void m13712_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13713-pure.cl b/OpenCL/m13713-pure.cl index fb42974a8..f748f8b74 100644 --- a/OpenCL/m13713-pure.cl +++ b/OpenCL/m13713-pure.cl @@ -249,13 +249,13 @@ KERNEL_FQ void m13713_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -292,22 +292,22 @@ KERNEL_FQ void m13713_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); ripemd160_hmac_ctx_t ripemd160_hmac_ctx; @@ -325,7 +325,7 @@ KERNEL_FQ void m13713_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) tmps[gid].opad[3] = ripemd160_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = ripemd160_hmac_ctx.opad.h[4]; - ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + ripemd160_hmac_update_global (&ripemd160_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 48; i += 5, j += 1) { @@ -377,9 +377,9 @@ KERNEL_FQ void m13713_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -640,7 +640,7 @@ KERNEL_FQ void m13713_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -649,7 +649,7 @@ KERNEL_FQ void m13713_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -657,7 +657,7 @@ KERNEL_FQ void m13713_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -665,7 +665,7 @@ KERNEL_FQ void m13713_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13721-pure.cl b/OpenCL/m13721-pure.cl index e15638438..4201b1ffa 100644 --- a/OpenCL/m13721-pure.cl +++ b/OpenCL/m13721-pure.cl @@ -155,13 +155,13 @@ KERNEL_FQ void m13721_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -218,22 +218,22 @@ KERNEL_FQ void m13721_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -290,7 +290,7 @@ KERNEL_FQ void m13721_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -364,9 +364,9 @@ KERNEL_FQ void m13721_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -661,7 +661,7 @@ KERNEL_FQ void m13721_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -670,7 +670,7 @@ KERNEL_FQ void m13721_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13722-pure.cl b/OpenCL/m13722-pure.cl index b2aa906b6..b887da37e 100644 --- a/OpenCL/m13722-pure.cl +++ b/OpenCL/m13722-pure.cl @@ -206,13 +206,13 @@ KERNEL_FQ void m13722_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -269,22 +269,22 @@ KERNEL_FQ void m13722_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -341,7 +341,7 @@ KERNEL_FQ void m13722_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 16; i += 8, j += 1) { @@ -415,9 +415,9 @@ KERNEL_FQ void m13722_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -717,7 +717,7 @@ KERNEL_FQ void m13722_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -726,7 +726,7 @@ KERNEL_FQ void m13722_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -734,7 +734,7 @@ KERNEL_FQ void m13722_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13723-pure.cl b/OpenCL/m13723-pure.cl index da755b629..5e2a429c3 100644 --- a/OpenCL/m13723-pure.cl +++ b/OpenCL/m13723-pure.cl @@ -271,13 +271,13 @@ KERNEL_FQ void m13723_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -334,22 +334,22 @@ KERNEL_FQ void m13723_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -406,7 +406,7 @@ KERNEL_FQ void m13723_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 24; i += 8, j += 1) { @@ -480,9 +480,9 @@ KERNEL_FQ void m13723_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -787,7 +787,7 @@ KERNEL_FQ void m13723_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -796,7 +796,7 @@ KERNEL_FQ void m13723_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -804,7 +804,7 @@ KERNEL_FQ void m13723_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -812,7 +812,7 @@ KERNEL_FQ void m13723_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13731-pure.cl b/OpenCL/m13731-pure.cl index de76defc5..2a28b4e76 100644 --- a/OpenCL/m13731-pure.cl +++ b/OpenCL/m13731-pure.cl @@ -193,13 +193,13 @@ KERNEL_FQ void m13731_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -278,22 +278,22 @@ KERNEL_FQ void m13731_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -350,7 +350,7 @@ KERNEL_FQ void m13731_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) tmps[gid].opad[14] = whirlpool_hmac_ctx.opad.h[14]; tmps[gid].opad[15] = whirlpool_hmac_ctx.opad.h[15]; - whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 16; i += 16, j += 1) { @@ -468,9 +468,9 @@ KERNEL_FQ void m13731_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -809,7 +809,7 @@ KERNEL_FQ void m13731_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -818,7 +818,7 @@ KERNEL_FQ void m13731_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13732-pure.cl b/OpenCL/m13732-pure.cl index 2fb26cb25..dad2cc3ab 100644 --- a/OpenCL/m13732-pure.cl +++ b/OpenCL/m13732-pure.cl @@ -244,13 +244,13 @@ KERNEL_FQ void m13732_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -329,22 +329,22 @@ KERNEL_FQ void m13732_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -401,7 +401,7 @@ KERNEL_FQ void m13732_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) tmps[gid].opad[14] = whirlpool_hmac_ctx.opad.h[14]; tmps[gid].opad[15] = whirlpool_hmac_ctx.opad.h[15]; - whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 32; i += 16, j += 1) { @@ -519,9 +519,9 @@ KERNEL_FQ void m13732_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -865,7 +865,7 @@ KERNEL_FQ void m13732_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -874,7 +874,7 @@ KERNEL_FQ void m13732_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -882,7 +882,7 @@ KERNEL_FQ void m13732_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13733-pure.cl b/OpenCL/m13733-pure.cl index e39be38e3..0d181be96 100644 --- a/OpenCL/m13733-pure.cl +++ b/OpenCL/m13733-pure.cl @@ -309,13 +309,13 @@ KERNEL_FQ void m13733_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -394,22 +394,22 @@ KERNEL_FQ void m13733_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -466,7 +466,7 @@ KERNEL_FQ void m13733_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) tmps[gid].opad[14] = whirlpool_hmac_ctx.opad.h[14]; tmps[gid].opad[15] = whirlpool_hmac_ctx.opad.h[15]; - whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + whirlpool_hmac_update_global_swap (&whirlpool_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 48; i += 16, j += 1) { @@ -584,9 +584,9 @@ KERNEL_FQ void m13733_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -935,7 +935,7 @@ KERNEL_FQ void m13733_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -944,7 +944,7 @@ KERNEL_FQ void m13733_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -952,7 +952,7 @@ KERNEL_FQ void m13733_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -960,7 +960,7 @@ KERNEL_FQ void m13733_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13751-pure.cl b/OpenCL/m13751-pure.cl index fef508f58..22ce6b973 100644 --- a/OpenCL/m13751-pure.cl +++ b/OpenCL/m13751-pure.cl @@ -139,13 +139,13 @@ KERNEL_FQ void m13751_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -182,22 +182,22 @@ KERNEL_FQ void m13751_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -238,7 +238,7 @@ KERNEL_FQ void m13751_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 16; i += 8, j += 1) { @@ -296,9 +296,9 @@ KERNEL_FQ void m13751_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -331,7 +331,7 @@ KERNEL_FQ void m13751_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) const int pim_start1 = pim_start + 1; - if ((pim_start1 >= esalt_bufs[digests_offset].pim_start) && (pim_start1 <= esalt_bufs[digests_offset].pim_stop)) + if ((pim_start1 >= esalt_bufs[DIGESTS_OFFSET].pim_start) && (pim_start1 <= esalt_bufs[DIGESTS_OFFSET].pim_stop)) { if (pim_start == pim_stop) { @@ -602,7 +602,7 @@ KERNEL_FQ void m13751_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -611,7 +611,7 @@ KERNEL_FQ void m13751_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13752-pure.cl b/OpenCL/m13752-pure.cl index 786bbff9b..5b3ec6ea9 100644 --- a/OpenCL/m13752-pure.cl +++ b/OpenCL/m13752-pure.cl @@ -190,13 +190,13 @@ KERNEL_FQ void m13752_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -233,22 +233,22 @@ KERNEL_FQ void m13752_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -289,7 +289,7 @@ KERNEL_FQ void m13752_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 32; i += 8, j += 1) { @@ -347,9 +347,9 @@ KERNEL_FQ void m13752_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -629,7 +629,7 @@ KERNEL_FQ void m13752_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -638,7 +638,7 @@ KERNEL_FQ void m13752_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -646,7 +646,7 @@ KERNEL_FQ void m13752_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13753-pure.cl b/OpenCL/m13753-pure.cl index ba414dc58..1a81e4960 100644 --- a/OpenCL/m13753-pure.cl +++ b/OpenCL/m13753-pure.cl @@ -255,13 +255,13 @@ KERNEL_FQ void m13753_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) * keyboard layout shared */ - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -298,22 +298,22 @@ KERNEL_FQ void m13753_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -354,7 +354,7 @@ KERNEL_FQ void m13753_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 48; i += 8, j += 1) { @@ -412,9 +412,9 @@ KERNEL_FQ void m13753_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -699,7 +699,7 @@ KERNEL_FQ void m13753_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -708,7 +708,7 @@ KERNEL_FQ void m13753_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -716,7 +716,7 @@ KERNEL_FQ void m13753_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -724,7 +724,7 @@ KERNEL_FQ void m13753_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13771-pure.cl b/OpenCL/m13771-pure.cl index 5772dcf8c..3f0d63249 100644 --- a/OpenCL/m13771-pure.cl +++ b/OpenCL/m13771-pure.cl @@ -181,13 +181,13 @@ KERNEL_FQ void m13771_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) const u64 lid = get_local_id (0); const u64 lsz = get_local_size (0); - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -248,22 +248,22 @@ KERNEL_FQ void m13771_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -322,7 +322,7 @@ KERNEL_FQ void m13771_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) tmps[gid].opad_raw[6] = streebog512_hmac_ctx.opad.s[6]; tmps[gid].opad_raw[7] = streebog512_hmac_ctx.opad.s[7]; - streebog512_hmac_update_global_swap (&streebog512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + streebog512_hmac_update_global_swap (&streebog512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -410,9 +410,9 @@ KERNEL_FQ void m13771_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -708,7 +708,7 @@ KERNEL_FQ void m13771_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -717,7 +717,7 @@ KERNEL_FQ void m13771_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13772-pure.cl b/OpenCL/m13772-pure.cl index a9a74a862..431841a39 100644 --- a/OpenCL/m13772-pure.cl +++ b/OpenCL/m13772-pure.cl @@ -232,13 +232,13 @@ KERNEL_FQ void m13772_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) const u64 lid = get_local_id (0); const u64 lsz = get_local_size (0); - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -299,22 +299,22 @@ KERNEL_FQ void m13772_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -373,7 +373,7 @@ KERNEL_FQ void m13772_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) tmps[gid].opad_raw[6] = streebog512_hmac_ctx.opad.s[6]; tmps[gid].opad_raw[7] = streebog512_hmac_ctx.opad.s[7]; - streebog512_hmac_update_global_swap (&streebog512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + streebog512_hmac_update_global_swap (&streebog512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 16; i += 8, j += 1) { @@ -461,9 +461,9 @@ KERNEL_FQ void m13772_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -764,7 +764,7 @@ KERNEL_FQ void m13772_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -773,7 +773,7 @@ KERNEL_FQ void m13772_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -781,7 +781,7 @@ KERNEL_FQ void m13772_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13773-pure.cl b/OpenCL/m13773-pure.cl index def01adbb..802b7b06f 100644 --- a/OpenCL/m13773-pure.cl +++ b/OpenCL/m13773-pure.cl @@ -297,13 +297,13 @@ KERNEL_FQ void m13773_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) const u64 lid = get_local_id (0); const u64 lsz = get_local_size (0); - const int keyboard_layout_mapping_cnt = esalt_bufs[digests_offset].keyboard_layout_mapping_cnt; + const int keyboard_layout_mapping_cnt = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_cnt; LOCAL_VK keyboard_layout_mapping_t s_keyboard_layout_mapping_buf[256]; for (u32 i = lid; i < 256; i += lsz) { - s_keyboard_layout_mapping_buf[i] = esalt_bufs[digests_offset].keyboard_layout_mapping_buf[i]; + s_keyboard_layout_mapping_buf[i] = esalt_bufs[DIGESTS_OFFSET].keyboard_layout_mapping_buf[i]; } SYNC_THREADS (); @@ -364,22 +364,22 @@ KERNEL_FQ void m13773_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) hc_execute_keyboard_layout_mapping (w0, w1, w2, w3, pw_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt); - w0[0] = u8add (w0[0], esalt_bufs[digests_offset].keyfile_buf[ 0]); - w0[1] = u8add (w0[1], esalt_bufs[digests_offset].keyfile_buf[ 1]); - w0[2] = u8add (w0[2], esalt_bufs[digests_offset].keyfile_buf[ 2]); - w0[3] = u8add (w0[3], esalt_bufs[digests_offset].keyfile_buf[ 3]); - w1[0] = u8add (w1[0], esalt_bufs[digests_offset].keyfile_buf[ 4]); - w1[1] = u8add (w1[1], esalt_bufs[digests_offset].keyfile_buf[ 5]); - w1[2] = u8add (w1[2], esalt_bufs[digests_offset].keyfile_buf[ 6]); - w1[3] = u8add (w1[3], esalt_bufs[digests_offset].keyfile_buf[ 7]); - w2[0] = u8add (w2[0], esalt_bufs[digests_offset].keyfile_buf[ 8]); - w2[1] = u8add (w2[1], esalt_bufs[digests_offset].keyfile_buf[ 9]); - w2[2] = u8add (w2[2], esalt_bufs[digests_offset].keyfile_buf[10]); - w2[3] = u8add (w2[3], esalt_bufs[digests_offset].keyfile_buf[11]); - w3[0] = u8add (w3[0], esalt_bufs[digests_offset].keyfile_buf[12]); - w3[1] = u8add (w3[1], esalt_bufs[digests_offset].keyfile_buf[13]); - w3[2] = u8add (w3[2], esalt_bufs[digests_offset].keyfile_buf[14]); - w3[3] = u8add (w3[3], esalt_bufs[digests_offset].keyfile_buf[15]); + w0[0] = u8add (w0[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 0]); + w0[1] = u8add (w0[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 1]); + w0[2] = u8add (w0[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 2]); + w0[3] = u8add (w0[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 3]); + w1[0] = u8add (w1[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 4]); + w1[1] = u8add (w1[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 5]); + w1[2] = u8add (w1[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 6]); + w1[3] = u8add (w1[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 7]); + w2[0] = u8add (w2[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 8]); + w2[1] = u8add (w2[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[ 9]); + w2[2] = u8add (w2[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[10]); + w2[3] = u8add (w2[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[11]); + w3[0] = u8add (w3[0], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[12]); + w3[1] = u8add (w3[1], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[13]); + w3[2] = u8add (w3[2], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[14]); + w3[3] = u8add (w3[3], esalt_bufs[DIGESTS_OFFSET].keyfile_buf[15]); w0[0] = hc_swap32_S (w0[0]); w0[1] = hc_swap32_S (w0[1]); @@ -438,7 +438,7 @@ KERNEL_FQ void m13773_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) tmps[gid].opad_raw[6] = streebog512_hmac_ctx.opad.s[6]; tmps[gid].opad_raw[7] = streebog512_hmac_ctx.opad.s[7]; - streebog512_hmac_update_global_swap (&streebog512_hmac_ctx, esalt_bufs[digests_offset].salt_buf, 64); + streebog512_hmac_update_global_swap (&streebog512_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 64); for (u32 i = 0, j = 1; i < 24; i += 8, j += 1) { @@ -526,9 +526,9 @@ KERNEL_FQ void m13773_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) // therefore the module limits the inner loop iteration count to 1000 // if the key_pim is set, we know that we have to save and check the key for this pim - const int pim_multi = esalt_bufs[digests_offset].pim_multi; - const int pim_start = esalt_bufs[digests_offset].pim_start; - const int pim_stop = esalt_bufs[digests_offset].pim_stop; + const int pim_multi = esalt_bufs[DIGESTS_OFFSET].pim_multi; + const int pim_start = esalt_bufs[DIGESTS_OFFSET].pim_start; + const int pim_stop = esalt_bufs[DIGESTS_OFFSET].pim_stop; int pim = 0; int pim_at = 0; @@ -834,7 +834,7 @@ KERNEL_FQ void m13773_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } else @@ -843,7 +843,7 @@ KERNEL_FQ void m13773_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -851,7 +851,7 @@ KERNEL_FQ void m13773_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } @@ -859,7 +859,7 @@ KERNEL_FQ void m13773_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { if (atomic_inc (&hashes_shown[0]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m13800_a0-optimized.cl b/OpenCL/m13800_a0-optimized.cl index 0a4f61175..a036044b0 100644 --- a/OpenCL/m13800_a0-optimized.cl +++ b/OpenCL/m13800_a0-optimized.cl @@ -439,7 +439,7 @@ KERNEL_FQ void m13800_m04 (KERN_ATTR_RULES_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -635,7 +635,7 @@ KERNEL_FQ void m13800_s04 (KERN_ATTR_RULES_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -648,10 +648,10 @@ KERNEL_FQ void m13800_s04 (KERN_ATTR_RULES_ESALT (win8phone_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13800_a0-pure.cl b/OpenCL/m13800_a0-pure.cl index 1a4061dd3..3aa9a26f2 100644 --- a/OpenCL/m13800_a0-pure.cl +++ b/OpenCL/m13800_a0-pure.cl @@ -55,7 +55,7 @@ KERNEL_FQ void m13800_mxx (KERN_ATTR_RULES_ESALT (win8phone_t)) sha256_update_utf16le_swap (&ctx, tmp.i, tmp.pw_len); - sha256_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, 128); + sha256_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 128); sha256_final (&ctx); @@ -85,10 +85,10 @@ KERNEL_FQ void m13800_sxx (KERN_ATTR_RULES_ESALT (win8phone_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -113,7 +113,7 @@ KERNEL_FQ void m13800_sxx (KERN_ATTR_RULES_ESALT (win8phone_t)) sha256_update_utf16le_swap (&ctx, tmp.i, tmp.pw_len); - sha256_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, 128); + sha256_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 128); sha256_final (&ctx); diff --git a/OpenCL/m13800_a1-optimized.cl b/OpenCL/m13800_a1-optimized.cl index 8073a941e..3b462466e 100644 --- a/OpenCL/m13800_a1-optimized.cl +++ b/OpenCL/m13800_a1-optimized.cl @@ -437,7 +437,7 @@ KERNEL_FQ void m13800_m04 (KERN_ATTR_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -689,7 +689,7 @@ KERNEL_FQ void m13800_s04 (KERN_ATTR_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -702,10 +702,10 @@ KERNEL_FQ void m13800_s04 (KERN_ATTR_ESALT (win8phone_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13800_a1-pure.cl b/OpenCL/m13800_a1-pure.cl index 4bcc63dcc..69569f0c6 100644 --- a/OpenCL/m13800_a1-pure.cl +++ b/OpenCL/m13800_a1-pure.cl @@ -51,7 +51,7 @@ KERNEL_FQ void m13800_mxx (KERN_ATTR_ESALT (win8phone_t)) sha256_update_global_utf16le_swap (&ctx, combs_buf[il_pos].i, combs_buf[il_pos].pw_len); - sha256_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, 128); + sha256_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 128); sha256_final (&ctx); @@ -81,10 +81,10 @@ KERNEL_FQ void m13800_sxx (KERN_ATTR_ESALT (win8phone_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -107,7 +107,7 @@ KERNEL_FQ void m13800_sxx (KERN_ATTR_ESALT (win8phone_t)) sha256_update_global_utf16le_swap (&ctx, combs_buf[il_pos].i, combs_buf[il_pos].pw_len); - sha256_update_global (&ctx, esalt_bufs[digests_offset].salt_buf, 128); + sha256_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, 128); sha256_final (&ctx); diff --git a/OpenCL/m13800_a3-optimized.cl b/OpenCL/m13800_a3-optimized.cl index 692a64e89..b1a1bffd3 100644 --- a/OpenCL/m13800_a3-optimized.cl +++ b/OpenCL/m13800_a3-optimized.cl @@ -563,10 +563,10 @@ DECLSPEC void m13800s (LOCAL_AS u32 *s_esalt, u32 *w, const u32 pw_len, KERN_ATT const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -751,7 +751,7 @@ KERNEL_FQ void m13800_m04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -762,7 +762,7 @@ KERNEL_FQ void m13800_m04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13800_m08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -808,7 +808,7 @@ KERNEL_FQ void m13800_m08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -819,7 +819,7 @@ KERNEL_FQ void m13800_m08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13800_m16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -865,7 +865,7 @@ KERNEL_FQ void m13800_m16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -876,7 +876,7 @@ KERNEL_FQ void m13800_m16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13800_s04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -922,7 +922,7 @@ KERNEL_FQ void m13800_s04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -933,7 +933,7 @@ KERNEL_FQ void m13800_s04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13800_s08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -979,7 +979,7 @@ KERNEL_FQ void m13800_s08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -990,7 +990,7 @@ KERNEL_FQ void m13800_s08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m13800_s16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -1036,7 +1036,7 @@ KERNEL_FQ void m13800_s16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) for (u32 i = lid; i < 32; i += lsz) { - s_esalt[i] = esalt_bufs[digests_offset].salt_buf[i]; + s_esalt[i] = esalt_bufs[DIGESTS_OFFSET].salt_buf[i]; } SYNC_THREADS (); @@ -1047,5 +1047,5 @@ KERNEL_FQ void m13800_s16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m13800_a3-pure.cl b/OpenCL/m13800_a3-pure.cl index 87ac2a02a..fd44322c0 100644 --- a/OpenCL/m13800_a3-pure.cl +++ b/OpenCL/m13800_a3-pure.cl @@ -50,7 +50,7 @@ KERNEL_FQ void m13800_mxx (KERN_ATTR_VECTOR_ESALT (win8phone_t)) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = esalt_bufs[digests_offset].salt_buf[idx]; + s[idx] = esalt_bufs[DIGESTS_OFFSET].salt_buf[idx]; } /** @@ -103,10 +103,10 @@ KERNEL_FQ void m13800_sxx (KERN_ATTR_VECTOR_ESALT (win8phone_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -128,7 +128,7 @@ KERNEL_FQ void m13800_sxx (KERN_ATTR_VECTOR_ESALT (win8phone_t)) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = esalt_bufs[digests_offset].salt_buf[idx]; + s[idx] = esalt_bufs[DIGESTS_OFFSET].salt_buf[idx]; } /** diff --git a/OpenCL/m13900_a0-optimized.cl b/OpenCL/m13900_a0-optimized.cl index 53e265ae8..731cea1c6 100644 --- a/OpenCL/m13900_a0-optimized.cl +++ b/OpenCL/m13900_a0-optimized.cl @@ -81,11 +81,11 @@ KERNEL_FQ void m13900_m04 (KERN_ATTR_RULES ()) u32 salt_buf0[3]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -308,11 +308,11 @@ KERNEL_FQ void m13900_s04 (KERN_ATTR_RULES ()) u32 salt_buf0[3]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -320,10 +320,10 @@ KERNEL_FQ void m13900_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13900_a0-pure.cl b/OpenCL/m13900_a0-pure.cl index ecc8d6db3..e827466f1 100644 --- a/OpenCL/m13900_a0-pure.cl +++ b/OpenCL/m13900_a0-pure.cl @@ -67,7 +67,7 @@ KERNEL_FQ void m13900_mxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -214,10 +214,10 @@ KERNEL_FQ void m13900_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -230,7 +230,7 @@ KERNEL_FQ void m13900_sxx (KERN_ATTR_RULES ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m13900_a1-optimized.cl b/OpenCL/m13900_a1-optimized.cl index 514c95913..89d52dfef 100644 --- a/OpenCL/m13900_a1-optimized.cl +++ b/OpenCL/m13900_a1-optimized.cl @@ -79,11 +79,11 @@ KERNEL_FQ void m13900_m04 (KERN_ATTR_BASIC ()) u32 salt_buf0[3]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -364,11 +364,11 @@ KERNEL_FQ void m13900_s04 (KERN_ATTR_BASIC ()) u32 salt_buf0[3]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -376,10 +376,10 @@ KERNEL_FQ void m13900_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m13900_a1-pure.cl b/OpenCL/m13900_a1-pure.cl index 7d34187ea..4012e1ca6 100644 --- a/OpenCL/m13900_a1-pure.cl +++ b/OpenCL/m13900_a1-pure.cl @@ -63,7 +63,7 @@ KERNEL_FQ void m13900_mxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_ctx_t ctx1l; @@ -210,10 +210,10 @@ KERNEL_FQ void m13900_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -224,7 +224,7 @@ KERNEL_FQ void m13900_sxx (KERN_ATTR_BASIC ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_ctx_t ctx1l; diff --git a/OpenCL/m13900_a3-optimized.cl b/OpenCL/m13900_a3-optimized.cl index 21cf1e92a..8905e51f6 100644 --- a/OpenCL/m13900_a3-optimized.cl +++ b/OpenCL/m13900_a3-optimized.cl @@ -41,11 +41,11 @@ DECLSPEC void m13900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[3]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[2]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[2]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -226,20 +226,20 @@ DECLSPEC void m13900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf1[4]; u32 salt_buf2[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); salt_buf2[2] = 0; salt_buf2[3] = 0; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -247,10 +247,10 @@ DECLSPEC void m13900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -482,7 +482,7 @@ KERNEL_FQ void m13900_m04 (KERN_ATTR_BASIC ()) * main */ - m13900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m13900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m13900_m08 (KERN_ATTR_BASIC ()) @@ -552,7 +552,7 @@ KERNEL_FQ void m13900_m08 (KERN_ATTR_BASIC ()) * main */ - m13900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m13900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m13900_m16 (KERN_ATTR_BASIC ()) @@ -622,7 +622,7 @@ KERNEL_FQ void m13900_m16 (KERN_ATTR_BASIC ()) * main */ - m13900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m13900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m13900_s04 (KERN_ATTR_BASIC ()) @@ -692,7 +692,7 @@ KERNEL_FQ void m13900_s04 (KERN_ATTR_BASIC ()) * main */ - m13900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m13900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m13900_s08 (KERN_ATTR_BASIC ()) @@ -762,7 +762,7 @@ KERNEL_FQ void m13900_s08 (KERN_ATTR_BASIC ()) * main */ - m13900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m13900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m13900_s16 (KERN_ATTR_BASIC ()) @@ -832,5 +832,5 @@ KERNEL_FQ void m13900_s16 (KERN_ATTR_BASIC ()) * main */ - m13900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m13900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m13900_a3-pure.cl b/OpenCL/m13900_a3-pure.cl index a0f8a5eb1..a3a105652 100644 --- a/OpenCL/m13900_a3-pure.cl +++ b/OpenCL/m13900_a3-pure.cl @@ -72,7 +72,7 @@ KERNEL_FQ void m13900_mxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -227,10 +227,10 @@ KERNEL_FQ void m13900_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -250,7 +250,7 @@ KERNEL_FQ void m13900_sxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m14000_a0-pure.cl b/OpenCL/m14000_a0-pure.cl index b6fa198cc..b8fa083e4 100644 --- a/OpenCL/m14000_a0-pure.cl +++ b/OpenCL/m14000_a0-pure.cl @@ -563,8 +563,8 @@ KERNEL_FQ void m14000_mxx (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * main @@ -668,8 +668,8 @@ KERNEL_FQ void m14000_sxx (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * digest @@ -677,8 +677,8 @@ KERNEL_FQ void m14000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m14000_a1-pure.cl b/OpenCL/m14000_a1-pure.cl index 4845c7f47..aadc657e2 100644 --- a/OpenCL/m14000_a1-pure.cl +++ b/OpenCL/m14000_a1-pure.cl @@ -553,8 +553,8 @@ KERNEL_FQ void m14000_mxx (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * loop @@ -701,8 +701,8 @@ KERNEL_FQ void m14000_sxx (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * digest @@ -710,8 +710,8 @@ KERNEL_FQ void m14000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m14000_a3-pure.cl b/OpenCL/m14000_a3-pure.cl index 72075cdc3..687c6fb2a 100644 --- a/OpenCL/m14000_a3-pure.cl +++ b/OpenCL/m14000_a3-pure.cl @@ -1767,8 +1767,8 @@ KERNEL_FQ void m14000_mxx (KERN_ATTR_BITSLICE ()) * salt */ - const u32 salt0 = salt_bufs[salt_pos].salt_buf_pc[0]; - const u32 salt1 = salt_bufs[salt_pos].salt_buf_pc[1]; + const u32 salt0 = salt_bufs[SALT_POS].salt_buf_pc[0]; + const u32 salt1 = salt_bufs[SALT_POS].salt_buf_pc[1]; // salt1 first, because this is a 64 bit value actually @@ -2124,7 +2124,7 @@ KERNEL_FQ void m14000_mxx (KERN_ATTR_BITSLICE ()) { for (u32 d = 0; d < digests_cnt; d++) { - const u32 final_hash_pos = digests_offset + d; + const u32 final_hash_pos = DIGESTS_OFFSET + d; if (hashes_shown[final_hash_pos]) continue; @@ -2209,8 +2209,8 @@ KERNEL_FQ void m14000_sxx (KERN_ATTR_BITSLICE ()) * salt */ - const u32 salt0 = salt_bufs[salt_pos].salt_buf_pc[0]; - const u32 salt1 = salt_bufs[salt_pos].salt_buf_pc[1]; + const u32 salt0 = salt_bufs[SALT_POS].salt_buf_pc[0]; + const u32 salt1 = salt_bufs[SALT_POS].salt_buf_pc[1]; // salt1 first, because this is a 64 bit value actually diff --git a/OpenCL/m14100_a0-pure.cl b/OpenCL/m14100_a0-pure.cl index 780b7fae2..e1f9b047e 100644 --- a/OpenCL/m14100_a0-pure.cl +++ b/OpenCL/m14100_a0-pure.cl @@ -607,8 +607,8 @@ KERNEL_FQ void m14100_mxx (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * main @@ -742,8 +742,8 @@ KERNEL_FQ void m14100_sxx (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * digest @@ -751,8 +751,8 @@ KERNEL_FQ void m14100_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m14100_a1-pure.cl b/OpenCL/m14100_a1-pure.cl index 923e3bf61..32836fe99 100644 --- a/OpenCL/m14100_a1-pure.cl +++ b/OpenCL/m14100_a1-pure.cl @@ -597,8 +597,8 @@ KERNEL_FQ void m14100_mxx (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * loop @@ -780,8 +780,8 @@ KERNEL_FQ void m14100_sxx (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * digest @@ -789,8 +789,8 @@ KERNEL_FQ void m14100_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m14100_a3-pure.cl b/OpenCL/m14100_a3-pure.cl index 3722e271a..bf2a438f4 100644 --- a/OpenCL/m14100_a3-pure.cl +++ b/OpenCL/m14100_a3-pure.cl @@ -546,8 +546,8 @@ DECLSPEC void m14100m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * Precompute fixed key scheduler @@ -635,8 +635,8 @@ DECLSPEC void m14100s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; /** * Precompute fixed key scheduler @@ -644,8 +644,8 @@ DECLSPEC void m14100s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32x iv[2]; - iv[0] = digests_buf[digests_offset].digest_buf[0]; - iv[1] = digests_buf[digests_offset].digest_buf[1]; + iv[0] = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + iv[1] = digests_buf[DIGESTS_OFFSET].digest_buf[1]; const u32x e = (w[4]); const u32x f = (w[5]); @@ -807,7 +807,7 @@ KERNEL_FQ void m14100_mxx (KERN_ATTR_BASIC ()) * main */ - m14100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m14100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m14100_sxx (KERN_ATTR_BASIC ()) @@ -881,5 +881,5 @@ KERNEL_FQ void m14100_sxx (KERN_ATTR_BASIC ()) * main */ - m14100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m14100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m14400_a0-optimized.cl b/OpenCL/m14400_a0-optimized.cl index 3f976a056..8bf9f074f 100644 --- a/OpenCL/m14400_a0-optimized.cl +++ b/OpenCL/m14400_a0-optimized.cl @@ -176,11 +176,11 @@ KERNEL_FQ void m14400_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; salt_buf1[1] = 0; salt_buf1[2] = 0; salt_buf1[3] = 0; @@ -215,7 +215,7 @@ KERNEL_FQ void m14400_m04 (KERN_ATTR_RULES ()) salt_buf3[2] = hc_swap32_S (salt_buf3[2]); salt_buf3[3] = hc_swap32_S (salt_buf3[3]); - const u32 salt_len_orig = salt_bufs[salt_pos].salt_len; + const u32 salt_len_orig = salt_bufs[SALT_POS].salt_len; const u32 salt_len_new = 2 + salt_len_orig + 2; @@ -447,11 +447,11 @@ KERNEL_FQ void m14400_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; salt_buf1[1] = 0; salt_buf1[2] = 0; salt_buf1[3] = 0; @@ -486,7 +486,7 @@ KERNEL_FQ void m14400_s04 (KERN_ATTR_RULES ()) salt_buf3[2] = hc_swap32_S (salt_buf3[2]); salt_buf3[3] = hc_swap32_S (salt_buf3[3]); - const u32 salt_len_orig = salt_bufs[salt_pos].salt_len; + const u32 salt_len_orig = salt_bufs[SALT_POS].salt_len; const u32 salt_len_new = 2 + salt_len_orig + 2; @@ -496,10 +496,10 @@ KERNEL_FQ void m14400_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m14400_a0-pure.cl b/OpenCL/m14400_a0-pure.cl index f57dbe814..9fd8400ad 100644 --- a/OpenCL/m14400_a0-pure.cl +++ b/OpenCL/m14400_a0-pure.cl @@ -91,7 +91,7 @@ KERNEL_FQ void m14400_mxx (KERN_ATTR_RULES ()) sha1_update_64 (&ctx0, d20, d21, d22, d23, 2); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); u32 d40[4]; u32 d41[4]; @@ -310,10 +310,10 @@ KERNEL_FQ void m14400_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -350,7 +350,7 @@ KERNEL_FQ void m14400_sxx (KERN_ATTR_RULES ()) sha1_update_64 (&ctx0, d20, d21, d22, d23, 2); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); u32 d40[4]; u32 d41[4]; diff --git a/OpenCL/m14400_a1-optimized.cl b/OpenCL/m14400_a1-optimized.cl index 3bbabbe4b..46bf30359 100644 --- a/OpenCL/m14400_a1-optimized.cl +++ b/OpenCL/m14400_a1-optimized.cl @@ -176,11 +176,11 @@ KERNEL_FQ void m14400_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; salt_buf1[1] = 0; salt_buf1[2] = 0; salt_buf1[3] = 0; @@ -215,7 +215,7 @@ KERNEL_FQ void m14400_m04 (KERN_ATTR_BASIC ()) salt_buf3[2] = hc_swap32_S (salt_buf3[2]); salt_buf3[3] = hc_swap32_S (salt_buf3[3]); - const u32 salt_len_orig = salt_bufs[salt_pos].salt_len; + const u32 salt_len_orig = salt_bufs[SALT_POS].salt_len; const u32 salt_len_new = 2 + salt_len_orig + 2; @@ -511,11 +511,11 @@ KERNEL_FQ void m14400_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; salt_buf1[1] = 0; salt_buf1[2] = 0; salt_buf1[3] = 0; @@ -550,7 +550,7 @@ KERNEL_FQ void m14400_s04 (KERN_ATTR_BASIC ()) salt_buf3[2] = hc_swap32_S (salt_buf3[2]); salt_buf3[3] = hc_swap32_S (salt_buf3[3]); - const u32 salt_len_orig = salt_bufs[salt_pos].salt_len; + const u32 salt_len_orig = salt_bufs[SALT_POS].salt_len; const u32 salt_len_new = 2 + salt_len_orig + 2; @@ -560,10 +560,10 @@ KERNEL_FQ void m14400_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m14400_a1-pure.cl b/OpenCL/m14400_a1-pure.cl index 77d5c7e8a..8822b1bbc 100644 --- a/OpenCL/m14400_a1-pure.cl +++ b/OpenCL/m14400_a1-pure.cl @@ -87,7 +87,7 @@ KERNEL_FQ void m14400_mxx (KERN_ATTR_BASIC ()) sha1_update_64 (&ctx0, d20, d21, d22, d23, 2); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); u32 d40[4]; u32 d41[4]; @@ -306,10 +306,10 @@ KERNEL_FQ void m14400_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -344,7 +344,7 @@ KERNEL_FQ void m14400_sxx (KERN_ATTR_BASIC ()) sha1_update_64 (&ctx0, d20, d21, d22, d23, 2); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); u32 d40[4]; u32 d41[4]; diff --git a/OpenCL/m14400_a3-optimized.cl b/OpenCL/m14400_a3-optimized.cl index e30be7856..8c698a798 100644 --- a/OpenCL/m14400_a3-optimized.cl +++ b/OpenCL/m14400_a3-optimized.cl @@ -138,11 +138,11 @@ DECLSPEC void m14400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; salt_buf1[1] = 0; salt_buf1[2] = 0; salt_buf1[3] = 0; @@ -177,7 +177,7 @@ DECLSPEC void m14400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = hc_swap32_S (salt_buf3[2]); salt_buf3[3] = hc_swap32_S (salt_buf3[3]); - const u32 salt_len_orig = salt_bufs[salt_pos].salt_len; + const u32 salt_len_orig = salt_bufs[SALT_POS].salt_len; const u32 salt_len_new = 2 + salt_len_orig + 2; @@ -382,10 +382,10 @@ DECLSPEC void m14400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -399,11 +399,11 @@ DECLSPEC void m14400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; salt_buf1[1] = 0; salt_buf1[2] = 0; salt_buf1[3] = 0; @@ -438,7 +438,7 @@ DECLSPEC void m14400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER salt_buf3[2] = hc_swap32_S (salt_buf3[2]); salt_buf3[3] = hc_swap32_S (salt_buf3[3]); - const u32 salt_len_orig = salt_bufs[salt_pos].salt_len; + const u32 salt_len_orig = salt_bufs[SALT_POS].salt_len; const u32 salt_len_new = 2 + salt_len_orig + 2; @@ -695,7 +695,7 @@ KERNEL_FQ void m14400_m04 (KERN_ATTR_BASIC ()) * main */ - m14400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m14400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m14400_m08 (KERN_ATTR_BASIC ()) @@ -765,7 +765,7 @@ KERNEL_FQ void m14400_m08 (KERN_ATTR_BASIC ()) * main */ - m14400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m14400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m14400_m16 (KERN_ATTR_BASIC ()) @@ -835,7 +835,7 @@ KERNEL_FQ void m14400_m16 (KERN_ATTR_BASIC ()) * main */ - m14400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m14400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m14400_s04 (KERN_ATTR_BASIC ()) @@ -905,7 +905,7 @@ KERNEL_FQ void m14400_s04 (KERN_ATTR_BASIC ()) * main */ - m14400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m14400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m14400_s08 (KERN_ATTR_BASIC ()) @@ -975,7 +975,7 @@ KERNEL_FQ void m14400_s08 (KERN_ATTR_BASIC ()) * main */ - m14400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m14400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m14400_s16 (KERN_ATTR_BASIC ()) @@ -1045,5 +1045,5 @@ KERNEL_FQ void m14400_s16 (KERN_ATTR_BASIC ()) * main */ - m14400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m14400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m14400_a3-pure.cl b/OpenCL/m14400_a3-pure.cl index 324cf988e..fc74c3c0d 100644 --- a/OpenCL/m14400_a3-pure.cl +++ b/OpenCL/m14400_a3-pure.cl @@ -96,7 +96,7 @@ KERNEL_FQ void m14400_mxx (KERN_ATTR_VECTOR ()) sha1_update_64 (&ctx0, d20, d21, d22, d23, 2); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); u32 d40[4]; u32 d41[4]; @@ -331,10 +331,10 @@ KERNEL_FQ void m14400_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -378,7 +378,7 @@ KERNEL_FQ void m14400_sxx (KERN_ATTR_VECTOR ()) sha1_update_64 (&ctx0, d20, d21, d22, d23, 2); - sha1_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); u32 d40[4]; u32 d41[4]; diff --git a/OpenCL/m14611-pure.cl b/OpenCL/m14611-pure.cl index 6869390c2..1432c0d0f 100644 --- a/OpenCL/m14611-pure.cl +++ b/OpenCL/m14611-pure.cl @@ -157,9 +157,9 @@ KERNEL_FQ void m14611_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad32[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad32[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 5, j += 1) { @@ -226,7 +226,7 @@ KERNEL_FQ void m14611_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[3] = packv (tmps, opad32, gid, 3); opad[4] = packv (tmps, opad32, gid, 4); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 5) { @@ -357,7 +357,7 @@ KERNEL_FQ void m14611_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_sha1_then_aes_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); + luks_af_sha1_then_aes_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); // check entropy @@ -365,9 +365,9 @@ KERNEL_FQ void m14611_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14612-pure.cl b/OpenCL/m14612-pure.cl index 1ba6880c9..d5f54a838 100644 --- a/OpenCL/m14612-pure.cl +++ b/OpenCL/m14612-pure.cl @@ -157,9 +157,9 @@ KERNEL_FQ void m14612_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad32[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad32[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 5, j += 1) { @@ -226,7 +226,7 @@ KERNEL_FQ void m14612_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[3] = packv (tmps, opad32, gid, 3); opad[4] = packv (tmps, opad32, gid, 4); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 5) { @@ -304,7 +304,7 @@ KERNEL_FQ void m14612_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_sha1_then_serpent_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf); + luks_af_sha1_then_serpent_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf); // check entropy @@ -312,9 +312,9 @@ KERNEL_FQ void m14612_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14613-pure.cl b/OpenCL/m14613-pure.cl index de1ee77b3..fa63df342 100644 --- a/OpenCL/m14613-pure.cl +++ b/OpenCL/m14613-pure.cl @@ -157,9 +157,9 @@ KERNEL_FQ void m14613_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad32[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad32[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 5, j += 1) { @@ -226,7 +226,7 @@ KERNEL_FQ void m14613_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[3] = packv (tmps, opad32, gid, 3); opad[4] = packv (tmps, opad32, gid, 4); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 5) { @@ -304,7 +304,7 @@ KERNEL_FQ void m14613_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_sha1_then_twofish_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf); + luks_af_sha1_then_twofish_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf); // check entropy @@ -312,9 +312,9 @@ KERNEL_FQ void m14613_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14621-pure.cl b/OpenCL/m14621-pure.cl index 69d0f8582..78d089f36 100644 --- a/OpenCL/m14621-pure.cl +++ b/OpenCL/m14621-pure.cl @@ -169,9 +169,9 @@ KERNEL_FQ void m14621_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad32[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad32[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 8, j += 1) { @@ -250,7 +250,7 @@ KERNEL_FQ void m14621_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[6] = packv (tmps, opad32, gid, 6); opad[7] = packv (tmps, opad32, gid, 7); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 8) { @@ -396,7 +396,7 @@ KERNEL_FQ void m14621_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_sha256_then_aes_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); + luks_af_sha256_then_aes_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); // check entropy @@ -404,9 +404,9 @@ KERNEL_FQ void m14621_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14622-pure.cl b/OpenCL/m14622-pure.cl index 565060adc..8746eec97 100644 --- a/OpenCL/m14622-pure.cl +++ b/OpenCL/m14622-pure.cl @@ -169,9 +169,9 @@ KERNEL_FQ void m14622_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad32[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad32[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 8, j += 1) { @@ -250,7 +250,7 @@ KERNEL_FQ void m14622_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[6] = packv (tmps, opad32, gid, 6); opad[7] = packv (tmps, opad32, gid, 7); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 8) { @@ -343,7 +343,7 @@ KERNEL_FQ void m14622_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_sha256_then_serpent_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf); + luks_af_sha256_then_serpent_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf); // check entropy @@ -351,9 +351,9 @@ KERNEL_FQ void m14622_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14623-pure.cl b/OpenCL/m14623-pure.cl index 81066c19b..4e978f31f 100644 --- a/OpenCL/m14623-pure.cl +++ b/OpenCL/m14623-pure.cl @@ -169,9 +169,9 @@ KERNEL_FQ void m14623_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad32[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad32[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 8, j += 1) { @@ -250,7 +250,7 @@ KERNEL_FQ void m14623_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[6] = packv (tmps, opad32, gid, 6); opad[7] = packv (tmps, opad32, gid, 7); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 8) { @@ -343,7 +343,7 @@ KERNEL_FQ void m14623_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_sha256_then_twofish_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf); + luks_af_sha256_then_twofish_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf); // check entropy @@ -351,9 +351,9 @@ KERNEL_FQ void m14623_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14631-pure.cl b/OpenCL/m14631-pure.cl index d85572cb6..8f4cf4312 100644 --- a/OpenCL/m14631-pure.cl +++ b/OpenCL/m14631-pure.cl @@ -185,9 +185,9 @@ KERNEL_FQ void m14631_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad64[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad64[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 16, j += 1) { @@ -286,7 +286,7 @@ KERNEL_FQ void m14631_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[6] = pack64v (tmps, opad64, gid, 6); opad[7] = pack64v (tmps, opad64, gid, 7); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 16) { @@ -452,7 +452,7 @@ KERNEL_FQ void m14631_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_sha512_then_aes_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); + luks_af_sha512_then_aes_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); // check entropy @@ -460,9 +460,9 @@ KERNEL_FQ void m14631_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14632-pure.cl b/OpenCL/m14632-pure.cl index 0e097ba13..ad66382bb 100644 --- a/OpenCL/m14632-pure.cl +++ b/OpenCL/m14632-pure.cl @@ -185,9 +185,9 @@ KERNEL_FQ void m14632_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad64[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad64[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 16, j += 1) { @@ -286,7 +286,7 @@ KERNEL_FQ void m14632_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[6] = pack64v (tmps, opad64, gid, 6); opad[7] = pack64v (tmps, opad64, gid, 7); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 16) { @@ -399,7 +399,7 @@ KERNEL_FQ void m14632_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_sha512_then_serpent_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf); + luks_af_sha512_then_serpent_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf); // check entropy @@ -407,9 +407,9 @@ KERNEL_FQ void m14632_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14633-pure.cl b/OpenCL/m14633-pure.cl index c019f23f0..8cec7bf47 100644 --- a/OpenCL/m14633-pure.cl +++ b/OpenCL/m14633-pure.cl @@ -185,9 +185,9 @@ KERNEL_FQ void m14633_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad64[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad64[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 16, j += 1) { @@ -286,7 +286,7 @@ KERNEL_FQ void m14633_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[6] = pack64v (tmps, opad64, gid, 6); opad[7] = pack64v (tmps, opad64, gid, 7); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 16) { @@ -399,7 +399,7 @@ KERNEL_FQ void m14633_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_sha512_then_twofish_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf); + luks_af_sha512_then_twofish_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf); // check entropy @@ -407,9 +407,9 @@ KERNEL_FQ void m14633_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14641-pure.cl b/OpenCL/m14641-pure.cl index 19e9829c0..c955a4529 100644 --- a/OpenCL/m14641-pure.cl +++ b/OpenCL/m14641-pure.cl @@ -157,9 +157,9 @@ KERNEL_FQ void m14641_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad32[3] = ripemd160_hmac_ctx.opad.h[3]; tmps[gid].opad32[4] = ripemd160_hmac_ctx.opad.h[4]; - ripemd160_hmac_update_global (&ripemd160_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + ripemd160_hmac_update_global (&ripemd160_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 5, j += 1) { @@ -226,7 +226,7 @@ KERNEL_FQ void m14641_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[3] = packv (tmps, opad32, gid, 3); opad[4] = packv (tmps, opad32, gid, 4); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 5) { @@ -357,7 +357,7 @@ KERNEL_FQ void m14641_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_ripemd160_then_aes_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); + luks_af_ripemd160_then_aes_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); // check entropy @@ -365,9 +365,9 @@ KERNEL_FQ void m14641_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14642-pure.cl b/OpenCL/m14642-pure.cl index b5fd5441a..1fb2acc13 100644 --- a/OpenCL/m14642-pure.cl +++ b/OpenCL/m14642-pure.cl @@ -157,9 +157,9 @@ KERNEL_FQ void m14642_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad32[3] = ripemd160_hmac_ctx.opad.h[3]; tmps[gid].opad32[4] = ripemd160_hmac_ctx.opad.h[4]; - ripemd160_hmac_update_global (&ripemd160_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + ripemd160_hmac_update_global (&ripemd160_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 5, j += 1) { @@ -226,7 +226,7 @@ KERNEL_FQ void m14642_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[3] = packv (tmps, opad32, gid, 3); opad[4] = packv (tmps, opad32, gid, 4); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 5) { @@ -304,7 +304,7 @@ KERNEL_FQ void m14642_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_ripemd160_then_serpent_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf); + luks_af_ripemd160_then_serpent_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf); // check entropy @@ -312,9 +312,9 @@ KERNEL_FQ void m14642_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14643-pure.cl b/OpenCL/m14643-pure.cl index 34ab7d4d1..27c7461df 100644 --- a/OpenCL/m14643-pure.cl +++ b/OpenCL/m14643-pure.cl @@ -157,9 +157,9 @@ KERNEL_FQ void m14643_init (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) tmps[gid].opad32[3] = ripemd160_hmac_ctx.opad.h[3]; tmps[gid].opad32[4] = ripemd160_hmac_ctx.opad.h[4]; - ripemd160_hmac_update_global (&ripemd160_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + ripemd160_hmac_update_global (&ripemd160_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); - const u32 key_size = esalt_bufs[digests_offset].key_size; + const u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0, j = 1; i < ((key_size / 8) / 4); i += 5, j += 1) { @@ -226,7 +226,7 @@ KERNEL_FQ void m14643_loop (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) opad[3] = packv (tmps, opad32, gid, 3); opad[4] = packv (tmps, opad32, gid, 4); - u32 key_size = esalt_bufs[digests_offset].key_size; + u32 key_size = esalt_bufs[DIGESTS_OFFSET].key_size; for (u32 i = 0; i < ((key_size / 8) / 4); i += 5) { @@ -304,7 +304,7 @@ KERNEL_FQ void m14643_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) u32 pt_buf[128]; - luks_af_ripemd160_then_twofish_decrypt (&esalt_bufs[digests_offset], &tmps[gid], pt_buf); + luks_af_ripemd160_then_twofish_decrypt (&esalt_bufs[DIGESTS_OFFSET], &tmps[gid], pt_buf); // check entropy @@ -312,9 +312,9 @@ KERNEL_FQ void m14643_comp (KERN_ATTR_TMPS_ESALT (luks_tmp_t, luks_t)) if (entropy < MAX_ENTROPY) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m14700-pure.cl b/OpenCL/m14700-pure.cl index fab345353..e4f47da8a 100644 --- a/OpenCL/m14700-pure.cl +++ b/OpenCL/m14700-pure.cl @@ -97,7 +97,7 @@ KERNEL_FQ void m14700_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, itunes_back tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -310,21 +310,21 @@ KERNEL_FQ void m14700_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, itunes_back u32 cipher[4]; - cipher[0] = esalt_bufs[digests_offset].wpky[0]; - cipher[1] = esalt_bufs[digests_offset].wpky[1]; + cipher[0] = esalt_bufs[DIGESTS_OFFSET].wpky[0]; + cipher[1] = esalt_bufs[DIGESTS_OFFSET].wpky[1]; cipher[2] = 0; cipher[3] = 0; u32 lsb[8]; - lsb[0] = esalt_bufs[digests_offset].wpky[8]; - lsb[1] = esalt_bufs[digests_offset].wpky[9]; - lsb[2] = esalt_bufs[digests_offset].wpky[6]; - lsb[3] = esalt_bufs[digests_offset].wpky[7]; - lsb[4] = esalt_bufs[digests_offset].wpky[4]; - lsb[5] = esalt_bufs[digests_offset].wpky[5]; - lsb[6] = esalt_bufs[digests_offset].wpky[2]; - lsb[7] = esalt_bufs[digests_offset].wpky[3]; + lsb[0] = esalt_bufs[DIGESTS_OFFSET].wpky[8]; + lsb[1] = esalt_bufs[DIGESTS_OFFSET].wpky[9]; + lsb[2] = esalt_bufs[DIGESTS_OFFSET].wpky[6]; + lsb[3] = esalt_bufs[DIGESTS_OFFSET].wpky[7]; + lsb[4] = esalt_bufs[DIGESTS_OFFSET].wpky[4]; + lsb[5] = esalt_bufs[DIGESTS_OFFSET].wpky[5]; + lsb[6] = esalt_bufs[DIGESTS_OFFSET].wpky[2]; + lsb[7] = esalt_bufs[DIGESTS_OFFSET].wpky[3]; for (int j = 5; j >= 0; j--) { @@ -379,9 +379,9 @@ KERNEL_FQ void m14700_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, itunes_back if ((cipher[0] == 0xa6a6a6a6) && (cipher[1] == 0xa6a6a6a6)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m14800-pure.cl b/OpenCL/m14800-pure.cl index 93495bfbb..c76a4e1a8 100644 --- a/OpenCL/m14800-pure.cl +++ b/OpenCL/m14800-pure.cl @@ -148,11 +148,11 @@ KERNEL_FQ void m14800_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, itunes_ba u32 w2[4]; u32 w3[4]; - w0[0] = esalt_bufs[digests_offset].dpsl[0]; - w0[1] = esalt_bufs[digests_offset].dpsl[1]; - w0[2] = esalt_bufs[digests_offset].dpsl[2]; - w0[3] = esalt_bufs[digests_offset].dpsl[3]; - w1[0] = esalt_bufs[digests_offset].dpsl[4]; + w0[0] = esalt_bufs[DIGESTS_OFFSET].dpsl[0]; + w0[1] = esalt_bufs[DIGESTS_OFFSET].dpsl[1]; + w0[2] = esalt_bufs[DIGESTS_OFFSET].dpsl[2]; + w0[3] = esalt_bufs[DIGESTS_OFFSET].dpsl[3]; + w1[0] = esalt_bufs[DIGESTS_OFFSET].dpsl[4]; w1[1] = 0; w1[2] = 0; w1[3] = 0; @@ -366,7 +366,7 @@ KERNEL_FQ void m14800_init2 (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, itunes_b tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -574,21 +574,21 @@ KERNEL_FQ void m14800_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, itunes_ba u32 cipher[4]; - cipher[0] = esalt_bufs[digests_offset].wpky[0]; - cipher[1] = esalt_bufs[digests_offset].wpky[1]; + cipher[0] = esalt_bufs[DIGESTS_OFFSET].wpky[0]; + cipher[1] = esalt_bufs[DIGESTS_OFFSET].wpky[1]; cipher[2] = 0; cipher[3] = 0; u32 lsb[8]; - lsb[0] = esalt_bufs[digests_offset].wpky[8]; - lsb[1] = esalt_bufs[digests_offset].wpky[9]; - lsb[2] = esalt_bufs[digests_offset].wpky[6]; - lsb[3] = esalt_bufs[digests_offset].wpky[7]; - lsb[4] = esalt_bufs[digests_offset].wpky[4]; - lsb[5] = esalt_bufs[digests_offset].wpky[5]; - lsb[6] = esalt_bufs[digests_offset].wpky[2]; - lsb[7] = esalt_bufs[digests_offset].wpky[3]; + lsb[0] = esalt_bufs[DIGESTS_OFFSET].wpky[8]; + lsb[1] = esalt_bufs[DIGESTS_OFFSET].wpky[9]; + lsb[2] = esalt_bufs[DIGESTS_OFFSET].wpky[6]; + lsb[3] = esalt_bufs[DIGESTS_OFFSET].wpky[7]; + lsb[4] = esalt_bufs[DIGESTS_OFFSET].wpky[4]; + lsb[5] = esalt_bufs[DIGESTS_OFFSET].wpky[5]; + lsb[6] = esalt_bufs[DIGESTS_OFFSET].wpky[2]; + lsb[7] = esalt_bufs[DIGESTS_OFFSET].wpky[3]; for (int j = 5; j >= 0; j--) { @@ -643,9 +643,9 @@ KERNEL_FQ void m14800_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, itunes_ba if ((cipher[0] == 0xa6a6a6a6) && (cipher[1] == 0xa6a6a6a6)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m14900_a0-optimized.cl b/OpenCL/m14900_a0-optimized.cl index f2d6f4c98..f5e78af0b 100644 --- a/OpenCL/m14900_a0-optimized.cl +++ b/OpenCL/m14900_a0-optimized.cl @@ -152,7 +152,7 @@ KERNEL_FQ void m14900_m04 (KERN_ATTR_RULES ()) * salt */ - const u32 KP = salt_bufs[salt_pos].salt_buf[0]; + const u32 KP = salt_bufs[SALT_POS].salt_buf[0]; /** * main @@ -243,7 +243,7 @@ KERNEL_FQ void m14900_s04 (KERN_ATTR_RULES ()) * salt */ - const u32 KP = salt_bufs[salt_pos].salt_buf[0]; + const u32 KP = salt_bufs[SALT_POS].salt_buf[0]; /** * digest @@ -251,7 +251,7 @@ KERNEL_FQ void m14900_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 diff --git a/OpenCL/m14900_a1-optimized.cl b/OpenCL/m14900_a1-optimized.cl index 14722335c..a2229eca3 100644 --- a/OpenCL/m14900_a1-optimized.cl +++ b/OpenCL/m14900_a1-optimized.cl @@ -150,7 +150,7 @@ KERNEL_FQ void m14900_m04 (KERN_ATTR_BASIC ()) * salt */ - const u32 KP = salt_bufs[salt_pos].salt_buf[0]; + const u32 KP = salt_bufs[SALT_POS].salt_buf[0]; /** * loop @@ -305,7 +305,7 @@ KERNEL_FQ void m14900_s04 (KERN_ATTR_BASIC ()) * salt */ - const u32 KP = salt_bufs[salt_pos].salt_buf[0]; + const u32 KP = salt_bufs[SALT_POS].salt_buf[0]; /** * digest @@ -313,7 +313,7 @@ KERNEL_FQ void m14900_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 diff --git a/OpenCL/m14900_a3-optimized.cl b/OpenCL/m14900_a3-optimized.cl index bd89b8874..47ce9452a 100644 --- a/OpenCL/m14900_a3-optimized.cl +++ b/OpenCL/m14900_a3-optimized.cl @@ -116,7 +116,7 @@ DECLSPEC void m14900m (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3 * salt */ - const u32 KP = salt_bufs[salt_pos].salt_buf[0]; + const u32 KP = salt_bufs[SALT_POS].salt_buf[0]; /** * loop @@ -164,7 +164,7 @@ DECLSPEC void m14900s (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3 * salt */ - const u32 KP = salt_bufs[salt_pos].salt_buf[0]; + const u32 KP = salt_bufs[SALT_POS].salt_buf[0]; /** * digest @@ -172,7 +172,7 @@ DECLSPEC void m14900s (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3 const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0, @@ -274,7 +274,7 @@ KERNEL_FQ void m14900_m04 (KERN_ATTR_BASIC ()) * main */ - m14900m (s_ftable, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m14900m (s_ftable, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m14900_m08 (KERN_ATTR_BASIC ()) @@ -348,7 +348,7 @@ KERNEL_FQ void m14900_s04 (KERN_ATTR_BASIC ()) * main */ - m14900s (s_ftable, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m14900s (s_ftable, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m14900_s08 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m15000_a0-optimized.cl b/OpenCL/m15000_a0-optimized.cl index a4fe67e48..707207686 100644 --- a/OpenCL/m15000_a0-optimized.cl +++ b/OpenCL/m15000_a0-optimized.cl @@ -154,24 +154,24 @@ KERNEL_FQ void m15000_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -356,10 +356,10 @@ KERNEL_FQ void m15000_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -371,24 +371,24 @@ KERNEL_FQ void m15000_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop diff --git a/OpenCL/m15000_a0-pure.cl b/OpenCL/m15000_a0-pure.cl index 9591d5555..0ed3e4c50 100644 --- a/OpenCL/m15000_a0-pure.cl +++ b/OpenCL/m15000_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m15000_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -88,10 +88,10 @@ KERNEL_FQ void m15000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -100,13 +100,13 @@ KERNEL_FQ void m15000_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m15000_a1-optimized.cl b/OpenCL/m15000_a1-optimized.cl index e410b3102..7249885e4 100644 --- a/OpenCL/m15000_a1-optimized.cl +++ b/OpenCL/m15000_a1-optimized.cl @@ -152,24 +152,24 @@ KERNEL_FQ void m15000_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -417,24 +417,24 @@ KERNEL_FQ void m15000_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -442,10 +442,10 @@ KERNEL_FQ void m15000_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m15000_a1-pure.cl b/OpenCL/m15000_a1-pure.cl index 6ec8d1576..28a58c341 100644 --- a/OpenCL/m15000_a1-pure.cl +++ b/OpenCL/m15000_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m15000_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_ctx_t ctx0; @@ -84,23 +84,23 @@ KERNEL_FQ void m15000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha512_ctx_t ctx0; diff --git a/OpenCL/m15000_a3-optimized.cl b/OpenCL/m15000_a3-optimized.cl index 70f020853..c0dbea76c 100644 --- a/OpenCL/m15000_a3-optimized.cl +++ b/OpenCL/m15000_a3-optimized.cl @@ -126,7 +126,7 @@ DECLSPEC void m15000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) * salt */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; u32 salt_buf0[4]; @@ -138,22 +138,22 @@ DECLSPEC void m15000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf6[4]; u32 salt_buf7[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; salt_buf4[0] = 0x80; salt_buf4[1] = 0; salt_buf4[2] = 0; @@ -287,17 +287,17 @@ DECLSPEC void m15000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * salt */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; u32 salt_buf0[4]; @@ -309,22 +309,22 @@ DECLSPEC void m15000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf6[4]; u32 salt_buf7[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; salt_buf4[0] = 0x80; salt_buf4[1] = 0; salt_buf4[2] = 0; @@ -478,7 +478,7 @@ KERNEL_FQ void m15000_m04 (KERN_ATTR_VECTOR ()) * main */ - m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15000_m08 (KERN_ATTR_VECTOR ()) @@ -516,7 +516,7 @@ KERNEL_FQ void m15000_m08 (KERN_ATTR_VECTOR ()) * main */ - m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15000_m16 (KERN_ATTR_VECTOR ()) @@ -554,7 +554,7 @@ KERNEL_FQ void m15000_m16 (KERN_ATTR_VECTOR ()) * main */ - m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15000_s04 (KERN_ATTR_VECTOR ()) @@ -592,7 +592,7 @@ KERNEL_FQ void m15000_s04 (KERN_ATTR_VECTOR ()) * main */ - m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15000_s08 (KERN_ATTR_VECTOR ()) @@ -630,7 +630,7 @@ KERNEL_FQ void m15000_s08 (KERN_ATTR_VECTOR ()) * main */ - m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15000_s16 (KERN_ATTR_VECTOR ()) @@ -668,5 +668,5 @@ KERNEL_FQ void m15000_s16 (KERN_ATTR_VECTOR ()) * main */ - m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m15000_a3-pure.cl b/OpenCL/m15000_a3-pure.cl index 9e652f284..05233c5c3 100644 --- a/OpenCL/m15000_a3-pure.cl +++ b/OpenCL/m15000_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m15000_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -97,10 +97,10 @@ KERNEL_FQ void m15000_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -116,13 +116,13 @@ KERNEL_FQ void m15000_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m15100-pure.cl b/OpenCL/m15100-pure.cl index 7b09ec0be..c61e2e9d4 100644 --- a/OpenCL/m15100-pure.cl +++ b/OpenCL/m15100-pure.cl @@ -90,7 +90,7 @@ KERNEL_FQ void m15100_init (KERN_ATTR_TMPS (pbkdf1_sha1_tmp_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf_pc, salt_bufs[salt_pos].salt_len_pc); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf_pc, salt_bufs[SALT_POS].salt_len_pc); sha1_hmac_final (&sha1_hmac_ctx); diff --git a/OpenCL/m15300-pure.cl b/OpenCL/m15300-pure.cl index f49c5c410..77fafe668 100644 --- a/OpenCL/m15300-pure.cl +++ b/OpenCL/m15300-pure.cl @@ -102,7 +102,7 @@ KERNEL_FQ void m15300_init (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v1_t, dpapimk_t)) u32 digest_context[5]; - if (esalt_bufs[digests_offset].context == 1) + if (esalt_bufs[DIGESTS_OFFSET].context == 1) { /* local credentials */ @@ -120,7 +120,7 @@ KERNEL_FQ void m15300_init (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v1_t, dpapimk_t)) digest_context[3] = ctx.h[3]; digest_context[4] = ctx.h[4]; } - else if (esalt_bufs[digests_offset].context == 2) + else if (esalt_bufs[DIGESTS_OFFSET].context == 2) { /* domain credentials */ @@ -172,7 +172,7 @@ KERNEL_FQ void m15300_init (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v1_t, dpapimk_t)) sha1_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha1_hmac_update_global (&ctx, esalt_bufs[digests_offset].SID, esalt_bufs[digests_offset].SID_len); + sha1_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].SID, esalt_bufs[DIGESTS_OFFSET].SID_len); sha1_hmac_final (&ctx); @@ -225,10 +225,10 @@ KERNEL_FQ void m15300_init (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v1_t, dpapimk_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - w0[0] = esalt_bufs[digests_offset].iv[0]; - w0[1] = esalt_bufs[digests_offset].iv[1]; - w0[2] = esalt_bufs[digests_offset].iv[2]; - w0[3] = esalt_bufs[digests_offset].iv[3]; + w0[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + w0[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + w0[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + w0[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; w1[0] = 0; w1[1] = 0; w1[2] = 0; @@ -474,41 +474,41 @@ KERNEL_FQ void m15300_comp (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v1_t, dpapimk_t)) u32 hmac_data[4]; - hmac_data[0] = hc_swap32_S (esalt_bufs[digests_offset].contents[0]); - hmac_data[1] = hc_swap32_S (esalt_bufs[digests_offset].contents[1]); - hmac_data[2] = hc_swap32_S (esalt_bufs[digests_offset].contents[2]); - hmac_data[3] = hc_swap32_S (esalt_bufs[digests_offset].contents[3]); + hmac_data[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[0]); + hmac_data[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[1]); + hmac_data[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[2]); + hmac_data[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[3]); u32 expected_key[4]; - expected_key[0] = hc_swap32_S (esalt_bufs[digests_offset].contents[4]); - expected_key[1] = hc_swap32_S (esalt_bufs[digests_offset].contents[5]); - expected_key[2] = hc_swap32_S (esalt_bufs[digests_offset].contents[6]); - expected_key[3] = hc_swap32_S (esalt_bufs[digests_offset].contents[7]); + expected_key[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[4]); + expected_key[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[5]); + expected_key[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[6]); + expected_key[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[7]); u32 last_iv[2]; - last_iv[0] = hc_swap32_S (esalt_bufs[digests_offset].contents[8]); - last_iv[1] = hc_swap32_S (esalt_bufs[digests_offset].contents[9]); + last_iv[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[8]); + last_iv[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[9]); u32 last_key[16]; - last_key[ 0] = hc_swap32_S (esalt_bufs[digests_offset].contents[10]); - last_key[ 1] = hc_swap32_S (esalt_bufs[digests_offset].contents[11]); - last_key[ 2] = hc_swap32_S (esalt_bufs[digests_offset].contents[12]); - last_key[ 3] = hc_swap32_S (esalt_bufs[digests_offset].contents[13]); - last_key[ 4] = hc_swap32_S (esalt_bufs[digests_offset].contents[14]); - last_key[ 5] = hc_swap32_S (esalt_bufs[digests_offset].contents[15]); - last_key[ 6] = hc_swap32_S (esalt_bufs[digests_offset].contents[16]); - last_key[ 7] = hc_swap32_S (esalt_bufs[digests_offset].contents[17]); - last_key[ 8] = hc_swap32_S (esalt_bufs[digests_offset].contents[18]); - last_key[ 9] = hc_swap32_S (esalt_bufs[digests_offset].contents[19]); - last_key[10] = hc_swap32_S (esalt_bufs[digests_offset].contents[20]); - last_key[11] = hc_swap32_S (esalt_bufs[digests_offset].contents[21]); - last_key[12] = hc_swap32_S (esalt_bufs[digests_offset].contents[22]); - last_key[13] = hc_swap32_S (esalt_bufs[digests_offset].contents[23]); - last_key[14] = hc_swap32_S (esalt_bufs[digests_offset].contents[24]); - last_key[15] = hc_swap32_S (esalt_bufs[digests_offset].contents[25]); + last_key[ 0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[10]); + last_key[ 1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[11]); + last_key[ 2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[12]); + last_key[ 3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[13]); + last_key[ 4] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[14]); + last_key[ 5] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[15]); + last_key[ 6] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[16]); + last_key[ 7] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[17]); + last_key[ 8] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[18]); + last_key[ 9] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[19]); + last_key[10] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[20]); + last_key[11] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[21]); + last_key[12] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[22]); + last_key[13] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[23]); + last_key[14] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[24]); + last_key[15] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].contents[25]); // hmac_data @@ -676,9 +676,9 @@ KERNEL_FQ void m15300_comp (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v1_t, dpapimk_t)) && (expected_key[2] == hc_swap32_S (ctx.opad.h[2])) && (expected_key[3] == hc_swap32_S (ctx.opad.h[3]))) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m15400_a0-optimized.cl b/OpenCL/m15400_a0-optimized.cl index 9cd6f23db..4290303f1 100644 --- a/OpenCL/m15400_a0-optimized.cl +++ b/OpenCL/m15400_a0-optimized.cl @@ -273,16 +273,16 @@ KERNEL_FQ void m15400_m04 (KERN_ATTR_RULES_ESALT (chacha20_t)) u32 position[2] = { 0 }; u32 offset = 0; - position[0] = esalt_bufs[digests_offset].position[0]; - position[1] = esalt_bufs[digests_offset].position[1]; + position[0] = esalt_bufs[DIGESTS_OFFSET].position[0]; + position[1] = esalt_bufs[DIGESTS_OFFSET].position[1]; - offset = esalt_bufs[digests_offset].offset; + offset = esalt_bufs[DIGESTS_OFFSET].offset; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; - plain[0] = esalt_bufs[digests_offset].plain[0]; - plain[1] = esalt_bufs[digests_offset].plain[1]; + plain[0] = esalt_bufs[DIGESTS_OFFSET].plain[0]; + plain[1] = esalt_bufs[DIGESTS_OFFSET].plain[1]; /** * loop @@ -351,16 +351,16 @@ KERNEL_FQ void m15400_s04 (KERN_ATTR_RULES_ESALT (chacha20_t)) u32 position[2] = { 0 }; u32 offset = 0; - position[0] = esalt_bufs[digests_offset].position[0]; - position[1] = esalt_bufs[digests_offset].position[1]; + position[0] = esalt_bufs[DIGESTS_OFFSET].position[0]; + position[1] = esalt_bufs[DIGESTS_OFFSET].position[1]; - offset = esalt_bufs[digests_offset].offset; + offset = esalt_bufs[DIGESTS_OFFSET].offset; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; - plain[0] = esalt_bufs[digests_offset].plain[0]; - plain[1] = esalt_bufs[digests_offset].plain[1]; + plain[0] = esalt_bufs[DIGESTS_OFFSET].plain[0]; + plain[1] = esalt_bufs[DIGESTS_OFFSET].plain[1]; /** * digest @@ -368,10 +368,10 @@ KERNEL_FQ void m15400_s04 (KERN_ATTR_RULES_ESALT (chacha20_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m15400_a1-optimized.cl b/OpenCL/m15400_a1-optimized.cl index 0761867cd..886796b1b 100644 --- a/OpenCL/m15400_a1-optimized.cl +++ b/OpenCL/m15400_a1-optimized.cl @@ -268,16 +268,16 @@ KERNEL_FQ void m15400_m04 (KERN_ATTR_ESALT (chacha20_t)) u32 position[2] = { 0 }; u32 offset = 0; - position[0] = esalt_bufs[digests_offset].position[0]; - position[1] = esalt_bufs[digests_offset].position[1]; + position[0] = esalt_bufs[DIGESTS_OFFSET].position[0]; + position[1] = esalt_bufs[DIGESTS_OFFSET].position[1]; - offset = esalt_bufs[digests_offset].offset; + offset = esalt_bufs[DIGESTS_OFFSET].offset; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; - plain[0] = esalt_bufs[digests_offset].plain[0]; - plain[1] = esalt_bufs[digests_offset].plain[1]; + plain[0] = esalt_bufs[DIGESTS_OFFSET].plain[0]; + plain[1] = esalt_bufs[DIGESTS_OFFSET].plain[1]; /** * loop @@ -398,16 +398,16 @@ KERNEL_FQ void m15400_s04 (KERN_ATTR_ESALT (chacha20_t)) u32 position[2] = { 0 }; u32 offset = 0; - position[0] = esalt_bufs[digests_offset].position[0]; - position[1] = esalt_bufs[digests_offset].position[1]; + position[0] = esalt_bufs[DIGESTS_OFFSET].position[0]; + position[1] = esalt_bufs[DIGESTS_OFFSET].position[1]; - offset = esalt_bufs[digests_offset].offset; + offset = esalt_bufs[DIGESTS_OFFSET].offset; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; - plain[0] = esalt_bufs[digests_offset].plain[0]; - plain[1] = esalt_bufs[digests_offset].plain[1]; + plain[0] = esalt_bufs[DIGESTS_OFFSET].plain[0]; + plain[1] = esalt_bufs[DIGESTS_OFFSET].plain[1]; /** * digest @@ -415,10 +415,10 @@ KERNEL_FQ void m15400_s04 (KERN_ATTR_ESALT (chacha20_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m15400_a3-optimized.cl b/OpenCL/m15400_a3-optimized.cl index 995c925e2..91f813a0a 100644 --- a/OpenCL/m15400_a3-optimized.cl +++ b/OpenCL/m15400_a3-optimized.cl @@ -273,20 +273,20 @@ KERNEL_FQ void m15400_m16 (KERN_ATTR_VECTOR_ESALT (chacha20_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; u32 plain[2]; - plain[0] = esalt_bufs[digests_offset].plain[0]; - plain[1] = esalt_bufs[digests_offset].plain[1]; + plain[0] = esalt_bufs[DIGESTS_OFFSET].plain[0]; + plain[1] = esalt_bufs[DIGESTS_OFFSET].plain[1]; u32 position[2]; - position[0] = esalt_bufs[digests_offset].position[0]; - position[1] = esalt_bufs[digests_offset].position[1]; + position[0] = esalt_bufs[DIGESTS_OFFSET].position[0]; + position[1] = esalt_bufs[DIGESTS_OFFSET].position[1]; - u32 offset = esalt_bufs[digests_offset].offset; + u32 offset = esalt_bufs[DIGESTS_OFFSET].offset; /** * loop @@ -361,20 +361,20 @@ KERNEL_FQ void m15400_s16 (KERN_ATTR_VECTOR_ESALT (chacha20_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; u32 plain[2]; - plain[0] = esalt_bufs[digests_offset].plain[0]; - plain[1] = esalt_bufs[digests_offset].plain[1]; + plain[0] = esalt_bufs[DIGESTS_OFFSET].plain[0]; + plain[1] = esalt_bufs[DIGESTS_OFFSET].plain[1]; u32 position[2]; - position[0] = esalt_bufs[digests_offset].position[0]; - position[1] = esalt_bufs[digests_offset].position[1]; + position[0] = esalt_bufs[DIGESTS_OFFSET].position[0]; + position[1] = esalt_bufs[DIGESTS_OFFSET].position[1]; - u32 offset = esalt_bufs[digests_offset].offset; + u32 offset = esalt_bufs[DIGESTS_OFFSET].offset; /** * digest @@ -382,10 +382,10 @@ KERNEL_FQ void m15400_s16 (KERN_ATTR_VECTOR_ESALT (chacha20_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m15500_a0-optimized.cl b/OpenCL/m15500_a0-optimized.cl index bc5ae795c..2c28cc08d 100644 --- a/OpenCL/m15500_a0-optimized.cl +++ b/OpenCL/m15500_a0-optimized.cl @@ -52,11 +52,11 @@ KERNEL_FQ void m15500_m04 (KERN_ATTR_RULES ()) u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; const u32 salt_len = 20; @@ -308,11 +308,11 @@ KERNEL_FQ void m15500_s04 (KERN_ATTR_RULES ()) u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; const u32 salt_len = 20; @@ -322,10 +322,10 @@ KERNEL_FQ void m15500_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m15500_a0-pure.cl b/OpenCL/m15500_a0-pure.cl index 7286c3b64..8bbff81f1 100644 --- a/OpenCL/m15500_a0-pure.cl +++ b/OpenCL/m15500_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m15500_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -94,10 +94,10 @@ KERNEL_FQ void m15500_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -106,13 +106,13 @@ KERNEL_FQ void m15500_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m15500_a1-optimized.cl b/OpenCL/m15500_a1-optimized.cl index e64b33a60..8ccd52a35 100644 --- a/OpenCL/m15500_a1-optimized.cl +++ b/OpenCL/m15500_a1-optimized.cl @@ -50,11 +50,11 @@ KERNEL_FQ void m15500_m04 (KERN_ATTR_BASIC ()) u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; const u32 salt_len = 20; @@ -366,11 +366,11 @@ KERNEL_FQ void m15500_s04 (KERN_ATTR_BASIC ()) u32 salt_buf[5]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf[4] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf[4] = salt_bufs[SALT_POS].salt_buf[4]; const u32 salt_len = 20; @@ -380,10 +380,10 @@ KERNEL_FQ void m15500_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m15500_a1-pure.cl b/OpenCL/m15500_a1-pure.cl index e93c0838e..09650d0ba 100644 --- a/OpenCL/m15500_a1-pure.cl +++ b/OpenCL/m15500_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m15500_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; @@ -90,23 +90,23 @@ KERNEL_FQ void m15500_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha1_ctx_t ctx0; diff --git a/OpenCL/m15500_a3-optimized.cl b/OpenCL/m15500_a3-optimized.cl index ad20fcf90..7afcfbace 100644 --- a/OpenCL/m15500_a3-optimized.cl +++ b/OpenCL/m15500_a3-optimized.cl @@ -32,11 +32,11 @@ DECLSPEC void m15500m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[4]; salt_buf1[1] = 0x80; salt_buf1[2] = 0; salt_buf1[3] = 0; @@ -68,7 +68,7 @@ DECLSPEC void m15500m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) w[14] |= hc_swap32_S (salt_buf3[2]); w[15] |= hc_swap32_S (salt_buf3[3]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -414,10 +414,10 @@ DECLSPEC void m15500s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -621,7 +621,7 @@ KERNEL_FQ void m15500_m04 (KERN_ATTR_VECTOR ()) * main */ - m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15500_m08 (KERN_ATTR_VECTOR ()) @@ -659,7 +659,7 @@ KERNEL_FQ void m15500_m08 (KERN_ATTR_VECTOR ()) * main */ - m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15500_m16 (KERN_ATTR_VECTOR ()) @@ -697,7 +697,7 @@ KERNEL_FQ void m15500_m16 (KERN_ATTR_VECTOR ()) * main */ - m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15500_s04 (KERN_ATTR_VECTOR ()) @@ -735,7 +735,7 @@ KERNEL_FQ void m15500_s04 (KERN_ATTR_VECTOR ()) * main */ - m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15500_s08 (KERN_ATTR_VECTOR ()) @@ -773,7 +773,7 @@ KERNEL_FQ void m15500_s08 (KERN_ATTR_VECTOR ()) * main */ - m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m15500_s16 (KERN_ATTR_VECTOR ()) @@ -811,5 +811,5 @@ KERNEL_FQ void m15500_s16 (KERN_ATTR_VECTOR ()) * main */ - m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m15500_a3-pure.cl b/OpenCL/m15500_a3-pure.cl index 1cecef4b8..c3a2eff43 100644 --- a/OpenCL/m15500_a3-pure.cl +++ b/OpenCL/m15500_a3-pure.cl @@ -38,13 +38,13 @@ KERNEL_FQ void m15500_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -103,10 +103,10 @@ KERNEL_FQ void m15500_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -122,13 +122,13 @@ KERNEL_FQ void m15500_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m15600-pure.cl b/OpenCL/m15600-pure.cl index 125e3d93d..71eb48bfc 100644 --- a/OpenCL/m15600-pure.cl +++ b/OpenCL/m15600-pure.cl @@ -237,7 +237,7 @@ KERNEL_FQ void m15600_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, ethereum_ tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -413,14 +413,14 @@ KERNEL_FQ void m15600_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, ethereum_ u32 ciphertext[8]; - ciphertext[0] = esalt_bufs[digests_offset].ciphertext[0]; - ciphertext[1] = esalt_bufs[digests_offset].ciphertext[1]; - ciphertext[2] = esalt_bufs[digests_offset].ciphertext[2]; - ciphertext[3] = esalt_bufs[digests_offset].ciphertext[3]; - ciphertext[4] = esalt_bufs[digests_offset].ciphertext[4]; - ciphertext[5] = esalt_bufs[digests_offset].ciphertext[5]; - ciphertext[6] = esalt_bufs[digests_offset].ciphertext[6]; - ciphertext[7] = esalt_bufs[digests_offset].ciphertext[7]; + ciphertext[0] = esalt_bufs[DIGESTS_OFFSET].ciphertext[0]; + ciphertext[1] = esalt_bufs[DIGESTS_OFFSET].ciphertext[1]; + ciphertext[2] = esalt_bufs[DIGESTS_OFFSET].ciphertext[2]; + ciphertext[3] = esalt_bufs[DIGESTS_OFFSET].ciphertext[3]; + ciphertext[4] = esalt_bufs[DIGESTS_OFFSET].ciphertext[4]; + ciphertext[5] = esalt_bufs[DIGESTS_OFFSET].ciphertext[5]; + ciphertext[6] = esalt_bufs[DIGESTS_OFFSET].ciphertext[6]; + ciphertext[7] = esalt_bufs[DIGESTS_OFFSET].ciphertext[7]; u32 key[4]; diff --git a/OpenCL/m15700-pure.cl b/OpenCL/m15700-pure.cl index 3c54850a4..c3e32fae9 100644 --- a/OpenCL/m15700-pure.cl +++ b/OpenCL/m15700-pure.cl @@ -421,7 +421,7 @@ KERNEL_FQ void m15700_init (KERN_ATTR_TMPS_ESALT (scrypt_tmp_t, ethereum_scrypt_ sha256_hmac_init_global_swap (&sha256_hmac_ctx, pws[gid].i, pws[gid].pw_len); - sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1, k = 0; i < SCRYPT_CNT; i += 8, j += 1, k += 2) { @@ -601,14 +601,14 @@ KERNEL_FQ void m15700_comp (KERN_ATTR_TMPS_ESALT (scrypt_tmp_t, ethereum_scrypt_ u32 ciphertext[8]; - ciphertext[0] = esalt_bufs[digests_offset].ciphertext[0]; - ciphertext[1] = esalt_bufs[digests_offset].ciphertext[1]; - ciphertext[2] = esalt_bufs[digests_offset].ciphertext[2]; - ciphertext[3] = esalt_bufs[digests_offset].ciphertext[3]; - ciphertext[4] = esalt_bufs[digests_offset].ciphertext[4]; - ciphertext[5] = esalt_bufs[digests_offset].ciphertext[5]; - ciphertext[6] = esalt_bufs[digests_offset].ciphertext[6]; - ciphertext[7] = esalt_bufs[digests_offset].ciphertext[7]; + ciphertext[0] = esalt_bufs[DIGESTS_OFFSET].ciphertext[0]; + ciphertext[1] = esalt_bufs[DIGESTS_OFFSET].ciphertext[1]; + ciphertext[2] = esalt_bufs[DIGESTS_OFFSET].ciphertext[2]; + ciphertext[3] = esalt_bufs[DIGESTS_OFFSET].ciphertext[3]; + ciphertext[4] = esalt_bufs[DIGESTS_OFFSET].ciphertext[4]; + ciphertext[5] = esalt_bufs[DIGESTS_OFFSET].ciphertext[5]; + ciphertext[6] = esalt_bufs[DIGESTS_OFFSET].ciphertext[6]; + ciphertext[7] = esalt_bufs[DIGESTS_OFFSET].ciphertext[7]; u32 key[4]; diff --git a/OpenCL/m15900-pure.cl b/OpenCL/m15900-pure.cl index 82a47cee5..f02201d88 100644 --- a/OpenCL/m15900-pure.cl +++ b/OpenCL/m15900-pure.cl @@ -125,7 +125,7 @@ KERNEL_FQ void m15900_init (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v2_t, dpapimk_t)) u32 digest_context[5]; - if (esalt_bufs[digests_offset].context == 1) + if (esalt_bufs[DIGESTS_OFFSET].context == 1) { /* local credentials */ @@ -143,7 +143,7 @@ KERNEL_FQ void m15900_init (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v2_t, dpapimk_t)) digest_context[3] = ctx.h[3]; digest_context[4] = ctx.h[4]; } - else if (esalt_bufs[digests_offset].context == 2) + else if (esalt_bufs[DIGESTS_OFFSET].context == 2) { /* domain credentials */ @@ -195,7 +195,7 @@ KERNEL_FQ void m15900_init (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v2_t, dpapimk_t)) sha1_hmac_init_64 (&ctx, w0, w1, w2, w3); - sha1_hmac_update_global (&ctx, esalt_bufs[digests_offset].SID, esalt_bufs[digests_offset].SID_len); + sha1_hmac_update_global (&ctx, esalt_bufs[DIGESTS_OFFSET].SID, esalt_bufs[DIGESTS_OFFSET].SID_len); sha1_hmac_final (&ctx); @@ -275,10 +275,10 @@ KERNEL_FQ void m15900_init (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v2_t, dpapimk_t)) tmps[gid].opad64[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad64[7] = sha512_hmac_ctx.opad.h[7]; - w0[0] = esalt_bufs[digests_offset].iv[0]; - w0[1] = esalt_bufs[digests_offset].iv[1]; - w0[2] = esalt_bufs[digests_offset].iv[2]; - w0[3] = esalt_bufs[digests_offset].iv[3]; + w0[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + w0[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + w0[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + w0[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; w1[0] = 0; w1[1] = 0; w1[2] = 0; @@ -603,43 +603,43 @@ KERNEL_FQ void m15900_comp (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v2_t, dpapimk_t)) u32 hmac_data[4]; - hmac_data[0] = esalt_bufs[digests_offset].contents[0]; - hmac_data[1] = esalt_bufs[digests_offset].contents[1]; - hmac_data[2] = esalt_bufs[digests_offset].contents[2]; - hmac_data[3] = esalt_bufs[digests_offset].contents[3]; + hmac_data[0] = esalt_bufs[DIGESTS_OFFSET].contents[0]; + hmac_data[1] = esalt_bufs[DIGESTS_OFFSET].contents[1]; + hmac_data[2] = esalt_bufs[DIGESTS_OFFSET].contents[2]; + hmac_data[3] = esalt_bufs[DIGESTS_OFFSET].contents[3]; u32 expected_key[4]; - expected_key[0] = esalt_bufs[digests_offset].contents[4]; - expected_key[1] = esalt_bufs[digests_offset].contents[5]; - expected_key[2] = esalt_bufs[digests_offset].contents[6]; - expected_key[3] = esalt_bufs[digests_offset].contents[7]; + expected_key[0] = esalt_bufs[DIGESTS_OFFSET].contents[4]; + expected_key[1] = esalt_bufs[DIGESTS_OFFSET].contents[5]; + expected_key[2] = esalt_bufs[DIGESTS_OFFSET].contents[6]; + expected_key[3] = esalt_bufs[DIGESTS_OFFSET].contents[7]; u32 last_iv[4]; - last_iv[0] = esalt_bufs[digests_offset].contents[16]; - last_iv[1] = esalt_bufs[digests_offset].contents[17]; - last_iv[2] = esalt_bufs[digests_offset].contents[18]; - last_iv[3] = esalt_bufs[digests_offset].contents[19]; + last_iv[0] = esalt_bufs[DIGESTS_OFFSET].contents[16]; + last_iv[1] = esalt_bufs[DIGESTS_OFFSET].contents[17]; + last_iv[2] = esalt_bufs[DIGESTS_OFFSET].contents[18]; + last_iv[3] = esalt_bufs[DIGESTS_OFFSET].contents[19]; u32 last_key[16]; - last_key[ 0] = esalt_bufs[digests_offset].contents[20]; - last_key[ 1] = esalt_bufs[digests_offset].contents[21]; - last_key[ 2] = esalt_bufs[digests_offset].contents[22]; - last_key[ 3] = esalt_bufs[digests_offset].contents[23]; - last_key[ 4] = esalt_bufs[digests_offset].contents[24]; - last_key[ 5] = esalt_bufs[digests_offset].contents[25]; - last_key[ 6] = esalt_bufs[digests_offset].contents[26]; - last_key[ 7] = esalt_bufs[digests_offset].contents[27]; - last_key[ 8] = esalt_bufs[digests_offset].contents[28]; - last_key[ 9] = esalt_bufs[digests_offset].contents[29]; - last_key[10] = esalt_bufs[digests_offset].contents[30]; - last_key[11] = esalt_bufs[digests_offset].contents[31]; - last_key[12] = esalt_bufs[digests_offset].contents[32]; - last_key[13] = esalt_bufs[digests_offset].contents[33]; - last_key[14] = esalt_bufs[digests_offset].contents[34]; - last_key[15] = esalt_bufs[digests_offset].contents[35]; + last_key[ 0] = esalt_bufs[DIGESTS_OFFSET].contents[20]; + last_key[ 1] = esalt_bufs[DIGESTS_OFFSET].contents[21]; + last_key[ 2] = esalt_bufs[DIGESTS_OFFSET].contents[22]; + last_key[ 3] = esalt_bufs[DIGESTS_OFFSET].contents[23]; + last_key[ 4] = esalt_bufs[DIGESTS_OFFSET].contents[24]; + last_key[ 5] = esalt_bufs[DIGESTS_OFFSET].contents[25]; + last_key[ 6] = esalt_bufs[DIGESTS_OFFSET].contents[26]; + last_key[ 7] = esalt_bufs[DIGESTS_OFFSET].contents[27]; + last_key[ 8] = esalt_bufs[DIGESTS_OFFSET].contents[28]; + last_key[ 9] = esalt_bufs[DIGESTS_OFFSET].contents[29]; + last_key[10] = esalt_bufs[DIGESTS_OFFSET].contents[30]; + last_key[11] = esalt_bufs[DIGESTS_OFFSET].contents[31]; + last_key[12] = esalt_bufs[DIGESTS_OFFSET].contents[32]; + last_key[13] = esalt_bufs[DIGESTS_OFFSET].contents[33]; + last_key[14] = esalt_bufs[DIGESTS_OFFSET].contents[34]; + last_key[15] = esalt_bufs[DIGESTS_OFFSET].contents[35]; // hmac_data @@ -859,9 +859,9 @@ KERNEL_FQ void m15900_comp (KERN_ATTR_TMPS_ESALT (dpapimk_tmp_v2_t, dpapimk_t)) && (expected_key[2] == h32_from_64_S (ctx.opad.h[1])) && (expected_key[3] == l32_from_64_S (ctx.opad.h[1]))) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16000_a0-pure.cl b/OpenCL/m16000_a0-pure.cl index 7f55f09b6..25ffe8c9e 100644 --- a/OpenCL/m16000_a0-pure.cl +++ b/OpenCL/m16000_a0-pure.cl @@ -648,8 +648,8 @@ KERNEL_FQ void m16000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m16000_a1-pure.cl b/OpenCL/m16000_a1-pure.cl index 8c9900a0a..e7d51e68d 100644 --- a/OpenCL/m16000_a1-pure.cl +++ b/OpenCL/m16000_a1-pure.cl @@ -737,8 +737,8 @@ KERNEL_FQ void m16000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m16000_a3-pure.cl b/OpenCL/m16000_a3-pure.cl index 11d655e98..d140efba4 100644 --- a/OpenCL/m16000_a3-pure.cl +++ b/OpenCL/m16000_a3-pure.cl @@ -693,8 +693,8 @@ KERNEL_FQ void m16000_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], 0, 0 }; diff --git a/OpenCL/m16100_a0-optimized.cl b/OpenCL/m16100_a0-optimized.cl index 538b15ef3..c52d9a7cc 100644 --- a/OpenCL/m16100_a0-optimized.cl +++ b/OpenCL/m16100_a0-optimized.cl @@ -61,19 +61,19 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) * salt */ - const u32 session_buf = esalt_bufs[digests_offset].session_buf[0]; - const u32 sequence_buf = esalt_bufs[digests_offset].sequence_buf[0]; + const u32 session_buf = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; + const u32 sequence_buf = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * digest */ - const u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + const u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; /** * loop @@ -258,9 +258,9 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -276,9 +276,9 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -295,9 +295,9 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -346,19 +346,19 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) * salt */ - const u32 session_buf = esalt_bufs[digests_offset].session_buf[0]; - const u32 sequence_buf = esalt_bufs[digests_offset].sequence_buf[0]; + const u32 session_buf = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; + const u32 sequence_buf = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * digest */ - const u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + const u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; /** * loop @@ -543,9 +543,9 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -561,9 +561,9 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -580,9 +580,9 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16100_a0-pure.cl b/OpenCL/m16100_a0-pure.cl index 4ec287d3b..95383651a 100644 --- a/OpenCL/m16100_a0-pure.cl +++ b/OpenCL/m16100_a0-pure.cl @@ -53,7 +53,7 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) u32 session2[4]; u32 session3[4]; - session0[0] = esalt_bufs[digests_offset].session_buf[0]; + session0[0] = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; session0[1] = 0; session0[2] = 0; session0[3] = 0; @@ -74,12 +74,12 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; - u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; - u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0]; + u32 sequence_buf0 = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * loop @@ -143,9 +143,9 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -161,9 +161,9 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -180,9 +180,9 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -215,7 +215,7 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) u32 session2[4]; u32 session3[4]; - session0[0] = esalt_bufs[digests_offset].session_buf[0]; + session0[0] = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; session0[1] = 0; session0[2] = 0; session0[3] = 0; @@ -236,12 +236,12 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; - u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; - u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0]; + u32 sequence_buf0 = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * loop @@ -305,9 +305,9 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -323,9 +323,9 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -342,9 +342,9 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_RULES_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16100_a1-optimized.cl b/OpenCL/m16100_a1-optimized.cl index 3790ea971..5978e8881 100644 --- a/OpenCL/m16100_a1-optimized.cl +++ b/OpenCL/m16100_a1-optimized.cl @@ -59,19 +59,19 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_ESALT (tacacs_plus_t)) * salt */ - const u32 session_buf = esalt_bufs[digests_offset].session_buf[0]; - const u32 sequence_buf = esalt_bufs[digests_offset].sequence_buf[0]; + const u32 session_buf = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; + const u32 sequence_buf = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * digest */ - const u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + const u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; /** * loop @@ -317,9 +317,9 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -335,9 +335,9 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -354,9 +354,9 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -405,19 +405,19 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_ESALT (tacacs_plus_t)) * salt */ - const u32 session_buf = esalt_bufs[digests_offset].session_buf[0]; - const u32 sequence_buf = esalt_bufs[digests_offset].sequence_buf[0]; + const u32 session_buf = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; + const u32 sequence_buf = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * digest */ - const u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + const u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; /** * loop @@ -663,9 +663,9 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -681,9 +681,9 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -700,9 +700,9 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16100_a1-pure.cl b/OpenCL/m16100_a1-pure.cl index 5225ba685..92d72903b 100644 --- a/OpenCL/m16100_a1-pure.cl +++ b/OpenCL/m16100_a1-pure.cl @@ -48,7 +48,7 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_ESALT (tacacs_plus_t)) u32 session2[4]; u32 session3[4]; - session0[0] = esalt_bufs[digests_offset].session_buf[0]; + session0[0] = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; session0[1] = 0; session0[2] = 0; session0[3] = 0; @@ -71,12 +71,12 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_ESALT (tacacs_plus_t)) u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; - u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; - u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0]; + u32 sequence_buf0 = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * loop @@ -136,9 +136,9 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -154,9 +154,9 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -173,9 +173,9 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -206,7 +206,7 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_ESALT (tacacs_plus_t)) u32 session2[4]; u32 session3[4]; - session0[0] = esalt_bufs[digests_offset].session_buf[0]; + session0[0] = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; session0[1] = 0; session0[2] = 0; session0[3] = 0; @@ -229,12 +229,12 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_ESALT (tacacs_plus_t)) u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; - u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; - u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0]; + u32 sequence_buf0 = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * loop @@ -294,9 +294,9 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -312,9 +312,9 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -331,9 +331,9 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16100_a3-optimized.cl b/OpenCL/m16100_a3-optimized.cl index 38aa22be4..4da7aebc1 100644 --- a/OpenCL/m16100_a3-optimized.cl +++ b/OpenCL/m16100_a3-optimized.cl @@ -38,19 +38,19 @@ DECLSPEC void m16100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * digest */ - const u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + const u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; /** * salt */ - const u32 session_buf = esalt_bufs[digests_offset].session_buf[0]; - const u32 sequence_buf = esalt_bufs[digests_offset].sequence_buf[0]; + const u32 session_buf = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; + const u32 sequence_buf = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; const u32 pw_salt_len = 4 + pw_len + 2; @@ -232,9 +232,9 @@ DECLSPEC void m16100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -250,9 +250,9 @@ DECLSPEC void m16100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -269,9 +269,9 @@ DECLSPEC void m16100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -291,19 +291,19 @@ DECLSPEC void m16100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER * digest */ - const u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + const u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; /** * salt */ - const u32 session_buf = esalt_bufs[digests_offset].session_buf[0]; - const u32 sequence_buf = esalt_bufs[digests_offset].sequence_buf[0]; + const u32 session_buf = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; + const u32 sequence_buf = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; const u32 pw_salt_len = 4 + pw_len + 2; @@ -485,9 +485,9 @@ DECLSPEC void m16100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -503,9 +503,9 @@ DECLSPEC void m16100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -522,9 +522,9 @@ DECLSPEC void m16100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -575,7 +575,7 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16100_m08 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -622,7 +622,7 @@ KERNEL_FQ void m16100_m08 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16100_m16 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -669,7 +669,7 @@ KERNEL_FQ void m16100_m16 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16100_s04 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -716,7 +716,7 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16100_s08 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -763,7 +763,7 @@ KERNEL_FQ void m16100_s08 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16100_s16 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -810,5 +810,5 @@ KERNEL_FQ void m16100_s16 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m16100_a3-pure.cl b/OpenCL/m16100_a3-pure.cl index daa0f1de3..0829b7eb8 100644 --- a/OpenCL/m16100_a3-pure.cl +++ b/OpenCL/m16100_a3-pure.cl @@ -57,7 +57,7 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) u32 session2[4]; u32 session3[4]; - session0[0] = esalt_bufs[digests_offset].session_buf[0]; + session0[0] = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; session0[1] = 0; session0[2] = 0; session0[3] = 0; @@ -78,12 +78,12 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; - u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; - u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0]; + u32 sequence_buf0 = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * loop @@ -153,9 +153,9 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -171,9 +171,9 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -190,9 +190,9 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -232,7 +232,7 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) u32 session2[4]; u32 session3[4]; - session0[0] = esalt_bufs[digests_offset].session_buf[0]; + session0[0] = esalt_bufs[DIGESTS_OFFSET].session_buf[0]; session0[1] = 0; session0[2] = 0; session0[3] = 0; @@ -253,12 +253,12 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) u32 ct_buf[2]; - ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0]; - ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1]; + ct_buf[0] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[0]; + ct_buf[1] = esalt_bufs[DIGESTS_OFFSET].ct_data_buf[1]; - u32 ct_len = esalt_bufs[digests_offset].ct_data_len; + u32 ct_len = esalt_bufs[DIGESTS_OFFSET].ct_data_len; - u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0]; + u32 sequence_buf0 = esalt_bufs[DIGESTS_OFFSET].sequence_buf[0]; /** * loop @@ -328,9 +328,9 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) && ((authen_service >= 0x00) && (authen_service <= 0x09)) && ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -346,9 +346,9 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) && (data_len == 0) && (flags == 0)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -365,9 +365,9 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) && (flags == 0x01 || flags == 0x00) && (6 + msg_len + data_len == ct_len)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16200-pure.cl b/OpenCL/m16200-pure.cl index 5f48e8378..dec32a02e 100644 --- a/OpenCL/m16200-pure.cl +++ b/OpenCL/m16200-pure.cl @@ -111,7 +111,7 @@ KERNEL_FQ void m16200_init (KERN_ATTR_TMPS_ESALT (apple_secure_notes_tmp_t, appl tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[digests_offset].ZCRYPTOSALT, 16); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].ZCRYPTOSALT, 16); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -347,12 +347,12 @@ KERNEL_FQ void m16200_comp (KERN_ATTR_TMPS_ESALT (apple_secure_notes_tmp_t, appl u32 P1[2]; u32 P2[2]; - A[0] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[0]); - A[1] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[1]); - P1[0] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[2]); - P1[1] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[3]); - P2[0] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[4]); - P2[1] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[5]); + A[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[0]); + A[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[1]); + P1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[2]); + P1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[3]); + P2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[4]); + P2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[5]); for (int j = 5; j >= 0; j--) { @@ -394,9 +394,9 @@ KERNEL_FQ void m16200_comp (KERN_ATTR_TMPS_ESALT (apple_secure_notes_tmp_t, appl if ((A[0] == 0xa6a6a6a6) && (A[1] == 0xa6a6a6a6)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m16300-pure.cl b/OpenCL/m16300-pure.cl index 2f5e81a7f..93bad060f 100644 --- a/OpenCL/m16300-pure.cl +++ b/OpenCL/m16300-pure.cl @@ -479,7 +479,7 @@ KERNEL_FQ void m16300_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, ethereum_ * aes init */ - #define KEYLEN 60 + #define KEYLEN 44 u32 ks[KEYLEN]; @@ -487,17 +487,17 @@ KERNEL_FQ void m16300_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, ethereum_ u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; u32 a = iv[0]; u32 b = iv[1]; u32 c = iv[2]; u32 d = iv[3]; - u32 enc_seed_len = esalt_bufs[digests_offset].enc_seed_len; + u32 enc_seed_len = esalt_bufs[DIGESTS_OFFSET].enc_seed_len; u64 seed[76 + 1]; // we need the + 1 to add the final \x02 @@ -508,10 +508,10 @@ KERNEL_FQ void m16300_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, ethereum_ { u32 data[4]; - data[0] = esalt_bufs[digests_offset].enc_seed[loop_idx + 0]; - data[1] = esalt_bufs[digests_offset].enc_seed[loop_idx + 1]; - data[2] = esalt_bufs[digests_offset].enc_seed[loop_idx + 2]; - data[3] = esalt_bufs[digests_offset].enc_seed[loop_idx + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].enc_seed[loop_idx + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].enc_seed[loop_idx + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].enc_seed[loop_idx + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].enc_seed[loop_idx + 3]; u32 out[4]; diff --git a/OpenCL/m16400_a0-optimized.cl b/OpenCL/m16400_a0-optimized.cl index 049b33b37..9047e90f3 100644 --- a/OpenCL/m16400_a0-optimized.cl +++ b/OpenCL/m16400_a0-optimized.cl @@ -199,10 +199,10 @@ KERNEL_FQ void m16400_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m16400_a0-pure.cl b/OpenCL/m16400_a0-pure.cl index 7857c8e1e..410f42885 100644 --- a/OpenCL/m16400_a0-pure.cl +++ b/OpenCL/m16400_a0-pure.cl @@ -239,10 +239,10 @@ KERNEL_FQ void m16400_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m16400_a1-optimized.cl b/OpenCL/m16400_a1-optimized.cl index 6082d7bc0..2d7fdf9d3 100644 --- a/OpenCL/m16400_a1-optimized.cl +++ b/OpenCL/m16400_a1-optimized.cl @@ -245,10 +245,10 @@ KERNEL_FQ void m16400_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m16400_a1-pure.cl b/OpenCL/m16400_a1-pure.cl index 4f3dcd36c..67c1a2ec8 100644 --- a/OpenCL/m16400_a1-pure.cl +++ b/OpenCL/m16400_a1-pure.cl @@ -235,10 +235,10 @@ KERNEL_FQ void m16400_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m16400_a3-optimized.cl b/OpenCL/m16400_a3-optimized.cl index 58ef27f5c..ffb1550c0 100644 --- a/OpenCL/m16400_a3-optimized.cl +++ b/OpenCL/m16400_a3-optimized.cl @@ -330,20 +330,20 @@ DECLSPEC void m16400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; MD5_STEP_REV (MD5_I_S, b_rev, c_rev, d_rev, a_rev, w[ 9], MD5C3f, MD5S33); MD5_STEP_REV (MD5_I_S, c_rev, d_rev, a_rev, b_rev, w[ 2], MD5C3e, MD5S32); @@ -504,7 +504,7 @@ KERNEL_FQ void m16400_m04 (KERN_ATTR_VECTOR ()) * main */ - m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16400_m08 (KERN_ATTR_VECTOR ()) @@ -542,7 +542,7 @@ KERNEL_FQ void m16400_m08 (KERN_ATTR_VECTOR ()) * main */ - m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16400_m16 (KERN_ATTR_VECTOR ()) @@ -580,7 +580,7 @@ KERNEL_FQ void m16400_m16 (KERN_ATTR_VECTOR ()) * main */ - m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16400_s04 (KERN_ATTR_VECTOR ()) @@ -618,7 +618,7 @@ KERNEL_FQ void m16400_s04 (KERN_ATTR_VECTOR ()) * main */ - m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16400_s08 (KERN_ATTR_VECTOR ()) @@ -656,7 +656,7 @@ KERNEL_FQ void m16400_s08 (KERN_ATTR_VECTOR ()) * main */ - m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16400_s16 (KERN_ATTR_VECTOR ()) @@ -694,5 +694,5 @@ KERNEL_FQ void m16400_s16 (KERN_ATTR_VECTOR ()) * main */ - m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m16400_a3-pure.cl b/OpenCL/m16400_a3-pure.cl index 6d3fef2fa..59520bbdf 100644 --- a/OpenCL/m16400_a3-pure.cl +++ b/OpenCL/m16400_a3-pure.cl @@ -249,10 +249,10 @@ KERNEL_FQ void m16400_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m16511_a0-pure.cl b/OpenCL/m16511_a0-pure.cl index bb97112a7..0eb31f9b7 100644 --- a/OpenCL/m16511_a0-pure.cl +++ b/OpenCL/m16511_a0-pure.cl @@ -56,7 +56,7 @@ KERNEL_FQ void m16511_mxx (KERN_ATTR_RULES_ESALT (jwt_t)) sha256_hmac_init_swap (&ctx, tmp.i, tmp.pw_len); - sha256_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha256_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha256_hmac_final (&ctx); @@ -86,10 +86,10 @@ KERNEL_FQ void m16511_sxx (KERN_ATTR_RULES_ESALT (jwt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -112,7 +112,7 @@ KERNEL_FQ void m16511_sxx (KERN_ATTR_RULES_ESALT (jwt_t)) sha256_hmac_init_swap (&ctx, tmp.i, tmp.pw_len); - sha256_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha256_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha256_hmac_final (&ctx); diff --git a/OpenCL/m16511_a1-pure.cl b/OpenCL/m16511_a1-pure.cl index f875823f0..504ece0ac 100644 --- a/OpenCL/m16511_a1-pure.cl +++ b/OpenCL/m16511_a1-pure.cl @@ -79,7 +79,7 @@ KERNEL_FQ void m16511_mxx (KERN_ATTR_ESALT (jwt_t)) sha256_hmac_init (&ctx, c, pw_len + comb_len); - sha256_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha256_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha256_hmac_final (&ctx); @@ -109,10 +109,10 @@ KERNEL_FQ void m16511_sxx (KERN_ATTR_ESALT (jwt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -160,7 +160,7 @@ KERNEL_FQ void m16511_sxx (KERN_ATTR_ESALT (jwt_t)) sha256_hmac_init (&ctx, c, pw_len + comb_len); - sha256_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha256_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha256_hmac_final (&ctx); diff --git a/OpenCL/m16511_a3-pure.cl b/OpenCL/m16511_a3-pure.cl index b86939fea..fc9302f59 100644 --- a/OpenCL/m16511_a3-pure.cl +++ b/OpenCL/m16511_a3-pure.cl @@ -65,7 +65,7 @@ KERNEL_FQ void m16511_mxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) sha256_hmac_init (&ctx, w, pw_len); - sha256_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha256_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha256_hmac_final (&ctx); @@ -95,10 +95,10 @@ KERNEL_FQ void m16511_sxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -132,7 +132,7 @@ KERNEL_FQ void m16511_sxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) sha256_hmac_init (&ctx, w, pw_len); - sha256_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha256_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha256_hmac_final (&ctx); diff --git a/OpenCL/m16512_a0-pure.cl b/OpenCL/m16512_a0-pure.cl index e92122ec4..8651383bd 100644 --- a/OpenCL/m16512_a0-pure.cl +++ b/OpenCL/m16512_a0-pure.cl @@ -56,7 +56,7 @@ KERNEL_FQ void m16512_mxx (KERN_ATTR_RULES_ESALT (jwt_t)) sha384_hmac_init_swap (&ctx, tmp.i, tmp.pw_len); - sha384_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha384_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha384_hmac_final (&ctx); @@ -86,10 +86,10 @@ KERNEL_FQ void m16512_sxx (KERN_ATTR_RULES_ESALT (jwt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -112,7 +112,7 @@ KERNEL_FQ void m16512_sxx (KERN_ATTR_RULES_ESALT (jwt_t)) sha384_hmac_init_swap (&ctx, tmp.i, tmp.pw_len); - sha384_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha384_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha384_hmac_final (&ctx); diff --git a/OpenCL/m16512_a1-pure.cl b/OpenCL/m16512_a1-pure.cl index 4ef07bb67..b62c59f14 100644 --- a/OpenCL/m16512_a1-pure.cl +++ b/OpenCL/m16512_a1-pure.cl @@ -79,7 +79,7 @@ KERNEL_FQ void m16512_mxx (KERN_ATTR_ESALT (jwt_t)) sha384_hmac_init (&ctx, c, pw_len + comb_len); - sha384_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha384_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha384_hmac_final (&ctx); @@ -109,10 +109,10 @@ KERNEL_FQ void m16512_sxx (KERN_ATTR_ESALT (jwt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -160,7 +160,7 @@ KERNEL_FQ void m16512_sxx (KERN_ATTR_ESALT (jwt_t)) sha384_hmac_init (&ctx, c, pw_len + comb_len); - sha384_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha384_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha384_hmac_final (&ctx); diff --git a/OpenCL/m16512_a3-pure.cl b/OpenCL/m16512_a3-pure.cl index bae71e6c4..6fdcc2e79 100644 --- a/OpenCL/m16512_a3-pure.cl +++ b/OpenCL/m16512_a3-pure.cl @@ -65,7 +65,7 @@ KERNEL_FQ void m16512_mxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) sha384_hmac_init (&ctx, w, pw_len); - sha384_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha384_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha384_hmac_final (&ctx); @@ -95,10 +95,10 @@ KERNEL_FQ void m16512_sxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -132,7 +132,7 @@ KERNEL_FQ void m16512_sxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) sha384_hmac_init (&ctx, w, pw_len); - sha384_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha384_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha384_hmac_final (&ctx); diff --git a/OpenCL/m16513_a0-pure.cl b/OpenCL/m16513_a0-pure.cl index fa8c6cb47..ad423e1dd 100644 --- a/OpenCL/m16513_a0-pure.cl +++ b/OpenCL/m16513_a0-pure.cl @@ -56,7 +56,7 @@ KERNEL_FQ void m16513_mxx (KERN_ATTR_RULES_ESALT (jwt_t)) sha512_hmac_init_swap (&ctx, tmp.i, tmp.pw_len); - sha512_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha512_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha512_hmac_final (&ctx); @@ -86,10 +86,10 @@ KERNEL_FQ void m16513_sxx (KERN_ATTR_RULES_ESALT (jwt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -112,7 +112,7 @@ KERNEL_FQ void m16513_sxx (KERN_ATTR_RULES_ESALT (jwt_t)) sha512_hmac_init_swap (&ctx, tmp.i, tmp.pw_len); - sha512_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha512_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha512_hmac_final (&ctx); diff --git a/OpenCL/m16513_a1-pure.cl b/OpenCL/m16513_a1-pure.cl index 131931b44..6e9e017c5 100644 --- a/OpenCL/m16513_a1-pure.cl +++ b/OpenCL/m16513_a1-pure.cl @@ -79,7 +79,7 @@ KERNEL_FQ void m16513_mxx (KERN_ATTR_ESALT (jwt_t)) sha512_hmac_init (&ctx, c, pw_len + comb_len); - sha512_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha512_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha512_hmac_final (&ctx); @@ -109,10 +109,10 @@ KERNEL_FQ void m16513_sxx (KERN_ATTR_ESALT (jwt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -160,7 +160,7 @@ KERNEL_FQ void m16513_sxx (KERN_ATTR_ESALT (jwt_t)) sha512_hmac_init (&ctx, c, pw_len + comb_len); - sha512_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha512_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha512_hmac_final (&ctx); diff --git a/OpenCL/m16513_a3-pure.cl b/OpenCL/m16513_a3-pure.cl index 1f7e3150d..446fce280 100644 --- a/OpenCL/m16513_a3-pure.cl +++ b/OpenCL/m16513_a3-pure.cl @@ -65,7 +65,7 @@ KERNEL_FQ void m16513_mxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) sha512_hmac_init (&ctx, w, pw_len); - sha512_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha512_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha512_hmac_final (&ctx); @@ -95,10 +95,10 @@ KERNEL_FQ void m16513_sxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -132,7 +132,7 @@ KERNEL_FQ void m16513_sxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) sha512_hmac_init (&ctx, w, pw_len); - sha512_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].salt_buf, esalt_bufs[digests_offset].salt_len); + sha512_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, esalt_bufs[DIGESTS_OFFSET].salt_len); sha512_hmac_final (&ctx); diff --git a/OpenCL/m16600_a0-optimized.cl b/OpenCL/m16600_a0-optimized.cl index 952a06c83..7dd9910ee 100644 --- a/OpenCL/m16600_a0-optimized.cl +++ b/OpenCL/m16600_a0-optimized.cl @@ -110,21 +110,21 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -384,9 +384,9 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -400,9 +400,9 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -412,17 +412,17 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -522,21 +522,21 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -796,9 +796,9 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -812,9 +812,9 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -824,17 +824,17 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16600_a0-pure.cl b/OpenCL/m16600_a0-pure.cl index 551e751d2..21752fd2a 100644 --- a/OpenCL/m16600_a0-pure.cl +++ b/OpenCL/m16600_a0-pure.cl @@ -98,21 +98,21 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -198,9 +198,9 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -214,9 +214,9 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -226,17 +226,17 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -316,21 +316,21 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -416,9 +416,9 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -432,9 +432,9 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -444,17 +444,17 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16600_a1-optimized.cl b/OpenCL/m16600_a1-optimized.cl index 72aba70f5..df070f6d6 100644 --- a/OpenCL/m16600_a1-optimized.cl +++ b/OpenCL/m16600_a1-optimized.cl @@ -108,21 +108,21 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -440,9 +440,9 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -456,9 +456,9 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -468,17 +468,17 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -578,21 +578,21 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -910,9 +910,9 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -926,9 +926,9 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -938,17 +938,17 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16600_a1-pure.cl b/OpenCL/m16600_a1-pure.cl index 976c72176..6959f34f5 100644 --- a/OpenCL/m16600_a1-pure.cl +++ b/OpenCL/m16600_a1-pure.cl @@ -100,21 +100,21 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -194,9 +194,9 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -210,9 +210,9 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -222,17 +222,17 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -316,21 +316,21 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -410,9 +410,9 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -426,9 +426,9 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -438,17 +438,17 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16600_a3-optimized.cl b/OpenCL/m16600_a3-optimized.cl index bf0ed87fd..6e5902c0b 100644 --- a/OpenCL/m16600_a3-optimized.cl +++ b/OpenCL/m16600_a3-optimized.cl @@ -35,21 +35,21 @@ DECLSPEC void m16600 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -161,9 +161,9 @@ DECLSPEC void m16600 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -177,9 +177,9 @@ DECLSPEC void m16600 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -189,17 +189,17 @@ DECLSPEC void m16600 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -298,7 +298,7 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16600_m08 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -393,7 +393,7 @@ KERNEL_FQ void m16600_m08 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16600_m16 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -488,7 +488,7 @@ KERNEL_FQ void m16600_m16 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -583,7 +583,7 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16600_s08 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -678,7 +678,7 @@ KERNEL_FQ void m16600_s08 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m16600_s16 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -773,5 +773,5 @@ KERNEL_FQ void m16600_s16 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m16600_a3-pure.cl b/OpenCL/m16600_a3-pure.cl index b7ead62fd..b3186aedc 100644 --- a/OpenCL/m16600_a3-pure.cl +++ b/OpenCL/m16600_a3-pure.cl @@ -103,21 +103,21 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -207,9 +207,9 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -223,9 +223,9 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -235,17 +235,17 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -332,21 +332,21 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) * data */ - const u32 salt_type = esalt_bufs[digests_offset].salt_type; + const u32 salt_type = esalt_bufs[DIGESTS_OFFSET].salt_type; u32 encrypted[4]; - encrypted[0] = esalt_bufs[digests_offset].encrypted[0]; - encrypted[1] = esalt_bufs[digests_offset].encrypted[1]; - encrypted[2] = esalt_bufs[digests_offset].encrypted[2]; - encrypted[3] = esalt_bufs[digests_offset].encrypted[3]; + encrypted[0] = esalt_bufs[DIGESTS_OFFSET].encrypted[0]; + encrypted[1] = esalt_bufs[DIGESTS_OFFSET].encrypted[1]; + encrypted[2] = esalt_bufs[DIGESTS_OFFSET].encrypted[2]; + encrypted[3] = esalt_bufs[DIGESTS_OFFSET].encrypted[3]; u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; /** * loop @@ -436,9 +436,9 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) if (is_valid_hex_32 (out[2]) == 0) continue; if (is_valid_hex_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -452,9 +452,9 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) if (is_valid_base58_32 (out[2]) == 0) continue; if (is_valid_base58_32 (out[3]) == 0) continue; - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } @@ -464,17 +464,17 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) if ((out[1] == 0x0c0c0c0c) && (out[2] == 0x0c0c0c0c) && (out[3] == 0x0c0c0c0c)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } if ((out[1] == 0x0d0d0d0d) && (out[2] == 0x0d0d0d0d) && (out[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m16800-pure.cl b/OpenCL/m16800-pure.cl index d8c3a26c9..4ba866f7c 100644 --- a/OpenCL/m16800-pure.cl +++ b/OpenCL/m16800-pure.cl @@ -107,7 +107,7 @@ KERNEL_FQ void m16800_init (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_pmkid_t) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[digests_offset].essid_buf, esalt_bufs[digests_offset].essid_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].essid_buf, esalt_bufs[DIGESTS_OFFSET].essid_len); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -270,7 +270,7 @@ KERNEL_FQ void m16800_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_pmkid_t) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_pmkid_t *wpa_pmkid = &esalt_bufs[digest_cur]; @@ -301,7 +301,7 @@ KERNEL_FQ void m16800_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_pmkid_t) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } diff --git a/OpenCL/m16801-pure.cl b/OpenCL/m16801-pure.cl index 0e93e669c..bb23720b9 100644 --- a/OpenCL/m16801-pure.cl +++ b/OpenCL/m16801-pure.cl @@ -143,7 +143,7 @@ KERNEL_FQ void m16801_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_pmkid_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_pmkid_t *wpa_pmkid = &esalt_bufs[digest_cur]; @@ -174,7 +174,7 @@ KERNEL_FQ void m16801_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_pmkid_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } diff --git a/OpenCL/m16900-pure.cl b/OpenCL/m16900-pure.cl index f9f2357b9..29b9e0cc9 100644 --- a/OpenCL/m16900-pure.cl +++ b/OpenCL/m16900-pure.cl @@ -110,7 +110,7 @@ KERNEL_FQ void m16900_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, ansible_v tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 2; i < 8; i += 8, j += 1) { @@ -295,7 +295,7 @@ KERNEL_FQ void m16900_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, ansible_v sha256_hmac_init (&ctx, key, 32); - sha256_hmac_update_global_swap (&ctx, esalt_bufs[digests_offset].ct_data_buf, esalt_bufs[digests_offset].ct_data_len); + sha256_hmac_update_global_swap (&ctx, esalt_bufs[DIGESTS_OFFSET].ct_data_buf, esalt_bufs[DIGESTS_OFFSET].ct_data_len); sha256_hmac_final(&ctx); diff --git a/OpenCL/m17200_a0-pure.cl b/OpenCL/m17200_a0-pure.cl index a8c64de0e..439bed6e3 100644 --- a/OpenCL/m17200_a0-pure.cl +++ b/OpenCL/m17200_a0-pure.cl @@ -556,7 +556,7 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -569,7 +569,7 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 @@ -579,9 +579,9 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; /** * base @@ -725,16 +725,16 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hash.data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hash.data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hash.data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -794,7 +794,7 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -805,9 +805,9 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; /** * base @@ -951,16 +951,16 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hash.data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hash.data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hash.data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array diff --git a/OpenCL/m17200_a1-pure.cl b/OpenCL/m17200_a1-pure.cl index 4b1e614d5..2545c841e 100644 --- a/OpenCL/m17200_a1-pure.cl +++ b/OpenCL/m17200_a1-pure.cl @@ -554,7 +554,7 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -567,7 +567,7 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 @@ -577,11 +577,11 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * loop @@ -727,16 +727,16 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hash.data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hash.data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hash.data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -796,7 +796,7 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -807,11 +807,11 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * loop @@ -957,16 +957,16 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hash.data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hash.data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hash.data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array diff --git a/OpenCL/m17200_a3-pure.cl b/OpenCL/m17200_a3-pure.cl index e92224aa4..dc25cb2fa 100644 --- a/OpenCL/m17200_a3-pure.cl +++ b/OpenCL/m17200_a3-pure.cl @@ -555,7 +555,7 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -568,7 +568,7 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 @@ -578,11 +578,11 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * base @@ -740,16 +740,16 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hash.data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hash.data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hash.data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -809,7 +809,7 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -820,11 +820,11 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * base @@ -982,16 +982,16 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; - if (esalt_bufs[digests_offset].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) continue; + if (esalt_bufs[DIGESTS_OFFSET].hash.data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) continue; mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hash.data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hash.data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hash.data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array diff --git a/OpenCL/m17210_a0-pure.cl b/OpenCL/m17210_a0-pure.cl index 95bde75a9..ce4c36bd7 100644 --- a/OpenCL/m17210_a0-pure.cl +++ b/OpenCL/m17210_a0-pure.cl @@ -247,7 +247,7 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -260,7 +260,7 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 @@ -270,11 +270,11 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * base @@ -411,7 +411,7 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u32 j = MAX_LOCAL, i = MAX_LOCAL * 4; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hash.data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hash.data[j]; if (data_length >= (i + 1)) { @@ -486,7 +486,7 @@ KERNEL_FQ void m17210_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -497,11 +497,11 @@ KERNEL_FQ void m17210_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * base @@ -638,7 +638,7 @@ KERNEL_FQ void m17210_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u32 j = MAX_LOCAL, i = MAX_LOCAL * 4; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hash.data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hash.data[j]; if (data_length >= (i + 1)) { diff --git a/OpenCL/m17210_a1-pure.cl b/OpenCL/m17210_a1-pure.cl index 75b9935c7..73bc005f6 100644 --- a/OpenCL/m17210_a1-pure.cl +++ b/OpenCL/m17210_a1-pure.cl @@ -245,7 +245,7 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -258,7 +258,7 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 @@ -268,11 +268,11 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * loop @@ -411,7 +411,7 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_ESALT (pkzip_t)) for (u32 j = MAX_LOCAL, i = MAX_LOCAL * 4; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hash.data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hash.data[j]; if (data_length >= (i + 1)) { @@ -486,7 +486,7 @@ KERNEL_FQ void m17210_mxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -497,11 +497,11 @@ KERNEL_FQ void m17210_mxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * loop @@ -640,7 +640,7 @@ KERNEL_FQ void m17210_mxx (KERN_ATTR_ESALT (pkzip_t)) for (u32 j = MAX_LOCAL, i = MAX_LOCAL * 4; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hash.data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hash.data[j]; if (data_length >= (i + 1)) { diff --git a/OpenCL/m17210_a3-pure.cl b/OpenCL/m17210_a3-pure.cl index 4ed4e06df..c25227d98 100644 --- a/OpenCL/m17210_a3-pure.cl +++ b/OpenCL/m17210_a3-pure.cl @@ -245,7 +245,7 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -258,7 +258,7 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 @@ -268,11 +268,11 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * base @@ -423,7 +423,7 @@ KERNEL_FQ void m17210_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u32 j = MAX_LOCAL, i = MAX_LOCAL * 4; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hash.data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hash.data[j]; if (data_length >= (i + 1)) { @@ -498,7 +498,7 @@ KERNEL_FQ void m17210_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hash.data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hash.data[i]; } SYNC_THREADS (); @@ -509,11 +509,11 @@ KERNEL_FQ void m17210_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 checksum_from_crc = esalt_bufs[digests_offset].hash.checksum_from_crc; - const u32 checksum_from_timestamp = esalt_bufs[digests_offset].hash.checksum_from_timestamp; - const u32 crc32_final = esalt_bufs[digests_offset].hash.crc32; - const u32 data_length = esalt_bufs[digests_offset].hash.data_length; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 checksum_from_crc = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_crc; + const u32 checksum_from_timestamp = esalt_bufs[DIGESTS_OFFSET].hash.checksum_from_timestamp; + const u32 crc32_final = esalt_bufs[DIGESTS_OFFSET].hash.crc32; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hash.data_length; /** * base @@ -664,7 +664,7 @@ KERNEL_FQ void m17210_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u32 j = MAX_LOCAL, i = MAX_LOCAL * 4; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hash.data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hash.data[j]; if (data_length >= (i + 1)) { diff --git a/OpenCL/m17220_a0-pure.cl b/OpenCL/m17220_a0-pure.cl index f1fb4677a..683d95a4d 100644 --- a/OpenCL/m17220_a0-pure.cl +++ b/OpenCL/m17220_a0-pure.cl @@ -554,7 +554,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -571,8 +571,8 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -607,7 +607,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -626,7 +626,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -645,7 +645,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -657,12 +657,12 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); const u32 key0_sav = key0; @@ -672,7 +672,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -698,7 +698,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -721,10 +721,10 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } @@ -734,8 +734,8 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -760,7 +760,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) if (ret != MZ_STREAM_END) break; // failed to inflate // we check the crc32, but it might not necessarily be the last one (depending how strict - if ((~infstream.crc32) == esalt_bufs[digests_offset].hashes[idx].crc32) + if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { @@ -770,13 +770,13 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[0], 0, 0, 0 }; - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; @@ -819,7 +819,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -836,8 +836,8 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -872,7 +872,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -891,7 +891,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -910,7 +910,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -922,12 +922,12 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); const u32 key0_sav = key0; @@ -937,7 +937,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -963,7 +963,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -986,10 +986,10 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } @@ -999,8 +999,8 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -1025,11 +1025,11 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) if (ret != MZ_STREAM_END) break; // failed to inflate // we check the crc32, but it might not necessarily be the last one (depending how strict - if ((~infstream.crc32) == esalt_bufs[digests_offset].hashes[idx].crc32) + if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; diff --git a/OpenCL/m17220_a1-pure.cl b/OpenCL/m17220_a1-pure.cl index ca188bd32..6920f1047 100644 --- a/OpenCL/m17220_a1-pure.cl +++ b/OpenCL/m17220_a1-pure.cl @@ -552,7 +552,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -563,8 +563,8 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -607,7 +607,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) u32x key2 = key2init2; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -626,7 +626,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -645,7 +645,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -657,12 +657,12 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); const u32 key0_sav = key0; @@ -672,7 +672,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -698,7 +698,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -721,10 +721,10 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } @@ -734,8 +734,8 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -760,7 +760,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) if (ret != MZ_STREAM_END) break; // failed to inflate // we check the crc32, but it might not necessarily be the last one (depending how strict - if ((~infstream.crc32) == esalt_bufs[digests_offset].hashes[idx].crc32) + if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { @@ -770,13 +770,13 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[0], 0, 0, 0 }; - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; @@ -819,7 +819,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -830,8 +830,8 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -874,7 +874,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) u32x key2 = key2init2; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -893,7 +893,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -912,7 +912,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -924,12 +924,12 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); const u32 key0_sav = key0; @@ -939,7 +939,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -965,7 +965,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -988,10 +988,10 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } @@ -1001,8 +1001,8 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -1027,11 +1027,11 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) if (ret != MZ_STREAM_END) break; // failed to inflate // we check the crc32, but it might not necessarily be the last one (depending how strict - if ((~infstream.crc32) == esalt_bufs[digests_offset].hashes[idx].crc32) + if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; diff --git a/OpenCL/m17220_a3-pure.cl b/OpenCL/m17220_a3-pure.cl index 0149f5ba8..6e96380f0 100644 --- a/OpenCL/m17220_a3-pure.cl +++ b/OpenCL/m17220_a3-pure.cl @@ -552,7 +552,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -576,8 +576,8 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -619,7 +619,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -638,7 +638,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -657,7 +657,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -669,12 +669,12 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); const u32 key0_sav = key0; @@ -684,7 +684,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -710,7 +710,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -733,10 +733,10 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } @@ -746,8 +746,8 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -772,7 +772,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) if (ret != MZ_STREAM_END) break; // failed to inflate // we check the crc32, but it might not necessarily be the last one (depending how strict - if ((~infstream.crc32) == esalt_bufs[digests_offset].hashes[idx].crc32) + if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { @@ -782,13 +782,13 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[0], 0, 0, 0 }; - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; @@ -831,7 +831,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -855,8 +855,8 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -898,7 +898,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -917,7 +917,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -936,7 +936,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -948,12 +948,12 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); const u32 key0_sav = key0; @@ -963,7 +963,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -989,7 +989,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -1012,10 +1012,10 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } @@ -1025,8 +1025,8 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -1051,11 +1051,11 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) if (ret != MZ_STREAM_END) break; // failed to inflate // we check the crc32, but it might not necessarily be the last one (depending how strict - if ((~infstream.crc32) == esalt_bufs[digests_offset].hashes[idx].crc32) + if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; diff --git a/OpenCL/m17225_a0-pure.cl b/OpenCL/m17225_a0-pure.cl index c46572539..af27eaf39 100644 --- a/OpenCL/m17225_a0-pure.cl +++ b/OpenCL/m17225_a0-pure.cl @@ -554,7 +554,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -571,8 +571,8 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -607,7 +607,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -626,7 +626,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -645,7 +645,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -657,15 +657,15 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 0 && esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 0 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial and uncompressed one, so we need to continue with the next one } @@ -677,11 +677,11 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; tmp[0] = plain; update_key012 (key0, key1, key2, plain, l_crc32tab); @@ -703,7 +703,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -726,25 +726,25 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } u32x crc = 0xffffffff; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8) { mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -772,7 +772,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) } else { - const u32 data_length = esalt_bufs[digests_offset].hashes[idx].data_length; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length; key0 = key0_sav; key1 = key1_sav; @@ -780,7 +780,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u32 j = 3, i = 12; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hashes[idx].data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[j]; if (data_length >= (i + 1)) { @@ -823,7 +823,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) } // we check the crc32, but it might not necessarily be the last one (depending how strict - if (crc == esalt_bufs[digests_offset].hashes[idx].crc32) + if (crc == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { @@ -833,13 +833,13 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[0], 0, 0, 0 }; - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; @@ -882,7 +882,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -899,8 +899,8 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -935,7 +935,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -954,7 +954,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -973,7 +973,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -985,15 +985,15 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 0 && esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 0 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial and uncompressed one, so we need to continue with the next one } @@ -1005,11 +1005,11 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; tmp[0] = plain; update_key012 (key0, key1, key2, plain, l_crc32tab); @@ -1031,7 +1031,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -1054,25 +1054,25 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } u32x crc = 0xffffffff; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8) { mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -1100,7 +1100,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) } else { - const u32 data_length = esalt_bufs[digests_offset].hashes[idx].data_length; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length; key0 = key0_sav; key1 = key1_sav; @@ -1108,7 +1108,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u32 j = 3, i = 12; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hashes[idx].data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[j]; if (data_length >= (i + 1)) { @@ -1151,11 +1151,11 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) } // we check the crc32, but it might not necessarily be the last one (depending how strict - if (crc == esalt_bufs[digests_offset].hashes[idx].crc32) + if (crc == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; diff --git a/OpenCL/m17225_a1-pure.cl b/OpenCL/m17225_a1-pure.cl index be2f66b00..a172b7cc5 100644 --- a/OpenCL/m17225_a1-pure.cl +++ b/OpenCL/m17225_a1-pure.cl @@ -552,7 +552,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -563,8 +563,8 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -607,7 +607,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) u32x key2 = key2init2; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -626,7 +626,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -645,7 +645,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -657,15 +657,15 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 0 && esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 0 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial and uncompressed one, so we need to continue with the next one } @@ -677,11 +677,11 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; tmp[0] = plain; update_key012 (key0, key1, key2, plain, l_crc32tab); @@ -703,7 +703,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -726,25 +726,25 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } u32x crc = 0xffffffff; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8) { mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -771,7 +771,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) crc = ~infstream.crc32; } else{ - const u32 data_length = esalt_bufs[digests_offset].hashes[idx].data_length; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length; key0 = key0_sav; key1 = key1_sav; @@ -779,7 +779,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) for (u32 j = 3, i = 12; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hashes[idx].data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[j]; if (data_length >= (i + 1)) { @@ -822,7 +822,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) } // we check the crc32, but it might not necessarily be the last one (depending how strict - if (crc == esalt_bufs[digests_offset].hashes[idx].crc32) + if (crc == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { @@ -832,13 +832,13 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[0], 0, 0, 0 }; - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; @@ -881,7 +881,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -892,8 +892,8 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -936,7 +936,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) u32x key2 = key2init2; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -955,7 +955,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -974,7 +974,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -986,15 +986,15 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 0 && esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 0 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial and uncompressed one, so we need to continue with the next one } @@ -1006,11 +1006,11 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; tmp[0] = plain; update_key012 (key0, key1, key2, plain, l_crc32tab); @@ -1032,7 +1032,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -1055,25 +1055,25 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } u32x crc = 0xffffffff; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8) { mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -1100,7 +1100,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) crc = ~infstream.crc32; } else{ - const u32 data_length = esalt_bufs[digests_offset].hashes[idx].data_length; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length; key0 = key0_sav; key1 = key1_sav; @@ -1108,7 +1108,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) for (u32 j = 3, i = 12; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hashes[idx].data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[j]; if (data_length >= (i + 1)) { @@ -1151,11 +1151,11 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t)) } // we check the crc32, but it might not necessarily be the last one (depending how strict - if (crc == esalt_bufs[digests_offset].hashes[idx].crc32) + if (crc == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; diff --git a/OpenCL/m17225_a3-pure.cl b/OpenCL/m17225_a3-pure.cl index 32db34f67..533afac2a 100644 --- a/OpenCL/m17225_a3-pure.cl +++ b/OpenCL/m17225_a3-pure.cl @@ -552,7 +552,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -576,8 +576,8 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -619,7 +619,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -638,7 +638,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -657,7 +657,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -669,15 +669,15 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 0 && esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 0 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial and uncompressed one, so we need to continue with the next one } @@ -689,11 +689,11 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; tmp[0] = plain; update_key012 (key0, key1, key2, plain, l_crc32tab); @@ -715,7 +715,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -738,25 +738,25 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } u32x crc = 0xffffffff; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8) { mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -784,7 +784,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) } else { - const u32 data_length = esalt_bufs[digests_offset].hashes[idx].data_length; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length; key0 = key0_sav; key1 = key1_sav; @@ -792,7 +792,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u32 j = 3, i = 12; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hashes[idx].data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[j]; if (data_length >= (i + 1)) { @@ -834,7 +834,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) crc = ~crc; } - if (crc == esalt_bufs[digests_offset].hashes[idx].crc32) + if (crc == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { @@ -844,13 +844,13 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[0], 0, 0, 0 }; - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; @@ -893,7 +893,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -917,8 +917,8 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -960,7 +960,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -979,7 +979,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -998,7 +998,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -1010,15 +1010,15 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 0 && esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 0 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial and uncompressed one, so we need to continue with the next one } @@ -1030,11 +1030,11 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u8 tmp[TMPSIZ]; if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; tmp[0] = plain; update_key012 (key0, key1, key2, plain, l_crc32tab); @@ -1056,7 +1056,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (int i = 16; i < 36; i += 4) { if (idx == 0) next = l_data[i / 4]; - else next = esalt_bufs[digests_offset].hashes[idx].data[i / 4]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[i / 4]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -1079,25 +1079,25 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); } - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length >= 36 && esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break; - if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_type_enum == 1) { continue; // so far everything matches for this hash, but it's only a partial one, so we need to continue with the next one } u32x crc = 0xffffffff; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8) + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8) { mz_stream infstream; inflate_state pStream; infstream.opaque = Z_NULL; - infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input - infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[digests_offset].hashes[idx].data + 12; // input char array + infstream.avail_in = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length - 12; // size of input + infstream.next_in = (GLOBAL_AS u8 *) esalt_bufs[DIGESTS_OFFSET].hashes[idx].data + 12; // input char array infstream.avail_out = TMPSIZ; // size of output infstream.next_out = tmp; // output char array @@ -1125,7 +1125,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) } else { - const u32 data_length = esalt_bufs[digests_offset].hashes[idx].data_length; + const u32 data_length = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data_length; key0 = key0_sav; key1 = key1_sav; @@ -1133,7 +1133,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u32 j = 3, i = 12; i < data_length; j++, i += 4) { - next = esalt_bufs[digests_offset].hashes[idx].data[j]; + next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[j]; if (data_length >= (i + 1)) { @@ -1175,11 +1175,11 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) crc = ~crc; } - if (crc == esalt_bufs[digests_offset].hashes[idx].crc32) + if (crc == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32) { if (idx + 1 == hash_count) { - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; diff --git a/OpenCL/m17230_a0-pure.cl b/OpenCL/m17230_a0-pure.cl index 456542b55..25eba47f2 100644 --- a/OpenCL/m17230_a0-pure.cl +++ b/OpenCL/m17230_a0-pure.cl @@ -247,7 +247,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -264,8 +264,8 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -300,7 +300,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -319,7 +319,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -338,7 +338,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -350,22 +350,22 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; - if (idx + 1 == esalt_bufs[digests_offset].hash_count) + if (idx + 1 == esalt_bufs[DIGESTS_OFFSET].hash_count) { /** * digest @@ -373,13 +373,13 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) const u32 search[4] = { - esalt_bufs[digests_offset].hashes[0].checksum_from_crc, + esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc, 0, 0, 0 }; - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; @@ -417,7 +417,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -434,8 +434,8 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -470,7 +470,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -489,7 +489,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -508,7 +508,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -520,24 +520,24 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; - if (idx + 1 == esalt_bufs[digests_offset].hash_count) + if (idx + 1 == esalt_bufs[DIGESTS_OFFSET].hash_count) { - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; diff --git a/OpenCL/m17230_a1-pure.cl b/OpenCL/m17230_a1-pure.cl index a067e8b6d..0e6f406dc 100644 --- a/OpenCL/m17230_a1-pure.cl +++ b/OpenCL/m17230_a1-pure.cl @@ -245,7 +245,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -256,8 +256,8 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -300,7 +300,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_ESALT (pkzip_t)) u32x key2 = key2init2; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -319,7 +319,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -338,7 +338,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -350,22 +350,22 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; - if (idx + 1 == esalt_bufs[digests_offset].hash_count) + if (idx + 1 == esalt_bufs[DIGESTS_OFFSET].hash_count) { /** * digest @@ -373,13 +373,13 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_ESALT (pkzip_t)) const u32 search[4] = { - esalt_bufs[digests_offset].hashes[0].checksum_from_crc, + esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc, 0, 0, 0 }; - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; @@ -417,7 +417,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -428,8 +428,8 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -472,7 +472,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_ESALT (pkzip_t)) u32x key2 = key2init2; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -491,7 +491,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -510,7 +510,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -522,24 +522,24 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; - if (idx + 1 == esalt_bufs[digests_offset].hash_count) + if (idx + 1 == esalt_bufs[DIGESTS_OFFSET].hash_count) { - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; diff --git a/OpenCL/m17230_a3-pure.cl b/OpenCL/m17230_a3-pure.cl index 144ff73b8..1ff89243e 100644 --- a/OpenCL/m17230_a3-pure.cl +++ b/OpenCL/m17230_a3-pure.cl @@ -245,7 +245,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -269,8 +269,8 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -314,7 +314,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -333,7 +333,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -352,7 +352,7 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -364,20 +364,20 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; if (idx + 1 == hash_count) { @@ -387,13 +387,13 @@ KERNEL_FQ void m17230_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) const u32 search[4] = { - esalt_bufs[digests_offset].hashes[0].checksum_from_crc, + esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc, 0, 0, 0 }; - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; @@ -431,7 +431,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) for (u64 i = lid; i < MAX_LOCAL; i += lsz) { - l_data[i] = esalt_bufs[digests_offset].hashes[0].data[i]; + l_data[i] = esalt_bufs[DIGESTS_OFFSET].hashes[0].data[i]; } SYNC_THREADS (); @@ -455,8 +455,8 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) * prefetch from global memory */ - const u32 checksum_size = esalt_bufs[digests_offset].checksum_size; - const u32 hash_count = esalt_bufs[digests_offset].hash_count; + const u32 checksum_size = esalt_bufs[DIGESTS_OFFSET].checksum_size; + const u32 hash_count = esalt_bufs[DIGESTS_OFFSET].hash_count; /** * loop @@ -500,7 +500,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) u32x key2 = key2init; if (idx == 0) next = l_data[0]; - else next = esalt_bufs[digests_offset].hashes[idx].data[0]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[0]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -519,7 +519,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[1]; - else next = esalt_bufs[digests_offset].hashes[idx].data[1]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[1]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -538,7 +538,7 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[2]; - else next = esalt_bufs[digests_offset].hashes[idx].data[2]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[2]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; @@ -550,24 +550,24 @@ KERNEL_FQ void m17230_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) update_key3 (key2, key3); plain = unpack_v8c_from_v32_S (next) ^ key3; - if ((checksum_size == 2) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; + if ((checksum_size == 2) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc & 0xff) != plain) && ((esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp & 0xff) != plain)) break; update_key012 (key0, key1, key2, plain, l_crc32tab); update_key3 (key2, key3); plain = unpack_v8d_from_v32_S (next) ^ key3; - if ((plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[digests_offset].hashes[idx].checksum_from_timestamp >> 8))) break; + if ((plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_crc >> 8)) && (plain != (esalt_bufs[DIGESTS_OFFSET].hashes[idx].checksum_from_timestamp >> 8))) break; update_key012 (key0, key1, key2, plain, l_crc32tab); if (idx == 0) next = l_data[3]; - else next = esalt_bufs[digests_offset].hashes[idx].data[3]; + else next = esalt_bufs[DIGESTS_OFFSET].hashes[idx].data[3]; update_key3 (key2, key3); plain = unpack_v8a_from_v32_S (next) ^ key3; - if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; + if (esalt_bufs[DIGESTS_OFFSET].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break; - if (idx + 1 == esalt_bufs[digests_offset].hash_count) + if (idx + 1 == esalt_bufs[DIGESTS_OFFSET].hash_count) { - const u32 r0 = esalt_bufs[digests_offset].hashes[0].checksum_from_crc; + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].hashes[0].checksum_from_crc; const u32 r1 = 0; const u32 r2 = 0; const u32 r3 = 0; diff --git a/OpenCL/m17300_a0-optimized.cl b/OpenCL/m17300_a0-optimized.cl index 726e28864..8523b504f 100644 --- a/OpenCL/m17300_a0-optimized.cl +++ b/OpenCL/m17300_a0-optimized.cl @@ -283,10 +283,10 @@ KERNEL_FQ void m17300_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17300_a1-optimized.cl b/OpenCL/m17300_a1-optimized.cl index ffbc1232c..e10975547 100644 --- a/OpenCL/m17300_a1-optimized.cl +++ b/OpenCL/m17300_a1-optimized.cl @@ -340,10 +340,10 @@ KERNEL_FQ void m17300_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17300_a3-optimized.cl b/OpenCL/m17300_a3-optimized.cl index c5f96f0cc..a8ff8cae9 100644 --- a/OpenCL/m17300_a3-optimized.cl +++ b/OpenCL/m17300_a3-optimized.cl @@ -228,10 +228,10 @@ DECLSPEC void m17300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -455,7 +455,7 @@ KERNEL_FQ void m17300_m04 (KERN_ATTR_BASIC ()) * main */ - m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17300_m08 (KERN_ATTR_BASIC ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m17300_m08 (KERN_ATTR_BASIC ()) * main */ - m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17300_m16 (KERN_ATTR_BASIC ()) @@ -549,7 +549,7 @@ KERNEL_FQ void m17300_m16 (KERN_ATTR_BASIC ()) * main */ - m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17300_s04 (KERN_ATTR_BASIC ()) @@ -596,7 +596,7 @@ KERNEL_FQ void m17300_s04 (KERN_ATTR_BASIC ()) * main */ - m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17300_s08 (KERN_ATTR_BASIC ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m17300_s08 (KERN_ATTR_BASIC ()) * main */ - m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17300_s16 (KERN_ATTR_BASIC ()) @@ -690,5 +690,5 @@ KERNEL_FQ void m17300_s16 (KERN_ATTR_BASIC ()) * main */ - m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m17400_a0-optimized.cl b/OpenCL/m17400_a0-optimized.cl index 5b4089ade..de148319b 100644 --- a/OpenCL/m17400_a0-optimized.cl +++ b/OpenCL/m17400_a0-optimized.cl @@ -283,10 +283,10 @@ KERNEL_FQ void m17400_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17400_a1-optimized.cl b/OpenCL/m17400_a1-optimized.cl index efed1b3b7..07905feff 100644 --- a/OpenCL/m17400_a1-optimized.cl +++ b/OpenCL/m17400_a1-optimized.cl @@ -340,10 +340,10 @@ KERNEL_FQ void m17400_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17400_a3-optimized.cl b/OpenCL/m17400_a3-optimized.cl index a85ea8e92..e918558ef 100644 --- a/OpenCL/m17400_a3-optimized.cl +++ b/OpenCL/m17400_a3-optimized.cl @@ -228,10 +228,10 @@ DECLSPEC void m17400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -455,7 +455,7 @@ KERNEL_FQ void m17400_m04 (KERN_ATTR_BASIC ()) * main */ - m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17400_m08 (KERN_ATTR_BASIC ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m17400_m08 (KERN_ATTR_BASIC ()) * main */ - m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17400_m16 (KERN_ATTR_BASIC ()) @@ -549,7 +549,7 @@ KERNEL_FQ void m17400_m16 (KERN_ATTR_BASIC ()) * main */ - m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17400_s04 (KERN_ATTR_BASIC ()) @@ -596,7 +596,7 @@ KERNEL_FQ void m17400_s04 (KERN_ATTR_BASIC ()) * main */ - m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17400_s08 (KERN_ATTR_BASIC ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m17400_s08 (KERN_ATTR_BASIC ()) * main */ - m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17400_s16 (KERN_ATTR_BASIC ()) @@ -690,5 +690,5 @@ KERNEL_FQ void m17400_s16 (KERN_ATTR_BASIC ()) * main */ - m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m17500_a0-optimized.cl b/OpenCL/m17500_a0-optimized.cl index 3e22b6aef..81c112d50 100644 --- a/OpenCL/m17500_a0-optimized.cl +++ b/OpenCL/m17500_a0-optimized.cl @@ -283,10 +283,10 @@ KERNEL_FQ void m17500_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17500_a1-optimized.cl b/OpenCL/m17500_a1-optimized.cl index 30f951adc..90ec39fd3 100644 --- a/OpenCL/m17500_a1-optimized.cl +++ b/OpenCL/m17500_a1-optimized.cl @@ -340,10 +340,10 @@ KERNEL_FQ void m17500_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17500_a3-optimized.cl b/OpenCL/m17500_a3-optimized.cl index 4dad1ff0e..61b82fff4 100644 --- a/OpenCL/m17500_a3-optimized.cl +++ b/OpenCL/m17500_a3-optimized.cl @@ -228,10 +228,10 @@ DECLSPEC void m17500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -455,7 +455,7 @@ KERNEL_FQ void m17500_m04 (KERN_ATTR_BASIC ()) * main */ - m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17500_m08 (KERN_ATTR_BASIC ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m17500_m08 (KERN_ATTR_BASIC ()) * main */ - m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17500_m16 (KERN_ATTR_BASIC ()) @@ -549,7 +549,7 @@ KERNEL_FQ void m17500_m16 (KERN_ATTR_BASIC ()) * main */ - m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17500_s04 (KERN_ATTR_BASIC ()) @@ -596,7 +596,7 @@ KERNEL_FQ void m17500_s04 (KERN_ATTR_BASIC ()) * main */ - m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17500_s08 (KERN_ATTR_BASIC ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m17500_s08 (KERN_ATTR_BASIC ()) * main */ - m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17500_s16 (KERN_ATTR_BASIC ()) @@ -690,5 +690,5 @@ KERNEL_FQ void m17500_s16 (KERN_ATTR_BASIC ()) * main */ - m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m17600_a0-optimized.cl b/OpenCL/m17600_a0-optimized.cl index adbe215c3..a9bec0257 100644 --- a/OpenCL/m17600_a0-optimized.cl +++ b/OpenCL/m17600_a0-optimized.cl @@ -283,10 +283,10 @@ KERNEL_FQ void m17600_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17600_a1-optimized.cl b/OpenCL/m17600_a1-optimized.cl index 1d5ae5739..18212f768 100644 --- a/OpenCL/m17600_a1-optimized.cl +++ b/OpenCL/m17600_a1-optimized.cl @@ -340,10 +340,10 @@ KERNEL_FQ void m17600_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17600_a3-optimized.cl b/OpenCL/m17600_a3-optimized.cl index ef15b3633..5b48782c7 100644 --- a/OpenCL/m17600_a3-optimized.cl +++ b/OpenCL/m17600_a3-optimized.cl @@ -228,10 +228,10 @@ DECLSPEC void m17600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -455,7 +455,7 @@ KERNEL_FQ void m17600_m04 (KERN_ATTR_BASIC ()) * main */ - m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17600_m08 (KERN_ATTR_BASIC ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m17600_m08 (KERN_ATTR_BASIC ()) * main */ - m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17600_m16 (KERN_ATTR_BASIC ()) @@ -549,7 +549,7 @@ KERNEL_FQ void m17600_m16 (KERN_ATTR_BASIC ()) * main */ - m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17600_s04 (KERN_ATTR_BASIC ()) @@ -596,7 +596,7 @@ KERNEL_FQ void m17600_s04 (KERN_ATTR_BASIC ()) * main */ - m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17600_s08 (KERN_ATTR_BASIC ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m17600_s08 (KERN_ATTR_BASIC ()) * main */ - m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17600_s16 (KERN_ATTR_BASIC ()) @@ -690,5 +690,5 @@ KERNEL_FQ void m17600_s16 (KERN_ATTR_BASIC ()) * main */ - m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m17700_a0-optimized.cl b/OpenCL/m17700_a0-optimized.cl index 27405a313..c801e6808 100644 --- a/OpenCL/m17700_a0-optimized.cl +++ b/OpenCL/m17700_a0-optimized.cl @@ -283,10 +283,10 @@ KERNEL_FQ void m17700_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17700_a1-optimized.cl b/OpenCL/m17700_a1-optimized.cl index 77faf268a..6837adcc4 100644 --- a/OpenCL/m17700_a1-optimized.cl +++ b/OpenCL/m17700_a1-optimized.cl @@ -340,10 +340,10 @@ KERNEL_FQ void m17700_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17700_a3-optimized.cl b/OpenCL/m17700_a3-optimized.cl index f87d4be01..8bac072a7 100644 --- a/OpenCL/m17700_a3-optimized.cl +++ b/OpenCL/m17700_a3-optimized.cl @@ -228,10 +228,10 @@ DECLSPEC void m17300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -455,7 +455,7 @@ KERNEL_FQ void m17700_m04 (KERN_ATTR_BASIC ()) * main */ - m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17700_m08 (KERN_ATTR_BASIC ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m17700_m08 (KERN_ATTR_BASIC ()) * main */ - m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17700_m16 (KERN_ATTR_BASIC ()) @@ -549,7 +549,7 @@ KERNEL_FQ void m17700_m16 (KERN_ATTR_BASIC ()) * main */ - m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17700_s04 (KERN_ATTR_BASIC ()) @@ -596,7 +596,7 @@ KERNEL_FQ void m17700_s04 (KERN_ATTR_BASIC ()) * main */ - m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17700_s08 (KERN_ATTR_BASIC ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m17700_s08 (KERN_ATTR_BASIC ()) * main */ - m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17700_s16 (KERN_ATTR_BASIC ()) @@ -690,5 +690,5 @@ KERNEL_FQ void m17700_s16 (KERN_ATTR_BASIC ()) * main */ - m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m17800_a0-optimized.cl b/OpenCL/m17800_a0-optimized.cl index b6d81c47b..7f5b4e9f8 100644 --- a/OpenCL/m17800_a0-optimized.cl +++ b/OpenCL/m17800_a0-optimized.cl @@ -283,10 +283,10 @@ KERNEL_FQ void m17800_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17800_a1-optimized.cl b/OpenCL/m17800_a1-optimized.cl index af26e55d1..f4aaca952 100644 --- a/OpenCL/m17800_a1-optimized.cl +++ b/OpenCL/m17800_a1-optimized.cl @@ -340,10 +340,10 @@ KERNEL_FQ void m17800_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17800_a3-optimized.cl b/OpenCL/m17800_a3-optimized.cl index 09284499c..cf7b4879d 100644 --- a/OpenCL/m17800_a3-optimized.cl +++ b/OpenCL/m17800_a3-optimized.cl @@ -228,10 +228,10 @@ DECLSPEC void m17400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -455,7 +455,7 @@ KERNEL_FQ void m17800_m04 (KERN_ATTR_BASIC ()) * main */ - m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17800_m08 (KERN_ATTR_BASIC ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m17800_m08 (KERN_ATTR_BASIC ()) * main */ - m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17800_m16 (KERN_ATTR_BASIC ()) @@ -549,7 +549,7 @@ KERNEL_FQ void m17800_m16 (KERN_ATTR_BASIC ()) * main */ - m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17800_s04 (KERN_ATTR_BASIC ()) @@ -596,7 +596,7 @@ KERNEL_FQ void m17800_s04 (KERN_ATTR_BASIC ()) * main */ - m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17800_s08 (KERN_ATTR_BASIC ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m17800_s08 (KERN_ATTR_BASIC ()) * main */ - m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17800_s16 (KERN_ATTR_BASIC ()) @@ -690,5 +690,5 @@ KERNEL_FQ void m17800_s16 (KERN_ATTR_BASIC ()) * main */ - m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17400s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m17900_a0-optimized.cl b/OpenCL/m17900_a0-optimized.cl index d49381ebe..797750ce3 100644 --- a/OpenCL/m17900_a0-optimized.cl +++ b/OpenCL/m17900_a0-optimized.cl @@ -283,10 +283,10 @@ KERNEL_FQ void m17900_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17900_a1-optimized.cl b/OpenCL/m17900_a1-optimized.cl index c0aa7848c..a063d7e18 100644 --- a/OpenCL/m17900_a1-optimized.cl +++ b/OpenCL/m17900_a1-optimized.cl @@ -340,10 +340,10 @@ KERNEL_FQ void m17900_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m17900_a3-optimized.cl b/OpenCL/m17900_a3-optimized.cl index 7f3a81d57..acbcc5abc 100644 --- a/OpenCL/m17900_a3-optimized.cl +++ b/OpenCL/m17900_a3-optimized.cl @@ -80,7 +80,7 @@ DECLSPEC void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER #define Rho_Pi(ad,r) \ bc0 = ad; \ - ad = hc_rotl64 (t, r); \ + ad = hc_rotl64 (t, r); \ t = bc0; \ #ifdef _unroll @@ -228,10 +228,10 @@ DECLSPEC void m17500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -278,7 +278,7 @@ DECLSPEC void m17500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER #define Rho_Pi(ad,r) \ bc0 = ad; \ - ad = hc_rotl64 (t, r); \ + ad = hc_rotl64 (t, r); \ t = bc0; \ #ifdef _unroll @@ -455,7 +455,7 @@ KERNEL_FQ void m17900_m04 (KERN_ATTR_BASIC ()) * main */ - m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17900_m08 (KERN_ATTR_BASIC ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m17900_m08 (KERN_ATTR_BASIC ()) * main */ - m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17900_m16 (KERN_ATTR_BASIC ()) @@ -549,7 +549,7 @@ KERNEL_FQ void m17900_m16 (KERN_ATTR_BASIC ()) * main */ - m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17900_s04 (KERN_ATTR_BASIC ()) @@ -596,7 +596,7 @@ KERNEL_FQ void m17900_s04 (KERN_ATTR_BASIC ()) * main */ - m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17900_s08 (KERN_ATTR_BASIC ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m17900_s08 (KERN_ATTR_BASIC ()) * main */ - m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m17900_s16 (KERN_ATTR_BASIC ()) @@ -690,5 +690,5 @@ KERNEL_FQ void m17900_s16 (KERN_ATTR_BASIC ()) * main */ - m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17500s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m18000_a0-optimized.cl b/OpenCL/m18000_a0-optimized.cl index ca5e1e9bf..349526fcb 100644 --- a/OpenCL/m18000_a0-optimized.cl +++ b/OpenCL/m18000_a0-optimized.cl @@ -283,10 +283,10 @@ KERNEL_FQ void m18000_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m18000_a1-optimized.cl b/OpenCL/m18000_a1-optimized.cl index 3aa24b561..d8565bca2 100644 --- a/OpenCL/m18000_a1-optimized.cl +++ b/OpenCL/m18000_a1-optimized.cl @@ -340,10 +340,10 @@ KERNEL_FQ void m18000_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m18000_a3-optimized.cl b/OpenCL/m18000_a3-optimized.cl index cc38031c7..82f06c7f0 100644 --- a/OpenCL/m18000_a3-optimized.cl +++ b/OpenCL/m18000_a3-optimized.cl @@ -228,10 +228,10 @@ DECLSPEC void m17600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -455,7 +455,7 @@ KERNEL_FQ void m18000_m04 (KERN_ATTR_BASIC ()) * main */ - m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18000_m08 (KERN_ATTR_BASIC ()) @@ -502,7 +502,7 @@ KERNEL_FQ void m18000_m08 (KERN_ATTR_BASIC ()) * main */ - m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18000_m16 (KERN_ATTR_BASIC ()) @@ -549,7 +549,7 @@ KERNEL_FQ void m18000_m16 (KERN_ATTR_BASIC ()) * main */ - m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18000_s04 (KERN_ATTR_BASIC ()) @@ -596,7 +596,7 @@ KERNEL_FQ void m18000_s04 (KERN_ATTR_BASIC ()) * main */ - m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18000_s08 (KERN_ATTR_BASIC ()) @@ -643,7 +643,7 @@ KERNEL_FQ void m18000_s08 (KERN_ATTR_BASIC ()) * main */ - m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18000_s16 (KERN_ATTR_BASIC ()) @@ -690,5 +690,5 @@ KERNEL_FQ void m18000_s16 (KERN_ATTR_BASIC ()) * main */ - m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m17600s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m18100_a0-pure.cl b/OpenCL/m18100_a0-pure.cl index d923a95e8..b67195ff3 100644 --- a/OpenCL/m18100_a0-pure.cl +++ b/OpenCL/m18100_a0-pure.cl @@ -39,7 +39,7 @@ KERNEL_FQ void m18100_mxx (KERN_ATTR_RULES ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -110,10 +110,10 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -128,7 +128,7 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_RULES ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m18100_a1-pure.cl b/OpenCL/m18100_a1-pure.cl index 2b170bc4a..7571b10dc 100644 --- a/OpenCL/m18100_a1-pure.cl +++ b/OpenCL/m18100_a1-pure.cl @@ -44,7 +44,7 @@ KERNEL_FQ void m18100_mxx (KERN_ATTR_BASIC ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -133,10 +133,10 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -158,7 +158,7 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_BASIC ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m18100_a3-pure.cl b/OpenCL/m18100_a3-pure.cl index ffd2525fe..aac11ef2e 100644 --- a/OpenCL/m18100_a3-pure.cl +++ b/OpenCL/m18100_a3-pure.cl @@ -44,7 +44,7 @@ KERNEL_FQ void m18100_mxx (KERN_ATTR_VECTOR ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -120,10 +120,10 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -145,7 +145,7 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_VECTOR ()) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m18200_a0-optimized.cl b/OpenCL/m18200_a0-optimized.cl index 3791d2058..e0ecdbc6f 100644 --- a/OpenCL/m18200_a0-optimized.cl +++ b/OpenCL/m18200_a0-optimized.cl @@ -618,10 +618,10 @@ KERNEL_FQ void m18200_m04 (KERN_ATTR_RULES_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -653,11 +653,11 @@ KERNEL_FQ void m18200_m04 (KERN_ATTR_RULES_ESALT (krb5asrep_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -716,10 +716,10 @@ KERNEL_FQ void m18200_s04 (KERN_ATTR_RULES_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -751,11 +751,11 @@ KERNEL_FQ void m18200_s04 (KERN_ATTR_RULES_ESALT (krb5asrep_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m18200_a0-pure.cl b/OpenCL/m18200_a0-pure.cl index ba15f1908..321971402 100644 --- a/OpenCL/m18200_a0-pure.cl +++ b/OpenCL/m18200_a0-pure.cl @@ -408,10 +408,10 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_RULES_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -437,11 +437,11 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_RULES_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -470,10 +470,10 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_RULES_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -499,11 +499,11 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_RULES_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m18200_a1-optimized.cl b/OpenCL/m18200_a1-optimized.cl index e66367c08..0d1ff44c2 100644 --- a/OpenCL/m18200_a1-optimized.cl +++ b/OpenCL/m18200_a1-optimized.cl @@ -615,10 +615,10 @@ KERNEL_FQ void m18200_m04 (KERN_ATTR_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -700,11 +700,11 @@ KERNEL_FQ void m18200_m04 (KERN_ATTR_ESALT (krb5asrep_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -762,10 +762,10 @@ KERNEL_FQ void m18200_s04 (KERN_ATTR_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -847,11 +847,11 @@ KERNEL_FQ void m18200_s04 (KERN_ATTR_ESALT (krb5asrep_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m18200_a1-pure.cl b/OpenCL/m18200_a1-pure.cl index 3817e1e8a..c82591db4 100644 --- a/OpenCL/m18200_a1-pure.cl +++ b/OpenCL/m18200_a1-pure.cl @@ -404,10 +404,10 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; md4_ctx_t ctx0; @@ -433,11 +433,11 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -464,10 +464,10 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; md4_ctx_t ctx0; @@ -493,11 +493,11 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m18200_a3-optimized.cl b/OpenCL/m18200_a3-optimized.cl index dce8dacf6..db9b24d67 100644 --- a/OpenCL/m18200_a3-optimized.cl +++ b/OpenCL/m18200_a3-optimized.cl @@ -586,10 +586,10 @@ DECLSPEC void m18200 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -620,11 +620,11 @@ DECLSPEC void m18200 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (rc4_key, tmp, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, tmp, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -679,7 +679,7 @@ KERNEL_FQ void m18200_m04 (KERN_ATTR_ESALT (krb5asrep_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m18200 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18200 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18200_m08 (KERN_ATTR_ESALT (krb5asrep_t)) @@ -731,7 +731,7 @@ KERNEL_FQ void m18200_m08 (KERN_ATTR_ESALT (krb5asrep_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m18200 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18200 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18200_m16 (KERN_ATTR_ESALT (krb5asrep_t)) @@ -787,7 +787,7 @@ KERNEL_FQ void m18200_s04 (KERN_ATTR_ESALT (krb5asrep_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m18200 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18200 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18200_s08 (KERN_ATTR_ESALT (krb5asrep_t)) @@ -839,7 +839,7 @@ KERNEL_FQ void m18200_s08 (KERN_ATTR_ESALT (krb5asrep_t)) LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; - m18200 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18200 (rc4_key, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18200_s16 (KERN_ATTR_ESALT (krb5asrep_t)) diff --git a/OpenCL/m18200_a3-pure.cl b/OpenCL/m18200_a3-pure.cl index 015cd4f36..c97a59024 100644 --- a/OpenCL/m18200_a3-pure.cl +++ b/OpenCL/m18200_a3-pure.cl @@ -413,10 +413,10 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_VECTOR_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -446,11 +446,11 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_VECTOR_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -486,10 +486,10 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_VECTOR_ESALT (krb5asrep_t)) u32 checksum[4]; - checksum[0] = esalt_bufs[digests_offset].checksum[0]; - checksum[1] = esalt_bufs[digests_offset].checksum[1]; - checksum[2] = esalt_bufs[digests_offset].checksum[2]; - checksum[3] = esalt_bufs[digests_offset].checksum[3]; + checksum[0] = esalt_bufs[DIGESTS_OFFSET].checksum[0]; + checksum[1] = esalt_bufs[DIGESTS_OFFSET].checksum[1]; + checksum[2] = esalt_bufs[DIGESTS_OFFSET].checksum[2]; + checksum[3] = esalt_bufs[DIGESTS_OFFSET].checksum[3]; /** * loop @@ -519,11 +519,11 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_VECTOR_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (rc4_key, digest, esalt_bufs[digests_offset].edata2, esalt_bufs[digests_offset].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (rc4_key, digest, esalt_bufs[DIGESTS_OFFSET].edata2, esalt_bufs[DIGESTS_OFFSET].edata2_len, K2, checksum) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m18300-pure.cl b/OpenCL/m18300-pure.cl index 46e52a1aa..1a349a46f 100644 --- a/OpenCL/m18300-pure.cl +++ b/OpenCL/m18300-pure.cl @@ -111,7 +111,7 @@ KERNEL_FQ void m18300_init (KERN_ATTR_TMPS_ESALT (apple_secure_notes_tmp_t, appl tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[digests_offset].ZCRYPTOSALT, 16); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].ZCRYPTOSALT, 16); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -353,16 +353,16 @@ KERNEL_FQ void m18300_comp (KERN_ATTR_TMPS_ESALT (apple_secure_notes_tmp_t, appl u32 P3[2]; u32 P4[2]; - A[0] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[0]); - A[1] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[1]); - P1[0] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[2]); - P1[1] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[3]); - P2[0] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[4]); - P2[1] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[5]); - P3[0] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[6]); - P3[1] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[7]); - P4[0] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[8]); - P4[1] = hc_swap32_S (esalt_bufs[digests_offset].ZCRYPTOWRAPPEDKEY[9]); + A[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[0]); + A[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[1]); + P1[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[2]); + P1[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[3]); + P2[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[4]); + P2[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[5]); + P3[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[6]); + P3[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[7]); + P4[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[8]); + P4[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].ZCRYPTOWRAPPEDKEY[9]); for (int j = 5; j >= 0; j--) { @@ -434,9 +434,9 @@ KERNEL_FQ void m18300_comp (KERN_ATTR_TMPS_ESALT (apple_secure_notes_tmp_t, appl if ((A[0] == 0xa6a6a6a6) && (A[1] == 0xa6a6a6a6)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m18400-pure.cl b/OpenCL/m18400-pure.cl index b6645e8a9..7381875a9 100644 --- a/OpenCL/m18400-pure.cl +++ b/OpenCL/m18400-pure.cl @@ -121,10 +121,10 @@ KERNEL_FQ void m18400_init (KERN_ATTR_TMPS_ESALT (odf12_tmp_t, odf12_t)) u32 m2[4]; u32 m3[4]; - m0[0] = hc_swap32_S (salt_bufs[digests_offset].salt_buf[0]); - m0[1] = hc_swap32_S (salt_bufs[digests_offset].salt_buf[1]); - m0[2] = hc_swap32_S (salt_bufs[digests_offset].salt_buf[2]); - m0[3] = hc_swap32_S (salt_bufs[digests_offset].salt_buf[3]); + m0[0] = hc_swap32_S (salt_bufs[DIGESTS_OFFSET].salt_buf[0]); + m0[1] = hc_swap32_S (salt_bufs[DIGESTS_OFFSET].salt_buf[1]); + m0[2] = hc_swap32_S (salt_bufs[DIGESTS_OFFSET].salt_buf[2]); + m0[3] = hc_swap32_S (salt_bufs[DIGESTS_OFFSET].salt_buf[3]); m1[0] = 0; m1[1] = 0; m1[2] = 0; @@ -343,7 +343,7 @@ KERNEL_FQ void m18400_comp (KERN_ATTR_TMPS_ESALT (odf12_tmp_t, odf12_t)) aes256_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); - GLOBAL_AS const odf12_t *es = &esalt_bufs[digests_offset]; + GLOBAL_AS const odf12_t *es = &esalt_bufs[DIGESTS_OFFSET]; u32 iv[4]; diff --git a/OpenCL/m18500_a0-pure.cl b/OpenCL/m18500_a0-pure.cl index e65809bf1..133b5618c 100644 --- a/OpenCL/m18500_a0-pure.cl +++ b/OpenCL/m18500_a0-pure.cl @@ -176,10 +176,10 @@ KERNEL_FQ void m18500_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m18500_a1-pure.cl b/OpenCL/m18500_a1-pure.cl index 84d6b1771..c775a024d 100644 --- a/OpenCL/m18500_a1-pure.cl +++ b/OpenCL/m18500_a1-pure.cl @@ -175,10 +175,10 @@ KERNEL_FQ void m18500_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m18500_a3-pure.cl b/OpenCL/m18500_a3-pure.cl index 5bd489870..d72552dda 100644 --- a/OpenCL/m18500_a3-pure.cl +++ b/OpenCL/m18500_a3-pure.cl @@ -185,10 +185,10 @@ KERNEL_FQ void m18500_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m18600-pure.cl b/OpenCL/m18600-pure.cl index 3ec64083e..061c61bd8 100644 --- a/OpenCL/m18600-pure.cl +++ b/OpenCL/m18600-pure.cl @@ -449,10 +449,10 @@ KERNEL_FQ void m18600_init (KERN_ATTR_TMPS_ESALT (odf11_tmp_t, odf11_t)) u32 m2[4]; u32 m3[4]; - m0[0] = salt_bufs[digests_offset].salt_buf[0]; - m0[1] = salt_bufs[digests_offset].salt_buf[1]; - m0[2] = salt_bufs[digests_offset].salt_buf[2]; - m0[3] = salt_bufs[digests_offset].salt_buf[3]; + m0[0] = salt_bufs[DIGESTS_OFFSET].salt_buf[0]; + m0[1] = salt_bufs[DIGESTS_OFFSET].salt_buf[1]; + m0[2] = salt_bufs[DIGESTS_OFFSET].salt_buf[2]; + m0[3] = salt_bufs[DIGESTS_OFFSET].salt_buf[3]; m1[0] = 0; m1[1] = 0; m1[2] = 0; @@ -697,7 +697,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m18600_comp (KERN_ATTR_TMPS_ S3[i + 3] = R0; } - GLOBAL_AS const odf11_t *es = &esalt_bufs[digests_offset]; + GLOBAL_AS const odf11_t *es = &esalt_bufs[DIGESTS_OFFSET]; u32 ct[2]; diff --git a/OpenCL/m18700_a0-optimized.cl b/OpenCL/m18700_a0-optimized.cl index ba5ccff14..51581de8c 100644 --- a/OpenCL/m18700_a0-optimized.cl +++ b/OpenCL/m18700_a0-optimized.cl @@ -148,7 +148,7 @@ KERNEL_FQ void m18700_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 diff --git a/OpenCL/m18700_a0-pure.cl b/OpenCL/m18700_a0-pure.cl index b7ee45dae..9ea3269b2 100644 --- a/OpenCL/m18700_a0-pure.cl +++ b/OpenCL/m18700_a0-pure.cl @@ -109,7 +109,7 @@ KERNEL_FQ void m18700_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 diff --git a/OpenCL/m18700_a1-optimized.cl b/OpenCL/m18700_a1-optimized.cl index 584cdcd54..027f24423 100644 --- a/OpenCL/m18700_a1-optimized.cl +++ b/OpenCL/m18700_a1-optimized.cl @@ -127,7 +127,7 @@ KERNEL_FQ void m18700_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 diff --git a/OpenCL/m18700_a1-pure.cl b/OpenCL/m18700_a1-pure.cl index 2a34b7911..dafc1b13c 100644 --- a/OpenCL/m18700_a1-pure.cl +++ b/OpenCL/m18700_a1-pure.cl @@ -108,7 +108,7 @@ KERNEL_FQ void m18700_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 diff --git a/OpenCL/m18700_a3-optimized.cl b/OpenCL/m18700_a3-optimized.cl index 9b09e3308..9c1547e2f 100644 --- a/OpenCL/m18700_a3-optimized.cl +++ b/OpenCL/m18700_a3-optimized.cl @@ -117,7 +117,7 @@ DECLSPEC void m18700s (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 @@ -181,7 +181,7 @@ KERNEL_FQ void m18700_m04 (KERN_ATTR_VECTOR ()) * main */ - m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18700_m08 (KERN_ATTR_VECTOR ()) @@ -219,7 +219,7 @@ KERNEL_FQ void m18700_m08 (KERN_ATTR_VECTOR ()) * main */ - m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18700_m16 (KERN_ATTR_VECTOR ()) @@ -257,7 +257,7 @@ KERNEL_FQ void m18700_m16 (KERN_ATTR_VECTOR ()) * main */ - m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18700_s04 (KERN_ATTR_VECTOR ()) @@ -295,7 +295,7 @@ KERNEL_FQ void m18700_s04 (KERN_ATTR_VECTOR ()) * main */ - m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18700_s08 (KERN_ATTR_VECTOR ()) @@ -333,7 +333,7 @@ KERNEL_FQ void m18700_s08 (KERN_ATTR_VECTOR ()) * main */ - m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m18700_s16 (KERN_ATTR_VECTOR ()) @@ -371,5 +371,5 @@ KERNEL_FQ void m18700_s16 (KERN_ATTR_VECTOR ()) * main */ - m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m18700_a3-pure.cl b/OpenCL/m18700_a3-pure.cl index 286656a84..72874e5c2 100644 --- a/OpenCL/m18700_a3-pure.cl +++ b/OpenCL/m18700_a3-pure.cl @@ -134,7 +134,7 @@ KERNEL_FQ void m18700_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], 0, 0, 0 diff --git a/OpenCL/m18800-pure.cl b/OpenCL/m18800-pure.cl index e237b865a..9f764dc68 100644 --- a/OpenCL/m18800-pure.cl +++ b/OpenCL/m18800-pure.cl @@ -37,7 +37,7 @@ KERNEL_FQ void m18800_init (KERN_ATTR_TMPS (bsp_tmp_t)) sha256_init (&ctx); - sha256_update_global_swap (&ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_update_global_swap (&ctx, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m18900-pure.cl b/OpenCL/m18900-pure.cl index 0eaa5d64d..ec7d42f88 100644 --- a/OpenCL/m18900-pure.cl +++ b/OpenCL/m18900-pure.cl @@ -102,7 +102,7 @@ KERNEL_FQ void m18900_init (KERN_ATTR_TMPS_ESALT (android_backup_tmp_t, android_ tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -315,17 +315,17 @@ KERNEL_FQ void m18900_comp (KERN_ATTR_TMPS_ESALT (android_backup_tmp_t, android_ u32 iv[4]; - iv[0] = hc_swap32_S (esalt_bufs[digests_offset].masterkey_blob[16]); - iv[1] = hc_swap32_S (esalt_bufs[digests_offset].masterkey_blob[17]); - iv[2] = hc_swap32_S (esalt_bufs[digests_offset].masterkey_blob[18]); - iv[3] = hc_swap32_S (esalt_bufs[digests_offset].masterkey_blob[19]); + iv[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].masterkey_blob[16]); + iv[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].masterkey_blob[17]); + iv[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].masterkey_blob[18]); + iv[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].masterkey_blob[19]); u32 ct[4]; - ct[0] = hc_swap32_S (esalt_bufs[digests_offset].masterkey_blob[20]); - ct[1] = hc_swap32_S (esalt_bufs[digests_offset].masterkey_blob[21]); - ct[2] = hc_swap32_S (esalt_bufs[digests_offset].masterkey_blob[22]); - ct[3] = hc_swap32_S (esalt_bufs[digests_offset].masterkey_blob[23]); + ct[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].masterkey_blob[20]); + ct[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].masterkey_blob[21]); + ct[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].masterkey_blob[22]); + ct[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].masterkey_blob[23]); u32 pt[4]; @@ -338,9 +338,9 @@ KERNEL_FQ void m18900_comp (KERN_ATTR_TMPS_ESALT (android_backup_tmp_t, android_ if ((pt[2] == 0x0d0d0d0d) && (pt[3] == 0x0d0d0d0d)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m19000-pure.cl b/OpenCL/m19000-pure.cl index d46951049..6a2e8a343 100644 --- a/OpenCL/m19000-pure.cl +++ b/OpenCL/m19000-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m19000_init (KERN_ATTR_TMPS (qnx_md5_tmp_t)) md5_init (&md5_ctx); - md5_update_global (&md5_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&md5_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_update_global (&md5_ctx, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m19100-pure.cl b/OpenCL/m19100-pure.cl index 98a3ae43b..22839b3e9 100644 --- a/OpenCL/m19100-pure.cl +++ b/OpenCL/m19100-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m19100_init (KERN_ATTR_TMPS (qnx_sha256_tmp_t)) sha256_init (&sha256_ctx); - sha256_update_global_swap (&sha256_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&sha256_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_update_global_swap (&sha256_ctx, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m19200-pure.cl b/OpenCL/m19200-pure.cl index a77742ae1..a856109ed 100644 --- a/OpenCL/m19200-pure.cl +++ b/OpenCL/m19200-pure.cl @@ -382,7 +382,7 @@ KERNEL_FQ void m19200_init (KERN_ATTR_TMPS (qnx_sha512_tmp_t)) sha512_init (&sha512_ctx); - sha512_update_global_swap (&sha512_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global_swap (&sha512_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_swap (&sha512_ctx, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m19300_a0-pure.cl b/OpenCL/m19300_a0-pure.cl index e646d1d50..feebd1d57 100644 --- a/OpenCL/m19300_a0-pure.cl +++ b/OpenCL/m19300_a0-pure.cl @@ -43,20 +43,20 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_RULES_ESALT (sha1_double_salt_t)) COPY_PW (pws[gid]); - const int salt2_len = esalt_bufs[digests_offset].salt2_len; + const int salt2_len = esalt_bufs[DIGESTS_OFFSET].salt2_len; u32 s2[64] = { 0 }; for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1) { - s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]); + s2[idx] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt2_buf[idx]); } sha1_ctx_t ctx0; sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len); + sha1_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt1_buf, esalt_bufs[DIGESTS_OFFSET].salt1_len); /** * loop @@ -102,10 +102,10 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_RULES_ESALT (sha1_double_salt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -114,20 +114,20 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_RULES_ESALT (sha1_double_salt_t)) COPY_PW (pws[gid]); - const int salt2_len = esalt_bufs[digests_offset].salt2_len; + const int salt2_len = esalt_bufs[DIGESTS_OFFSET].salt2_len; u32 s2[64] = { 0 }; for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1) { - s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]); + s2[idx] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt2_buf[idx]); } sha1_ctx_t ctx0; sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len); + sha1_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt1_buf, esalt_bufs[DIGESTS_OFFSET].salt1_len); /** * loop diff --git a/OpenCL/m19300_a1-pure.cl b/OpenCL/m19300_a1-pure.cl index f11cbb77f..49ba11554 100644 --- a/OpenCL/m19300_a1-pure.cl +++ b/OpenCL/m19300_a1-pure.cl @@ -39,20 +39,20 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_ESALT (sha1_double_salt_t)) * base */ - const int salt2_len = esalt_bufs[digests_offset].salt2_len; + const int salt2_len = esalt_bufs[DIGESTS_OFFSET].salt2_len; u32 s2[64] = { 0 }; for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1) { - s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]); + s2[idx] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt2_buf[idx]); } sha1_ctx_t ctx0; sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len); + sha1_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt1_buf, esalt_bufs[DIGESTS_OFFSET].salt1_len); sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -96,30 +96,30 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_ESALT (sha1_double_salt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const int salt2_len = esalt_bufs[digests_offset].salt2_len; + const int salt2_len = esalt_bufs[DIGESTS_OFFSET].salt2_len; u32 s2[64] = { 0 }; for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1) { - s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]); + s2[idx] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt2_buf[idx]); } sha1_ctx_t ctx0; sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len); + sha1_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt1_buf, esalt_bufs[DIGESTS_OFFSET].salt1_len); sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m19300_a3-pure.cl b/OpenCL/m19300_a3-pure.cl index ef74edf0d..14502004a 100644 --- a/OpenCL/m19300_a3-pure.cl +++ b/OpenCL/m19300_a3-pure.cl @@ -48,20 +48,20 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_VECTOR_ESALT (sha1_double_salt_t)) w[idx] = pws[gid].i[idx]; } - const int salt2_len = esalt_bufs[digests_offset].salt2_len; + const int salt2_len = esalt_bufs[DIGESTS_OFFSET].salt2_len; u32x s2[64] = { 0 }; for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1) { - s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]); + s2[idx] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt2_buf[idx]); } sha1_ctx_t ctx0; sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len); + sha1_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt1_buf, esalt_bufs[DIGESTS_OFFSET].salt1_len); /** * loop @@ -113,10 +113,10 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_VECTOR_ESALT (sha1_double_salt_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -132,20 +132,20 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_VECTOR_ESALT (sha1_double_salt_t)) w[idx] = pws[gid].i[idx]; } - const int salt2_len = esalt_bufs[digests_offset].salt2_len; + const int salt2_len = esalt_bufs[DIGESTS_OFFSET].salt2_len; u32x s2[64] = { 0 }; for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1) { - s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]); + s2[idx] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].salt2_buf[idx]); } sha1_ctx_t ctx0; sha1_init (&ctx0); - sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len); + sha1_update_global_swap (&ctx0, esalt_bufs[DIGESTS_OFFSET].salt1_buf, esalt_bufs[DIGESTS_OFFSET].salt1_len); /** * loop diff --git a/OpenCL/m19500_a0-pure.cl b/OpenCL/m19500_a0-pure.cl index 5ebfaea0c..dd0114567 100644 --- a/OpenCL/m19500_a0-pure.cl +++ b/OpenCL/m19500_a0-pure.cl @@ -73,9 +73,9 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_RULES_ESALT (devise_hash_t)) COPY_PW (pws[gid]); - const int salt_len = esalt_bufs[digests_offset].salt_len; + const int salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; - const int site_key_len = esalt_bufs[digests_offset].site_key_len; + const int site_key_len = esalt_bufs[DIGESTS_OFFSET].site_key_len; u32 s[64] = { 0 }; u32 k[64] = { 0 }; @@ -84,12 +84,12 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_RULES_ESALT (devise_hash_t)) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (esalt_bufs[SALT_POS].salt_buf[idx]); } for (int i = 0, idx = 0; i < site_key_len; i += 4, idx += 1) { - k[idx] = hc_swap32_S (esalt_bufs[salt_pos].site_key_buf[idx]); + k[idx] = hc_swap32_S (esalt_bufs[SALT_POS].site_key_buf[idx]); } // precompute some stuff @@ -208,10 +208,10 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_RULES_ESALT (devise_hash_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -220,9 +220,9 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_RULES_ESALT (devise_hash_t)) COPY_PW (pws[gid]); - const int salt_len = esalt_bufs[digests_offset].salt_len; + const int salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; - const int site_key_len = esalt_bufs[digests_offset].site_key_len; + const int site_key_len = esalt_bufs[DIGESTS_OFFSET].site_key_len; u32 s[64] = { 0 }; u32 k[64] = { 0 }; @@ -231,12 +231,12 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_RULES_ESALT (devise_hash_t)) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (esalt_bufs[SALT_POS].salt_buf[idx]); } for (int i = 0, idx = 0; i < site_key_len; i += 4, idx += 1) { - k[idx] = hc_swap32_S (esalt_bufs[salt_pos].site_key_buf[idx]); + k[idx] = hc_swap32_S (esalt_bufs[SALT_POS].site_key_buf[idx]); } // precompute some stuff diff --git a/OpenCL/m19500_a1-pure.cl b/OpenCL/m19500_a1-pure.cl index 464f534f4..97bfcff6f 100644 --- a/OpenCL/m19500_a1-pure.cl +++ b/OpenCL/m19500_a1-pure.cl @@ -69,9 +69,9 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_ESALT (devise_hash_t)) * base */ - const int salt_len = esalt_bufs[digests_offset].salt_len; + const int salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; - const int site_key_len = esalt_bufs[digests_offset].site_key_len; + const int site_key_len = esalt_bufs[DIGESTS_OFFSET].site_key_len; u32 s[64] = { 0 }; u32 k[64] = { 0 }; @@ -80,12 +80,12 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_ESALT (devise_hash_t)) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (esalt_bufs[SALT_POS].salt_buf[idx]); } for (int i = 0, idx = 0; i < site_key_len; i += 4, idx += 1) { - k[idx] = hc_swap32_S (esalt_bufs[salt_pos].site_key_buf[idx]); + k[idx] = hc_swap32_S (esalt_bufs[SALT_POS].site_key_buf[idx]); } // precompute some stuff @@ -202,19 +202,19 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_ESALT (devise_hash_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const int salt_len = esalt_bufs[digests_offset].salt_len; + const int salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; - const int site_key_len = esalt_bufs[digests_offset].site_key_len; + const int site_key_len = esalt_bufs[DIGESTS_OFFSET].site_key_len; u32 s[64] = { 0 }; u32 k[64] = { 0 }; @@ -223,12 +223,12 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_ESALT (devise_hash_t)) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (esalt_bufs[SALT_POS].salt_buf[idx]); } for (int i = 0, idx = 0; i < site_key_len; i += 4, idx += 1) { - k[idx] = hc_swap32_S (esalt_bufs[salt_pos].site_key_buf[idx]); + k[idx] = hc_swap32_S (esalt_bufs[SALT_POS].site_key_buf[idx]); } // precompute some stuff diff --git a/OpenCL/m19500_a3-pure.cl b/OpenCL/m19500_a3-pure.cl index a8f0fa8cd..13c8990f6 100644 --- a/OpenCL/m19500_a3-pure.cl +++ b/OpenCL/m19500_a3-pure.cl @@ -78,9 +78,9 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_VECTOR_ESALT (devise_hash_t)) w[idx] = pws[gid].i[idx]; } - const int salt_len = esalt_bufs[digests_offset].salt_len; + const int salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; - const int site_key_len = esalt_bufs[digests_offset].site_key_len; + const int site_key_len = esalt_bufs[DIGESTS_OFFSET].site_key_len; u32 s[64] = { 0 }; u32 k[64] = { 0 }; @@ -89,12 +89,12 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_VECTOR_ESALT (devise_hash_t)) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (esalt_bufs[SALT_POS].salt_buf[idx]); } for (int i = 0, idx = 0; i < site_key_len; i += 4, idx += 1) { - k[idx] = hc_swap32_S (esalt_bufs[salt_pos].site_key_buf[idx]); + k[idx] = hc_swap32_S (esalt_bufs[SALT_POS].site_key_buf[idx]); } // precompute some stuff @@ -217,10 +217,10 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_VECTOR_ESALT (devise_hash_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -236,9 +236,9 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_VECTOR_ESALT (devise_hash_t)) w[idx] = pws[gid].i[idx]; } - const int salt_len = esalt_bufs[digests_offset].salt_len; + const int salt_len = esalt_bufs[DIGESTS_OFFSET].salt_len; - const int site_key_len = esalt_bufs[digests_offset].site_key_len; + const int site_key_len = esalt_bufs[DIGESTS_OFFSET].site_key_len; u32 s[64] = { 0 }; u32 k[64] = { 0 }; @@ -247,12 +247,12 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_VECTOR_ESALT (devise_hash_t)) for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (esalt_bufs[SALT_POS].salt_buf[idx]); } for (int i = 0, idx = 0; i < site_key_len; i += 4, idx += 1) { - k[idx] = hc_swap32_S (esalt_bufs[salt_pos].site_key_buf[idx]); + k[idx] = hc_swap32_S (esalt_bufs[SALT_POS].site_key_buf[idx]); } // precompute some stuff diff --git a/OpenCL/m19600-pure.cl b/OpenCL/m19600-pure.cl index 39219af3f..8604921e0 100644 --- a/OpenCL/m19600-pure.cl +++ b/OpenCL/m19600-pure.cl @@ -147,7 +147,7 @@ KERNEL_FQ void m19600_init (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[digests_offset].account_info, esalt_bufs[digests_offset].account_info_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].account_info, esalt_bufs[DIGESTS_OFFSET].account_info_len); for (u32 i = 0, j = 1; i < 4; i += 5, j += 1) { @@ -446,29 +446,29 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t u32 decrypted_block[4]; - first_blocks[0] = esalt_bufs[digests_offset].edata2[0]; - first_blocks[1] = esalt_bufs[digests_offset].edata2[1]; - first_blocks[2] = esalt_bufs[digests_offset].edata2[2]; - first_blocks[3] = esalt_bufs[digests_offset].edata2[3]; + first_blocks[0] = esalt_bufs[DIGESTS_OFFSET].edata2[0]; + first_blocks[1] = esalt_bufs[DIGESTS_OFFSET].edata2[1]; + first_blocks[2] = esalt_bufs[DIGESTS_OFFSET].edata2[2]; + first_blocks[3] = esalt_bufs[DIGESTS_OFFSET].edata2[3]; - first_blocks[4] = esalt_bufs[digests_offset].edata2[4]; // possible ASN1 structs - first_blocks[5] = esalt_bufs[digests_offset].edata2[5]; - first_blocks[6] = esalt_bufs[digests_offset].edata2[6]; // possible ASN1 structs - first_blocks[7] = esalt_bufs[digests_offset].edata2[7]; + first_blocks[4] = esalt_bufs[DIGESTS_OFFSET].edata2[4]; // possible ASN1 structs + first_blocks[5] = esalt_bufs[DIGESTS_OFFSET].edata2[5]; + first_blocks[6] = esalt_bufs[DIGESTS_OFFSET].edata2[6]; // possible ASN1 structs + first_blocks[7] = esalt_bufs[DIGESTS_OFFSET].edata2[7]; /* we will decrypt them here in order to be able to compute hmac directly if ASN1 structs were to be found */ - first_blocks[8] = esalt_bufs[digests_offset].edata2[8]; - first_blocks[9] = esalt_bufs[digests_offset].edata2[9]; - first_blocks[10] = esalt_bufs[digests_offset].edata2[10]; - first_blocks[11] = esalt_bufs[digests_offset].edata2[11]; + first_blocks[8] = esalt_bufs[DIGESTS_OFFSET].edata2[8]; + first_blocks[9] = esalt_bufs[DIGESTS_OFFSET].edata2[9]; + first_blocks[10] = esalt_bufs[DIGESTS_OFFSET].edata2[10]; + first_blocks[11] = esalt_bufs[DIGESTS_OFFSET].edata2[11]; - first_blocks[12] = esalt_bufs[digests_offset].edata2[12]; - first_blocks[13] = esalt_bufs[digests_offset].edata2[13]; - first_blocks[14] = esalt_bufs[digests_offset].edata2[14]; - first_blocks[15] = esalt_bufs[digests_offset].edata2[15]; + first_blocks[12] = esalt_bufs[DIGESTS_OFFSET].edata2[12]; + first_blocks[13] = esalt_bufs[DIGESTS_OFFSET].edata2[13]; + first_blocks[14] = esalt_bufs[DIGESTS_OFFSET].edata2[14]; + first_blocks[15] = esalt_bufs[DIGESTS_OFFSET].edata2[15]; u32 w0[4]; u32 w1[4]; @@ -505,7 +505,7 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t // now we decrypt all the ticket to verify checksum int block_position; - int edata2_len = esalt_bufs[digests_offset].edata2_len; + int edata2_len = esalt_bufs[DIGESTS_OFFSET].edata2_len; int edata2_left; @@ -580,22 +580,22 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t // first 4 blocks are already decrypted for (edata2_left = need - 64; edata2_left >= 64; edata2_left -= 64) { - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; - block[4] = esalt_bufs[digests_offset].edata2[block_position + 4]; - block[5] = esalt_bufs[digests_offset].edata2[block_position + 5]; - block[6] = esalt_bufs[digests_offset].edata2[block_position + 6]; - block[7] = esalt_bufs[digests_offset].edata2[block_position + 7]; - block[8] = esalt_bufs[digests_offset].edata2[block_position + 8]; - block[9] = esalt_bufs[digests_offset].edata2[block_position + 9]; - block[10] = esalt_bufs[digests_offset].edata2[block_position + 10]; - block[11] = esalt_bufs[digests_offset].edata2[block_position + 11]; - block[12] = esalt_bufs[digests_offset].edata2[block_position + 12]; - block[13] = esalt_bufs[digests_offset].edata2[block_position + 13]; - block[14] = esalt_bufs[digests_offset].edata2[block_position + 14]; - block[15] = esalt_bufs[digests_offset].edata2[block_position + 15]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; + block[4] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 4]; + block[5] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 5]; + block[6] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 6]; + block[7] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 7]; + block[8] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 8]; + block[9] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 9]; + block[10] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 10]; + block[11] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 11]; + block[12] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 12]; + block[13] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 13]; + block[14] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 14]; + block[15] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 15]; aes128_decrypt_cbc (aes_cts_decrypt_ks, block, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -632,10 +632,10 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t if (edata2_left == 16) { - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; aes128_decrypt_cbc (aes_cts_decrypt_ks, block, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -665,14 +665,14 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t } else if (edata2_left == 32) { - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; - block[4] = esalt_bufs[digests_offset].edata2[block_position + 4]; - block[5] = esalt_bufs[digests_offset].edata2[block_position + 5]; - block[6] = esalt_bufs[digests_offset].edata2[block_position + 6]; - block[7] = esalt_bufs[digests_offset].edata2[block_position + 7]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; + block[4] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 4]; + block[5] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 5]; + block[6] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 6]; + block[7] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 7]; aes128_decrypt_cbc (aes_cts_decrypt_ks, block, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -704,18 +704,18 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t } else if (edata2_left == 48) { - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; - block[4] = esalt_bufs[digests_offset].edata2[block_position + 4]; - block[5] = esalt_bufs[digests_offset].edata2[block_position + 5]; - block[6] = esalt_bufs[digests_offset].edata2[block_position + 6]; - block[7] = esalt_bufs[digests_offset].edata2[block_position + 7]; - block[8] = esalt_bufs[digests_offset].edata2[block_position + 8]; - block[9] = esalt_bufs[digests_offset].edata2[block_position + 9]; - block[10] = esalt_bufs[digests_offset].edata2[block_position + 10]; - block[11] = esalt_bufs[digests_offset].edata2[block_position + 11]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; + block[4] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 4]; + block[5] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 5]; + block[6] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 6]; + block[7] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 7]; + block[8] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 8]; + block[9] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 9]; + block[10] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 10]; + block[11] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 11]; aes128_decrypt_cbc (aes_cts_decrypt_ks, block, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -756,16 +756,16 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t // this is block n-2, it will be xored with the n-1 block later crafted u32 last_block_cbc[4]; - last_block_cbc[0] = esalt_bufs[digests_offset].edata2[last_block_cbc_position + 0]; - last_block_cbc[1] = esalt_bufs[digests_offset].edata2[last_block_cbc_position + 1]; - last_block_cbc[2] = esalt_bufs[digests_offset].edata2[last_block_cbc_position + 2]; - last_block_cbc[3] = esalt_bufs[digests_offset].edata2[last_block_cbc_position + 3]; + last_block_cbc[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_cbc_position + 0]; + last_block_cbc[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_cbc_position + 1]; + last_block_cbc[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_cbc_position + 2]; + last_block_cbc[3] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_cbc_position + 3]; // n-1 block is decrypted separately from the previous blocks which were cbc decrypted - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; aes128_decrypt (aes_cts_decrypt_ks, block, decrypted_block, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -804,7 +804,7 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t { case 0: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; u32 mask = (0xffffffff >> ((4 - last_block_size) * 8)); @@ -819,7 +819,7 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t case 1: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; if (shift == 0) { @@ -833,7 +833,7 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t } else { - last_block[1] = esalt_bufs[digests_offset].edata2[last_block_position + 1]; + last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); @@ -852,8 +852,8 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t case 2: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; - last_block[1] = esalt_bufs[digests_offset].edata2[last_block_position + 1]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; + last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; if (shift == 0) { @@ -870,7 +870,7 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t } else { - last_block[2] = esalt_bufs[digests_offset].edata2[last_block_position + 2]; + last_block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 2]; u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); @@ -891,9 +891,9 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t case 3: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; - last_block[1] = esalt_bufs[digests_offset].edata2[last_block_position + 1]; - last_block[2] = esalt_bufs[digests_offset].edata2[last_block_position + 2]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; + last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; + last_block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 2]; if (shift == 0) { @@ -912,7 +912,7 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t } else { - last_block[3] = esalt_bufs[digests_offset].edata2[last_block_position + 3]; + last_block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 3]; u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); @@ -935,10 +935,10 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t case 4: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; - last_block[1] = esalt_bufs[digests_offset].edata2[last_block_position + 1]; - last_block[2] = esalt_bufs[digests_offset].edata2[last_block_position + 2]; - last_block[3] = esalt_bufs[digests_offset].edata2[last_block_position + 3]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; + last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; + last_block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 2]; + last_block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 3]; n_1_crafted[0] = last_block[0]; n_1_crafted[1] = last_block[1]; @@ -993,14 +993,14 @@ KERNEL_FQ void m19600_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_17_tmp_t, krb5tgs_17_t sha1_hmac_final (&sha1_hmac_ctx); - if (sha1_hmac_ctx.opad.h[0] == esalt_bufs[digests_offset].checksum[0] - && sha1_hmac_ctx.opad.h[1] == esalt_bufs[digests_offset].checksum[1] - && sha1_hmac_ctx.opad.h[2] == esalt_bufs[digests_offset].checksum[2]) + if (sha1_hmac_ctx.opad.h[0] == esalt_bufs[DIGESTS_OFFSET].checksum[0] + && sha1_hmac_ctx.opad.h[1] == esalt_bufs[DIGESTS_OFFSET].checksum[1] + && sha1_hmac_ctx.opad.h[2] == esalt_bufs[DIGESTS_OFFSET].checksum[2]) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { #define il_pos 0 - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m19700-pure.cl b/OpenCL/m19700-pure.cl index eea054590..9cc74c490 100644 --- a/OpenCL/m19700-pure.cl +++ b/OpenCL/m19700-pure.cl @@ -147,7 +147,7 @@ KERNEL_FQ void m19700_init (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[digests_offset].account_info, esalt_bufs[digests_offset].account_info_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].account_info, esalt_bufs[DIGESTS_OFFSET].account_info_len); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -506,29 +506,29 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t u32 decrypted_block[8]; - first_blocks[0] = esalt_bufs[digests_offset].edata2[0]; - first_blocks[1] = esalt_bufs[digests_offset].edata2[1]; - first_blocks[2] = esalt_bufs[digests_offset].edata2[2]; - first_blocks[3] = esalt_bufs[digests_offset].edata2[3]; + first_blocks[0] = esalt_bufs[DIGESTS_OFFSET].edata2[0]; + first_blocks[1] = esalt_bufs[DIGESTS_OFFSET].edata2[1]; + first_blocks[2] = esalt_bufs[DIGESTS_OFFSET].edata2[2]; + first_blocks[3] = esalt_bufs[DIGESTS_OFFSET].edata2[3]; - first_blocks[4] = esalt_bufs[digests_offset].edata2[4]; // possible ASN1 structs - first_blocks[5] = esalt_bufs[digests_offset].edata2[5]; - first_blocks[6] = esalt_bufs[digests_offset].edata2[6]; // possible ASN1 structs - first_blocks[7] = esalt_bufs[digests_offset].edata2[7]; + first_blocks[4] = esalt_bufs[DIGESTS_OFFSET].edata2[4]; // possible ASN1 structs + first_blocks[5] = esalt_bufs[DIGESTS_OFFSET].edata2[5]; + first_blocks[6] = esalt_bufs[DIGESTS_OFFSET].edata2[6]; // possible ASN1 structs + first_blocks[7] = esalt_bufs[DIGESTS_OFFSET].edata2[7]; /* we will decrypt them here in order to be able to compute hmac directly if ASN1 structs were to be found */ - first_blocks[8] = esalt_bufs[digests_offset].edata2[8]; - first_blocks[9] = esalt_bufs[digests_offset].edata2[9]; - first_blocks[10] = esalt_bufs[digests_offset].edata2[10]; - first_blocks[11] = esalt_bufs[digests_offset].edata2[11]; + first_blocks[8] = esalt_bufs[DIGESTS_OFFSET].edata2[8]; + first_blocks[9] = esalt_bufs[DIGESTS_OFFSET].edata2[9]; + first_blocks[10] = esalt_bufs[DIGESTS_OFFSET].edata2[10]; + first_blocks[11] = esalt_bufs[DIGESTS_OFFSET].edata2[11]; - first_blocks[12] = esalt_bufs[digests_offset].edata2[12]; - first_blocks[13] = esalt_bufs[digests_offset].edata2[13]; - first_blocks[14] = esalt_bufs[digests_offset].edata2[14]; - first_blocks[15] = esalt_bufs[digests_offset].edata2[15]; + first_blocks[12] = esalt_bufs[DIGESTS_OFFSET].edata2[12]; + first_blocks[13] = esalt_bufs[DIGESTS_OFFSET].edata2[13]; + first_blocks[14] = esalt_bufs[DIGESTS_OFFSET].edata2[14]; + first_blocks[15] = esalt_bufs[DIGESTS_OFFSET].edata2[15]; u32 w0[4]; u32 w1[4]; @@ -582,7 +582,7 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t int block_position; - int edata2_len = esalt_bufs[digests_offset].edata2_len; + int edata2_len = esalt_bufs[DIGESTS_OFFSET].edata2_len; int edata2_left; @@ -642,22 +642,22 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t // first 4 blocks are already decrypted for (edata2_left = need - 64; edata2_left >= 64; edata2_left -= 64) { - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; - block[4] = esalt_bufs[digests_offset].edata2[block_position + 4]; - block[5] = esalt_bufs[digests_offset].edata2[block_position + 5]; - block[6] = esalt_bufs[digests_offset].edata2[block_position + 6]; - block[7] = esalt_bufs[digests_offset].edata2[block_position + 7]; - block[8] = esalt_bufs[digests_offset].edata2[block_position + 8]; - block[9] = esalt_bufs[digests_offset].edata2[block_position + 9]; - block[10] = esalt_bufs[digests_offset].edata2[block_position + 10]; - block[11] = esalt_bufs[digests_offset].edata2[block_position + 11]; - block[12] = esalt_bufs[digests_offset].edata2[block_position + 12]; - block[13] = esalt_bufs[digests_offset].edata2[block_position + 13]; - block[14] = esalt_bufs[digests_offset].edata2[block_position + 14]; - block[15] = esalt_bufs[digests_offset].edata2[block_position + 15]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; + block[4] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 4]; + block[5] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 5]; + block[6] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 6]; + block[7] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 7]; + block[8] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 8]; + block[9] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 9]; + block[10] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 10]; + block[11] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 11]; + block[12] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 12]; + block[13] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 13]; + block[14] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 14]; + block[15] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 15]; aes256_decrypt_cbc (aes_cts_decrypt_ks, block, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -695,10 +695,10 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t if (edata2_left == 16) { - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; aes256_decrypt_cbc (aes_cts_decrypt_ks, block, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -728,14 +728,14 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t } else if (edata2_left == 32) { - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; - block[4] = esalt_bufs[digests_offset].edata2[block_position + 4]; - block[5] = esalt_bufs[digests_offset].edata2[block_position + 5]; - block[6] = esalt_bufs[digests_offset].edata2[block_position + 6]; - block[7] = esalt_bufs[digests_offset].edata2[block_position + 7]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; + block[4] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 4]; + block[5] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 5]; + block[6] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 6]; + block[7] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 7]; aes256_decrypt_cbc (aes_cts_decrypt_ks, block, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -767,18 +767,18 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t } else if (edata2_left == 48) { - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; - block[4] = esalt_bufs[digests_offset].edata2[block_position + 4]; - block[5] = esalt_bufs[digests_offset].edata2[block_position + 5]; - block[6] = esalt_bufs[digests_offset].edata2[block_position + 6]; - block[7] = esalt_bufs[digests_offset].edata2[block_position + 7]; - block[8] = esalt_bufs[digests_offset].edata2[block_position + 8]; - block[9] = esalt_bufs[digests_offset].edata2[block_position + 9]; - block[10] = esalt_bufs[digests_offset].edata2[block_position + 10]; - block[11] = esalt_bufs[digests_offset].edata2[block_position + 11]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; + block[4] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 4]; + block[5] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 5]; + block[6] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 6]; + block[7] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 7]; + block[8] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 8]; + block[9] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 9]; + block[10] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 10]; + block[11] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 11]; aes256_decrypt_cbc (aes_cts_decrypt_ks, block, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -819,16 +819,16 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t // this is block n-2, it will be xored with the n-1 block later crafted u32 last_block_cbc[4]; - last_block_cbc[0] = esalt_bufs[digests_offset].edata2[last_block_cbc_position + 0]; - last_block_cbc[1] = esalt_bufs[digests_offset].edata2[last_block_cbc_position + 1]; - last_block_cbc[2] = esalt_bufs[digests_offset].edata2[last_block_cbc_position + 2]; - last_block_cbc[3] = esalt_bufs[digests_offset].edata2[last_block_cbc_position + 3]; + last_block_cbc[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_cbc_position + 0]; + last_block_cbc[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_cbc_position + 1]; + last_block_cbc[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_cbc_position + 2]; + last_block_cbc[3] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_cbc_position + 3]; // n-1 block is decrypted separately from the previous blocks which were cbc decrypted - block[0] = esalt_bufs[digests_offset].edata2[block_position + 0]; - block[1] = esalt_bufs[digests_offset].edata2[block_position + 1]; - block[2] = esalt_bufs[digests_offset].edata2[block_position + 2]; - block[3] = esalt_bufs[digests_offset].edata2[block_position + 3]; + block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 0]; + block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 1]; + block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 2]; + block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[block_position + 3]; aes256_decrypt (aes_cts_decrypt_ks, block, decrypted_block, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -867,7 +867,7 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t { case 0: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; u32 mask = (0xffffffff >> ((4 - last_block_size) * 8)); @@ -882,7 +882,7 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t case 1: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; if (shift == 0) { @@ -896,7 +896,7 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t } else { - last_block[1] = esalt_bufs[digests_offset].edata2[last_block_position + 1]; + last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); @@ -915,8 +915,8 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t case 2: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; - last_block[1] = esalt_bufs[digests_offset].edata2[last_block_position + 1]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; + last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; if (shift == 0) { @@ -933,7 +933,7 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t } else { - last_block[2] = esalt_bufs[digests_offset].edata2[last_block_position + 2]; + last_block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 2]; u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); @@ -954,9 +954,9 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t case 3: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; - last_block[1] = esalt_bufs[digests_offset].edata2[last_block_position + 1]; - last_block[2] = esalt_bufs[digests_offset].edata2[last_block_position + 2]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; + last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; + last_block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 2]; if (shift == 0) { @@ -975,7 +975,7 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t } else { - last_block[3] = esalt_bufs[digests_offset].edata2[last_block_position + 3]; + last_block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 3]; u32 mask = (0xffffffff >> ((4 - (last_block_size % 4)) * 8)); @@ -998,10 +998,10 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t case 4: - last_block[0] = esalt_bufs[digests_offset].edata2[last_block_position + 0]; - last_block[1] = esalt_bufs[digests_offset].edata2[last_block_position + 1]; - last_block[2] = esalt_bufs[digests_offset].edata2[last_block_position + 2]; - last_block[3] = esalt_bufs[digests_offset].edata2[last_block_position + 3]; + last_block[0] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 0]; + last_block[1] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 1]; + last_block[2] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 2]; + last_block[3] = esalt_bufs[DIGESTS_OFFSET].edata2[last_block_position + 3]; n_1_crafted[0] = last_block[0]; n_1_crafted[1] = last_block[1]; @@ -1057,14 +1057,14 @@ KERNEL_FQ void m19700_comp (KERN_ATTR_TMPS_ESALT (krb5tgs_18_tmp_t, krb5tgs_18_t sha1_hmac_final (&sha1_hmac_ctx); - if (sha1_hmac_ctx.opad.h[0] == esalt_bufs[digests_offset].checksum[0] - && sha1_hmac_ctx.opad.h[1] == esalt_bufs[digests_offset].checksum[1] - && sha1_hmac_ctx.opad.h[2] == esalt_bufs[digests_offset].checksum[2]) + if (sha1_hmac_ctx.opad.h[0] == esalt_bufs[DIGESTS_OFFSET].checksum[0] + && sha1_hmac_ctx.opad.h[1] == esalt_bufs[DIGESTS_OFFSET].checksum[1] + && sha1_hmac_ctx.opad.h[2] == esalt_bufs[DIGESTS_OFFSET].checksum[2]) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { #define il_pos 0 - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m19800-pure.cl b/OpenCL/m19800-pure.cl index bcadc5a10..9959b86b8 100644 --- a/OpenCL/m19800-pure.cl +++ b/OpenCL/m19800-pure.cl @@ -147,7 +147,7 @@ KERNEL_FQ void m19800_init (KERN_ATTR_TMPS_ESALT (krb5pa_17_tmp_t, krb5pa_17_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[digests_offset].account_info, esalt_bufs[digests_offset].account_info_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].account_info, esalt_bufs[DIGESTS_OFFSET].account_info_len); for (u32 i = 0, j = 1; i < 4; i += 5, j += 1) { @@ -424,16 +424,16 @@ KERNEL_FQ void m19800_comp (KERN_ATTR_TMPS_ESALT (krb5pa_17_tmp_t, krb5pa_17_t)) u32 decrypted_block[4]; // c_0 - enc_blocks[0] = esalt_bufs[digests_offset].enc_timestamp[0]; - enc_blocks[1] = esalt_bufs[digests_offset].enc_timestamp[1]; - enc_blocks[2] = esalt_bufs[digests_offset].enc_timestamp[2]; - enc_blocks[3] = esalt_bufs[digests_offset].enc_timestamp[3]; + enc_blocks[0] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[0]; + enc_blocks[1] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[1]; + enc_blocks[2] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[2]; + enc_blocks[3] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[3]; // c_1 aka c_n-1 since there are guaranteed to be exactly 3 blocks - enc_blocks[4] = esalt_bufs[digests_offset].enc_timestamp[4]; - enc_blocks[5] = esalt_bufs[digests_offset].enc_timestamp[5]; - enc_blocks[6] = esalt_bufs[digests_offset].enc_timestamp[6]; - enc_blocks[7] = esalt_bufs[digests_offset].enc_timestamp[7]; + enc_blocks[4] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[4]; + enc_blocks[5] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[5]; + enc_blocks[6] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[6]; + enc_blocks[7] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[7]; u32 w0[4]; u32 w1[4]; @@ -445,10 +445,10 @@ KERNEL_FQ void m19800_comp (KERN_ATTR_TMPS_ESALT (krb5pa_17_tmp_t, krb5pa_17_t)) AES128_set_decrypt_key (aes_cts_decrypt_ks, ke, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); // Our first decryption is the last block (currently in c_n-1) using the first portion of (c_n) as our IV, this allows us to get plaintext in one crypto operation - aes_iv[0] = esalt_bufs[digests_offset].enc_timestamp[ 8]; - aes_iv[1] = esalt_bufs[digests_offset].enc_timestamp[ 9]; - aes_iv[2] = esalt_bufs[digests_offset].enc_timestamp[10]; - aes_iv[3] = esalt_bufs[digests_offset].enc_timestamp[11]; + aes_iv[0] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[ 8]; + aes_iv[1] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[ 9]; + aes_iv[2] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[10]; + aes_iv[3] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[11]; aes128_decrypt_cbc (aes_cts_decrypt_ks, enc_blocks + 4, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -468,7 +468,7 @@ KERNEL_FQ void m19800_comp (KERN_ATTR_TMPS_ESALT (krb5pa_17_tmp_t, krb5pa_17_t)) w0[2] = decrypted_block[2]; w0[3] = decrypted_block[3]; - int enc_timestamp_len = esalt_bufs[digests_offset].enc_timestamp_len; + int enc_timestamp_len = esalt_bufs[DIGESTS_OFFSET].enc_timestamp_len; int last_word_position = enc_timestamp_len / 4; // New c_1, join c_n with result of the decrypted c_n-1 @@ -478,7 +478,7 @@ KERNEL_FQ void m19800_comp (KERN_ATTR_TMPS_ESALT (krb5pa_17_tmp_t, krb5pa_17_t)) { if (last_word_position > last_block_iter + 4) { - enc_blocks[last_block_iter] = esalt_bufs[digests_offset].enc_timestamp[last_block_iter + 4]; + enc_blocks[last_block_iter] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[last_block_iter + 4]; } else if (last_word_position == last_block_iter + 4) { @@ -486,13 +486,13 @@ KERNEL_FQ void m19800_comp (KERN_ATTR_TMPS_ESALT (krb5pa_17_tmp_t, krb5pa_17_t)) switch (enc_timestamp_len % 4) { case 1: - enc_blocks[last_block_iter] = (esalt_bufs[digests_offset].enc_timestamp[last_block_iter + 4] & 0x000000ff) | (w0[last_block_iter - 4] & 0xffffff00); + enc_blocks[last_block_iter] = (esalt_bufs[DIGESTS_OFFSET].enc_timestamp[last_block_iter + 4] & 0x000000ff) | (w0[last_block_iter - 4] & 0xffffff00); break; case 2: - enc_blocks[last_block_iter] = (esalt_bufs[digests_offset].enc_timestamp[last_block_iter + 4] & 0x0000ffff) | (w0[last_block_iter - 4] & 0xffff0000); + enc_blocks[last_block_iter] = (esalt_bufs[DIGESTS_OFFSET].enc_timestamp[last_block_iter + 4] & 0x0000ffff) | (w0[last_block_iter - 4] & 0xffff0000); break; case 3: - enc_blocks[last_block_iter] = (esalt_bufs[digests_offset].enc_timestamp[last_block_iter + 4] & 0x00ffffff) | (w0[last_block_iter - 4] & 0xff000000); + enc_blocks[last_block_iter] = (esalt_bufs[DIGESTS_OFFSET].enc_timestamp[last_block_iter + 4] & 0x00ffffff) | (w0[last_block_iter - 4] & 0xff000000); break; default: enc_blocks[last_block_iter] = w0[last_block_iter - 4]; @@ -505,10 +505,10 @@ KERNEL_FQ void m19800_comp (KERN_ATTR_TMPS_ESALT (krb5pa_17_tmp_t, krb5pa_17_t)) } // c_2 aka c_n which is now equal to the old c_n-1 - enc_blocks[8] = esalt_bufs[digests_offset].enc_timestamp[4]; - enc_blocks[9] = esalt_bufs[digests_offset].enc_timestamp[5]; - enc_blocks[10] = esalt_bufs[digests_offset].enc_timestamp[6]; - enc_blocks[11] = esalt_bufs[digests_offset].enc_timestamp[7]; + enc_blocks[8] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[4]; + enc_blocks[9] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[5]; + enc_blocks[10] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[6]; + enc_blocks[11] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[7]; // Go ahead and decrypt all blocks now as a normal AES CBC operation aes_iv[0] = 0; aes_iv[1] = 0; @@ -605,15 +605,15 @@ KERNEL_FQ void m19800_comp (KERN_ATTR_TMPS_ESALT (krb5pa_17_tmp_t, krb5pa_17_t)) sha1_hmac_final (&sha1_hmac_ctx); // Compare checksum - if ((sha1_hmac_ctx.opad.h[0] == esalt_bufs[digests_offset].checksum[0]) - && (sha1_hmac_ctx.opad.h[1] == esalt_bufs[digests_offset].checksum[1]) - && (sha1_hmac_ctx.opad.h[2] == esalt_bufs[digests_offset].checksum[2])) + if ((sha1_hmac_ctx.opad.h[0] == esalt_bufs[DIGESTS_OFFSET].checksum[0]) + && (sha1_hmac_ctx.opad.h[1] == esalt_bufs[DIGESTS_OFFSET].checksum[1]) + && (sha1_hmac_ctx.opad.h[2] == esalt_bufs[DIGESTS_OFFSET].checksum[2])) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { #define il_pos 0 - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m19900-pure.cl b/OpenCL/m19900-pure.cl index ed646ead9..cf1fdd685 100644 --- a/OpenCL/m19900-pure.cl +++ b/OpenCL/m19900-pure.cl @@ -147,7 +147,7 @@ KERNEL_FQ void m19900_init (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[digests_offset].account_info, esalt_bufs[digests_offset].account_info_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].account_info, esalt_bufs[DIGESTS_OFFSET].account_info_len); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -453,16 +453,16 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t)) u32 decrypted_block[4]; // c_0 - enc_blocks[0] = esalt_bufs[digests_offset].enc_timestamp[0]; - enc_blocks[1] = esalt_bufs[digests_offset].enc_timestamp[1]; - enc_blocks[2] = esalt_bufs[digests_offset].enc_timestamp[2]; - enc_blocks[3] = esalt_bufs[digests_offset].enc_timestamp[3]; + enc_blocks[0] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[0]; + enc_blocks[1] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[1]; + enc_blocks[2] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[2]; + enc_blocks[3] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[3]; // c_1 aka c_n-1 since there are guaranteed to be exactly 3 blocks - enc_blocks[4] = esalt_bufs[digests_offset].enc_timestamp[4]; - enc_blocks[5] = esalt_bufs[digests_offset].enc_timestamp[5]; - enc_blocks[6] = esalt_bufs[digests_offset].enc_timestamp[6]; - enc_blocks[7] = esalt_bufs[digests_offset].enc_timestamp[7]; + enc_blocks[4] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[4]; + enc_blocks[5] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[5]; + enc_blocks[6] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[6]; + enc_blocks[7] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[7]; u32 w0[4]; u32 w1[4]; @@ -474,10 +474,10 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t)) AES256_set_decrypt_key (aes_cts_decrypt_ks, ke, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); // Our first decryption is the last block (currently in c_n-1) using the first portion of (c_n) as our IV, this allows us to get plaintext in one crypto operation - aes_iv[0] = esalt_bufs[digests_offset].enc_timestamp[8]; - aes_iv[1] = esalt_bufs[digests_offset].enc_timestamp[9]; - aes_iv[2] = esalt_bufs[digests_offset].enc_timestamp[10]; - aes_iv[3] = esalt_bufs[digests_offset].enc_timestamp[11]; + aes_iv[0] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[8]; + aes_iv[1] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[9]; + aes_iv[2] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[10]; + aes_iv[3] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[11]; aes256_decrypt_cbc (aes_cts_decrypt_ks, enc_blocks + 4, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -497,7 +497,7 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t)) w0[2] = decrypted_block[2]; w0[3] = decrypted_block[3]; - int enc_timestamp_len = esalt_bufs[digests_offset].enc_timestamp_len; + int enc_timestamp_len = esalt_bufs[DIGESTS_OFFSET].enc_timestamp_len; int last_word_position = enc_timestamp_len / 4; // New c_1, join c_n with result of the decrypted c_n-1 @@ -507,7 +507,7 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t)) { if (last_word_position > last_block_iter + 4) { - enc_blocks[last_block_iter] = esalt_bufs[digests_offset].enc_timestamp[last_block_iter + 4]; + enc_blocks[last_block_iter] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[last_block_iter + 4]; } else if (last_word_position == last_block_iter + 4) { @@ -515,13 +515,13 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t)) switch (enc_timestamp_len % 4) { case 1: - enc_blocks[last_block_iter] = (esalt_bufs[digests_offset].enc_timestamp[last_block_iter + 4] & 0x000000ff) | (w0[last_block_iter - 4] & 0xffffff00); + enc_blocks[last_block_iter] = (esalt_bufs[DIGESTS_OFFSET].enc_timestamp[last_block_iter + 4] & 0x000000ff) | (w0[last_block_iter - 4] & 0xffffff00); break; case 2: - enc_blocks[last_block_iter] = (esalt_bufs[digests_offset].enc_timestamp[last_block_iter + 4] & 0x0000ffff) | (w0[last_block_iter - 4] & 0xffff0000); + enc_blocks[last_block_iter] = (esalt_bufs[DIGESTS_OFFSET].enc_timestamp[last_block_iter + 4] & 0x0000ffff) | (w0[last_block_iter - 4] & 0xffff0000); break; case 3: - enc_blocks[last_block_iter] = (esalt_bufs[digests_offset].enc_timestamp[last_block_iter + 4] & 0x00ffffff) | (w0[last_block_iter - 4] & 0xff000000); + enc_blocks[last_block_iter] = (esalt_bufs[DIGESTS_OFFSET].enc_timestamp[last_block_iter + 4] & 0x00ffffff) | (w0[last_block_iter - 4] & 0xff000000); break; default: enc_blocks[last_block_iter] = w0[last_block_iter - 4]; @@ -534,10 +534,10 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t)) } // c_2 aka c_n which is now equal to the old c_n-1 - enc_blocks[ 8] = esalt_bufs[digests_offset].enc_timestamp[4]; - enc_blocks[ 9] = esalt_bufs[digests_offset].enc_timestamp[5]; - enc_blocks[10] = esalt_bufs[digests_offset].enc_timestamp[6]; - enc_blocks[11] = esalt_bufs[digests_offset].enc_timestamp[7]; + enc_blocks[ 8] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[4]; + enc_blocks[ 9] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[5]; + enc_blocks[10] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[6]; + enc_blocks[11] = esalt_bufs[DIGESTS_OFFSET].enc_timestamp[7]; // Go ahead and decrypt all blocks now as a normal AES CBC operation aes_iv[0] = 0; @@ -647,15 +647,15 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t)) sha1_hmac_final (&sha1_hmac_ctx); // Compare checksum - if ((sha1_hmac_ctx.opad.h[0] == esalt_bufs[digests_offset].checksum[0]) - && (sha1_hmac_ctx.opad.h[1] == esalt_bufs[digests_offset].checksum[1]) - && (sha1_hmac_ctx.opad.h[2] == esalt_bufs[digests_offset].checksum[2])) + if ((sha1_hmac_ctx.opad.h[0] == esalt_bufs[DIGESTS_OFFSET].checksum[0]) + && (sha1_hmac_ctx.opad.h[1] == esalt_bufs[DIGESTS_OFFSET].checksum[1]) + && (sha1_hmac_ctx.opad.h[2] == esalt_bufs[DIGESTS_OFFSET].checksum[2])) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { #define il_pos 0 - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m20011-pure.cl b/OpenCL/m20011-pure.cl index 247191796..f4c827431 100644 --- a/OpenCL/m20011-pure.cl +++ b/OpenCL/m20011-pure.cl @@ -124,7 +124,7 @@ KERNEL_FQ void m20011_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, diskcrypt tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -405,27 +405,27 @@ KERNEL_FQ void m20011_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, diskcrypt ukey2[6] = hc_swap32_S (h32_from_64_S (tmps[gid].out[7])); ukey2[7] = hc_swap32_S (l32_from_64_S (tmps[gid].out[7])); - if (dcrp_verify_header_serpent (digests_buf[digests_offset].digest_buf, ukey1, ukey2) == 1) + if (dcrp_verify_header_serpent (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_twofish (digests_buf[digests_offset].digest_buf, ukey1, ukey2) == 1) + if (dcrp_verify_header_twofish (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_aes (digests_buf[digests_offset].digest_buf, ukey1, ukey2, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) + if (dcrp_verify_header_aes (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m20012-pure.cl b/OpenCL/m20012-pure.cl index 823cec6e7..5c538b713 100644 --- a/OpenCL/m20012-pure.cl +++ b/OpenCL/m20012-pure.cl @@ -124,7 +124,7 @@ KERNEL_FQ void m20012_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, diskcrypt tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 16; i += 8, j += 1) { @@ -405,27 +405,27 @@ KERNEL_FQ void m20012_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, diskcrypt ukey2[6] = hc_swap32_S (h32_from_64_S (tmps[gid].out[7])); ukey2[7] = hc_swap32_S (l32_from_64_S (tmps[gid].out[7])); - if (dcrp_verify_header_serpent (digests_buf[digests_offset].digest_buf, ukey1, ukey2) == 1) + if (dcrp_verify_header_serpent (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_twofish (digests_buf[digests_offset].digest_buf, ukey1, ukey2) == 1) + if (dcrp_verify_header_twofish (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_aes (digests_buf[digests_offset].digest_buf, ukey1, ukey2, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) + if (dcrp_verify_header_aes (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } @@ -451,27 +451,27 @@ KERNEL_FQ void m20012_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, diskcrypt ukey4[6] = hc_swap32_S (h32_from_64_S (tmps[gid].out[15])); ukey4[7] = hc_swap32_S (l32_from_64_S (tmps[gid].out[15])); - if (dcrp_verify_header_serpent_aes (digests_buf[digests_offset].digest_buf, ukey1, ukey2, ukey3, ukey4, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) + if (dcrp_verify_header_serpent_aes (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, ukey3, ukey4, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_twofish_serpent (digests_buf[digests_offset].digest_buf, ukey1, ukey2, ukey3, ukey4) == 1) + if (dcrp_verify_header_twofish_serpent (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, ukey3, ukey4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_aes_twofish (digests_buf[digests_offset].digest_buf, ukey1, ukey2, ukey3, ukey4, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) + if (dcrp_verify_header_aes_twofish (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, ukey3, ukey4, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m20013-pure.cl b/OpenCL/m20013-pure.cl index de9a55c45..608b6ff79 100644 --- a/OpenCL/m20013-pure.cl +++ b/OpenCL/m20013-pure.cl @@ -124,7 +124,7 @@ KERNEL_FQ void m20013_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, diskcrypt tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 24; i += 8, j += 1) { @@ -405,27 +405,27 @@ KERNEL_FQ void m20013_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, diskcrypt ukey2[6] = hc_swap32_S (h32_from_64_S (tmps[gid].out[7])); ukey2[7] = hc_swap32_S (l32_from_64_S (tmps[gid].out[7])); - if (dcrp_verify_header_serpent (digests_buf[digests_offset].digest_buf, ukey1, ukey2) == 1) + if (dcrp_verify_header_serpent (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_twofish (digests_buf[digests_offset].digest_buf, ukey1, ukey2) == 1) + if (dcrp_verify_header_twofish (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_aes (digests_buf[digests_offset].digest_buf, ukey1, ukey2, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) + if (dcrp_verify_header_aes (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } @@ -451,27 +451,27 @@ KERNEL_FQ void m20013_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, diskcrypt ukey4[6] = hc_swap32_S (h32_from_64_S (tmps[gid].out[15])); ukey4[7] = hc_swap32_S (l32_from_64_S (tmps[gid].out[15])); - if (dcrp_verify_header_serpent_aes (digests_buf[digests_offset].digest_buf, ukey1, ukey2, ukey3, ukey4, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) + if (dcrp_verify_header_serpent_aes (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, ukey3, ukey4, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_twofish_serpent (digests_buf[digests_offset].digest_buf, ukey1, ukey2, ukey3, ukey4) == 1) + if (dcrp_verify_header_twofish_serpent (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, ukey3, ukey4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_aes_twofish (digests_buf[digests_offset].digest_buf, ukey1, ukey2, ukey3, ukey4, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) + if (dcrp_verify_header_aes_twofish (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, ukey3, ukey4, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } @@ -497,19 +497,19 @@ KERNEL_FQ void m20013_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha512_tmp_t, diskcrypt ukey6[6] = hc_swap32_S (h32_from_64_S (tmps[gid].out[23])); ukey6[7] = hc_swap32_S (l32_from_64_S (tmps[gid].out[23])); - if (dcrp_verify_header_serpent_twofish_aes (digests_buf[digests_offset].digest_buf, ukey1, ukey2, ukey3, ukey4, ukey5, ukey6, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) + if (dcrp_verify_header_serpent_twofish_aes (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, ukey3, ukey4, ukey5, ukey6, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } - if (dcrp_verify_header_aes_twofish_serpent (digests_buf[digests_offset].digest_buf, ukey1, ukey2, ukey3, ukey4, ukey5, ukey6, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) + if (dcrp_verify_header_aes_twofish_serpent (digests_buf[DIGESTS_OFFSET].digest_buf, ukey1, ukey2, ukey3, ukey4, ukey5, ukey6, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m20500_a0-pure.cl b/OpenCL/m20500_a0-pure.cl index b8a2c9ea9..2a9ca70ed 100644 --- a/OpenCL/m20500_a0-pure.cl +++ b/OpenCL/m20500_a0-pure.cl @@ -182,9 +182,9 @@ KERNEL_FQ void m20500_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], 0 }; diff --git a/OpenCL/m20500_a1-pure.cl b/OpenCL/m20500_a1-pure.cl index 3edd2e86b..c03b3c2fc 100644 --- a/OpenCL/m20500_a1-pure.cl +++ b/OpenCL/m20500_a1-pure.cl @@ -180,9 +180,9 @@ KERNEL_FQ void m20500_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], 0 }; @@ -256,9 +256,9 @@ KERNEL_FQ void m20500_mxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], 0 }; diff --git a/OpenCL/m20500_a3-pure.cl b/OpenCL/m20500_a3-pure.cl index 27b4b0765..7d5fdb59a 100644 --- a/OpenCL/m20500_a3-pure.cl +++ b/OpenCL/m20500_a3-pure.cl @@ -292,9 +292,9 @@ KERNEL_FQ void m20500_sxx (KERN_ATTR_VECTOR ()) * reverse */ - u32 prep0 = digests_buf[digests_offset].digest_buf[0]; - u32 prep1 = digests_buf[digests_offset].digest_buf[1]; - u32 prep2 = digests_buf[digests_offset].digest_buf[2]; + u32 prep0 = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 prep1 = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 prep2 = digests_buf[DIGESTS_OFFSET].digest_buf[2]; for (u32 pos = pw_len - 1; pos >= 4; pos--) { diff --git a/OpenCL/m20510_a0-pure.cl b/OpenCL/m20510_a0-pure.cl index 7185b9a3e..05339048c 100644 --- a/OpenCL/m20510_a0-pure.cl +++ b/OpenCL/m20510_a0-pure.cl @@ -535,9 +535,9 @@ KERNEL_FQ void m20510_sxx (KERN_ATTR_RULES ()) * reverse */ - u32 prep0 = hc_swap32_S (digests_buf[digests_offset].digest_buf[0]); - u32 prep1 = hc_swap32_S (digests_buf[digests_offset].digest_buf[1]); - u32 prep2 = hc_swap32_S (digests_buf[digests_offset].digest_buf[2]); + u32 prep0 = hc_swap32_S (digests_buf[DIGESTS_OFFSET].digest_buf[0]); + u32 prep1 = hc_swap32_S (digests_buf[DIGESTS_OFFSET].digest_buf[1]); + u32 prep2 = hc_swap32_S (digests_buf[DIGESTS_OFFSET].digest_buf[2]); /** * loop diff --git a/OpenCL/m20510_a1-pure.cl b/OpenCL/m20510_a1-pure.cl index 07382dce3..0b3f3074d 100644 --- a/OpenCL/m20510_a1-pure.cl +++ b/OpenCL/m20510_a1-pure.cl @@ -527,9 +527,9 @@ KERNEL_FQ void m20510_sxx (KERN_ATTR_BASIC ()) * reverse */ - u32 prep0 = hc_swap32_S (digests_buf[digests_offset].digest_buf[0]); - u32 prep1 = hc_swap32_S (digests_buf[digests_offset].digest_buf[1]); - u32 prep2 = hc_swap32_S (digests_buf[digests_offset].digest_buf[2]); + u32 prep0 = hc_swap32_S (digests_buf[DIGESTS_OFFSET].digest_buf[0]); + u32 prep1 = hc_swap32_S (digests_buf[DIGESTS_OFFSET].digest_buf[1]); + u32 prep2 = hc_swap32_S (digests_buf[DIGESTS_OFFSET].digest_buf[2]); /** * loop diff --git a/OpenCL/m20510_a3-pure.cl b/OpenCL/m20510_a3-pure.cl index 92293d6a6..027220e29 100644 --- a/OpenCL/m20510_a3-pure.cl +++ b/OpenCL/m20510_a3-pure.cl @@ -533,9 +533,9 @@ KERNEL_FQ void m20510_sxx (KERN_ATTR_VECTOR ()) * reverse */ - u32 prep0 = hc_swap32_S (digests_buf[digests_offset].digest_buf[0]); - u32 prep1 = hc_swap32_S (digests_buf[digests_offset].digest_buf[1]); - u32 prep2 = hc_swap32_S (digests_buf[digests_offset].digest_buf[2]); + u32 prep0 = hc_swap32_S (digests_buf[DIGESTS_OFFSET].digest_buf[0]); + u32 prep1 = hc_swap32_S (digests_buf[DIGESTS_OFFSET].digest_buf[1]); + u32 prep2 = hc_swap32_S (digests_buf[DIGESTS_OFFSET].digest_buf[2]); for (int pos = pw_len - 1; pos >= 4; pos--) { diff --git a/OpenCL/m20600-pure.cl b/OpenCL/m20600-pure.cl index bbcfe5002..25f4f39fd 100644 --- a/OpenCL/m20600-pure.cl +++ b/OpenCL/m20600-pure.cl @@ -43,7 +43,7 @@ KERNEL_FQ void m20600_init (KERN_ATTR_TMPS (omt_sha256_tmp_t)) sha256_init (&sha256_ctx); - sha256_update_global_swap (&sha256_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&sha256_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_update_global_swap (&sha256_ctx, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m20710_a0-optimized.cl b/OpenCL/m20710_a0-optimized.cl index 311bdf508..42b2d7702 100644 --- a/OpenCL/m20710_a0-optimized.cl +++ b/OpenCL/m20710_a0-optimized.cl @@ -98,24 +98,24 @@ KERNEL_FQ void m20710_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -792,24 +792,24 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -817,10 +817,10 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m20710_a0-pure.cl b/OpenCL/m20710_a0-pure.cl index 0c150aa03..e67d37f1a 100644 --- a/OpenCL/m20710_a0-pure.cl +++ b/OpenCL/m20710_a0-pure.cl @@ -68,13 +68,13 @@ KERNEL_FQ void m20710_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -175,10 +175,10 @@ KERNEL_FQ void m20710_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -192,13 +192,13 @@ KERNEL_FQ void m20710_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m20710_a1-optimized.cl b/OpenCL/m20710_a1-optimized.cl index 8458348fb..05f6b0908 100644 --- a/OpenCL/m20710_a1-optimized.cl +++ b/OpenCL/m20710_a1-optimized.cl @@ -96,24 +96,24 @@ KERNEL_FQ void m20710_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -848,24 +848,24 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -873,10 +873,10 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m20710_a1-pure.cl b/OpenCL/m20710_a1-pure.cl index ae7b05d41..71489010b 100644 --- a/OpenCL/m20710_a1-pure.cl +++ b/OpenCL/m20710_a1-pure.cl @@ -66,11 +66,11 @@ KERNEL_FQ void m20710_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx1; @@ -171,10 +171,10 @@ KERNEL_FQ void m20710_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -186,13 +186,13 @@ KERNEL_FQ void m20710_sxx (KERN_ATTR_BASIC ()) u32 w2[4]; u32 w3[4]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx1; diff --git a/OpenCL/m20710_a3-optimized.cl b/OpenCL/m20710_a3-optimized.cl index 95f20665d..7a0df4363 100644 --- a/OpenCL/m20710_a3-optimized.cl +++ b/OpenCL/m20710_a3-optimized.cl @@ -58,24 +58,24 @@ DECLSPEC void m20710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -700,10 +700,10 @@ DECLSPEC void m20710s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -715,24 +715,24 @@ DECLSPEC void m20710s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 0]); - salt_buf0[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 1]); - salt_buf0[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); - salt_buf0[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 3]); - salt_buf1[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 4]); - salt_buf1[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 5]); - salt_buf1[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 6]); - salt_buf1[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 7]); - salt_buf2[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 8]); - salt_buf2[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[ 9]); - salt_buf2[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[10]); - salt_buf2[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[11]); - salt_buf3[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[12]); - salt_buf3[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[13]); - salt_buf3[2] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[14]); - salt_buf3[3] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[15]); + salt_buf0[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 0]); + salt_buf0[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 1]); + salt_buf0[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 2]); + salt_buf0[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 3]); + salt_buf1[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 4]); + salt_buf1[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 5]); + salt_buf1[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 6]); + salt_buf1[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7]); + salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8]); + salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9]); + salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]); + salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[11]); + salt_buf3[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[12]); + salt_buf3[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[13]); + salt_buf3[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[14]); + salt_buf3[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[15]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -1403,7 +1403,7 @@ KERNEL_FQ void m20710_m04 (KERN_ATTR_VECTOR ()) * main */ - m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20710_m08 (KERN_ATTR_VECTOR ()) @@ -1464,7 +1464,7 @@ KERNEL_FQ void m20710_m08 (KERN_ATTR_VECTOR ()) * main */ - m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20710_m16 (KERN_ATTR_VECTOR ()) @@ -1525,7 +1525,7 @@ KERNEL_FQ void m20710_m16 (KERN_ATTR_VECTOR ()) * main */ - m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20710_s04 (KERN_ATTR_VECTOR ()) @@ -1586,7 +1586,7 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_VECTOR ()) * main */ - m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20710_s08 (KERN_ATTR_VECTOR ()) @@ -1647,7 +1647,7 @@ KERNEL_FQ void m20710_s08 (KERN_ATTR_VECTOR ()) * main */ - m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20710_s16 (KERN_ATTR_VECTOR ()) @@ -1708,5 +1708,5 @@ KERNEL_FQ void m20710_s16 (KERN_ATTR_VECTOR ()) * main */ - m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m20710_a3-pure.cl b/OpenCL/m20710_a3-pure.cl index ede8e076a..56dca7ddc 100644 --- a/OpenCL/m20710_a3-pure.cl +++ b/OpenCL/m20710_a3-pure.cl @@ -73,13 +73,13 @@ KERNEL_FQ void m20710_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** @@ -184,10 +184,10 @@ KERNEL_FQ void m20710_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -208,13 +208,13 @@ KERNEL_FQ void m20710_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } /** diff --git a/OpenCL/m20800_a0-optimized.cl b/OpenCL/m20800_a0-optimized.cl index d428df4f0..fd07fac9b 100644 --- a/OpenCL/m20800_a0-optimized.cl +++ b/OpenCL/m20800_a0-optimized.cl @@ -367,24 +367,24 @@ KERNEL_FQ void m20800_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m20800_a0-pure.cl b/OpenCL/m20800_a0-pure.cl index 01ce1a6ad..3e4d11dbf 100644 --- a/OpenCL/m20800_a0-pure.cl +++ b/OpenCL/m20800_a0-pure.cl @@ -165,10 +165,10 @@ KERNEL_FQ void m20800_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m20800_a1-optimized.cl b/OpenCL/m20800_a1-optimized.cl index 6ec1be3da..c65163d38 100644 --- a/OpenCL/m20800_a1-optimized.cl +++ b/OpenCL/m20800_a1-optimized.cl @@ -420,24 +420,24 @@ KERNEL_FQ void m20800_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m20800_a1-pure.cl b/OpenCL/m20800_a1-pure.cl index 1bce6143a..239bb142c 100644 --- a/OpenCL/m20800_a1-pure.cl +++ b/OpenCL/m20800_a1-pure.cl @@ -161,10 +161,10 @@ KERNEL_FQ void m20800_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m20800_a3-optimized.cl b/OpenCL/m20800_a3-optimized.cl index 8ddfcc703..66c340f4e 100644 --- a/OpenCL/m20800_a3-optimized.cl +++ b/OpenCL/m20800_a3-optimized.cl @@ -292,24 +292,24 @@ DECLSPEC void m20800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); @@ -613,7 +613,7 @@ KERNEL_FQ void m20800_m04 (KERN_ATTR_BASIC ()) * main */ - m20800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20800_m08 (KERN_ATTR_BASIC ()) @@ -683,7 +683,7 @@ KERNEL_FQ void m20800_m08 (KERN_ATTR_BASIC ()) * main */ - m20800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20800_m16 (KERN_ATTR_BASIC ()) @@ -753,7 +753,7 @@ KERNEL_FQ void m20800_m16 (KERN_ATTR_BASIC ()) * main */ - m20800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20800_s04 (KERN_ATTR_BASIC ()) @@ -823,7 +823,7 @@ KERNEL_FQ void m20800_s04 (KERN_ATTR_BASIC ()) * main */ - m20800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20800_s08 (KERN_ATTR_BASIC ()) @@ -893,7 +893,7 @@ KERNEL_FQ void m20800_s08 (KERN_ATTR_BASIC ()) * main */ - m20800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20800_s16 (KERN_ATTR_BASIC ()) @@ -963,5 +963,5 @@ KERNEL_FQ void m20800_s16 (KERN_ATTR_BASIC ()) * main */ - m20800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m20800_a3-pure.cl b/OpenCL/m20800_a3-pure.cl index 9cb333ba1..12bb433d5 100644 --- a/OpenCL/m20800_a3-pure.cl +++ b/OpenCL/m20800_a3-pure.cl @@ -174,10 +174,10 @@ KERNEL_FQ void m20800_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m20900_a0-optimized.cl b/OpenCL/m20900_a0-optimized.cl index 9699c3211..a12d8693b 100644 --- a/OpenCL/m20900_a0-optimized.cl +++ b/OpenCL/m20900_a0-optimized.cl @@ -792,10 +792,10 @@ KERNEL_FQ void m20900_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m20900_a0-pure.cl b/OpenCL/m20900_a0-pure.cl index 773a6249e..903d11119 100644 --- a/OpenCL/m20900_a0-pure.cl +++ b/OpenCL/m20900_a0-pure.cl @@ -244,10 +244,10 @@ KERNEL_FQ void m20900_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m20900_a1-optimized.cl b/OpenCL/m20900_a1-optimized.cl index d74c1c050..9e06d620f 100644 --- a/OpenCL/m20900_a1-optimized.cl +++ b/OpenCL/m20900_a1-optimized.cl @@ -848,10 +848,10 @@ KERNEL_FQ void m20900_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m20900_a1-pure.cl b/OpenCL/m20900_a1-pure.cl index 710fa8be2..3f7956aba 100644 --- a/OpenCL/m20900_a1-pure.cl +++ b/OpenCL/m20900_a1-pure.cl @@ -244,10 +244,10 @@ KERNEL_FQ void m20900_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m20900_a3-optimized.cl b/OpenCL/m20900_a3-optimized.cl index 88d705bb9..e563816f6 100644 --- a/OpenCL/m20900_a3-optimized.cl +++ b/OpenCL/m20900_a3-optimized.cl @@ -703,10 +703,10 @@ DECLSPEC void m20900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -1431,7 +1431,7 @@ KERNEL_FQ void m20900_m04 (KERN_ATTR_BASIC ()) * main */ - m20900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20900_m08 (KERN_ATTR_BASIC ()) @@ -1501,7 +1501,7 @@ KERNEL_FQ void m20900_m08 (KERN_ATTR_BASIC ()) * main */ - m20900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20900_m16 (KERN_ATTR_BASIC ()) @@ -1571,7 +1571,7 @@ KERNEL_FQ void m20900_m16 (KERN_ATTR_BASIC ()) * main */ - m20900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20900_s04 (KERN_ATTR_BASIC ()) @@ -1641,7 +1641,7 @@ KERNEL_FQ void m20900_s04 (KERN_ATTR_BASIC ()) * main */ - m20900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20900_s08 (KERN_ATTR_BASIC ()) @@ -1711,7 +1711,7 @@ KERNEL_FQ void m20900_s08 (KERN_ATTR_BASIC ()) * main */ - m20900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m20900_s16 (KERN_ATTR_BASIC ()) @@ -1781,5 +1781,5 @@ KERNEL_FQ void m20900_s16 (KERN_ATTR_BASIC ()) * main */ - m20900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m20900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m20900_a3-pure.cl b/OpenCL/m20900_a3-pure.cl index ad6eb3071..1ffbb1b96 100644 --- a/OpenCL/m20900_a3-pure.cl +++ b/OpenCL/m20900_a3-pure.cl @@ -253,10 +253,10 @@ KERNEL_FQ void m20900_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21000_a0-optimized.cl b/OpenCL/m21000_a0-optimized.cl index c7cfa5b8d..137a633e2 100644 --- a/OpenCL/m21000_a0-optimized.cl +++ b/OpenCL/m21000_a0-optimized.cl @@ -310,10 +310,10 @@ KERNEL_FQ void m21000_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21000_a0-pure.cl b/OpenCL/m21000_a0-pure.cl index 247fc3b3d..33fde2983 100644 --- a/OpenCL/m21000_a0-pure.cl +++ b/OpenCL/m21000_a0-pure.cl @@ -104,10 +104,10 @@ KERNEL_FQ void m21000_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21000_a1-optimized.cl b/OpenCL/m21000_a1-optimized.cl index 7ff4577f7..67ba5514e 100644 --- a/OpenCL/m21000_a1-optimized.cl +++ b/OpenCL/m21000_a1-optimized.cl @@ -441,10 +441,10 @@ KERNEL_FQ void m21000_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21000_a1-pure.cl b/OpenCL/m21000_a1-pure.cl index f5782bbd4..c83514fdd 100644 --- a/OpenCL/m21000_a1-pure.cl +++ b/OpenCL/m21000_a1-pure.cl @@ -100,10 +100,10 @@ KERNEL_FQ void m21000_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21000_a3-optimized.cl b/OpenCL/m21000_a3-optimized.cl index 768ba9e02..7ba7e964f 100644 --- a/OpenCL/m21000_a3-optimized.cl +++ b/OpenCL/m21000_a3-optimized.cl @@ -326,10 +326,10 @@ DECLSPEC void m21000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -451,7 +451,7 @@ KERNEL_FQ void m21000_m04 (KERN_ATTR_VECTOR ()) * main */ - m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21000_m08 (KERN_ATTR_VECTOR ()) @@ -489,7 +489,7 @@ KERNEL_FQ void m21000_m08 (KERN_ATTR_VECTOR ()) * main */ - m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21000_m16 (KERN_ATTR_VECTOR ()) @@ -527,7 +527,7 @@ KERNEL_FQ void m21000_m16 (KERN_ATTR_VECTOR ()) * main */ - m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21000_s04 (KERN_ATTR_VECTOR ()) @@ -565,7 +565,7 @@ KERNEL_FQ void m21000_s04 (KERN_ATTR_VECTOR ()) * main */ - m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21000_s08 (KERN_ATTR_VECTOR ()) @@ -603,7 +603,7 @@ KERNEL_FQ void m21000_s08 (KERN_ATTR_VECTOR ()) * main */ - m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21000_s16 (KERN_ATTR_VECTOR ()) @@ -641,5 +641,5 @@ KERNEL_FQ void m21000_s16 (KERN_ATTR_VECTOR ()) * main */ - m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m21000_a3-pure.cl b/OpenCL/m21000_a3-pure.cl index 4fd40a511..e12d498bf 100644 --- a/OpenCL/m21000_a3-pure.cl +++ b/OpenCL/m21000_a3-pure.cl @@ -113,10 +113,10 @@ KERNEL_FQ void m21000_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21100_a0-optimized.cl b/OpenCL/m21100_a0-optimized.cl index 810899b66..e7bed2442 100644 --- a/OpenCL/m21100_a0-optimized.cl +++ b/OpenCL/m21100_a0-optimized.cl @@ -85,24 +85,24 @@ KERNEL_FQ void m21100_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; append_0x80_4x4_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, salt_len); @@ -450,24 +450,24 @@ KERNEL_FQ void m21100_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; append_0x80_4x4_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, salt_len); @@ -477,10 +477,10 @@ KERNEL_FQ void m21100_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21100_a0-pure.cl b/OpenCL/m21100_a0-pure.cl index 18ccf6823..d9921cd95 100644 --- a/OpenCL/m21100_a0-pure.cl +++ b/OpenCL/m21100_a0-pure.cl @@ -64,13 +64,13 @@ KERNEL_FQ void m21100_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -181,10 +181,10 @@ KERNEL_FQ void m21100_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -193,13 +193,13 @@ KERNEL_FQ void m21100_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m21100_a1-optimized.cl b/OpenCL/m21100_a1-optimized.cl index 815bb508f..256b44509 100644 --- a/OpenCL/m21100_a1-optimized.cl +++ b/OpenCL/m21100_a1-optimized.cl @@ -83,24 +83,24 @@ KERNEL_FQ void m21100_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -503,10 +503,10 @@ KERNEL_FQ void m21100_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -524,24 +524,24 @@ KERNEL_FQ void m21100_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop diff --git a/OpenCL/m21100_a1-pure.cl b/OpenCL/m21100_a1-pure.cl index 783632dcd..4d3e348ef 100644 --- a/OpenCL/m21100_a1-pure.cl +++ b/OpenCL/m21100_a1-pure.cl @@ -60,13 +60,13 @@ KERNEL_FQ void m21100_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; @@ -177,23 +177,23 @@ KERNEL_FQ void m21100_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } md5_ctx_t ctx0; diff --git a/OpenCL/m21100_a3-optimized.cl b/OpenCL/m21100_a3-optimized.cl index 4d83834cf..2a2e3dd1c 100644 --- a/OpenCL/m21100_a3-optimized.cl +++ b/OpenCL/m21100_a3-optimized.cl @@ -45,24 +45,24 @@ DECLSPEC void m21100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; /** @@ -376,10 +376,10 @@ DECLSPEC void m21100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -707,7 +707,7 @@ KERNEL_FQ void m21100_m04 (KERN_ATTR_BASIC ()) * main */ - m21100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21100_m08 (KERN_ATTR_BASIC ()) @@ -777,7 +777,7 @@ KERNEL_FQ void m21100_m08 (KERN_ATTR_BASIC ()) * main */ - m21100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21100_m16 (KERN_ATTR_BASIC ()) @@ -847,7 +847,7 @@ KERNEL_FQ void m21100_m16 (KERN_ATTR_BASIC ()) * main */ - m21100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21100_s04 (KERN_ATTR_BASIC ()) @@ -917,7 +917,7 @@ KERNEL_FQ void m21100_s04 (KERN_ATTR_BASIC ()) * main */ - m21100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21100_s08 (KERN_ATTR_BASIC ()) @@ -987,7 +987,7 @@ KERNEL_FQ void m21100_s08 (KERN_ATTR_BASIC ()) * main */ - m21100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21100_s16 (KERN_ATTR_BASIC ()) @@ -1057,5 +1057,5 @@ KERNEL_FQ void m21100_s16 (KERN_ATTR_BASIC ()) * main */ - m21100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m21100_a3-pure.cl b/OpenCL/m21100_a3-pure.cl index c38d7cae5..4f5d7cd67 100644 --- a/OpenCL/m21100_a3-pure.cl +++ b/OpenCL/m21100_a3-pure.cl @@ -69,13 +69,13 @@ KERNEL_FQ void m21100_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** @@ -190,10 +190,10 @@ KERNEL_FQ void m21100_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -209,13 +209,13 @@ KERNEL_FQ void m21100_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = salt_bufs[salt_pos].salt_buf[idx]; + s[idx] = salt_bufs[SALT_POS].salt_buf[idx]; } /** diff --git a/OpenCL/m21200_a0-optimized.cl b/OpenCL/m21200_a0-optimized.cl index baad1072c..57901acfd 100644 --- a/OpenCL/m21200_a0-optimized.cl +++ b/OpenCL/m21200_a0-optimized.cl @@ -84,16 +84,16 @@ KERNEL_FQ void m21200_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; @@ -506,16 +506,16 @@ KERNEL_FQ void m21200_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; @@ -529,10 +529,10 @@ KERNEL_FQ void m21200_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21200_a0-pure.cl b/OpenCL/m21200_a0-pure.cl index e0a801fc8..aa3dfb225 100644 --- a/OpenCL/m21200_a0-pure.cl +++ b/OpenCL/m21200_a0-pure.cl @@ -72,16 +72,16 @@ KERNEL_FQ void m21200_mxx (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; @@ -201,10 +201,10 @@ KERNEL_FQ void m21200_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -222,16 +222,16 @@ KERNEL_FQ void m21200_sxx (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; diff --git a/OpenCL/m21200_a1-optimized.cl b/OpenCL/m21200_a1-optimized.cl index 18ab817e9..aa730dba5 100644 --- a/OpenCL/m21200_a1-optimized.cl +++ b/OpenCL/m21200_a1-optimized.cl @@ -82,16 +82,16 @@ KERNEL_FQ void m21200_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; @@ -562,16 +562,16 @@ KERNEL_FQ void m21200_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; @@ -585,10 +585,10 @@ KERNEL_FQ void m21200_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21200_a1-pure.cl b/OpenCL/m21200_a1-pure.cl index 2e5dd6315..bcd2056e9 100644 --- a/OpenCL/m21200_a1-pure.cl +++ b/OpenCL/m21200_a1-pure.cl @@ -74,16 +74,16 @@ KERNEL_FQ void m21200_mxx (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; @@ -197,10 +197,10 @@ KERNEL_FQ void m21200_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -222,16 +222,16 @@ KERNEL_FQ void m21200_sxx (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; diff --git a/OpenCL/m21200_a3-optimized.cl b/OpenCL/m21200_a3-optimized.cl index 8204d1d42..cd4545efc 100644 --- a/OpenCL/m21200_a3-optimized.cl +++ b/OpenCL/m21200_a3-optimized.cl @@ -44,16 +44,16 @@ DECLSPEC void m21200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; @@ -417,16 +417,16 @@ DECLSPEC void m21200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; @@ -440,10 +440,10 @@ DECLSPEC void m21200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -854,7 +854,7 @@ KERNEL_FQ void m21200_m04 (KERN_ATTR_BASIC ()) * main */ - m21200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21200_m08 (KERN_ATTR_BASIC ()) @@ -924,7 +924,7 @@ KERNEL_FQ void m21200_m08 (KERN_ATTR_BASIC ()) * main */ - m21200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21200_m16 (KERN_ATTR_BASIC ()) @@ -994,7 +994,7 @@ KERNEL_FQ void m21200_m16 (KERN_ATTR_BASIC ()) * main */ - m21200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21200_s04 (KERN_ATTR_BASIC ()) @@ -1064,7 +1064,7 @@ KERNEL_FQ void m21200_s04 (KERN_ATTR_BASIC ()) * main */ - m21200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21200_s08 (KERN_ATTR_BASIC ()) @@ -1134,7 +1134,7 @@ KERNEL_FQ void m21200_s08 (KERN_ATTR_BASIC ()) * main */ - m21200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } KERNEL_FQ void m21200_s16 (KERN_ATTR_BASIC ()) @@ -1204,5 +1204,5 @@ KERNEL_FQ void m21200_s16 (KERN_ATTR_BASIC ()) * main */ - m21200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max, l_bin2asc); + m21200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max, l_bin2asc); } diff --git a/OpenCL/m21200_a3-pure.cl b/OpenCL/m21200_a3-pure.cl index b69aa225b..daa2e9789 100644 --- a/OpenCL/m21200_a3-pure.cl +++ b/OpenCL/m21200_a3-pure.cl @@ -77,16 +77,16 @@ KERNEL_FQ void m21200_mxx (KERN_ATTR_VECTOR ()) u32x salt_buf2[4]; u32x salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; @@ -208,10 +208,10 @@ KERNEL_FQ void m21200_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -236,16 +236,16 @@ KERNEL_FQ void m21200_sxx (KERN_ATTR_VECTOR ()) u32x salt_buf2[4]; u32x salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf_pc[8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf_pc[9]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf_pc[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf_pc[1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf_pc[2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf_pc[3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf_pc[4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf_pc[5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf_pc[6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf_pc[7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf_pc[8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf_pc[9]; salt_buf2[2] = 0; salt_buf2[3] = 0; salt_buf3[0] = 0; diff --git a/OpenCL/m21300_a0-pure.cl b/OpenCL/m21300_a0-pure.cl index 04c76d812..4110c685e 100644 --- a/OpenCL/m21300_a0-pure.cl +++ b/OpenCL/m21300_a0-pure.cl @@ -68,13 +68,13 @@ KERNEL_FQ void m21300_mxx (KERN_ATTR_RULES ()) sha1_init(&ctx00); - sha1_update_global_swap (&ctx00, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx00, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_ctx_t ctx11; md5_init (&ctx11); - md5_update_global (&ctx11, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx11, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -181,10 +181,10 @@ KERNEL_FQ void m21300_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -197,13 +197,13 @@ KERNEL_FQ void m21300_sxx (KERN_ATTR_RULES ()) sha1_init(&ctx00); - sha1_update_global_swap (&ctx00, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx00, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_ctx_t ctx11; md5_init (&ctx11); - md5_update_global (&ctx11, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx11, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m21300_a1-pure.cl b/OpenCL/m21300_a1-pure.cl index 9b231e6f2..54d83512c 100644 --- a/OpenCL/m21300_a1-pure.cl +++ b/OpenCL/m21300_a1-pure.cl @@ -64,7 +64,7 @@ KERNEL_FQ void m21300_mxx (KERN_ATTR_BASIC ()) sha1_init (&ctx00); - sha1_update_global_swap (&ctx00, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx00, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_swap (&ctx00, pws[gid].i, pws[gid].pw_len); @@ -72,7 +72,7 @@ KERNEL_FQ void m21300_mxx (KERN_ATTR_BASIC ()) md5_init (&ctx11); - md5_update_global (&ctx11, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx11, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -175,10 +175,10 @@ KERNEL_FQ void m21300_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -189,7 +189,7 @@ KERNEL_FQ void m21300_sxx (KERN_ATTR_BASIC ()) sha1_init (&ctx00); - sha1_update_global_swap (&ctx00, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx00, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha1_update_global_swap (&ctx00, pws[gid].i, pws[gid].pw_len); @@ -197,7 +197,7 @@ KERNEL_FQ void m21300_sxx (KERN_ATTR_BASIC ()) md5_init (&ctx11); - md5_update_global (&ctx11, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx11, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m21300_a3-pure.cl b/OpenCL/m21300_a3-pure.cl index d517eb0a0..456c04561 100644 --- a/OpenCL/m21300_a3-pure.cl +++ b/OpenCL/m21300_a3-pure.cl @@ -73,13 +73,13 @@ KERNEL_FQ void m21300_mxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx00); - sha1_update_global_swap (&ctx00, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx00, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_ctx_t ctx11; md5_init (&ctx11); - md5_update_global (&ctx11, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx11, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -194,10 +194,10 @@ KERNEL_FQ void m21300_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -217,13 +217,13 @@ KERNEL_FQ void m21300_sxx (KERN_ATTR_VECTOR ()) sha1_init (&ctx00); - sha1_update_global_swap (&ctx00, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_update_global_swap (&ctx00, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); md5_ctx_t ctx11; md5_init (&ctx11); - md5_update_global (&ctx11, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + md5_update_global (&ctx11, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m21400_a0-optimized.cl b/OpenCL/m21400_a0-optimized.cl index 0de1171c0..042bc8d53 100644 --- a/OpenCL/m21400_a0-optimized.cl +++ b/OpenCL/m21400_a0-optimized.cl @@ -321,24 +321,24 @@ KERNEL_FQ void m21400_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m21400_a0-pure.cl b/OpenCL/m21400_a0-pure.cl index 1937d53e9..befa428d0 100644 --- a/OpenCL/m21400_a0-pure.cl +++ b/OpenCL/m21400_a0-pure.cl @@ -108,10 +108,10 @@ KERNEL_FQ void m21400_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21400_a1-optimized.cl b/OpenCL/m21400_a1-optimized.cl index 49e39d78e..f601fa0fa 100644 --- a/OpenCL/m21400_a1-optimized.cl +++ b/OpenCL/m21400_a1-optimized.cl @@ -377,24 +377,24 @@ KERNEL_FQ void m21400_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m21400_a1-pure.cl b/OpenCL/m21400_a1-pure.cl index 3336bf6ee..35eb73dbe 100644 --- a/OpenCL/m21400_a1-pure.cl +++ b/OpenCL/m21400_a1-pure.cl @@ -104,10 +104,10 @@ KERNEL_FQ void m21400_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21400_a3-optimized.cl b/OpenCL/m21400_a3-optimized.cl index 82cc7448b..65f0b3ff6 100644 --- a/OpenCL/m21400_a3-optimized.cl +++ b/OpenCL/m21400_a3-optimized.cl @@ -262,24 +262,24 @@ DECLSPEC void m21400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); @@ -534,7 +534,7 @@ KERNEL_FQ void m21400_m04 (KERN_ATTR_VECTOR ()) * main */ - m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21400_m08 (KERN_ATTR_VECTOR ()) @@ -572,7 +572,7 @@ KERNEL_FQ void m21400_m08 (KERN_ATTR_VECTOR ()) * main */ - m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21400_m16 (KERN_ATTR_VECTOR ()) @@ -610,7 +610,7 @@ KERNEL_FQ void m21400_m16 (KERN_ATTR_VECTOR ()) * main */ - m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21400_s04 (KERN_ATTR_VECTOR ()) @@ -648,7 +648,7 @@ KERNEL_FQ void m21400_s04 (KERN_ATTR_VECTOR ()) * main */ - m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21400_s08 (KERN_ATTR_VECTOR ()) @@ -686,7 +686,7 @@ KERNEL_FQ void m21400_s08 (KERN_ATTR_VECTOR ()) * main */ - m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m21400_s16 (KERN_ATTR_VECTOR ()) @@ -724,5 +724,5 @@ KERNEL_FQ void m21400_s16 (KERN_ATTR_VECTOR ()) * main */ - m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m21400_a3-pure.cl b/OpenCL/m21400_a3-pure.cl index ed44f3b5a..4d54c7c55 100644 --- a/OpenCL/m21400_a3-pure.cl +++ b/OpenCL/m21400_a3-pure.cl @@ -117,10 +117,10 @@ KERNEL_FQ void m21400_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m21500-pure.cl b/OpenCL/m21500-pure.cl index 510aa7b23..241b0beb4 100644 --- a/OpenCL/m21500-pure.cl +++ b/OpenCL/m21500-pure.cl @@ -96,7 +96,7 @@ KERNEL_FQ void m21500_init (KERN_ATTR_TMPS_ESALT (solarwinds_tmp_t, solarwinds_t tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 256; i += 5, j += 1) { diff --git a/OpenCL/m21600-pure.cl b/OpenCL/m21600-pure.cl index 670e31b57..71add4921 100644 --- a/OpenCL/m21600-pure.cl +++ b/OpenCL/m21600-pure.cl @@ -117,7 +117,7 @@ KERNEL_FQ void m21600_init (KERN_ATTR_TMPS (web2py_sha512_tmp_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { diff --git a/OpenCL/m21700-pure.cl b/OpenCL/m21700-pure.cl index 45bd04ee0..9da4fb91a 100644 --- a/OpenCL/m21700-pure.cl +++ b/OpenCL/m21700-pure.cl @@ -379,7 +379,7 @@ KERNEL_FQ void m21700_comp (KERN_ATTR_TMPS_ESALT (electrum_tmp_t, electrum_t)) * the main secp256k1 point multiplication by a scalar/tweak: */ - GLOBAL_AS secp256k1_t *coords = (GLOBAL_AS secp256k1_t *) &esalt_bufs[digests_offset].coords; + GLOBAL_AS secp256k1_t *coords = (GLOBAL_AS secp256k1_t *) &esalt_bufs[DIGESTS_OFFSET].coords; u32 pubkey[64] = { 0 }; // for point_mul () we need: 1 + 32 bytes (for sha512 () we need more) @@ -401,9 +401,9 @@ KERNEL_FQ void m21700_comp (KERN_ATTR_TMPS_ESALT (electrum_tmp_t, electrum_t)) * sha256-hmac () of the data_buf */ - GLOBAL_AS u32 *data_buf = (GLOBAL_AS u32 *) esalt_bufs[digests_offset].data_buf; + GLOBAL_AS u32 *data_buf = (GLOBAL_AS u32 *) esalt_bufs[DIGESTS_OFFSET].data_buf; - u32 data_len = esalt_bufs[digests_offset].data_len; + u32 data_len = esalt_bufs[DIGESTS_OFFSET].data_len; u32 key[16] = { 0 }; diff --git a/OpenCL/m21800-pure.cl b/OpenCL/m21800-pure.cl index fc447c94a..afa33ed42 100644 --- a/OpenCL/m21800-pure.cl +++ b/OpenCL/m21800-pure.cl @@ -431,7 +431,7 @@ KERNEL_FQ void m21800_comp (KERN_ATTR_TMPS_ESALT (electrum_tmp_t, electrum_t)) * the main secp256k1 point multiplication by a scalar/tweak: */ - GLOBAL_AS secp256k1_t *coords = (GLOBAL_AS secp256k1_t *) &esalt_bufs[digests_offset].coords; + GLOBAL_AS secp256k1_t *coords = (GLOBAL_AS secp256k1_t *) &esalt_bufs[DIGESTS_OFFSET].coords; u32 pubkey[64] = { 0 }; // for point_mul () we need: 1 + 32 bytes (for sha512 () we need more) @@ -496,7 +496,7 @@ KERNEL_FQ void m21800_comp (KERN_ATTR_TMPS_ESALT (electrum_tmp_t, electrum_t)) // we need to run it at least once: - GLOBAL_AS u32 *data_buf = (GLOBAL_AS u32 *) esalt_bufs[digests_offset].data_buf; + GLOBAL_AS u32 *data_buf = (GLOBAL_AS u32 *) esalt_bufs[DIGESTS_OFFSET].data_buf; u32 data[4]; @@ -605,9 +605,9 @@ KERNEL_FQ void m21800_comp (KERN_ATTR_TMPS_ESALT (electrum_tmp_t, electrum_t)) ((tmp[0] == 0x7b) && (tmp[1] == 0x0d) && (tmp[2] == 0x0a) && (tmp[3] == 0x20) && (tmp[4] == 0x20) && (tmp[5] == 0x20) && (tmp[6] == 0x20) && (tmp[7] == 0x22))) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m22000-pure.cl b/OpenCL/m22000-pure.cl index 954f62ce3..2e2a87f61 100644 --- a/OpenCL/m22000-pure.cl +++ b/OpenCL/m22000-pure.cl @@ -171,7 +171,7 @@ KERNEL_FQ void m22000_init (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[digests_offset].essid_buf, esalt_bufs[digests_offset].essid_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].essid_buf, esalt_bufs[DIGESTS_OFFSET].essid_len); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -327,7 +327,7 @@ KERNEL_FQ void m22000_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_t *wpa = &esalt_bufs[digest_cur]; @@ -490,7 +490,7 @@ KERNEL_FQ void m22000_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -517,7 +517,7 @@ KERNEL_FQ void m22000_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_t *wpa = &esalt_bufs[digest_cur]; @@ -670,7 +670,7 @@ KERNEL_FQ void m22000_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -737,7 +737,7 @@ KERNEL_FQ void m22000_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_t *wpa = &esalt_bufs[digest_cur]; @@ -965,7 +965,7 @@ KERNEL_FQ void m22000_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -999,7 +999,7 @@ KERNEL_FQ void m22000_aux4 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_t *wpa = &esalt_bufs[digest_cur]; @@ -1030,7 +1030,7 @@ KERNEL_FQ void m22000_aux4 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } diff --git a/OpenCL/m22001-pure.cl b/OpenCL/m22001-pure.cl index e3a9d23f9..c41533432 100644 --- a/OpenCL/m22001-pure.cl +++ b/OpenCL/m22001-pure.cl @@ -234,7 +234,7 @@ KERNEL_FQ void m22001_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_t *wpa = &esalt_bufs[digest_cur]; @@ -397,7 +397,7 @@ KERNEL_FQ void m22001_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -424,7 +424,7 @@ KERNEL_FQ void m22001_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_t *wpa = &esalt_bufs[digest_cur]; @@ -577,7 +577,7 @@ KERNEL_FQ void m22001_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -644,7 +644,7 @@ KERNEL_FQ void m22001_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_t *wpa = &esalt_bufs[digest_cur]; @@ -872,7 +872,7 @@ KERNEL_FQ void m22001_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -906,7 +906,7 @@ KERNEL_FQ void m22001_aux4 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_t)) const u32 digest_pos = loop_pos; - const u32 digest_cur = digests_offset + digest_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; GLOBAL_AS const wpa_t *wpa = &esalt_bufs[digest_cur]; @@ -937,7 +937,7 @@ KERNEL_FQ void m22001_aux4 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_t)) { if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } diff --git a/OpenCL/m22100-pure.cl b/OpenCL/m22100-pure.cl index 3a5f60b84..9961c10f7 100644 --- a/OpenCL/m22100-pure.cl +++ b/OpenCL/m22100-pure.cl @@ -230,10 +230,10 @@ KERNEL_FQ void m22100_loop (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) u32x t2[4]; u32x t3[4]; - t0[0] = salt_bufs[salt_pos].salt_buf[0]; - t0[1] = salt_bufs[salt_pos].salt_buf[1]; - t0[2] = salt_bufs[salt_pos].salt_buf[2]; - t0[3] = salt_bufs[salt_pos].salt_buf[3]; + t0[0] = salt_bufs[SALT_POS].salt_buf[0]; + t0[1] = salt_bufs[SALT_POS].salt_buf[1]; + t0[2] = salt_bufs[SALT_POS].salt_buf[2]; + t0[3] = salt_bufs[SALT_POS].salt_buf[3]; t1[0] = 0; t1[1] = 0; t1[2] = 0x80000000; @@ -280,7 +280,7 @@ KERNEL_FQ void m22100_loop (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) { for (int j = 0; j < 48; j++) // first 16 set to register { - s_wb_ke_pc[i][j] = esalt_bufs[digests_offset].wb_ke_pc[loop_pos + t + i][j]; + s_wb_ke_pc[i][j] = esalt_bufs[DIGESTS_OFFSET].wb_ke_pc[loop_pos + t + i][j]; } } @@ -292,7 +292,7 @@ KERNEL_FQ void m22100_loop (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) { for (int j = 0; j < 48; j++) // first 16 set to register { - s_wb_ke_pc[i][j] = esalt_bufs[digests_offset].wb_ke_pc[loop_pos + t + i][j]; + s_wb_ke_pc[i][j] = esalt_bufs[DIGESTS_OFFSET].wb_ke_pc[loop_pos + t + i][j]; } } } @@ -301,7 +301,7 @@ KERNEL_FQ void m22100_loop (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) #else - s_wb_ke_pc = &esalt_bufs[digests_offset].wb_ke_pc[loop_pos + t]; + s_wb_ke_pc = &esalt_bufs[DIGESTS_OFFSET].wb_ke_pc[loop_pos + t]; #endif @@ -433,10 +433,10 @@ KERNEL_FQ void m22100_comp (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; // in total we've 60 bytes: we need out0 (16 bytes) to out3 (16 bytes) for MAC verification @@ -448,17 +448,17 @@ KERNEL_FQ void m22100_comp (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) // some early reject: - out1[0] ^= esalt_bufs[digests_offset].data[4]; // skip MAC for now (first 16 bytes) + out1[0] ^= esalt_bufs[DIGESTS_OFFSET].data[4]; // skip MAC for now (first 16 bytes) if ((out1[0] & 0xffff0000) != 0x2c000000) return; // data_size must be 0x2c00 - out1[1] ^= esalt_bufs[digests_offset].data[5]; + out1[1] ^= esalt_bufs[DIGESTS_OFFSET].data[5]; if ((out1[1] & 0xffff0000) != 0x01000000) return; // version must be 0x0100 - out1[2] ^= esalt_bufs[digests_offset].data[6]; + out1[2] ^= esalt_bufs[DIGESTS_OFFSET].data[6]; if ((out1[2] & 0x00ff0000) != 0x00200000) return; // v2 must be 0x20 @@ -466,19 +466,19 @@ KERNEL_FQ void m22100_comp (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) // if no MAC verification should be performed, we are already done: - u32 type = esalt_bufs[digests_offset].type; + u32 type = esalt_bufs[DIGESTS_OFFSET].type; if (type == 0) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; } - out1[3] ^= esalt_bufs[digests_offset].data[7]; + out1[3] ^= esalt_bufs[DIGESTS_OFFSET].data[7]; /* * Decrypt the whole data buffer for MAC verification (type == 1): @@ -492,10 +492,10 @@ KERNEL_FQ void m22100_comp (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) AES256_encrypt (ks, iv, out0, s_te0, s_te1, s_te2, s_te3, s_te4); - out0[0] ^= esalt_bufs[digests_offset].data[0]; - out0[1] ^= esalt_bufs[digests_offset].data[1]; - out0[2] ^= esalt_bufs[digests_offset].data[2]; - out0[3] ^= esalt_bufs[digests_offset].data[3]; + out0[0] ^= esalt_bufs[DIGESTS_OFFSET].data[0]; + out0[1] ^= esalt_bufs[DIGESTS_OFFSET].data[1]; + out0[2] ^= esalt_bufs[DIGESTS_OFFSET].data[2]; + out0[3] ^= esalt_bufs[DIGESTS_OFFSET].data[3]; // 2 @@ -507,10 +507,10 @@ KERNEL_FQ void m22100_comp (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) AES256_encrypt (ks, iv, out2, s_te0, s_te1, s_te2, s_te3, s_te4); - out2[0] ^= esalt_bufs[digests_offset].data[ 8]; - out2[1] ^= esalt_bufs[digests_offset].data[ 9]; - out2[2] ^= esalt_bufs[digests_offset].data[10]; - out2[3] ^= esalt_bufs[digests_offset].data[11]; + out2[0] ^= esalt_bufs[DIGESTS_OFFSET].data[ 8]; + out2[1] ^= esalt_bufs[DIGESTS_OFFSET].data[ 9]; + out2[2] ^= esalt_bufs[DIGESTS_OFFSET].data[10]; + out2[3] ^= esalt_bufs[DIGESTS_OFFSET].data[11]; // 3 @@ -520,9 +520,9 @@ KERNEL_FQ void m22100_comp (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) AES256_encrypt (ks, iv, out3, s_te0, s_te1, s_te2, s_te3, s_te4); - out3[0] ^= esalt_bufs[digests_offset].data[12]; - out3[1] ^= esalt_bufs[digests_offset].data[13]; - out3[2] ^= esalt_bufs[digests_offset].data[14]; + out3[0] ^= esalt_bufs[DIGESTS_OFFSET].data[12]; + out3[1] ^= esalt_bufs[DIGESTS_OFFSET].data[13]; + out3[2] ^= esalt_bufs[DIGESTS_OFFSET].data[14]; // compute MAC: @@ -569,8 +569,8 @@ KERNEL_FQ void m22100_comp (KERN_ATTR_TMPS_ESALT (bitlocker_tmp_t, bitlocker_t)) // if we end up here, we are sure to have found the correct password: - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } } diff --git a/OpenCL/m22200_a0-optimized.cl b/OpenCL/m22200_a0-optimized.cl index 8c0e51b03..112a4de7a 100644 --- a/OpenCL/m22200_a0-optimized.cl +++ b/OpenCL/m22200_a0-optimized.cl @@ -158,10 +158,10 @@ KERNEL_FQ void m22200_m04 (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -281,10 +281,10 @@ KERNEL_FQ void m22200_s04 (KERN_ATTR_RULES ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -292,10 +292,10 @@ KERNEL_FQ void m22200_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m22200_a0-pure.cl b/OpenCL/m22200_a0-pure.cl index ce07ea73a..3f0aab63d 100644 --- a/OpenCL/m22200_a0-pure.cl +++ b/OpenCL/m22200_a0-pure.cl @@ -39,7 +39,7 @@ KERNEL_FQ void m22200_mxx (KERN_ATTR_RULES ()) sha512_init (&ctx0); - sha512_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -85,10 +85,10 @@ KERNEL_FQ void m22200_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -103,7 +103,7 @@ KERNEL_FQ void m22200_sxx (KERN_ATTR_RULES ()) sha512_init (&ctx0); - sha512_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m22200_a1-optimized.cl b/OpenCL/m22200_a1-optimized.cl index 39ca46c20..3cdc1e2fe 100644 --- a/OpenCL/m22200_a1-optimized.cl +++ b/OpenCL/m22200_a1-optimized.cl @@ -156,10 +156,10 @@ KERNEL_FQ void m22200_m04 (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -167,10 +167,10 @@ KERNEL_FQ void m22200_m04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -351,10 +351,10 @@ KERNEL_FQ void m22200_s04 (KERN_ATTR_BASIC ()) u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -362,10 +362,10 @@ KERNEL_FQ void m22200_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** diff --git a/OpenCL/m22200_a1-pure.cl b/OpenCL/m22200_a1-pure.cl index 5ee5567af..e02d62f87 100644 --- a/OpenCL/m22200_a1-pure.cl +++ b/OpenCL/m22200_a1-pure.cl @@ -35,7 +35,7 @@ KERNEL_FQ void m22200_mxx (KERN_ATTR_BASIC ()) sha512_init (&ctx0); - sha512_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); @@ -80,10 +80,10 @@ KERNEL_FQ void m22200_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -96,7 +96,7 @@ KERNEL_FQ void m22200_sxx (KERN_ATTR_BASIC ()) sha512_init (&ctx0); - sha512_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha512_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len); diff --git a/OpenCL/m22200_a3-optimized.cl b/OpenCL/m22200_a3-optimized.cl index c04f8c8c4..1720702af 100644 --- a/OpenCL/m22200_a3-optimized.cl +++ b/OpenCL/m22200_a3-optimized.cl @@ -135,10 +135,10 @@ DECLSPEC void m22200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -213,10 +213,10 @@ DECLSPEC void m22200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf0[2]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -226,10 +226,10 @@ DECLSPEC void m22200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -349,7 +349,7 @@ KERNEL_FQ void m22200_m04 (KERN_ATTR_BASIC ()) * main */ - m22200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22200_m08 (KERN_ATTR_BASIC ()) @@ -421,7 +421,7 @@ KERNEL_FQ void m22200_m08 (KERN_ATTR_BASIC ()) * main */ - m22200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22200_m16 (KERN_ATTR_BASIC ()) @@ -508,7 +508,7 @@ KERNEL_FQ void m22200_m16 (KERN_ATTR_BASIC ()) * main */ - m22200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22200m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22200_s04 (KERN_ATTR_BASIC ()) @@ -572,7 +572,7 @@ KERNEL_FQ void m22200_s04 (KERN_ATTR_BASIC ()) * main */ - m22200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22200_s08 (KERN_ATTR_BASIC ()) @@ -644,7 +644,7 @@ KERNEL_FQ void m22200_s08 (KERN_ATTR_BASIC ()) * main */ - m22200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22200_s16 (KERN_ATTR_BASIC ()) @@ -731,5 +731,5 @@ KERNEL_FQ void m22200_s16 (KERN_ATTR_BASIC ()) * main */ - m22200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22200s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m22200_a3-pure.cl b/OpenCL/m22200_a3-pure.cl index 294230f5e..2136db122 100644 --- a/OpenCL/m22200_a3-pure.cl +++ b/OpenCL/m22200_a3-pure.cl @@ -44,7 +44,7 @@ KERNEL_FQ void m22200_mxx (KERN_ATTR_VECTOR ()) sha512_init (&ctx0); - sha512_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -96,10 +96,10 @@ KERNEL_FQ void m22200_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -121,7 +121,7 @@ KERNEL_FQ void m22200_sxx (KERN_ATTR_VECTOR ()) sha512_init (&ctx0); - sha512_update_global (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_update_global (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m22300_a0-optimized.cl b/OpenCL/m22300_a0-optimized.cl index 8ca94cb57..5dc804a2c 100644 --- a/OpenCL/m22300_a0-optimized.cl +++ b/OpenCL/m22300_a0-optimized.cl @@ -69,24 +69,24 @@ KERNEL_FQ void m22300_m04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -324,24 +324,24 @@ KERNEL_FQ void m22300_s04 (KERN_ATTR_RULES ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -349,24 +349,24 @@ KERNEL_FQ void m22300_s04 (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m22300_a0-pure.cl b/OpenCL/m22300_a0-pure.cl index bfb212751..bb37e7f9a 100644 --- a/OpenCL/m22300_a0-pure.cl +++ b/OpenCL/m22300_a0-pure.cl @@ -33,13 +33,13 @@ KERNEL_FQ void m22300_mxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; @@ -92,10 +92,10 @@ KERNEL_FQ void m22300_sxx (KERN_ATTR_RULES ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -104,13 +104,13 @@ KERNEL_FQ void m22300_sxx (KERN_ATTR_RULES ()) COPY_PW (pws[gid]); - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; diff --git a/OpenCL/m22300_a1-optimized.cl b/OpenCL/m22300_a1-optimized.cl index ce683086f..3c3f442f2 100644 --- a/OpenCL/m22300_a1-optimized.cl +++ b/OpenCL/m22300_a1-optimized.cl @@ -67,24 +67,24 @@ KERNEL_FQ void m22300_m04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * loop @@ -382,24 +382,24 @@ KERNEL_FQ void m22300_s04 (KERN_ATTR_BASIC ()) u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; /** * digest @@ -407,24 +407,24 @@ KERNEL_FQ void m22300_s04 (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); diff --git a/OpenCL/m22300_a1-pure.cl b/OpenCL/m22300_a1-pure.cl index 018bdc6f9..376f2f9af 100644 --- a/OpenCL/m22300_a1-pure.cl +++ b/OpenCL/m22300_a1-pure.cl @@ -29,13 +29,13 @@ KERNEL_FQ void m22300_mxx (KERN_ATTR_BASIC ()) * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; @@ -86,23 +86,23 @@ KERNEL_FQ void m22300_sxx (KERN_ATTR_BASIC ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * base */ - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32 s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; diff --git a/OpenCL/m22300_a3-optimized.cl b/OpenCL/m22300_a3-optimized.cl index 338c6ce46..d10ff302d 100644 --- a/OpenCL/m22300_a3-optimized.cl +++ b/OpenCL/m22300_a3-optimized.cl @@ -46,46 +46,46 @@ DECLSPEC void m22300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; u32 salt_buf0_t[4]; u32 salt_buf1_t[4]; u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -284,24 +284,24 @@ DECLSPEC void m22300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** * reverse */ - u32 a_rev = digests_buf[digests_offset].digest_buf[0]; - u32 b_rev = digests_buf[digests_offset].digest_buf[1]; - u32 c_rev = digests_buf[digests_offset].digest_buf[2]; - u32 d_rev = digests_buf[digests_offset].digest_buf[3]; - u32 e_rev = digests_buf[digests_offset].digest_buf[4]; - u32 f_rev = digests_buf[digests_offset].digest_buf[5]; - u32 g_rev = digests_buf[digests_offset].digest_buf[6]; - u32 h_rev = digests_buf[digests_offset].digest_buf[7]; + u32 a_rev = digests_buf[DIGESTS_OFFSET].digest_buf[0]; + u32 b_rev = digests_buf[DIGESTS_OFFSET].digest_buf[1]; + u32 c_rev = digests_buf[DIGESTS_OFFSET].digest_buf[2]; + u32 d_rev = digests_buf[DIGESTS_OFFSET].digest_buf[3]; + u32 e_rev = digests_buf[DIGESTS_OFFSET].digest_buf[4]; + u32 f_rev = digests_buf[DIGESTS_OFFSET].digest_buf[5]; + u32 g_rev = digests_buf[DIGESTS_OFFSET].digest_buf[6]; + u32 h_rev = digests_buf[DIGESTS_OFFSET].digest_buf[7]; SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); SHA256_STEP_REV (a_rev, b_rev, c_rev, d_rev, e_rev, f_rev, g_rev, h_rev); @@ -317,46 +317,46 @@ DECLSPEC void m22300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER u32 salt_buf2[4]; u32 salt_buf3[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3[3] = salt_bufs[SALT_POS].salt_buf[15]; u32 salt_buf0_t[4]; u32 salt_buf1_t[4]; u32 salt_buf2_t[4]; u32 salt_buf3_t[4]; - salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0]; - salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1]; - salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2]; - salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3]; - salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4]; - salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5]; - salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6]; - salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7]; - salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8]; - salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9]; - salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10]; - salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11]; - salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12]; - salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13]; - salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14]; - salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15]; + salt_buf0_t[0] = salt_bufs[SALT_POS].salt_buf[ 0]; + salt_buf0_t[1] = salt_bufs[SALT_POS].salt_buf[ 1]; + salt_buf0_t[2] = salt_bufs[SALT_POS].salt_buf[ 2]; + salt_buf0_t[3] = salt_bufs[SALT_POS].salt_buf[ 3]; + salt_buf1_t[0] = salt_bufs[SALT_POS].salt_buf[ 4]; + salt_buf1_t[1] = salt_bufs[SALT_POS].salt_buf[ 5]; + salt_buf1_t[2] = salt_bufs[SALT_POS].salt_buf[ 6]; + salt_buf1_t[3] = salt_bufs[SALT_POS].salt_buf[ 7]; + salt_buf2_t[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + salt_buf2_t[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + salt_buf2_t[2] = salt_bufs[SALT_POS].salt_buf[10]; + salt_buf2_t[3] = salt_bufs[SALT_POS].salt_buf[11]; + salt_buf3_t[0] = salt_bufs[SALT_POS].salt_buf[12]; + salt_buf3_t[1] = salt_bufs[SALT_POS].salt_buf[13]; + salt_buf3_t[2] = salt_bufs[SALT_POS].salt_buf[14]; + salt_buf3_t[3] = salt_bufs[SALT_POS].salt_buf[15]; - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; const u32 pw_salt_len = pw_len + salt_len; @@ -587,7 +587,7 @@ KERNEL_FQ void m22300_m04 (KERN_ATTR_BASIC ()) * main */ - m22300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22300_m08 (KERN_ATTR_BASIC ()) @@ -634,7 +634,7 @@ KERNEL_FQ void m22300_m08 (KERN_ATTR_BASIC ()) * main */ - m22300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22300_m16 (KERN_ATTR_BASIC ()) @@ -681,7 +681,7 @@ KERNEL_FQ void m22300_m16 (KERN_ATTR_BASIC ()) * main */ - m22300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22300m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22300_s04 (KERN_ATTR_BASIC ()) @@ -728,7 +728,7 @@ KERNEL_FQ void m22300_s04 (KERN_ATTR_BASIC ()) * main */ - m22300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22300_s08 (KERN_ATTR_BASIC ()) @@ -775,7 +775,7 @@ KERNEL_FQ void m22300_s08 (KERN_ATTR_BASIC ()) * main */ - m22300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22300_s16 (KERN_ATTR_BASIC ()) @@ -822,5 +822,5 @@ KERNEL_FQ void m22300_s16 (KERN_ATTR_BASIC ()) * main */ - m22300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22300s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m22300_a3-pure.cl b/OpenCL/m22300_a3-pure.cl index 398027754..164e32f0a 100644 --- a/OpenCL/m22300_a3-pure.cl +++ b/OpenCL/m22300_a3-pure.cl @@ -38,20 +38,20 @@ KERNEL_FQ void m22300_mxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32 (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop @@ -103,10 +103,10 @@ KERNEL_FQ void m22300_sxx (KERN_ATTR_VECTOR ()) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[DGST_R0], - digests_buf[digests_offset].digest_buf[DGST_R1], - digests_buf[digests_offset].digest_buf[DGST_R2], - digests_buf[digests_offset].digest_buf[DGST_R3] + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] }; /** @@ -122,20 +122,20 @@ KERNEL_FQ void m22300_sxx (KERN_ATTR_VECTOR ()) w[idx] = pws[gid].i[idx]; } - const u32 salt_len = salt_bufs[salt_pos].salt_len; + const u32 salt_len = salt_bufs[SALT_POS].salt_len; u32x s[64] = { 0 }; for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { - s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); + s[idx] = hc_swap32 (salt_bufs[SALT_POS].salt_buf[idx]); } sha256_ctx_t ctx0; sha256_init (&ctx0); - sha256_update_global_swap (&ctx0, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); /** * loop diff --git a/OpenCL/m22400-pure.cl b/OpenCL/m22400-pure.cl index c8dded678..8045986c5 100644 --- a/OpenCL/m22400-pure.cl +++ b/OpenCL/m22400-pure.cl @@ -45,10 +45,10 @@ KERNEL_FQ void m22400_init (KERN_ATTR_TMPS_ESALT (aescrypt_tmp_t, aescrypt_t)) u32 s[16] = { 0 }; // 64-byte aligned - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; // convert password to utf16le: @@ -258,21 +258,21 @@ KERNEL_FQ void m22400_comp (KERN_ATTR_TMPS_ESALT (aescrypt_tmp_t, aescrypt_t)) u32 data[16] = { 0 }; - data[ 0] = esalt_bufs[digests_offset].iv[0]; - data[ 1] = esalt_bufs[digests_offset].iv[1]; - data[ 2] = esalt_bufs[digests_offset].iv[2]; - data[ 3] = esalt_bufs[digests_offset].iv[3]; + data[ 0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + data[ 1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + data[ 2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + data[ 3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; // key - data[ 4] = esalt_bufs[digests_offset].key[0]; - data[ 5] = esalt_bufs[digests_offset].key[1]; - data[ 6] = esalt_bufs[digests_offset].key[2]; - data[ 7] = esalt_bufs[digests_offset].key[3]; - data[ 8] = esalt_bufs[digests_offset].key[4]; - data[ 9] = esalt_bufs[digests_offset].key[5]; - data[10] = esalt_bufs[digests_offset].key[6]; - data[11] = esalt_bufs[digests_offset].key[7]; + data[ 4] = esalt_bufs[DIGESTS_OFFSET].key[0]; + data[ 5] = esalt_bufs[DIGESTS_OFFSET].key[1]; + data[ 6] = esalt_bufs[DIGESTS_OFFSET].key[2]; + data[ 7] = esalt_bufs[DIGESTS_OFFSET].key[3]; + data[ 8] = esalt_bufs[DIGESTS_OFFSET].key[4]; + data[ 9] = esalt_bufs[DIGESTS_OFFSET].key[5]; + data[10] = esalt_bufs[DIGESTS_OFFSET].key[6]; + data[11] = esalt_bufs[DIGESTS_OFFSET].key[7]; /* * HMAC-SHA256: diff --git a/OpenCL/m22500_a0-optimized.cl b/OpenCL/m22500_a0-optimized.cl index 4940e8004..866229b36 100644 --- a/OpenCL/m22500_a0-optimized.cl +++ b/OpenCL/m22500_a0-optimized.cl @@ -112,19 +112,19 @@ KERNEL_FQ void m22500_m04 (KERN_ATTR_RULES ()) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; /** * loop @@ -609,9 +609,9 @@ KERNEL_FQ void m22500_m04 (KERN_ATTR_RULES ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -707,19 +707,19 @@ KERNEL_FQ void m22500_s04 (KERN_ATTR_RULES ()) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; /** * loop @@ -1204,9 +1204,9 @@ KERNEL_FQ void m22500_s04 (KERN_ATTR_RULES ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m22500_a0-pure.cl b/OpenCL/m22500_a0-pure.cl index 41782e501..d59915fd8 100644 --- a/OpenCL/m22500_a0-pure.cl +++ b/OpenCL/m22500_a0-pure.cl @@ -100,19 +100,19 @@ KERNEL_FQ void m22500_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; /** * loop @@ -318,9 +318,9 @@ KERNEL_FQ void m22500_mxx (KERN_ATTR_RULES ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -396,19 +396,19 @@ KERNEL_FQ void m22500_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; /** * loop @@ -614,9 +614,9 @@ KERNEL_FQ void m22500_sxx (KERN_ATTR_RULES ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m22500_a1-optimized.cl b/OpenCL/m22500_a1-optimized.cl index c42de1689..3f5b4b672 100644 --- a/OpenCL/m22500_a1-optimized.cl +++ b/OpenCL/m22500_a1-optimized.cl @@ -111,19 +111,19 @@ KERNEL_FQ void m22500_m04 (KERN_ATTR_BASIC ()) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; /** * loop @@ -668,9 +668,9 @@ KERNEL_FQ void m22500_m04 (KERN_ATTR_BASIC ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -766,19 +766,19 @@ KERNEL_FQ void m22500_s04 (KERN_ATTR_BASIC ()) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; /** * loop @@ -1323,9 +1323,9 @@ KERNEL_FQ void m22500_s04 (KERN_ATTR_BASIC ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m22500_a1-pure.cl b/OpenCL/m22500_a1-pure.cl index 00af53ae4..b2442e889 100644 --- a/OpenCL/m22500_a1-pure.cl +++ b/OpenCL/m22500_a1-pure.cl @@ -96,19 +96,19 @@ KERNEL_FQ void m22500_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; md5_ctx_t ctx0; @@ -322,9 +322,9 @@ KERNEL_FQ void m22500_mxx (KERN_ATTR_BASIC ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -398,19 +398,19 @@ KERNEL_FQ void m22500_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; md5_ctx_t ctx0; @@ -624,9 +624,9 @@ KERNEL_FQ void m22500_sxx (KERN_ATTR_BASIC ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m22500_a3-optimized.cl b/OpenCL/m22500_a3-optimized.cl index ce93eb6a3..4855b6a55 100644 --- a/OpenCL/m22500_a3-optimized.cl +++ b/OpenCL/m22500_a3-optimized.cl @@ -41,8 +41,8 @@ DECLSPEC void m22500 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a u32 salt_buf0[4]; - salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf0[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf0[1] = salt_bufs[SALT_POS].salt_buf[1]; salt_buf0[2] = 0x80; salt_buf0[3] = 0; @@ -73,14 +73,14 @@ DECLSPEC void m22500 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; /** * base @@ -597,9 +597,9 @@ DECLSPEC void m22500 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -696,7 +696,7 @@ KERNEL_FQ void m22500_m04 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22500_m08 (KERN_ATTR_VECTOR ()) @@ -791,7 +791,7 @@ KERNEL_FQ void m22500_m08 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22500_m16 (KERN_ATTR_VECTOR ()) @@ -886,7 +886,7 @@ KERNEL_FQ void m22500_m16 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22500_s04 (KERN_ATTR_VECTOR ()) @@ -981,7 +981,7 @@ KERNEL_FQ void m22500_s04 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22500_s08 (KERN_ATTR_VECTOR ()) @@ -1076,7 +1076,7 @@ KERNEL_FQ void m22500_s08 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m22500_s16 (KERN_ATTR_VECTOR ()) @@ -1171,5 +1171,5 @@ KERNEL_FQ void m22500_s16 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m22500_a3-pure.cl b/OpenCL/m22500_a3-pure.cl index ddc002e57..0e182ad48 100644 --- a/OpenCL/m22500_a3-pure.cl +++ b/OpenCL/m22500_a3-pure.cl @@ -109,19 +109,19 @@ KERNEL_FQ void m22500_mxx (KERN_ATTR_VECTOR ()) u32 s[64] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; /** * loop @@ -331,9 +331,9 @@ KERNEL_FQ void m22500_mxx (KERN_ATTR_VECTOR ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -420,19 +420,19 @@ KERNEL_FQ void m22500_sxx (KERN_ATTR_VECTOR ()) u32 s[64] = { 0 }; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 data[8]; - data[0] = salt_bufs[salt_pos].salt_buf[2]; - data[1] = salt_bufs[salt_pos].salt_buf[3]; - data[2] = salt_bufs[salt_pos].salt_buf[4]; - data[3] = salt_bufs[salt_pos].salt_buf[5]; - data[4] = salt_bufs[salt_pos].salt_buf[6]; - data[5] = salt_bufs[salt_pos].salt_buf[7]; - data[6] = salt_bufs[salt_pos].salt_buf[8]; - data[7] = salt_bufs[salt_pos].salt_buf[9]; + data[0] = salt_bufs[SALT_POS].salt_buf[2]; + data[1] = salt_bufs[SALT_POS].salt_buf[3]; + data[2] = salt_bufs[SALT_POS].salt_buf[4]; + data[3] = salt_bufs[SALT_POS].salt_buf[5]; + data[4] = salt_bufs[SALT_POS].salt_buf[6]; + data[5] = salt_bufs[SALT_POS].salt_buf[7]; + data[6] = salt_bufs[SALT_POS].salt_buf[8]; + data[7] = salt_bufs[SALT_POS].salt_buf[9]; /** * loop @@ -642,9 +642,9 @@ KERNEL_FQ void m22500_sxx (KERN_ATTR_VECTOR ()) if (out[3] != 0x41202145) continue; // "A !E" } - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m22600-pure.cl b/OpenCL/m22600-pure.cl index 46bedd975..972b8224a 100644 --- a/OpenCL/m22600-pure.cl +++ b/OpenCL/m22600-pure.cl @@ -136,7 +136,7 @@ KERNEL_FQ void m22600_init (KERN_ATTR_TMPS_ESALT (telegram_tmp_t, telegram_t)) // salt length is always 32 bytes: - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 34; i += 5, j += 1) { @@ -332,10 +332,10 @@ KERNEL_FQ void m22600_comp (KERN_ATTR_TMPS_ESALT (telegram_tmp_t, telegram_t)) u32 message_key[4]; - message_key[0] = esalt_bufs[digests_offset].data[0]; - message_key[1] = esalt_bufs[digests_offset].data[1]; - message_key[2] = esalt_bufs[digests_offset].data[2]; - message_key[3] = esalt_bufs[digests_offset].data[3]; + message_key[0] = esalt_bufs[DIGESTS_OFFSET].data[0]; + message_key[1] = esalt_bufs[DIGESTS_OFFSET].data[1]; + message_key[2] = esalt_bufs[DIGESTS_OFFSET].data[2]; + message_key[3] = esalt_bufs[DIGESTS_OFFSET].data[3]; u32 data_a[12]; u32 data_b[12]; @@ -469,10 +469,10 @@ KERNEL_FQ void m22600_comp (KERN_ATTR_TMPS_ESALT (telegram_tmp_t, telegram_t)) { u32 x[4]; - x[0] = esalt_bufs[digests_offset].data[4 + i]; - x[1] = esalt_bufs[digests_offset].data[5 + i]; - x[2] = esalt_bufs[digests_offset].data[6 + i]; - x[3] = esalt_bufs[digests_offset].data[7 + i]; + x[0] = esalt_bufs[DIGESTS_OFFSET].data[4 + i]; + x[1] = esalt_bufs[DIGESTS_OFFSET].data[5 + i]; + x[2] = esalt_bufs[DIGESTS_OFFSET].data[6 + i]; + x[3] = esalt_bufs[DIGESTS_OFFSET].data[7 + i]; u32 y[4]; @@ -521,9 +521,9 @@ KERNEL_FQ void m22600_comp (KERN_ATTR_TMPS_ESALT (telegram_tmp_t, telegram_t)) r2 == message_key[2] && r3 == message_key[3]) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } } } diff --git a/OpenCL/m22700-pure.cl b/OpenCL/m22700-pure.cl index f5ec90de5..985a249da 100644 --- a/OpenCL/m22700-pure.cl +++ b/OpenCL/m22700-pure.cl @@ -648,17 +648,17 @@ KERNEL_FQ void m22700_comp (KERN_ATTR_TMPS (scrypt_tmp_t)) u32 iv[4]; - iv[0] = salt_bufs[salt_pos].salt_buf[0]; - iv[1] = salt_bufs[salt_pos].salt_buf[1]; - iv[2] = salt_bufs[salt_pos].salt_buf[2]; - iv[3] = salt_bufs[salt_pos].salt_buf[3]; + iv[0] = salt_bufs[SALT_POS].salt_buf[0]; + iv[1] = salt_bufs[SALT_POS].salt_buf[1]; + iv[2] = salt_bufs[SALT_POS].salt_buf[2]; + iv[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 enc[4]; - enc[0] = salt_bufs[salt_pos].salt_buf[4]; - enc[1] = salt_bufs[salt_pos].salt_buf[5]; - enc[2] = salt_bufs[salt_pos].salt_buf[6]; - enc[3] = salt_bufs[salt_pos].salt_buf[7]; + enc[0] = salt_bufs[SALT_POS].salt_buf[4]; + enc[1] = salt_bufs[SALT_POS].salt_buf[5]; + enc[2] = salt_bufs[SALT_POS].salt_buf[6]; + enc[3] = salt_bufs[SALT_POS].salt_buf[7]; u32 dec[4]; @@ -671,9 +671,9 @@ KERNEL_FQ void m22700_comp (KERN_ATTR_TMPS (scrypt_tmp_t)) if (is_valid_bitcoinj (dec) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; @@ -681,10 +681,10 @@ KERNEL_FQ void m22700_comp (KERN_ATTR_TMPS (scrypt_tmp_t)) // alternative 2 (second block, fixed IV): - enc[0] = salt_bufs[salt_pos].salt_buf[ 8]; - enc[1] = salt_bufs[salt_pos].salt_buf[ 9]; - enc[2] = salt_bufs[salt_pos].salt_buf[10]; - enc[3] = salt_bufs[salt_pos].salt_buf[11]; + enc[0] = salt_bufs[SALT_POS].salt_buf[ 8]; + enc[1] = salt_bufs[SALT_POS].salt_buf[ 9]; + enc[2] = salt_bufs[SALT_POS].salt_buf[10]; + enc[3] = salt_bufs[SALT_POS].salt_buf[11]; aes256_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -695,9 +695,9 @@ KERNEL_FQ void m22700_comp (KERN_ATTR_TMPS (scrypt_tmp_t)) if (is_valid_bitcoinj (dec) == 1) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m22911_a0-pure.cl b/OpenCL/m22911_a0-pure.cl index b5bbaf507..bf880bece 100644 --- a/OpenCL/m22911_a0-pure.cl +++ b/OpenCL/m22911_a0-pure.cl @@ -75,10 +75,10 @@ KERNEL_FQ void m22911_mxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -89,15 +89,15 @@ KERNEL_FQ void m22911_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -105,13 +105,13 @@ KERNEL_FQ void m22911_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -281,10 +281,10 @@ KERNEL_FQ void m22911_sxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -295,15 +295,15 @@ KERNEL_FQ void m22911_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -311,13 +311,13 @@ KERNEL_FQ void m22911_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22911_a1-pure.cl b/OpenCL/m22911_a1-pure.cl index 2ff5468b0..313e66589 100644 --- a/OpenCL/m22911_a1-pure.cl +++ b/OpenCL/m22911_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m22911_mxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -85,15 +85,15 @@ KERNEL_FQ void m22911_mxx (KERN_ATTR_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -101,13 +101,13 @@ KERNEL_FQ void m22911_mxx (KERN_ATTR_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -277,10 +277,10 @@ KERNEL_FQ void m22911_sxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -289,15 +289,15 @@ KERNEL_FQ void m22911_sxx (KERN_ATTR_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -305,13 +305,13 @@ KERNEL_FQ void m22911_sxx (KERN_ATTR_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22911_a3-pure.cl b/OpenCL/m22911_a3-pure.cl index 594e9805f..b2294ddb8 100644 --- a/OpenCL/m22911_a3-pure.cl +++ b/OpenCL/m22911_a3-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m22911_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -85,15 +85,15 @@ KERNEL_FQ void m22911_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -101,13 +101,13 @@ KERNEL_FQ void m22911_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base @@ -294,10 +294,10 @@ KERNEL_FQ void m22911_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -306,15 +306,15 @@ KERNEL_FQ void m22911_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -322,13 +322,13 @@ KERNEL_FQ void m22911_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base diff --git a/OpenCL/m22921_a0-pure.cl b/OpenCL/m22921_a0-pure.cl index e3de223ae..5ef866aba 100644 --- a/OpenCL/m22921_a0-pure.cl +++ b/OpenCL/m22921_a0-pure.cl @@ -75,10 +75,10 @@ KERNEL_FQ void m22921_mxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -89,15 +89,15 @@ KERNEL_FQ void m22921_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -105,13 +105,13 @@ KERNEL_FQ void m22921_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -248,10 +248,10 @@ KERNEL_FQ void m22921_sxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -262,15 +262,15 @@ KERNEL_FQ void m22921_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -278,13 +278,13 @@ KERNEL_FQ void m22921_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22921_a1-pure.cl b/OpenCL/m22921_a1-pure.cl index d91767287..b6b8918f2 100644 --- a/OpenCL/m22921_a1-pure.cl +++ b/OpenCL/m22921_a1-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m22921_mxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -85,15 +85,15 @@ KERNEL_FQ void m22921_mxx (KERN_ATTR_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -101,13 +101,13 @@ KERNEL_FQ void m22921_mxx (KERN_ATTR_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -242,10 +242,10 @@ KERNEL_FQ void m22921_sxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -254,15 +254,15 @@ KERNEL_FQ void m22921_sxx (KERN_ATTR_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -270,13 +270,13 @@ KERNEL_FQ void m22921_sxx (KERN_ATTR_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22921_a3-pure.cl b/OpenCL/m22921_a3-pure.cl index 8eb15d0a1..c3d586802 100644 --- a/OpenCL/m22921_a3-pure.cl +++ b/OpenCL/m22921_a3-pure.cl @@ -73,10 +73,10 @@ KERNEL_FQ void m22921_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -85,15 +85,15 @@ KERNEL_FQ void m22921_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -101,13 +101,13 @@ KERNEL_FQ void m22921_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base @@ -262,10 +262,10 @@ KERNEL_FQ void m22921_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -274,15 +274,15 @@ KERNEL_FQ void m22921_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[2]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; u32 first_data[2]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -290,13 +290,13 @@ KERNEL_FQ void m22921_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; u32 enc[2]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base diff --git a/OpenCL/m22931_a0-pure.cl b/OpenCL/m22931_a0-pure.cl index 62aaf84d4..6856822df 100644 --- a/OpenCL/m22931_a0-pure.cl +++ b/OpenCL/m22931_a0-pure.cl @@ -91,10 +91,10 @@ KERNEL_FQ void m22931_mxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -105,19 +105,19 @@ KERNEL_FQ void m22931_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -125,17 +125,17 @@ KERNEL_FQ void m22931_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -298,10 +298,10 @@ KERNEL_FQ void m22931_sxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -312,19 +312,19 @@ KERNEL_FQ void m22931_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -332,17 +332,17 @@ KERNEL_FQ void m22931_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22931_a1-pure.cl b/OpenCL/m22931_a1-pure.cl index 24810cd5f..983844177 100644 --- a/OpenCL/m22931_a1-pure.cl +++ b/OpenCL/m22931_a1-pure.cl @@ -89,10 +89,10 @@ KERNEL_FQ void m22931_mxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -101,19 +101,19 @@ KERNEL_FQ void m22931_mxx (KERN_ATTR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -121,17 +121,17 @@ KERNEL_FQ void m22931_mxx (KERN_ATTR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -292,10 +292,10 @@ KERNEL_FQ void m22931_sxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -304,19 +304,19 @@ KERNEL_FQ void m22931_sxx (KERN_ATTR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -324,17 +324,17 @@ KERNEL_FQ void m22931_sxx (KERN_ATTR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22931_a3-pure.cl b/OpenCL/m22931_a3-pure.cl index 1ce87a47b..e4ac41d43 100644 --- a/OpenCL/m22931_a3-pure.cl +++ b/OpenCL/m22931_a3-pure.cl @@ -89,10 +89,10 @@ KERNEL_FQ void m22931_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -101,19 +101,19 @@ KERNEL_FQ void m22931_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -121,17 +121,17 @@ KERNEL_FQ void m22931_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base @@ -311,10 +311,10 @@ KERNEL_FQ void m22931_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -323,19 +323,19 @@ KERNEL_FQ void m22931_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -343,17 +343,17 @@ KERNEL_FQ void m22931_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base diff --git a/OpenCL/m22941_a0-pure.cl b/OpenCL/m22941_a0-pure.cl index 50e2d7265..3db9941ac 100644 --- a/OpenCL/m22941_a0-pure.cl +++ b/OpenCL/m22941_a0-pure.cl @@ -91,10 +91,10 @@ KERNEL_FQ void m22941_mxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -105,19 +105,19 @@ KERNEL_FQ void m22941_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -125,17 +125,17 @@ KERNEL_FQ void m22941_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -318,10 +318,10 @@ KERNEL_FQ void m22941_sxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -332,19 +332,19 @@ KERNEL_FQ void m22941_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -352,17 +352,17 @@ KERNEL_FQ void m22941_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22941_a1-pure.cl b/OpenCL/m22941_a1-pure.cl index a4e4ab7d1..ede85eef5 100644 --- a/OpenCL/m22941_a1-pure.cl +++ b/OpenCL/m22941_a1-pure.cl @@ -89,10 +89,10 @@ KERNEL_FQ void m22941_mxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -101,19 +101,19 @@ KERNEL_FQ void m22941_mxx (KERN_ATTR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -121,17 +121,17 @@ KERNEL_FQ void m22941_mxx (KERN_ATTR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -314,10 +314,10 @@ KERNEL_FQ void m22941_sxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -326,19 +326,19 @@ KERNEL_FQ void m22941_sxx (KERN_ATTR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -346,17 +346,17 @@ KERNEL_FQ void m22941_sxx (KERN_ATTR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22941_a3-pure.cl b/OpenCL/m22941_a3-pure.cl index 08d14a35d..291e37da6 100644 --- a/OpenCL/m22941_a3-pure.cl +++ b/OpenCL/m22941_a3-pure.cl @@ -89,10 +89,10 @@ KERNEL_FQ void m22941_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -101,19 +101,19 @@ KERNEL_FQ void m22941_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -121,17 +121,17 @@ KERNEL_FQ void m22941_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base @@ -331,10 +331,10 @@ KERNEL_FQ void m22941_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -343,19 +343,19 @@ KERNEL_FQ void m22941_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -363,17 +363,17 @@ KERNEL_FQ void m22941_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base diff --git a/OpenCL/m22951_a0-pure.cl b/OpenCL/m22951_a0-pure.cl index 38427e991..2e7f655cb 100644 --- a/OpenCL/m22951_a0-pure.cl +++ b/OpenCL/m22951_a0-pure.cl @@ -91,10 +91,10 @@ KERNEL_FQ void m22951_mxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -105,19 +105,19 @@ KERNEL_FQ void m22951_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -125,17 +125,17 @@ KERNEL_FQ void m22951_mxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -322,10 +322,10 @@ KERNEL_FQ void m22951_sxx (KERN_ATTR_RULES_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -336,19 +336,19 @@ KERNEL_FQ void m22951_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -356,17 +356,17 @@ KERNEL_FQ void m22951_sxx (KERN_ATTR_RULES_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22951_a1-pure.cl b/OpenCL/m22951_a1-pure.cl index aaf6af3be..41296ef30 100644 --- a/OpenCL/m22951_a1-pure.cl +++ b/OpenCL/m22951_a1-pure.cl @@ -89,10 +89,10 @@ KERNEL_FQ void m22951_mxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -101,19 +101,19 @@ KERNEL_FQ void m22951_mxx (KERN_ATTR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -121,17 +121,17 @@ KERNEL_FQ void m22951_mxx (KERN_ATTR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop @@ -318,10 +318,10 @@ KERNEL_FQ void m22951_sxx (KERN_ATTR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -330,19 +330,19 @@ KERNEL_FQ void m22951_sxx (KERN_ATTR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -350,17 +350,17 @@ KERNEL_FQ void m22951_sxx (KERN_ATTR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * loop diff --git a/OpenCL/m22951_a3-pure.cl b/OpenCL/m22951_a3-pure.cl index e2753d621..8200194e9 100644 --- a/OpenCL/m22951_a3-pure.cl +++ b/OpenCL/m22951_a3-pure.cl @@ -89,10 +89,10 @@ KERNEL_FQ void m22951_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -101,19 +101,19 @@ KERNEL_FQ void m22951_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -121,17 +121,17 @@ KERNEL_FQ void m22951_mxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base @@ -335,10 +335,10 @@ KERNEL_FQ void m22951_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) const u32 search[4] = { - digests_buf[digests_offset].digest_buf[0], - digests_buf[digests_offset].digest_buf[1], - digests_buf[digests_offset].digest_buf[2], - digests_buf[digests_offset].digest_buf[3] + digests_buf[DIGESTS_OFFSET].digest_buf[0], + digests_buf[DIGESTS_OFFSET].digest_buf[1], + digests_buf[DIGESTS_OFFSET].digest_buf[2], + digests_buf[DIGESTS_OFFSET].digest_buf[3] }; /** @@ -347,19 +347,19 @@ KERNEL_FQ void m22951_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 s[4]; - s[0] = salt_bufs[salt_pos].salt_buf[0]; - s[1] = salt_bufs[salt_pos].salt_buf[1]; - s[2] = salt_bufs[salt_pos].salt_buf[2]; - s[3] = salt_bufs[salt_pos].salt_buf[3]; + s[0] = salt_bufs[SALT_POS].salt_buf[0]; + s[1] = salt_bufs[SALT_POS].salt_buf[1]; + s[2] = salt_bufs[SALT_POS].salt_buf[2]; + s[3] = salt_bufs[SALT_POS].salt_buf[3]; u32 first_data[4]; - first_data[0] = esalt_bufs[digests_offset].data_buf[0]; - first_data[1] = esalt_bufs[digests_offset].data_buf[1]; - first_data[2] = esalt_bufs[digests_offset].data_buf[2]; - first_data[3] = esalt_bufs[digests_offset].data_buf[3]; + first_data[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + first_data[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + first_data[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + first_data[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; - const int data_len = esalt_bufs[digests_offset].data_len; + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; const int last_pad_pos = data_len - 1; @@ -367,17 +367,17 @@ KERNEL_FQ void m22951_sxx (KERN_ATTR_VECTOR_ESALT (pem_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 7]; - iv[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 6]; - iv[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 5]; - iv[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 4]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; u32 enc[4]; - enc[0] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 3]; - enc[1] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 2]; - enc[2] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 1]; - enc[3] = esalt_bufs[digests_offset].data_buf[last_pad_elem - 0]; + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; /** * base diff --git a/OpenCL/m23001_a0-optimized.cl b/OpenCL/m23001_a0-optimized.cl index 38e36df2d..800521e0c 100644 --- a/OpenCL/m23001_a0-optimized.cl +++ b/OpenCL/m23001_a0-optimized.cl @@ -312,17 +312,17 @@ KERNEL_FQ void m23001_m04 (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -344,9 +344,9 @@ KERNEL_FQ void m23001_m04 (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -646,17 +646,17 @@ KERNEL_FQ void m23001_s04 (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -678,9 +678,9 @@ KERNEL_FQ void m23001_s04 (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23001_a0-pure.cl b/OpenCL/m23001_a0-pure.cl index 0ce3cf586..8bf4f6855 100644 --- a/OpenCL/m23001_a0-pure.cl +++ b/OpenCL/m23001_a0-pure.cl @@ -178,17 +178,17 @@ KERNEL_FQ void m23001_mxx (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -210,9 +210,9 @@ KERNEL_FQ void m23001_mxx (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -370,17 +370,17 @@ KERNEL_FQ void m23001_sxx (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -402,9 +402,9 @@ KERNEL_FQ void m23001_sxx (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23001_a1-optimized.cl b/OpenCL/m23001_a1-optimized.cl index dcbcab1cc..db7dce410 100644 --- a/OpenCL/m23001_a1-optimized.cl +++ b/OpenCL/m23001_a1-optimized.cl @@ -368,17 +368,17 @@ KERNEL_FQ void m23001_m04 (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -400,9 +400,9 @@ KERNEL_FQ void m23001_m04 (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -760,17 +760,17 @@ KERNEL_FQ void m23001_s04 (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -792,9 +792,9 @@ KERNEL_FQ void m23001_s04 (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23001_a1-pure.cl b/OpenCL/m23001_a1-pure.cl index cf4f004c2..cd0762c9d 100644 --- a/OpenCL/m23001_a1-pure.cl +++ b/OpenCL/m23001_a1-pure.cl @@ -174,17 +174,17 @@ KERNEL_FQ void m23001_mxx (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -206,9 +206,9 @@ KERNEL_FQ void m23001_mxx (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -364,17 +364,17 @@ KERNEL_FQ void m23001_sxx (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -396,9 +396,9 @@ KERNEL_FQ void m23001_sxx (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23001_a3-optimized.cl b/OpenCL/m23001_a3-optimized.cl index 04c4c264b..27de74343 100644 --- a/OpenCL/m23001_a3-optimized.cl +++ b/OpenCL/m23001_a3-optimized.cl @@ -338,17 +338,17 @@ DECLSPEC void m23001m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -370,9 +370,9 @@ DECLSPEC void m23001m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -692,17 +692,17 @@ DECLSPEC void m23001s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -724,9 +724,9 @@ DECLSPEC void m23001s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -820,7 +820,7 @@ KERNEL_FQ void m23001_m04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23001_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -911,7 +911,7 @@ KERNEL_FQ void m23001_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23001_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1002,7 +1002,7 @@ KERNEL_FQ void m23001_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23001_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1093,7 +1093,7 @@ KERNEL_FQ void m23001_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23001_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1184,7 +1184,7 @@ KERNEL_FQ void m23001_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23001_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1275,5 +1275,5 @@ KERNEL_FQ void m23001_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m23001_a3-pure.cl b/OpenCL/m23001_a3-pure.cl index 9875bdf79..0ac32cc4a 100644 --- a/OpenCL/m23001_a3-pure.cl +++ b/OpenCL/m23001_a3-pure.cl @@ -187,17 +187,17 @@ KERNEL_FQ void m23001_mxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -219,9 +219,9 @@ KERNEL_FQ void m23001_mxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -390,17 +390,17 @@ KERNEL_FQ void m23001_sxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 44 @@ -422,9 +422,9 @@ KERNEL_FQ void m23001_sxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23002_a0-optimized.cl b/OpenCL/m23002_a0-optimized.cl index 8ef0e36a9..5c45093ab 100644 --- a/OpenCL/m23002_a0-optimized.cl +++ b/OpenCL/m23002_a0-optimized.cl @@ -365,17 +365,17 @@ KERNEL_FQ void m23002_m04 (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -397,9 +397,9 @@ KERNEL_FQ void m23002_m04 (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -752,17 +752,17 @@ KERNEL_FQ void m23002_s04 (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -784,9 +784,9 @@ KERNEL_FQ void m23002_s04 (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23002_a0-pure.cl b/OpenCL/m23002_a0-pure.cl index 309f07cfa..278dfe8e7 100644 --- a/OpenCL/m23002_a0-pure.cl +++ b/OpenCL/m23002_a0-pure.cl @@ -231,17 +231,17 @@ KERNEL_FQ void m23002_mxx (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -263,9 +263,9 @@ KERNEL_FQ void m23002_mxx (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -476,17 +476,17 @@ KERNEL_FQ void m23002_sxx (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -508,9 +508,9 @@ KERNEL_FQ void m23002_sxx (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23002_a1-optimized.cl b/OpenCL/m23002_a1-optimized.cl index bf8e90201..92809b922 100644 --- a/OpenCL/m23002_a1-optimized.cl +++ b/OpenCL/m23002_a1-optimized.cl @@ -421,17 +421,17 @@ KERNEL_FQ void m23002_m04 (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -453,9 +453,9 @@ KERNEL_FQ void m23002_m04 (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -866,17 +866,17 @@ KERNEL_FQ void m23002_s04 (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -898,9 +898,9 @@ KERNEL_FQ void m23002_s04 (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23002_a1-pure.cl b/OpenCL/m23002_a1-pure.cl index d0dc1648c..97804af53 100644 --- a/OpenCL/m23002_a1-pure.cl +++ b/OpenCL/m23002_a1-pure.cl @@ -227,17 +227,17 @@ KERNEL_FQ void m23002_mxx (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -259,9 +259,9 @@ KERNEL_FQ void m23002_mxx (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -470,17 +470,17 @@ KERNEL_FQ void m23002_sxx (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -502,9 +502,9 @@ KERNEL_FQ void m23002_sxx (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23002_a3-optimized.cl b/OpenCL/m23002_a3-optimized.cl index e81f891a9..4a4ee3dd6 100644 --- a/OpenCL/m23002_a3-optimized.cl +++ b/OpenCL/m23002_a3-optimized.cl @@ -391,17 +391,17 @@ DECLSPEC void m23002m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -423,9 +423,9 @@ DECLSPEC void m23002m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -798,17 +798,17 @@ DECLSPEC void m23002s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -830,9 +830,9 @@ DECLSPEC void m23002s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -926,7 +926,7 @@ KERNEL_FQ void m23002_m04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23002_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1017,7 +1017,7 @@ KERNEL_FQ void m23002_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23002_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1108,7 +1108,7 @@ KERNEL_FQ void m23002_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23002_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1199,7 +1199,7 @@ KERNEL_FQ void m23002_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23002_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1290,7 +1290,7 @@ KERNEL_FQ void m23002_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23002_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1381,5 +1381,5 @@ KERNEL_FQ void m23002_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m23002_a3-pure.cl b/OpenCL/m23002_a3-pure.cl index 0dd5cf00b..ef1968170 100644 --- a/OpenCL/m23002_a3-pure.cl +++ b/OpenCL/m23002_a3-pure.cl @@ -240,17 +240,17 @@ KERNEL_FQ void m23002_mxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -272,9 +272,9 @@ KERNEL_FQ void m23002_mxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -496,17 +496,17 @@ KERNEL_FQ void m23002_sxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 52 @@ -528,9 +528,9 @@ KERNEL_FQ void m23002_sxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23003_a0-optimized.cl b/OpenCL/m23003_a0-optimized.cl index b83e45769..36956f8cf 100644 --- a/OpenCL/m23003_a0-optimized.cl +++ b/OpenCL/m23003_a0-optimized.cl @@ -367,17 +367,17 @@ KERNEL_FQ void m23003_m04 (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -399,9 +399,9 @@ KERNEL_FQ void m23003_m04 (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -756,17 +756,17 @@ KERNEL_FQ void m23003_s04 (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -788,9 +788,9 @@ KERNEL_FQ void m23003_s04 (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23003_a0-pure.cl b/OpenCL/m23003_a0-pure.cl index 62c15e642..1dcf9cca5 100644 --- a/OpenCL/m23003_a0-pure.cl +++ b/OpenCL/m23003_a0-pure.cl @@ -233,17 +233,17 @@ KERNEL_FQ void m23003_mxx (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -265,9 +265,9 @@ KERNEL_FQ void m23003_mxx (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -480,17 +480,17 @@ KERNEL_FQ void m23003_sxx (KERN_ATTR_RULES_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -512,9 +512,9 @@ KERNEL_FQ void m23003_sxx (KERN_ATTR_RULES_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23003_a1-optimized.cl b/OpenCL/m23003_a1-optimized.cl index 1e38939b1..341d4f476 100644 --- a/OpenCL/m23003_a1-optimized.cl +++ b/OpenCL/m23003_a1-optimized.cl @@ -423,17 +423,17 @@ KERNEL_FQ void m23003_m04 (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -455,9 +455,9 @@ KERNEL_FQ void m23003_m04 (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -870,17 +870,17 @@ KERNEL_FQ void m23003_s04 (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -902,9 +902,9 @@ KERNEL_FQ void m23003_s04 (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23003_a1-pure.cl b/OpenCL/m23003_a1-pure.cl index 17d13b16c..138d80829 100644 --- a/OpenCL/m23003_a1-pure.cl +++ b/OpenCL/m23003_a1-pure.cl @@ -229,17 +229,17 @@ KERNEL_FQ void m23003_mxx (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -261,9 +261,9 @@ KERNEL_FQ void m23003_mxx (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -474,17 +474,17 @@ KERNEL_FQ void m23003_sxx (KERN_ATTR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -506,9 +506,9 @@ KERNEL_FQ void m23003_sxx (KERN_ATTR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23003_a3-optimized.cl b/OpenCL/m23003_a3-optimized.cl index 7f6656935..bc5361ad7 100644 --- a/OpenCL/m23003_a3-optimized.cl +++ b/OpenCL/m23003_a3-optimized.cl @@ -393,17 +393,17 @@ DECLSPEC void m23003m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -425,9 +425,9 @@ DECLSPEC void m23003m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -802,17 +802,17 @@ DECLSPEC void m23003s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -834,9 +834,9 @@ DECLSPEC void m23003s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -930,7 +930,7 @@ KERNEL_FQ void m23003_m04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23003_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1021,7 +1021,7 @@ KERNEL_FQ void m23003_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23003_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1112,7 +1112,7 @@ KERNEL_FQ void m23003_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23003_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1203,7 +1203,7 @@ KERNEL_FQ void m23003_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23003_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1294,7 +1294,7 @@ KERNEL_FQ void m23003_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } KERNEL_FQ void m23003_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1385,5 +1385,5 @@ KERNEL_FQ void m23003_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max); + m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); } diff --git a/OpenCL/m23003_a3-pure.cl b/OpenCL/m23003_a3-pure.cl index d1522701c..c4415fdd1 100644 --- a/OpenCL/m23003_a3-pure.cl +++ b/OpenCL/m23003_a3-pure.cl @@ -242,17 +242,17 @@ KERNEL_FQ void m23003_mxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -274,9 +274,9 @@ KERNEL_FQ void m23003_mxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } @@ -500,17 +500,17 @@ KERNEL_FQ void m23003_sxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].data[28]; - iv[1] = esalt_bufs[digests_offset].data[29]; - iv[2] = esalt_bufs[digests_offset].data[30]; - iv[3] = esalt_bufs[digests_offset].data[31]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[28]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[29]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data[30]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data[31]; u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[32]; - data[1] = esalt_bufs[digests_offset].data[33]; - data[2] = esalt_bufs[digests_offset].data[34]; - data[3] = esalt_bufs[digests_offset].data[35]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[32]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[33]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[34]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[35]; #define KEYLEN 60 @@ -532,9 +532,9 @@ KERNEL_FQ void m23003_sxx (KERN_ATTR_VECTOR_ESALT (securezip_t)) (out[2] == 0x10101010) && (out[3] == 0x10101010)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, il_pos, 0, 0); } } } diff --git a/OpenCL/m23100-pure.cl b/OpenCL/m23100-pure.cl index 5c79ea960..ed0957e23 100644 --- a/OpenCL/m23100-pure.cl +++ b/OpenCL/m23100-pure.cl @@ -94,7 +94,7 @@ KERNEL_FQ void m23100_init (KERN_ATTR_TMPS_ESALT (keychain_tmp_t, keychain_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[salt_pos].salt_buf, 20); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, 20); for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) { @@ -294,13 +294,13 @@ KERNEL_FQ void m23100_comp (KERN_ATTR_TMPS_ESALT (keychain_tmp_t, keychain_t)) u32 iv[2]; - iv[0] = esalt_bufs[digests_offset].data[8]; - iv[1] = esalt_bufs[digests_offset].data[9]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].data[8]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data[9]; u32 data[2]; - data[0] = esalt_bufs[digests_offset].data[10]; - data[1] = esalt_bufs[digests_offset].data[11]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[10]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[11]; // 3DES-CBC (decrypt, encrypt, decrypt): @@ -325,9 +325,9 @@ KERNEL_FQ void m23100_comp (KERN_ATTR_TMPS_ESALT (keychain_tmp_t, keychain_t)) if ((out[1] ^ iv[1]) == 0x04040404) // this check uses very low number of bits => collisions { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m23200-pure.cl b/OpenCL/m23200-pure.cl index 344c5215a..8751a8c96 100644 --- a/OpenCL/m23200-pure.cl +++ b/OpenCL/m23200-pure.cl @@ -89,7 +89,7 @@ KERNEL_FQ void m23200_init (KERN_ATTR_TMPS (xmpp_tmp_t)) tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; - sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[digests_offset].salt_buf, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 4; i += 5, j += 1) { diff --git a/OpenCL/m23300-pure.cl b/OpenCL/m23300-pure.cl index a2f0bb4bc..b73be81db 100644 --- a/OpenCL/m23300-pure.cl +++ b/OpenCL/m23300-pure.cl @@ -100,10 +100,10 @@ KERNEL_FQ void m23300_init (KERN_ATTR_TMPS_ESALT (iwork_tmp_t, iwork_t)) u32 w2[4]; u32 w3[4]; - w0[0] = salt_bufs[salt_pos].salt_buf[0]; - w0[1] = salt_bufs[salt_pos].salt_buf[1]; - w0[2] = salt_bufs[salt_pos].salt_buf[2]; - w0[3] = salt_bufs[salt_pos].salt_buf[3]; + w0[0] = salt_bufs[SALT_POS].salt_buf[0]; + w0[1] = salt_bufs[SALT_POS].salt_buf[1]; + w0[2] = salt_bufs[SALT_POS].salt_buf[2]; + w0[3] = salt_bufs[SALT_POS].salt_buf[3]; w1[0] = 0; w1[1] = 0; w1[2] = 0; @@ -117,7 +117,7 @@ KERNEL_FQ void m23300_init (KERN_ATTR_TMPS_ESALT (iwork_tmp_t, iwork_t)) w3[2] = 0; w3[3] = 0; - sha1_hmac_update_64 (&sha1_hmac_ctx, w0, w1, w2, w3, salt_bufs[salt_pos].salt_len); + sha1_hmac_update_64 (&sha1_hmac_ctx, w0, w1, w2, w3, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 4; i += 5, j += 1) { @@ -306,7 +306,7 @@ KERNEL_FQ void m23300_comp (KERN_ATTR_TMPS_ESALT (iwork_tmp_t, iwork_t)) * AES part */ - u32 ukey[8]; + u32 ukey[4]; ukey[0] = tmps[gid].out[0]; ukey[1] = tmps[gid].out[1]; @@ -321,10 +321,10 @@ KERNEL_FQ void m23300_comp (KERN_ATTR_TMPS_ESALT (iwork_tmp_t, iwork_t)) u32 iv[4]; - iv[0] = esalt_bufs[digests_offset].iv[0]; - iv[1] = esalt_bufs[digests_offset].iv[1]; - iv[2] = esalt_bufs[digests_offset].iv[2]; - iv[3] = esalt_bufs[digests_offset].iv[3]; + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv[3]; u32 res[12]; // actually res[16], but we don't need the full 64 bytes output @@ -332,10 +332,10 @@ KERNEL_FQ void m23300_comp (KERN_ATTR_TMPS_ESALT (iwork_tmp_t, iwork_t)) { u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[i + 0]; - data[1] = esalt_bufs[digests_offset].data[i + 1]; - data[2] = esalt_bufs[digests_offset].data[i + 2]; - data[3] = esalt_bufs[digests_offset].data[i + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[i + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[i + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[i + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[i + 3]; u32 out[4]; @@ -400,9 +400,9 @@ KERNEL_FQ void m23300_comp (KERN_ATTR_TMPS_ESALT (iwork_tmp_t, iwork_t)) (res[10] == checksum[2]) && (res[11] == checksum[3])) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m23400-pure.cl b/OpenCL/m23400-pure.cl index 13e9d89a4..12ac3c473 100644 --- a/OpenCL/m23400-pure.cl +++ b/OpenCL/m23400-pure.cl @@ -101,7 +101,7 @@ KERNEL_FQ void m23400_init (KERN_ATTR_TMPS (bitwarden_tmp_t)) tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; - sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx; diff --git a/OpenCL/m23500-pure.cl b/OpenCL/m23500-pure.cl index 202f94d67..cb28b7f0d 100644 --- a/OpenCL/m23500-pure.cl +++ b/OpenCL/m23500-pure.cl @@ -125,7 +125,7 @@ KERNEL_FQ void m23500_init (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global (&sha512_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -361,10 +361,10 @@ KERNEL_FQ void m23500_init2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) u32 salt[4]; - salt[0] = esalt_bufs[digests_offset].salt[0]; - salt[1] = esalt_bufs[digests_offset].salt[1]; - salt[2] = esalt_bufs[digests_offset].salt[2]; - salt[3] = esalt_bufs[digests_offset].salt[3]; + salt[0] = esalt_bufs[DIGESTS_OFFSET].salt[0]; + salt[1] = esalt_bufs[DIGESTS_OFFSET].salt[1]; + salt[2] = esalt_bufs[DIGESTS_OFFSET].salt[2]; + salt[3] = esalt_bufs[DIGESTS_OFFSET].salt[3]; tmps[gid].KEK[0] = KEK[0] ^ salt[0]; tmps[gid].KEK[1] = KEK[1] ^ salt[1]; @@ -373,7 +373,7 @@ KERNEL_FQ void m23500_init2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) for (int i = 0; i < 10; i++) { - tmps[gid].data[i] = esalt_bufs[digests_offset].data[i]; + tmps[gid].data[i] = esalt_bufs[DIGESTS_OFFSET].data[i]; } } @@ -468,7 +468,7 @@ KERNEL_FQ void m23500_loop2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) AES128_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); - const int wrapping_rounds = (int) salt_bufs[salt_pos].salt_iter2; + const int wrapping_rounds = (int) salt_bufs[SALT_POS].salt_iter2; // custom AES un-wrapping loop @@ -511,9 +511,9 @@ KERNEL_FQ void m23500_comp (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) if ((tmps[gid].data[0] == 0xa6a6a6a6) && (tmps[gid].data[1] == 0xa6a6a6a6)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m23600-pure.cl b/OpenCL/m23600-pure.cl index 42e7f687b..3c1a169c0 100644 --- a/OpenCL/m23600-pure.cl +++ b/OpenCL/m23600-pure.cl @@ -125,7 +125,7 @@ KERNEL_FQ void m23600_init (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; - sha512_hmac_update_global (&sha512_hmac_ctx, salt_bufs[salt_pos].salt_buf, salt_bufs[salt_pos].salt_len); + sha512_hmac_update_global (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) { @@ -365,14 +365,14 @@ KERNEL_FQ void m23600_init2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) u32 salt[8]; - salt[0] = esalt_bufs[digests_offset].salt[0]; - salt[1] = esalt_bufs[digests_offset].salt[1]; - salt[2] = esalt_bufs[digests_offset].salt[2]; - salt[3] = esalt_bufs[digests_offset].salt[3]; - salt[4] = esalt_bufs[digests_offset].salt[4]; - salt[5] = esalt_bufs[digests_offset].salt[5]; - salt[6] = esalt_bufs[digests_offset].salt[6]; - salt[7] = esalt_bufs[digests_offset].salt[7]; + salt[0] = esalt_bufs[DIGESTS_OFFSET].salt[0]; + salt[1] = esalt_bufs[DIGESTS_OFFSET].salt[1]; + salt[2] = esalt_bufs[DIGESTS_OFFSET].salt[2]; + salt[3] = esalt_bufs[DIGESTS_OFFSET].salt[3]; + salt[4] = esalt_bufs[DIGESTS_OFFSET].salt[4]; + salt[5] = esalt_bufs[DIGESTS_OFFSET].salt[5]; + salt[6] = esalt_bufs[DIGESTS_OFFSET].salt[6]; + salt[7] = esalt_bufs[DIGESTS_OFFSET].salt[7]; tmps[gid].KEK[0] = KEK[0] ^ salt[0]; tmps[gid].KEK[1] = KEK[1] ^ salt[1]; @@ -385,7 +385,7 @@ KERNEL_FQ void m23600_init2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) for (int i = 0; i < 14; i++) { - tmps[gid].data[i] = esalt_bufs[digests_offset].data[i]; + tmps[gid].data[i] = esalt_bufs[DIGESTS_OFFSET].data[i]; } } @@ -484,7 +484,7 @@ KERNEL_FQ void m23600_loop2 (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) AES256_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); - const int wrapping_rounds = (int) salt_bufs[salt_pos].salt_iter2; + const int wrapping_rounds = (int) salt_bufs[SALT_POS].salt_iter2; // custom AES un-wrapping loop @@ -527,9 +527,9 @@ KERNEL_FQ void m23600_comp (KERN_ATTR_TMPS_ESALT (axcrypt2_tmp_t, axcrypt2_t)) if ((tmps[gid].data[0] == 0xa6a6a6a6) && (tmps[gid].data[1] == 0xa6a6a6a6)) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m23700-optimized.cl b/OpenCL/m23700-optimized.cl index 53d030f06..3968033da 100644 --- a/OpenCL/m23700-optimized.cl +++ b/OpenCL/m23700-optimized.cl @@ -173,8 +173,8 @@ KERNEL_FQ void m23700_loop (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; const u32 salt_len = 8; @@ -503,8 +503,8 @@ KERNEL_FQ void m23700_loop (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; const u32 salt_len = 8; @@ -817,8 +817,8 @@ KERNEL_FQ void m23700_comp (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; //const u32 salt_len = 8; @@ -883,8 +883,8 @@ KERNEL_FQ void m23700_comp (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) iv[2] = hc_swap32_S (iv[2]); iv[3] = hc_swap32_S (iv[3]); - const u32 pack_size = esalt_bufs[digests_offset].pack_size; - const u32 unpack_size = esalt_bufs[digests_offset].unpack_size; + const u32 pack_size = esalt_bufs[DIGESTS_OFFSET].pack_size; + const u32 unpack_size = esalt_bufs[DIGESTS_OFFSET].unpack_size; if (pack_size > unpack_size) // could be aligned { @@ -894,10 +894,10 @@ KERNEL_FQ void m23700_comp (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) u32 last_block_encrypted[4]; - last_block_encrypted[0] = esalt_bufs[digests_offset].data[pack_size_elements - 4 + 0]; - last_block_encrypted[1] = esalt_bufs[digests_offset].data[pack_size_elements - 4 + 1]; - last_block_encrypted[2] = esalt_bufs[digests_offset].data[pack_size_elements - 4 + 2]; - last_block_encrypted[3] = esalt_bufs[digests_offset].data[pack_size_elements - 4 + 3]; + last_block_encrypted[0] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 4 + 0]; + last_block_encrypted[1] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 4 + 1]; + last_block_encrypted[2] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 4 + 2]; + last_block_encrypted[3] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 4 + 3]; u32 last_block_decrypted[4]; @@ -905,10 +905,10 @@ KERNEL_FQ void m23700_comp (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) u32 last_block_iv[4]; - last_block_iv[0] = esalt_bufs[digests_offset].data[pack_size_elements - 8 + 0]; - last_block_iv[1] = esalt_bufs[digests_offset].data[pack_size_elements - 8 + 1]; - last_block_iv[2] = esalt_bufs[digests_offset].data[pack_size_elements - 8 + 2]; - last_block_iv[3] = esalt_bufs[digests_offset].data[pack_size_elements - 8 + 3]; + last_block_iv[0] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 8 + 0]; + last_block_iv[1] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 8 + 1]; + last_block_iv[2] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 8 + 2]; + last_block_iv[3] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 8 + 3]; last_block_decrypted[0] ^= last_block_iv[0]; last_block_decrypted[1] ^= last_block_iv[1]; @@ -927,10 +927,10 @@ KERNEL_FQ void m23700_comp (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) { u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[j + 0]; - data[1] = esalt_bufs[digests_offset].data[j + 1]; - data[2] = esalt_bufs[digests_offset].data[j + 2]; - data[3] = esalt_bufs[digests_offset].data[j + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[j + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[j + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[j + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[j + 3]; u32 out[4]; diff --git a/OpenCL/m23700-pure.cl b/OpenCL/m23700-pure.cl index 5ccae0530..3675e4515 100644 --- a/OpenCL/m23700-pure.cl +++ b/OpenCL/m23700-pure.cl @@ -912,8 +912,8 @@ KERNEL_FQ void m23700_init (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) u32 salt_buf[3]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); // swap needed due to -O kernel - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); // swap needed due to -O kernel + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); salt_buf[2] = 0; // switch buffer by offset (can only be 0 or 2 because of utf16): @@ -1180,8 +1180,8 @@ KERNEL_FQ void m23700_comp (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) AES128_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); - const u32 pack_size = esalt_bufs[digests_offset].pack_size; - const u32 unpack_size = esalt_bufs[digests_offset].unpack_size; + const u32 pack_size = esalt_bufs[DIGESTS_OFFSET].pack_size; + const u32 unpack_size = esalt_bufs[DIGESTS_OFFSET].unpack_size; if (pack_size > unpack_size) // could be aligned { @@ -1191,10 +1191,10 @@ KERNEL_FQ void m23700_comp (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) u32 last_block_encrypted[4]; - last_block_encrypted[0] = esalt_bufs[digests_offset].data[pack_size_elements - 4 + 0]; - last_block_encrypted[1] = esalt_bufs[digests_offset].data[pack_size_elements - 4 + 1]; - last_block_encrypted[2] = esalt_bufs[digests_offset].data[pack_size_elements - 4 + 2]; - last_block_encrypted[3] = esalt_bufs[digests_offset].data[pack_size_elements - 4 + 3]; + last_block_encrypted[0] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 4 + 0]; + last_block_encrypted[1] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 4 + 1]; + last_block_encrypted[2] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 4 + 2]; + last_block_encrypted[3] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 4 + 3]; u32 last_block_decrypted[4]; @@ -1202,10 +1202,10 @@ KERNEL_FQ void m23700_comp (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) u32 last_block_iv[4]; - last_block_iv[0] = esalt_bufs[digests_offset].data[pack_size_elements - 8 + 0]; - last_block_iv[1] = esalt_bufs[digests_offset].data[pack_size_elements - 8 + 1]; - last_block_iv[2] = esalt_bufs[digests_offset].data[pack_size_elements - 8 + 2]; - last_block_iv[3] = esalt_bufs[digests_offset].data[pack_size_elements - 8 + 3]; + last_block_iv[0] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 8 + 0]; + last_block_iv[1] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 8 + 1]; + last_block_iv[2] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 8 + 2]; + last_block_iv[3] = esalt_bufs[DIGESTS_OFFSET].data[pack_size_elements - 8 + 3]; last_block_decrypted[0] ^= last_block_iv[0]; last_block_decrypted[1] ^= last_block_iv[1]; @@ -1236,10 +1236,10 @@ KERNEL_FQ void m23700_comp (KERN_ATTR_TMPS_ESALT (rar3_tmp_t, rar3_t)) { u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[j + 0]; - data[1] = esalt_bufs[digests_offset].data[j + 1]; - data[2] = esalt_bufs[digests_offset].data[j + 2]; - data[3] = esalt_bufs[digests_offset].data[j + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[j + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[j + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[j + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[j + 3]; u32 out[4]; diff --git a/OpenCL/m23800-optimized.cl b/OpenCL/m23800-optimized.cl index 399a35d8b..fdaf41875 100644 --- a/OpenCL/m23800-optimized.cl +++ b/OpenCL/m23800-optimized.cl @@ -83,8 +83,8 @@ KERNEL_FQ void m23800_loop (KERN_ATTR_TMPS_HOOKS_ESALT (rar3_tmp_t, rar3_hook_t, u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; const u32 salt_len = 8; @@ -379,8 +379,8 @@ KERNEL_FQ void m23800_hook23 (KERN_ATTR_TMPS_HOOKS_ESALT (rar3_tmp_t, rar3_hook_ u32 salt_buf[2]; - salt_buf[0] = salt_bufs[salt_pos].salt_buf[0]; - salt_buf[1] = salt_bufs[salt_pos].salt_buf[1]; + salt_buf[0] = salt_bufs[SALT_POS].salt_buf[0]; + salt_buf[1] = salt_bufs[SALT_POS].salt_buf[1]; //const u32 salt_len = 8; @@ -463,10 +463,10 @@ KERNEL_FQ void m23800_hook23 (KERN_ATTR_TMPS_HOOKS_ESALT (rar3_tmp_t, rar3_hook_ u32 data[4]; - data[0] = hc_swap32_S (esalt_bufs[digests_offset].first_block_encrypted[0]); - data[1] = hc_swap32_S (esalt_bufs[digests_offset].first_block_encrypted[1]); - data[2] = hc_swap32_S (esalt_bufs[digests_offset].first_block_encrypted[2]); - data[3] = hc_swap32_S (esalt_bufs[digests_offset].first_block_encrypted[3]); + data[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].first_block_encrypted[0]); + data[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].first_block_encrypted[1]); + data[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].first_block_encrypted[2]); + data[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].first_block_encrypted[3]); u32 out[4]; diff --git a/OpenCL/m23800-pure.cl b/OpenCL/m23800-pure.cl index 9908d53cd..70a28fe36 100644 --- a/OpenCL/m23800-pure.cl +++ b/OpenCL/m23800-pure.cl @@ -823,8 +823,8 @@ KERNEL_FQ void m23800_init (KERN_ATTR_TMPS_HOOKS_ESALT (rar3_tmp_t, rar3_hook_t, u32 salt_buf[3]; - salt_buf[0] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[0]); // swap needed due to -O kernel - salt_buf[1] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[1]); + salt_buf[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[0]); // swap needed due to -O kernel + salt_buf[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[1]); salt_buf[2] = 0; // switch buffer by offset (can only be 0 or 2 because of utf16): @@ -1103,10 +1103,10 @@ KERNEL_FQ void m23800_hook23 (KERN_ATTR_TMPS_HOOKS_ESALT (rar3_tmp_t, rar3_hook_ u32 data[4]; - data[0] = hc_swap32_S (esalt_bufs[digests_offset].first_block_encrypted[0]); - data[1] = hc_swap32_S (esalt_bufs[digests_offset].first_block_encrypted[1]); - data[2] = hc_swap32_S (esalt_bufs[digests_offset].first_block_encrypted[2]); - data[3] = hc_swap32_S (esalt_bufs[digests_offset].first_block_encrypted[3]); + data[0] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].first_block_encrypted[0]); + data[1] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].first_block_encrypted[1]); + data[2] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].first_block_encrypted[2]); + data[3] = hc_swap32_S (esalt_bufs[DIGESTS_OFFSET].first_block_encrypted[3]); u32 out[4]; diff --git a/OpenCL/m23900-pure.cl b/OpenCL/m23900-pure.cl index 02699db1d..7d2c6616f 100644 --- a/OpenCL/m23900-pure.cl +++ b/OpenCL/m23900-pure.cl @@ -35,12 +35,12 @@ KERNEL_FQ void m23900_init (KERN_ATTR_TMPS_ESALT (bestcrypt_tmp_t, bestcrypt_t)) if (gid >= gid_max) return; - const int salt_pw_len = 8 + pws[gid].pw_len; + const int salt_pw_len = 8 + MIN (pws[gid].pw_len, 56); u32 comb[16]; - comb[ 0] = salt_bufs[salt_pos].salt_buf[0]; - comb[ 1] = salt_bufs[salt_pos].salt_buf[1]; + comb[ 0] = salt_bufs[SALT_POS].salt_buf[0]; + comb[ 1] = salt_bufs[SALT_POS].salt_buf[1]; comb[ 2] = hc_swap32_S (pws[gid].i[ 0]); // in theory BE is faster because it comb[ 3] = hc_swap32_S (pws[gid].i[ 1]); // avoids several other byte swaps later on @@ -109,7 +109,7 @@ KERNEL_FQ void m23900_loop (KERN_ATTR_TMPS_ESALT (bestcrypt_tmp_t, bestcrypt_t)) if (gid >= gid_max) return; - const int salt_pw_len = 8 + pws[gid].pw_len; + const int salt_pw_len = 8 + MIN (pws[gid].pw_len, 56); u32 salt_pw_buf[32 + 1]; // 8 + 56 + 64 = 128 bytes @@ -365,10 +365,10 @@ KERNEL_FQ void m23900_comp (KERN_ATTR_TMPS_ESALT (bestcrypt_tmp_t, bestcrypt_t)) { u32 data[4]; - data[0] = esalt_bufs[digests_offset].data[i + 0]; - data[1] = esalt_bufs[digests_offset].data[i + 1]; - data[2] = esalt_bufs[digests_offset].data[i + 2]; - data[3] = esalt_bufs[digests_offset].data[i + 3]; + data[0] = esalt_bufs[DIGESTS_OFFSET].data[i + 0]; + data[1] = esalt_bufs[DIGESTS_OFFSET].data[i + 1]; + data[2] = esalt_bufs[DIGESTS_OFFSET].data[i + 2]; + data[3] = esalt_bufs[DIGESTS_OFFSET].data[i + 3]; u32 out[4]; @@ -444,9 +444,9 @@ KERNEL_FQ void m23900_comp (KERN_ATTR_TMPS_ESALT (bestcrypt_tmp_t, bestcrypt_t)) (digest[2] == res[18]) && (digest[3] == res[19])) { - if (atomic_inc (&hashes_shown[digests_offset]) == 0) + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, 0, 0, 0); + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); } return; diff --git a/OpenCL/m24100-pure.cl b/OpenCL/m24100-pure.cl new file mode 100644 index 000000000..3b2cb60f3 --- /dev/null +++ b/OpenCL/m24100-pure.cl @@ -0,0 +1,366 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_md5.cl" +#include "inc_hash_sha1.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct mongodb_sha1_tmp +{ + u32 ipad[5]; + u32 opad[5]; + + u32 dgst[5]; + u32 out[5]; + +} mongodb_sha1_tmp_t; + +typedef struct mongodb_sha1 +{ + u32 salt[16]; + u32 user[16]; + + u32 user_len; + +} mongodb_sha1_t; + +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = 0x80000000; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 20) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m24100_init (KERN_ATTR_TMPS_ESALT (mongodb_sha1_tmp_t, mongodb_sha1_t)) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * bin2asc table + */ + + LOCAL_VK u32 l_bin2asc[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + const u32 i0 = (i >> 0) & 15; + const u32 i1 = (i >> 4) & 15; + + l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 0 + | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 8; + } + + SYNC_THREADS (); + + if (gid >= gid_max) return; + + md5_ctx_t md5_ctx; + + md5_init (&md5_ctx); + + md5_update_global (&md5_ctx, esalt_bufs[DIGESTS_OFFSET].user, esalt_bufs[DIGESTS_OFFSET].user_len); + md5_update_global (&md5_ctx, pws[gid].i, pws[gid].pw_len); + + md5_final (&md5_ctx); + + u32 a = md5_ctx.h[0]; + u32 b = md5_ctx.h[1]; + u32 c = md5_ctx.h[2]; + u32 d = md5_ctx.h[3]; + + #define uint_to_hex_lower8(i) l_bin2asc[(i)] + + u32 hex[16] = { 0 }; + + hex[0] = uint_to_hex_lower8 ((a >> 8) & 255) << 0 + | uint_to_hex_lower8 ((a >> 0) & 255) << 16; + hex[1] = uint_to_hex_lower8 ((a >> 24) & 255) << 0 + | uint_to_hex_lower8 ((a >> 16) & 255) << 16; + hex[2] = uint_to_hex_lower8 ((b >> 8) & 255) << 0 + | uint_to_hex_lower8 ((b >> 0) & 255) << 16; + hex[3] = uint_to_hex_lower8 ((b >> 24) & 255) << 0 + | uint_to_hex_lower8 ((b >> 16) & 255) << 16; + hex[4] = uint_to_hex_lower8 ((c >> 8) & 255) << 0 + | uint_to_hex_lower8 ((c >> 0) & 255) << 16; + hex[5] = uint_to_hex_lower8 ((c >> 24) & 255) << 0 + | uint_to_hex_lower8 ((c >> 16) & 255) << 16; + hex[6] = uint_to_hex_lower8 ((d >> 8) & 255) << 0 + | uint_to_hex_lower8 ((d >> 0) & 255) << 16; + hex[7] = uint_to_hex_lower8 ((d >> 24) & 255) << 0 + | uint_to_hex_lower8 ((d >> 16) & 255) << 16; + + sha1_hmac_ctx_t sha1_hmac_ctx; + + sha1_hmac_init (&sha1_hmac_ctx, hex, 32); + + tmps[gid].ipad[0] = sha1_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha1_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha1_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha1_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha1_hmac_ctx.ipad.h[4]; + + tmps[gid].opad[0] = sha1_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha1_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha1_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; + + sha1_hmac_update_global (&sha1_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt, 16); + + for (u32 i = 0, j = 1; i < 4; i += 5, j += 1) + { + sha1_hmac_ctx_t sha1_hmac_ctx2 = sha1_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha1_hmac_update_64 (&sha1_hmac_ctx2, w0, w1, w2, w3, 4); + + sha1_hmac_final (&sha1_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha1_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha1_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha1_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha1_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha1_hmac_ctx2.opad.h[4]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + } +} + +KERNEL_FQ void m24100_loop (KERN_ATTR_TMPS_ESALT (mongodb_sha1_tmp_t, mongodb_sha1_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u32x ipad[5]; + u32x opad[5]; + + ipad[0] = packv (tmps, ipad, gid, 0); + ipad[1] = packv (tmps, ipad, gid, 1); + ipad[2] = packv (tmps, ipad, gid, 2); + ipad[3] = packv (tmps, ipad, gid, 3); + ipad[4] = packv (tmps, ipad, gid, 4); + + opad[0] = packv (tmps, opad, gid, 0); + opad[1] = packv (tmps, opad, gid, 1); + opad[2] = packv (tmps, opad, gid, 2); + opad[3] = packv (tmps, opad, gid, 3); + opad[4] = packv (tmps, opad, gid, 4); + + for (u32 i = 0; i < 4; i += 5) + { + u32x dgst[5]; + u32x out[5]; + + dgst[0] = packv (tmps, dgst, gid, i + 0); + dgst[1] = packv (tmps, dgst, gid, i + 1); + dgst[2] = packv (tmps, dgst, gid, i + 2); + dgst[3] = packv (tmps, dgst, gid, i + 3); + dgst[4] = packv (tmps, dgst, gid, i + 4); + + out[0] = packv (tmps, out, gid, i + 0); + out[1] = packv (tmps, out, gid, i + 1); + out[2] = packv (tmps, out, gid, i + 2); + out[3] = packv (tmps, out, gid, i + 3); + out[4] = packv (tmps, out, gid, i + 4); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = dgst[0]; + w0[1] = dgst[1]; + w0[2] = dgst[2]; + w0[3] = dgst[3]; + w1[0] = dgst[4]; + w1[1] = 0x80000000; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 20) * 8; + + hmac_sha1_run_V (w0, w1, w2, w3, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + } + + unpackv (tmps, dgst, gid, i + 0, dgst[0]); + unpackv (tmps, dgst, gid, i + 1, dgst[1]); + unpackv (tmps, dgst, gid, i + 2, dgst[2]); + unpackv (tmps, dgst, gid, i + 3, dgst[3]); + unpackv (tmps, dgst, gid, i + 4, dgst[4]); + + unpackv (tmps, out, gid, i + 0, out[0]); + unpackv (tmps, out, gid, i + 1, out[1]); + unpackv (tmps, out, gid, i + 2, out[2]); + unpackv (tmps, out, gid, i + 3, out[3]); + unpackv (tmps, out, gid, i + 4, out[4]); + } +} + +KERNEL_FQ void m24100_comp (KERN_ATTR_TMPS_ESALT (mongodb_sha1_tmp_t, mongodb_sha1_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + const u64 lid = get_local_id (0); + + u32 out[5]; + + out[0] = tmps[gid].out[0]; + out[1] = tmps[gid].out[1]; + out[2] = tmps[gid].out[2]; + out[3] = tmps[gid].out[3]; + out[4] = tmps[gid].out[4]; + + // HMAC-SHA1 with "Server Key" salt: + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = out[0]; + w0[1] = out[1]; + w0[2] = out[2]; + w0[3] = out[3]; + w1[0] = out[4]; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha1_hmac_ctx_t sha1_hmac_ctx; + + sha1_hmac_init_64 (&sha1_hmac_ctx, w0, w1, w2, w3); + + w0[0] = 0x53657276; // Serv + w0[1] = 0x6572204b; // er K + w0[2] = 0x65790000; // ey + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha1_hmac_update_64 (&sha1_hmac_ctx, w0, w1, w2, w3, 10); + + sha1_hmac_final (&sha1_hmac_ctx); + + const u32 r0 = sha1_hmac_ctx.opad.h[DGST_R0]; + const u32 r1 = sha1_hmac_ctx.opad.h[DGST_R1]; + const u32 r2 = sha1_hmac_ctx.opad.h[DGST_R2]; + const u32 r3 = sha1_hmac_ctx.opad.h[DGST_R3]; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m24200-pure.cl b/OpenCL/m24200-pure.cl new file mode 100644 index 000000000..0efa80e05 --- /dev/null +++ b/OpenCL/m24200-pure.cl @@ -0,0 +1,353 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha256.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct mongodb_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[8]; + u32 out[8]; + +} mongodb_sha256_tmp_t; + +typedef struct mongodb_sha256 +{ + u32 salt[16]; + u32 user[16]; + + u32 user_len; + +} mongodb_sha256_t; + +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + digest[5] = ipad[5]; + digest[6] = ipad[6]; + digest[7] = ipad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = digest[5]; + w1[2] = digest[6]; + w1[3] = digest[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + digest[5] = opad[5]; + digest[6] = opad[6]; + digest[7] = opad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m24200_init (KERN_ATTR_TMPS_ESALT (mongodb_sha256_tmp_t, mongodb_sha256_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + sha256_hmac_ctx_t sha256_hmac_ctx; + + sha256_hmac_init_global_swap (&sha256_hmac_ctx, pws[gid].i, pws[gid].pw_len); + + tmps[gid].ipad[0] = sha256_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha256_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha256_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha256_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha256_hmac_ctx.ipad.h[4]; + tmps[gid].ipad[5] = sha256_hmac_ctx.ipad.h[5]; + tmps[gid].ipad[6] = sha256_hmac_ctx.ipad.h[6]; + tmps[gid].ipad[7] = sha256_hmac_ctx.ipad.h[7]; + + tmps[gid].opad[0] = sha256_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha256_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha256_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha256_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha256_hmac_ctx.opad.h[4]; + tmps[gid].opad[5] = sha256_hmac_ctx.opad.h[5]; + tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; + tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; + + sha256_hmac_update_global (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt, 28); + + for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) + { + sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha256_hmac_update_64 (&sha256_hmac_ctx2, w0, w1, w2, w3, 4); + + sha256_hmac_final (&sha256_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha256_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha256_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha256_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha256_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha256_hmac_ctx2.opad.h[4]; + tmps[gid].dgst[i + 5] = sha256_hmac_ctx2.opad.h[5]; + tmps[gid].dgst[i + 6] = sha256_hmac_ctx2.opad.h[6]; + tmps[gid].dgst[i + 7] = sha256_hmac_ctx2.opad.h[7]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + tmps[gid].out[i + 5] = tmps[gid].dgst[i + 5]; + tmps[gid].out[i + 6] = tmps[gid].dgst[i + 6]; + tmps[gid].out[i + 7] = tmps[gid].dgst[i + 7]; + } +} + +KERNEL_FQ void m24200_loop (KERN_ATTR_TMPS_ESALT (mongodb_sha256_tmp_t, mongodb_sha256_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u32x ipad[8]; + u32x opad[8]; + + ipad[0] = packv (tmps, ipad, gid, 0); + ipad[1] = packv (tmps, ipad, gid, 1); + ipad[2] = packv (tmps, ipad, gid, 2); + ipad[3] = packv (tmps, ipad, gid, 3); + ipad[4] = packv (tmps, ipad, gid, 4); + ipad[5] = packv (tmps, ipad, gid, 5); + ipad[6] = packv (tmps, ipad, gid, 6); + ipad[7] = packv (tmps, ipad, gid, 7); + + opad[0] = packv (tmps, opad, gid, 0); + opad[1] = packv (tmps, opad, gid, 1); + opad[2] = packv (tmps, opad, gid, 2); + opad[3] = packv (tmps, opad, gid, 3); + opad[4] = packv (tmps, opad, gid, 4); + opad[5] = packv (tmps, opad, gid, 5); + opad[6] = packv (tmps, opad, gid, 6); + opad[7] = packv (tmps, opad, gid, 7); + + for (u32 i = 0; i < 8; i += 8) + { + u32x dgst[8]; + u32x out[8]; + + dgst[0] = packv (tmps, dgst, gid, i + 0); + dgst[1] = packv (tmps, dgst, gid, i + 1); + dgst[2] = packv (tmps, dgst, gid, i + 2); + dgst[3] = packv (tmps, dgst, gid, i + 3); + dgst[4] = packv (tmps, dgst, gid, i + 4); + dgst[5] = packv (tmps, dgst, gid, i + 5); + dgst[6] = packv (tmps, dgst, gid, i + 6); + dgst[7] = packv (tmps, dgst, gid, i + 7); + + out[0] = packv (tmps, out, gid, i + 0); + out[1] = packv (tmps, out, gid, i + 1); + out[2] = packv (tmps, out, gid, i + 2); + out[3] = packv (tmps, out, gid, i + 3); + out[4] = packv (tmps, out, gid, i + 4); + out[5] = packv (tmps, out, gid, i + 5); + out[6] = packv (tmps, out, gid, i + 6); + out[7] = packv (tmps, out, gid, i + 7); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = dgst[0]; + w0[1] = dgst[1]; + w0[2] = dgst[2]; + w0[3] = dgst[3]; + w1[0] = dgst[4]; + w1[1] = dgst[5]; + w1[2] = dgst[6]; + w1[3] = dgst[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + hmac_sha256_run_V (w0, w1, w2, w3, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + out[5] ^= dgst[5]; + out[6] ^= dgst[6]; + out[7] ^= dgst[7]; + } + + unpackv (tmps, dgst, gid, i + 0, dgst[0]); + unpackv (tmps, dgst, gid, i + 1, dgst[1]); + unpackv (tmps, dgst, gid, i + 2, dgst[2]); + unpackv (tmps, dgst, gid, i + 3, dgst[3]); + unpackv (tmps, dgst, gid, i + 4, dgst[4]); + unpackv (tmps, dgst, gid, i + 5, dgst[5]); + unpackv (tmps, dgst, gid, i + 6, dgst[6]); + unpackv (tmps, dgst, gid, i + 7, dgst[7]); + + unpackv (tmps, out, gid, i + 0, out[0]); + unpackv (tmps, out, gid, i + 1, out[1]); + unpackv (tmps, out, gid, i + 2, out[2]); + unpackv (tmps, out, gid, i + 3, out[3]); + unpackv (tmps, out, gid, i + 4, out[4]); + unpackv (tmps, out, gid, i + 5, out[5]); + unpackv (tmps, out, gid, i + 6, out[6]); + unpackv (tmps, out, gid, i + 7, out[7]); + } +} + +KERNEL_FQ void m24200_comp (KERN_ATTR_TMPS_ESALT (mongodb_sha256_tmp_t, mongodb_sha256_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + const u64 lid = get_local_id (0); + + u32 out[8]; + + out[0] = tmps[gid].out[0]; + out[1] = tmps[gid].out[1]; + out[2] = tmps[gid].out[2]; + out[3] = tmps[gid].out[3]; + out[4] = tmps[gid].out[4]; + out[5] = tmps[gid].out[5]; + out[6] = tmps[gid].out[6]; + out[7] = tmps[gid].out[7]; + + // HMAC-SHA256 with "Server Key" salt: + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = out[0]; + w0[1] = out[1]; + w0[2] = out[2]; + w0[3] = out[3]; + w1[0] = out[4]; + w1[1] = out[5]; + w1[2] = out[6]; + w1[3] = out[7]; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha256_hmac_ctx_t sha256_hmac_ctx; + + sha256_hmac_init_64 (&sha256_hmac_ctx, w0, w1, w2, w3); + + w0[0] = 0x53657276; // Serv + w0[1] = 0x6572204b; // er K + w0[2] = 0x65790000; // ey + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha256_hmac_update_64 (&sha256_hmac_ctx, w0, w1, w2, w3, 10); + + sha256_hmac_final (&sha256_hmac_ctx); + + const u32 r0 = sha256_hmac_ctx.opad.h[DGST_R0]; + const u32 r1 = sha256_hmac_ctx.opad.h[DGST_R1]; + const u32 r2 = sha256_hmac_ctx.opad.h[DGST_R2]; + const u32 r3 = sha256_hmac_ctx.opad.h[DGST_R3]; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m24410-pure.cl b/OpenCL/m24410-pure.cl new file mode 100644 index 000000000..2d5ef5143 --- /dev/null +++ b/OpenCL/m24410-pure.cl @@ -0,0 +1,600 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha1.cl" +#include "inc_cipher_aes.cl" +#include "inc_cipher_des.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct pkcs_sha1_tmp +{ + u32 ipad[5]; + u32 opad[5]; + + u32 dgst[32]; + u32 out[32]; + +} pkcs_sha1_tmp_t; + +typedef struct pkcs +{ + int cipher; + + u32 data_buf[16384]; + int data_len; + + u32 iv_buf[4]; + +} pkcs_t; + +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = 0x80000000; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 20) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m24410_init (KERN_ATTR_TMPS_ESALT (pkcs_sha1_tmp_t, pkcs_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + sha1_hmac_ctx_t sha1_hmac_ctx; + + sha1_hmac_init_global_swap (&sha1_hmac_ctx, pws[gid].i, pws[gid].pw_len); + + tmps[gid].ipad[0] = sha1_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha1_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha1_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha1_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha1_hmac_ctx.ipad.h[4]; + + tmps[gid].opad[0] = sha1_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha1_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha1_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; + + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); + + u32 key_elem = 0; + + if (esalt_bufs[DIGESTS_OFFSET].cipher == 1) { key_elem = (192 / 8) / 4; } + else if (esalt_bufs[DIGESTS_OFFSET].cipher == 2) { key_elem = (128 / 8) / 4; } + else if (esalt_bufs[DIGESTS_OFFSET].cipher == 3) { key_elem = (192 / 8) / 4; } + else if (esalt_bufs[DIGESTS_OFFSET].cipher == 4) { key_elem = (256 / 8) / 4; } + + for (u32 i = 0, j = 1; i < key_elem; i += 5, j += 1) + { + sha1_hmac_ctx_t sha1_hmac_ctx2 = sha1_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha1_hmac_update_64 (&sha1_hmac_ctx2, w0, w1, w2, w3, 4); + + sha1_hmac_final (&sha1_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha1_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha1_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha1_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha1_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha1_hmac_ctx2.opad.h[4]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + } +} + +KERNEL_FQ void m24410_loop (KERN_ATTR_TMPS_ESALT (pkcs_sha1_tmp_t, pkcs_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u32x ipad[5]; + u32x opad[5]; + + ipad[0] = packv (tmps, ipad, gid, 0); + ipad[1] = packv (tmps, ipad, gid, 1); + ipad[2] = packv (tmps, ipad, gid, 2); + ipad[3] = packv (tmps, ipad, gid, 3); + ipad[4] = packv (tmps, ipad, gid, 4); + + opad[0] = packv (tmps, opad, gid, 0); + opad[1] = packv (tmps, opad, gid, 1); + opad[2] = packv (tmps, opad, gid, 2); + opad[3] = packv (tmps, opad, gid, 3); + opad[4] = packv (tmps, opad, gid, 4); + + u32 key_elem = 0; + + if (esalt_bufs[DIGESTS_OFFSET].cipher == 1) { key_elem = (192 / 8) / 4; } + else if (esalt_bufs[DIGESTS_OFFSET].cipher == 2) { key_elem = (128 / 8) / 4; } + else if (esalt_bufs[DIGESTS_OFFSET].cipher == 3) { key_elem = (192 / 8) / 4; } + else if (esalt_bufs[DIGESTS_OFFSET].cipher == 4) { key_elem = (256 / 8) / 4; } + + for (u32 i = 0; i < key_elem; i += 5) + { + u32x dgst[5]; + u32x out[5]; + + dgst[0] = packv (tmps, dgst, gid, i + 0); + dgst[1] = packv (tmps, dgst, gid, i + 1); + dgst[2] = packv (tmps, dgst, gid, i + 2); + dgst[3] = packv (tmps, dgst, gid, i + 3); + dgst[4] = packv (tmps, dgst, gid, i + 4); + + out[0] = packv (tmps, out, gid, i + 0); + out[1] = packv (tmps, out, gid, i + 1); + out[2] = packv (tmps, out, gid, i + 2); + out[3] = packv (tmps, out, gid, i + 3); + out[4] = packv (tmps, out, gid, i + 4); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = dgst[0]; + w0[1] = dgst[1]; + w0[2] = dgst[2]; + w0[3] = dgst[3]; + w1[0] = dgst[4]; + w1[1] = 0x80000000; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 20) * 8; + + hmac_sha1_run_V (w0, w1, w2, w3, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + } + + unpackv (tmps, dgst, gid, i + 0, dgst[0]); + unpackv (tmps, dgst, gid, i + 1, dgst[1]); + unpackv (tmps, dgst, gid, i + 2, dgst[2]); + unpackv (tmps, dgst, gid, i + 3, dgst[3]); + unpackv (tmps, dgst, gid, i + 4, dgst[4]); + + unpackv (tmps, out, gid, i + 0, out[0]); + unpackv (tmps, out, gid, i + 1, out[1]); + unpackv (tmps, out, gid, i + 2, out[2]); + unpackv (tmps, out, gid, i + 3, out[3]); + unpackv (tmps, out, gid, i + 4, out[4]); + } +} + +KERNEL_FQ void m24410_comp (KERN_ATTR_TMPS_ESALT (pkcs_sha1_tmp_t, pkcs_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + LOCAL_VK u32 s_SPtrans[8][64]; + LOCAL_VK u32 s_skb[8][64]; + + for (u32 i = lid; i < 64; i += lsz) + { + s_SPtrans[0][i] = c_SPtrans[0][i]; + s_SPtrans[1][i] = c_SPtrans[1][i]; + s_SPtrans[2][i] = c_SPtrans[2][i]; + s_SPtrans[3][i] = c_SPtrans[3][i]; + s_SPtrans[4][i] = c_SPtrans[4][i]; + s_SPtrans[5][i] = c_SPtrans[5][i]; + s_SPtrans[6][i] = c_SPtrans[6][i]; + s_SPtrans[7][i] = c_SPtrans[7][i]; + + s_skb[0][i] = c_skb[0][i]; + s_skb[1][i] = c_skb[1][i]; + s_skb[2][i] = c_skb[2][i]; + s_skb[3][i] = c_skb[3][i]; + s_skb[4][i] = c_skb[4][i]; + s_skb[5][i] = c_skb[5][i]; + s_skb[6][i] = c_skb[6][i]; + s_skb[7][i] = c_skb[7][i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + CONSTANT_AS u32a (*s_SPtrans)[64] = c_SPtrans; + CONSTANT_AS u32a (*s_skb)[64] = c_skb; + + #endif + + if (gid >= gid_max) return; + + u32 ukey[8]; + + ukey[0] = tmps[gid].out[0]; + ukey[1] = tmps[gid].out[1]; + ukey[2] = tmps[gid].out[2]; + ukey[3] = tmps[gid].out[3]; + ukey[4] = tmps[gid].out[4]; + ukey[5] = tmps[gid].out[5]; + ukey[6] = tmps[gid].out[6]; + ukey[7] = tmps[gid].out[7]; + + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; + + const int last_pad_pos = data_len - 1; + + const int last_pad_elem = last_pad_pos / 4; + + const int cipher = esalt_bufs[DIGESTS_OFFSET].cipher; + + u32 iv[4]; + + u32 enc[4]; + u32 dec[4]; + + if (cipher == 1) + { + ukey[0] = hc_swap32_S (ukey[0]); + ukey[1] = hc_swap32_S (ukey[1]); + ukey[2] = hc_swap32_S (ukey[2]); + ukey[3] = hc_swap32_S (ukey[3]); + ukey[4] = hc_swap32_S (ukey[4]); + ukey[5] = hc_swap32_S (ukey[5]); + + u32 K0[16]; + u32 K1[16]; + u32 K2[16]; + u32 K3[16]; + u32 K4[16]; + u32 K5[16]; + + _des_crypt_keysetup (ukey[0], ukey[1], K0, K1, s_skb); + _des_crypt_keysetup (ukey[2], ukey[3], K2, K3, s_skb); + _des_crypt_keysetup (ukey[4], ukey[5], K4, K5, s_skb); + + // first check the padding + + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; + + u32 p1[2]; + u32 p2[2]; + + _des_crypt_decrypt (p1, enc, K4, K5, s_SPtrans); + _des_crypt_encrypt (p2, p1, K2, K3, s_SPtrans); + _des_crypt_decrypt (dec, p2, K0, K1, s_SPtrans); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + + const int paddingv = pkcs_padding_bs8 (dec, 8); + + if (paddingv == -1) return; + + // second check (naive code) ASN.1 structure + + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + + _des_crypt_decrypt (p1, enc, K4, K5, s_SPtrans); + _des_crypt_encrypt (p2, p1, K2, K3, s_SPtrans); + _des_crypt_decrypt (dec, p2, K0, K1, s_SPtrans); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + + const int real_len = (data_len - 8) + paddingv; + + const int asn1_ok = asn1_detect (dec, real_len); + + if (asn1_ok == 0) return; + } + else if (cipher == 2) + { + u32 ks[44]; + + AES128_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + // first check the padding + + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; + + aes128_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int paddingv = pkcs_padding_bs16 (dec, 16); + + if (paddingv == -1) return; + + // second check (naive code) ASN.1 structure + + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv_buf[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv_buf[3]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + aes128_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int real_len = (data_len - 16) + paddingv; + + const int asn1_ok = asn1_detect (dec, real_len); + + if (asn1_ok == 0) return; + } + else if (cipher == 3) + { + u32 ks[52]; + + AES192_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + // first check the padding + + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; + + aes192_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int paddingv = pkcs_padding_bs16 (dec, 16); + + if (paddingv == -1) return; + + // second check (naive code) ASN.1 structure + + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv_buf[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv_buf[3]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + aes192_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int real_len = (data_len - 16) + paddingv; + + const int asn1_ok = asn1_detect (dec, real_len); + + if (asn1_ok == 0) return; + } + else if (cipher == 4) + { + u32 ks[60]; + + AES256_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + // first check the padding + + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; + + aes256_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int paddingv = pkcs_padding_bs16 (dec, 16); + + if (paddingv == -1) return; + + // second check (naive code) ASN.1 structure + + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv_buf[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv_buf[3]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + aes256_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int real_len = (data_len - 16) + paddingv; + + const int asn1_ok = asn1_detect (dec, real_len); + + if (asn1_ok == 0) return; + } + else + { + return; + } + + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + const u32 r1 = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + const u32 r2 = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + const u32 r3 = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m24420-pure.cl b/OpenCL/m24420-pure.cl new file mode 100644 index 000000000..2e2569428 --- /dev/null +++ b/OpenCL/m24420-pure.cl @@ -0,0 +1,625 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha256.cl" +#include "inc_cipher_aes.cl" +#include "inc_cipher_des.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct pkcs_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[32]; + u32 out[32]; + +} pkcs_sha256_tmp_t; + +typedef struct pkcs +{ + int cipher; + + u32 data_buf[16384]; + int data_len; + + u32 iv_buf[4]; + +} pkcs_t; + +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + digest[5] = ipad[5]; + digest[6] = ipad[6]; + digest[7] = ipad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = digest[5]; + w1[2] = digest[6]; + w1[3] = digest[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + digest[5] = opad[5]; + digest[6] = opad[6]; + digest[7] = opad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m24420_init (KERN_ATTR_TMPS_ESALT (pkcs_sha256_tmp_t, pkcs_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + sha256_hmac_ctx_t sha256_hmac_ctx; + + sha256_hmac_init_global_swap (&sha256_hmac_ctx, pws[gid].i, pws[gid].pw_len); + + tmps[gid].ipad[0] = sha256_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha256_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha256_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha256_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha256_hmac_ctx.ipad.h[4]; + tmps[gid].ipad[5] = sha256_hmac_ctx.ipad.h[5]; + tmps[gid].ipad[6] = sha256_hmac_ctx.ipad.h[6]; + tmps[gid].ipad[7] = sha256_hmac_ctx.ipad.h[7]; + + tmps[gid].opad[0] = sha256_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha256_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha256_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha256_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha256_hmac_ctx.opad.h[4]; + tmps[gid].opad[5] = sha256_hmac_ctx.opad.h[5]; + tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; + tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; + + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); + + for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) + { + sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha256_hmac_update_64 (&sha256_hmac_ctx2, w0, w1, w2, w3, 4); + + sha256_hmac_final (&sha256_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha256_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha256_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha256_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha256_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha256_hmac_ctx2.opad.h[4]; + tmps[gid].dgst[i + 5] = sha256_hmac_ctx2.opad.h[5]; + tmps[gid].dgst[i + 6] = sha256_hmac_ctx2.opad.h[6]; + tmps[gid].dgst[i + 7] = sha256_hmac_ctx2.opad.h[7]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + tmps[gid].out[i + 5] = tmps[gid].dgst[i + 5]; + tmps[gid].out[i + 6] = tmps[gid].dgst[i + 6]; + tmps[gid].out[i + 7] = tmps[gid].dgst[i + 7]; + } +} + +KERNEL_FQ void m24420_loop (KERN_ATTR_TMPS_ESALT (pkcs_sha256_tmp_t, pkcs_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u32x ipad[8]; + u32x opad[8]; + + ipad[0] = packv (tmps, ipad, gid, 0); + ipad[1] = packv (tmps, ipad, gid, 1); + ipad[2] = packv (tmps, ipad, gid, 2); + ipad[3] = packv (tmps, ipad, gid, 3); + ipad[4] = packv (tmps, ipad, gid, 4); + ipad[5] = packv (tmps, ipad, gid, 5); + ipad[6] = packv (tmps, ipad, gid, 6); + ipad[7] = packv (tmps, ipad, gid, 7); + + opad[0] = packv (tmps, opad, gid, 0); + opad[1] = packv (tmps, opad, gid, 1); + opad[2] = packv (tmps, opad, gid, 2); + opad[3] = packv (tmps, opad, gid, 3); + opad[4] = packv (tmps, opad, gid, 4); + opad[5] = packv (tmps, opad, gid, 5); + opad[6] = packv (tmps, opad, gid, 6); + opad[7] = packv (tmps, opad, gid, 7); + + for (u32 i = 0; i < 8; i += 8) + { + u32x dgst[8]; + u32x out[8]; + + dgst[0] = packv (tmps, dgst, gid, i + 0); + dgst[1] = packv (tmps, dgst, gid, i + 1); + dgst[2] = packv (tmps, dgst, gid, i + 2); + dgst[3] = packv (tmps, dgst, gid, i + 3); + dgst[4] = packv (tmps, dgst, gid, i + 4); + dgst[5] = packv (tmps, dgst, gid, i + 5); + dgst[6] = packv (tmps, dgst, gid, i + 6); + dgst[7] = packv (tmps, dgst, gid, i + 7); + + out[0] = packv (tmps, out, gid, i + 0); + out[1] = packv (tmps, out, gid, i + 1); + out[2] = packv (tmps, out, gid, i + 2); + out[3] = packv (tmps, out, gid, i + 3); + out[4] = packv (tmps, out, gid, i + 4); + out[5] = packv (tmps, out, gid, i + 5); + out[6] = packv (tmps, out, gid, i + 6); + out[7] = packv (tmps, out, gid, i + 7); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = dgst[0]; + w0[1] = dgst[1]; + w0[2] = dgst[2]; + w0[3] = dgst[3]; + w1[0] = dgst[4]; + w1[1] = dgst[5]; + w1[2] = dgst[6]; + w1[3] = dgst[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + hmac_sha256_run_V (w0, w1, w2, w3, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + out[5] ^= dgst[5]; + out[6] ^= dgst[6]; + out[7] ^= dgst[7]; + } + + unpackv (tmps, dgst, gid, i + 0, dgst[0]); + unpackv (tmps, dgst, gid, i + 1, dgst[1]); + unpackv (tmps, dgst, gid, i + 2, dgst[2]); + unpackv (tmps, dgst, gid, i + 3, dgst[3]); + unpackv (tmps, dgst, gid, i + 4, dgst[4]); + unpackv (tmps, dgst, gid, i + 5, dgst[5]); + unpackv (tmps, dgst, gid, i + 6, dgst[6]); + unpackv (tmps, dgst, gid, i + 7, dgst[7]); + + unpackv (tmps, out, gid, i + 0, out[0]); + unpackv (tmps, out, gid, i + 1, out[1]); + unpackv (tmps, out, gid, i + 2, out[2]); + unpackv (tmps, out, gid, i + 3, out[3]); + unpackv (tmps, out, gid, i + 4, out[4]); + unpackv (tmps, out, gid, i + 5, out[5]); + unpackv (tmps, out, gid, i + 6, out[6]); + unpackv (tmps, out, gid, i + 7, out[7]); + } +} + +KERNEL_FQ void m24420_comp (KERN_ATTR_TMPS_ESALT (pkcs_sha256_tmp_t, pkcs_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + LOCAL_VK u32 s_SPtrans[8][64]; + LOCAL_VK u32 s_skb[8][64]; + + for (u32 i = lid; i < 64; i += lsz) + { + s_SPtrans[0][i] = c_SPtrans[0][i]; + s_SPtrans[1][i] = c_SPtrans[1][i]; + s_SPtrans[2][i] = c_SPtrans[2][i]; + s_SPtrans[3][i] = c_SPtrans[3][i]; + s_SPtrans[4][i] = c_SPtrans[4][i]; + s_SPtrans[5][i] = c_SPtrans[5][i]; + s_SPtrans[6][i] = c_SPtrans[6][i]; + s_SPtrans[7][i] = c_SPtrans[7][i]; + + s_skb[0][i] = c_skb[0][i]; + s_skb[1][i] = c_skb[1][i]; + s_skb[2][i] = c_skb[2][i]; + s_skb[3][i] = c_skb[3][i]; + s_skb[4][i] = c_skb[4][i]; + s_skb[5][i] = c_skb[5][i]; + s_skb[6][i] = c_skb[6][i]; + s_skb[7][i] = c_skb[7][i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + CONSTANT_AS u32a (*s_SPtrans)[64] = c_SPtrans; + CONSTANT_AS u32a (*s_skb)[64] = c_skb; + + #endif + + if (gid >= gid_max) return; + + u32 ukey[8]; + + ukey[0] = tmps[gid].out[0]; + ukey[1] = tmps[gid].out[1]; + ukey[2] = tmps[gid].out[2]; + ukey[3] = tmps[gid].out[3]; + ukey[4] = tmps[gid].out[4]; + ukey[5] = tmps[gid].out[5]; + ukey[6] = tmps[gid].out[6]; + ukey[7] = tmps[gid].out[7]; + + const int data_len = esalt_bufs[DIGESTS_OFFSET].data_len; + + const int last_pad_pos = data_len - 1; + + const int last_pad_elem = last_pad_pos / 4; + + const int cipher = esalt_bufs[DIGESTS_OFFSET].cipher; + + u32 iv[4]; + + u32 enc[4]; + u32 dec[4]; + + if (cipher == 1) + { + ukey[0] = hc_swap32_S (ukey[0]); + ukey[1] = hc_swap32_S (ukey[1]); + ukey[2] = hc_swap32_S (ukey[2]); + ukey[3] = hc_swap32_S (ukey[3]); + ukey[4] = hc_swap32_S (ukey[4]); + ukey[5] = hc_swap32_S (ukey[5]); + + u32 K0[16]; + u32 K1[16]; + u32 K2[16]; + u32 K3[16]; + u32 K4[16]; + u32 K5[16]; + + _des_crypt_keysetup (ukey[0], ukey[1], K0, K1, s_skb); + _des_crypt_keysetup (ukey[2], ukey[3], K2, K3, s_skb); + _des_crypt_keysetup (ukey[4], ukey[5], K4, K5, s_skb); + + // first check the padding + + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; + + u32 p1[2]; + u32 p2[2]; + + _des_crypt_decrypt (p1, enc, K4, K5, s_SPtrans); + _des_crypt_encrypt (p2, p1, K2, K3, s_SPtrans); + _des_crypt_decrypt (dec, p2, K0, K1, s_SPtrans); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + + const int paddingv = pkcs_padding_bs8 (dec, 8); + + if (paddingv == -1) return; + + // second check (naive code) ASN.1 structure + + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + + _des_crypt_decrypt (p1, enc, K4, K5, s_SPtrans); + _des_crypt_encrypt (p2, p1, K2, K3, s_SPtrans); + _des_crypt_decrypt (dec, p2, K0, K1, s_SPtrans); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + + const int real_len = (data_len - 8) + paddingv; + + const int asn1_ok = asn1_detect (dec, real_len); + + if (asn1_ok == 0) return; + } + else if (cipher == 2) + { + u32 ks[44]; + + AES128_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + // first check the padding + + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; + + aes128_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int paddingv = pkcs_padding_bs16 (dec, 16); + + if (paddingv == -1) return; + + // second check (naive code) ASN.1 structure + + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv_buf[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv_buf[3]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + aes128_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int real_len = (data_len - 16) + paddingv; + + const int asn1_ok = asn1_detect (dec, real_len); + + if (asn1_ok == 0) return; + } + else if (cipher == 3) + { + u32 ks[52]; + + AES192_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + // first check the padding + + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; + + aes192_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int paddingv = pkcs_padding_bs16 (dec, 16); + + if (paddingv == -1) return; + + // second check (naive code) ASN.1 structure + + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv_buf[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv_buf[3]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + aes192_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int real_len = (data_len - 16) + paddingv; + + const int asn1_ok = asn1_detect (dec, real_len); + + if (asn1_ok == 0) return; + } + else if (cipher == 4) + { + u32 ks[60]; + + AES256_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + // first check the padding + + iv[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 7]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 6]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 5]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 4]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 3]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 2]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 1]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[last_pad_elem - 0]; + + aes256_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int paddingv = pkcs_padding_bs16 (dec, 16); + + if (paddingv == -1) return; + + // second check (naive code) ASN.1 structure + + iv[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + iv[2] = esalt_bufs[DIGESTS_OFFSET].iv_buf[2]; + iv[3] = esalt_bufs[DIGESTS_OFFSET].iv_buf[3]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + aes256_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv[0]; + dec[1] ^= iv[1]; + dec[2] ^= iv[2]; + dec[3] ^= iv[3]; + + const int real_len = (data_len - 16) + paddingv; + + const int asn1_ok = asn1_detect (dec, real_len); + + if (asn1_ok == 0) return; + } + else + { + return; + } + + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + const u32 r1 = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + const u32 r2 = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + const u32 r3 = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m24500-pure.cl b/OpenCL/m24500-pure.cl new file mode 100644 index 000000000..ba7de30c4 --- /dev/null +++ b/OpenCL/m24500-pure.cl @@ -0,0 +1,654 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha1.cl" +#include "inc_hash_sha512.cl" +#include "inc_cipher_aes.cl" +#endif + +typedef struct telegram_tmp +{ + u64 ipad[8]; + u64 opad[8]; + + u64 dgst[24]; + u64 out [24]; + +} telegram_tmp_t; + +typedef struct telegram +{ + u32 data[72]; + +} telegram_t; + +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + digest[5] = ipad[5]; + digest[6] = ipad[6]; + digest[7] = ipad[7]; + + sha512_transform_vector (w0, w1, w2, w3, w4, w5, w6, w7, digest); + + w0[0] = h32_from_64 (digest[0]); + w0[1] = l32_from_64 (digest[0]); + w0[2] = h32_from_64 (digest[1]); + w0[3] = l32_from_64 (digest[1]); + w1[0] = h32_from_64 (digest[2]); + w1[1] = l32_from_64 (digest[2]); + w1[2] = h32_from_64 (digest[3]); + w1[3] = l32_from_64 (digest[3]); + w2[0] = h32_from_64 (digest[4]); + w2[1] = l32_from_64 (digest[4]); + w2[2] = h32_from_64 (digest[5]); + w2[3] = l32_from_64 (digest[5]); + w3[0] = h32_from_64 (digest[6]); + w3[1] = l32_from_64 (digest[6]); + w3[2] = h32_from_64 (digest[7]); + w3[3] = l32_from_64 (digest[7]); + w4[0] = 0x80000000; + w4[1] = 0; + w4[2] = 0; + w4[3] = 0; + w5[0] = 0; + w5[1] = 0; + w5[2] = 0; + w5[3] = 0; + w6[0] = 0; + w6[1] = 0; + w6[2] = 0; + w6[3] = 0; + w7[0] = 0; + w7[1] = 0; + w7[2] = 0; + w7[3] = (128 + 64) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + digest[5] = opad[5]; + digest[6] = opad[6]; + digest[7] = opad[7]; + + sha512_transform_vector (w0, w1, w2, w3, w4, w5, w6, w7, digest); +} + +DECLSPEC void sha1_run (u32 *w, u32 *res) +{ + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = w[ 0]; + w0[1] = w[ 1]; + w0[2] = w[ 2]; + w0[3] = w[ 3]; + w1[0] = w[ 4]; + w1[1] = w[ 5]; + w1[2] = w[ 6]; + w1[3] = w[ 7]; + w2[0] = w[ 8]; + w2[1] = w[ 9]; + w2[2] = w[10]; + w2[3] = w[11]; + w3[0] = 0x80000000; + w3[1] = 0; + w3[2] = 0; + w3[3] = 48 * 8; + + u32 digest[5]; + + digest[0] = SHA1M_A; + digest[1] = SHA1M_B; + digest[2] = SHA1M_C; + digest[3] = SHA1M_D; + digest[4] = SHA1M_E; + + sha1_transform (w0, w1, w2, w3, digest); + + res[0] = digest[0]; + res[1] = digest[1]; + res[2] = digest[2]; + res[3] = digest[3]; + res[4] = digest[4]; +} + +KERNEL_FQ void m24500_init (KERN_ATTR_TMPS_ESALT (telegram_tmp_t, telegram_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + const u32 salt_len = salt_bufs[SALT_POS].salt_len; // 32 + + sha512_ctx_t sha512_ctx; + + sha512_init (&sha512_ctx); + + sha512_update_global (&sha512_ctx, salt_bufs[SALT_POS].salt_buf, salt_len); + sha512_update_global_swap (&sha512_ctx, pws[gid].i, pws[gid].pw_len); + sha512_update_global (&sha512_ctx, salt_bufs[SALT_POS].salt_buf, salt_len); + + sha512_final (&sha512_ctx); + + u32 w[32] = { 0 }; + + w[ 0] = h32_from_64_S (sha512_ctx.h[0]); + w[ 1] = l32_from_64_S (sha512_ctx.h[0]); + w[ 2] = h32_from_64_S (sha512_ctx.h[1]); + w[ 3] = l32_from_64_S (sha512_ctx.h[1]); + w[ 4] = h32_from_64_S (sha512_ctx.h[2]); + w[ 5] = l32_from_64_S (sha512_ctx.h[2]); + w[ 6] = h32_from_64_S (sha512_ctx.h[3]); + w[ 7] = l32_from_64_S (sha512_ctx.h[3]); + w[ 8] = h32_from_64_S (sha512_ctx.h[4]); + w[ 9] = l32_from_64_S (sha512_ctx.h[4]); + w[10] = h32_from_64_S (sha512_ctx.h[5]); + w[11] = l32_from_64_S (sha512_ctx.h[5]); + w[12] = h32_from_64_S (sha512_ctx.h[6]); + w[13] = l32_from_64_S (sha512_ctx.h[6]); + w[14] = h32_from_64_S (sha512_ctx.h[7]); + w[15] = l32_from_64_S (sha512_ctx.h[7]); + + sha512_hmac_ctx_t sha512_hmac_ctx; + + sha512_hmac_init (&sha512_hmac_ctx, w, 64); + + tmps[gid].ipad[0] = sha512_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha512_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha512_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha512_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha512_hmac_ctx.ipad.h[4]; + tmps[gid].ipad[5] = sha512_hmac_ctx.ipad.h[5]; + tmps[gid].ipad[6] = sha512_hmac_ctx.ipad.h[6]; + tmps[gid].ipad[7] = sha512_hmac_ctx.ipad.h[7]; + + tmps[gid].opad[0] = sha512_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha512_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha512_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha512_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha512_hmac_ctx.opad.h[4]; + tmps[gid].opad[5] = sha512_hmac_ctx.opad.h[5]; + tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; + tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; + + sha512_hmac_update_global (&sha512_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); + + for (u32 i = 0, j = 1; i < 24; i += 8, j += 1) + { + sha512_hmac_ctx_t sha512_hmac_ctx2 = sha512_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + u32 w4[4]; + u32 w5[4]; + u32 w6[4]; + u32 w7[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + w4[0] = 0; + w4[1] = 0; + w4[2] = 0; + w4[3] = 0; + w5[0] = 0; + w5[1] = 0; + w5[2] = 0; + w5[3] = 0; + w6[0] = 0; + w6[1] = 0; + w6[2] = 0; + w6[3] = 0; + w7[0] = 0; + w7[1] = 0; + w7[2] = 0; + w7[3] = 0; + + sha512_hmac_update_128 (&sha512_hmac_ctx2, w0, w1, w2, w3, w4, w5, w6, w7, 4); + + sha512_hmac_final (&sha512_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha512_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha512_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha512_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha512_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha512_hmac_ctx2.opad.h[4]; + tmps[gid].dgst[i + 5] = sha512_hmac_ctx2.opad.h[5]; + tmps[gid].dgst[i + 6] = sha512_hmac_ctx2.opad.h[6]; + tmps[gid].dgst[i + 7] = sha512_hmac_ctx2.opad.h[7]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + tmps[gid].out[i + 5] = tmps[gid].dgst[i + 5]; + tmps[gid].out[i + 6] = tmps[gid].dgst[i + 6]; + tmps[gid].out[i + 7] = tmps[gid].dgst[i + 7]; + } +} + +KERNEL_FQ void m24500_loop (KERN_ATTR_TMPS_ESALT (telegram_tmp_t, telegram_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u64x ipad[8]; + u64x opad[8]; + + ipad[0] = pack64v (tmps, ipad, gid, 0); + ipad[1] = pack64v (tmps, ipad, gid, 1); + ipad[2] = pack64v (tmps, ipad, gid, 2); + ipad[3] = pack64v (tmps, ipad, gid, 3); + ipad[4] = pack64v (tmps, ipad, gid, 4); + ipad[5] = pack64v (tmps, ipad, gid, 5); + ipad[6] = pack64v (tmps, ipad, gid, 6); + ipad[7] = pack64v (tmps, ipad, gid, 7); + + opad[0] = pack64v (tmps, opad, gid, 0); + opad[1] = pack64v (tmps, opad, gid, 1); + opad[2] = pack64v (tmps, opad, gid, 2); + opad[3] = pack64v (tmps, opad, gid, 3); + opad[4] = pack64v (tmps, opad, gid, 4); + opad[5] = pack64v (tmps, opad, gid, 5); + opad[6] = pack64v (tmps, opad, gid, 6); + opad[7] = pack64v (tmps, opad, gid, 7); + + for (u32 i = 0; i < 24; i += 8) + { + u64x dgst[8]; + u64x out[8]; + + dgst[0] = pack64v (tmps, dgst, gid, i + 0); + dgst[1] = pack64v (tmps, dgst, gid, i + 1); + dgst[2] = pack64v (tmps, dgst, gid, i + 2); + dgst[3] = pack64v (tmps, dgst, gid, i + 3); + dgst[4] = pack64v (tmps, dgst, gid, i + 4); + dgst[5] = pack64v (tmps, dgst, gid, i + 5); + dgst[6] = pack64v (tmps, dgst, gid, i + 6); + dgst[7] = pack64v (tmps, dgst, gid, i + 7); + + out[0] = pack64v (tmps, out, gid, i + 0); + out[1] = pack64v (tmps, out, gid, i + 1); + out[2] = pack64v (tmps, out, gid, i + 2); + out[3] = pack64v (tmps, out, gid, i + 3); + out[4] = pack64v (tmps, out, gid, i + 4); + out[5] = pack64v (tmps, out, gid, i + 5); + out[6] = pack64v (tmps, out, gid, i + 6); + out[7] = pack64v (tmps, out, gid, i + 7); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + u32x w4[4]; + u32x w5[4]; + u32x w6[4]; + u32x w7[4]; + + w0[0] = h32_from_64 (dgst[0]); + w0[1] = l32_from_64 (dgst[0]); + w0[2] = h32_from_64 (dgst[1]); + w0[3] = l32_from_64 (dgst[1]); + w1[0] = h32_from_64 (dgst[2]); + w1[1] = l32_from_64 (dgst[2]); + w1[2] = h32_from_64 (dgst[3]); + w1[3] = l32_from_64 (dgst[3]); + w2[0] = h32_from_64 (dgst[4]); + w2[1] = l32_from_64 (dgst[4]); + w2[2] = h32_from_64 (dgst[5]); + w2[3] = l32_from_64 (dgst[5]); + w3[0] = h32_from_64 (dgst[6]); + w3[1] = l32_from_64 (dgst[6]); + w3[2] = h32_from_64 (dgst[7]); + w3[3] = l32_from_64 (dgst[7]); + w4[0] = 0x80000000; + w4[1] = 0; + w4[2] = 0; + w4[3] = 0; + w5[0] = 0; + w5[1] = 0; + w5[2] = 0; + w5[3] = 0; + w6[0] = 0; + w6[1] = 0; + w6[2] = 0; + w6[3] = 0; + w7[0] = 0; + w7[1] = 0; + w7[2] = 0; + w7[3] = (128 + 64) * 8; + + hmac_sha512_run_V (w0, w1, w2, w3, w4, w5, w6, w7, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + out[5] ^= dgst[5]; + out[6] ^= dgst[6]; + out[7] ^= dgst[7]; + } + + unpack64v (tmps, dgst, gid, i + 0, dgst[0]); + unpack64v (tmps, dgst, gid, i + 1, dgst[1]); + unpack64v (tmps, dgst, gid, i + 2, dgst[2]); + unpack64v (tmps, dgst, gid, i + 3, dgst[3]); + unpack64v (tmps, dgst, gid, i + 4, dgst[4]); + unpack64v (tmps, dgst, gid, i + 5, dgst[5]); + unpack64v (tmps, dgst, gid, i + 6, dgst[6]); + unpack64v (tmps, dgst, gid, i + 7, dgst[7]); + + unpack64v (tmps, out, gid, i + 0, out[0]); + unpack64v (tmps, out, gid, i + 1, out[1]); + unpack64v (tmps, out, gid, i + 2, out[2]); + unpack64v (tmps, out, gid, i + 3, out[3]); + unpack64v (tmps, out, gid, i + 4, out[4]); + unpack64v (tmps, out, gid, i + 5, out[5]); + unpack64v (tmps, out, gid, i + 6, out[6]); + unpack64v (tmps, out, gid, i + 7, out[7]); + } +} + +KERNEL_FQ void m24500_comp (KERN_ATTR_TMPS_ESALT (telegram_tmp_t, telegram_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + u32 data_key[4]; + + data_key[0] = esalt_bufs[DIGESTS_OFFSET].data[0]; + data_key[1] = esalt_bufs[DIGESTS_OFFSET].data[1]; + data_key[2] = esalt_bufs[DIGESTS_OFFSET].data[2]; + data_key[3] = esalt_bufs[DIGESTS_OFFSET].data[3]; + + u32 data_a[12]; + u32 data_b[12]; + u32 data_c[12]; + u32 data_d[12]; + + data_a[ 0] = data_key[0]; + data_a[ 1] = data_key[1]; + data_a[ 2] = data_key[2]; + data_a[ 3] = data_key[3]; + + data_b[ 4] = data_key[0]; + data_b[ 5] = data_key[1]; + data_b[ 6] = data_key[2]; + data_b[ 7] = data_key[3]; + + data_c[ 8] = data_key[0]; + data_c[ 9] = data_key[1]; + data_c[10] = data_key[2]; + data_c[11] = data_key[3]; + + data_d[ 0] = data_key[0]; + data_d[ 1] = data_key[1]; + data_d[ 2] = data_key[2]; + data_d[ 3] = data_key[3]; + + data_a[ 4] = h32_from_64_S (tmps[gid].out[ 1]); // not a bug: out[0] is ignored + data_a[ 5] = l32_from_64_S (tmps[gid].out[ 1]); + data_a[ 6] = h32_from_64_S (tmps[gid].out[ 2]); + data_a[ 7] = l32_from_64_S (tmps[gid].out[ 2]); + data_a[ 8] = h32_from_64_S (tmps[gid].out[ 3]); + data_a[ 9] = l32_from_64_S (tmps[gid].out[ 3]); + data_a[10] = h32_from_64_S (tmps[gid].out[ 4]); + data_a[11] = l32_from_64_S (tmps[gid].out[ 4]); + + data_b[ 0] = h32_from_64_S (tmps[gid].out[ 5]); + data_b[ 1] = l32_from_64_S (tmps[gid].out[ 5]); + data_b[ 2] = h32_from_64_S (tmps[gid].out[ 6]); + data_b[ 3] = l32_from_64_S (tmps[gid].out[ 6]); + + data_b[ 8] = h32_from_64_S (tmps[gid].out[ 7]); + data_b[ 9] = l32_from_64_S (tmps[gid].out[ 7]); + data_b[10] = h32_from_64_S (tmps[gid].out[ 8]); + data_b[11] = l32_from_64_S (tmps[gid].out[ 8]); + + data_c[ 0] = h32_from_64_S (tmps[gid].out[ 9]); + data_c[ 1] = l32_from_64_S (tmps[gid].out[ 9]); + data_c[ 2] = h32_from_64_S (tmps[gid].out[10]); + data_c[ 3] = l32_from_64_S (tmps[gid].out[10]); + data_c[ 4] = h32_from_64_S (tmps[gid].out[11]); + data_c[ 5] = l32_from_64_S (tmps[gid].out[11]); + data_c[ 6] = h32_from_64_S (tmps[gid].out[12]); + data_c[ 7] = l32_from_64_S (tmps[gid].out[12]); + + data_d[ 4] = h32_from_64_S (tmps[gid].out[13]); + data_d[ 5] = l32_from_64_S (tmps[gid].out[13]); + data_d[ 6] = h32_from_64_S (tmps[gid].out[14]); + data_d[ 7] = l32_from_64_S (tmps[gid].out[14]); + data_d[ 8] = h32_from_64_S (tmps[gid].out[15]); + data_d[ 9] = l32_from_64_S (tmps[gid].out[15]); + data_d[10] = h32_from_64_S (tmps[gid].out[16]); + data_d[11] = l32_from_64_S (tmps[gid].out[16]); + + // hash (SHA1 ()) the data_*: + + u32 a[5]; + + sha1_run (data_a, a); + + u32 b[5]; + + sha1_run (data_b, b); + + u32 c[5]; + + sha1_run (data_c, c); + + u32 d[5]; + + sha1_run (data_d, d); + + // set up AES key and AES IV: + + u32 key[8]; + + key[0] = a[0]; + key[1] = a[1]; + key[2] = b[2]; + key[3] = b[3]; + key[4] = b[4]; + key[5] = c[1]; + key[6] = c[2]; + key[7] = c[3]; + + u32 iv[8]; + + iv[0] = a[2]; + iv[1] = a[3]; + iv[2] = a[4]; + iv[3] = b[0]; + iv[4] = b[1]; + iv[5] = c[4]; + iv[6] = d[0]; + iv[7] = d[1]; + + // decrypt with AES-IGE: + + #define KEYLEN 60 + + u32 ks[KEYLEN]; + + AES256_set_decrypt_key (ks, key, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + u32 x_prev[4]; + + x_prev[0] = iv[0]; + x_prev[1] = iv[1]; + x_prev[2] = iv[2]; + x_prev[3] = iv[3]; + + u32 y_prev[4]; + + y_prev[0] = iv[4]; + y_prev[1] = iv[5]; + y_prev[2] = iv[6]; + y_prev[3] = iv[7]; + + u32 out[80] = { 0 }; // 64-byte aligned for SHA1 + + for (int i = 0; i < 68; i += 4) + { + u32 x[4]; + + x[0] = esalt_bufs[DIGESTS_OFFSET].data[4 + i]; + x[1] = esalt_bufs[DIGESTS_OFFSET].data[5 + i]; + x[2] = esalt_bufs[DIGESTS_OFFSET].data[6 + i]; + x[3] = esalt_bufs[DIGESTS_OFFSET].data[7 + i]; + + u32 y[4]; + + y[0] = x[0] ^ y_prev[0]; + y[1] = x[1] ^ y_prev[1]; + y[2] = x[2] ^ y_prev[2]; + y[3] = x[3] ^ y_prev[3]; + + u32 dec[4]; + + AES256_decrypt (ks, y, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + y_prev[0] = dec[0] ^ x_prev[0]; + y_prev[1] = dec[1] ^ x_prev[1]; + y_prev[2] = dec[2] ^ x_prev[2]; + y_prev[3] = dec[3] ^ x_prev[3]; + + out[i + 0] = y_prev[0]; + out[i + 1] = y_prev[1]; + out[i + 2] = y_prev[2]; + out[i + 3] = y_prev[3]; + + x_prev[0] = x[0]; + x_prev[1] = x[1]; + x_prev[2] = x[2]; + x_prev[3] = x[3]; + } + + // final SHA1 checksum of the decrypted data (out): + + sha1_ctx_t ctx; + + sha1_init (&ctx); + sha1_update (&ctx, out, 272); + sha1_final (&ctx); + + const u32 r0 = ctx.h[0]; + const u32 r1 = ctx.h[1]; + const u32 r2 = ctx.h[2]; + const u32 r3 = ctx.h[3]; + + // verify: + + if (r0 == data_key[0] && + r1 == data_key[1] && + r2 == data_key[2] && + r3 == data_key[3]) + { + if (atomic_inc (&hashes_shown[DIGESTS_OFFSET]) == 0) + { + mark_hash (plains_buf, d_return_buf, SALT_POS, digests_cnt, 0, DIGESTS_OFFSET + 0, gid, 0, 0, 0); + } + } +} diff --git a/OpenCL/m24610-pure.cl b/OpenCL/m24610-pure.cl new file mode 100644 index 000000000..aad6b6729 --- /dev/null +++ b/OpenCL/m24610-pure.cl @@ -0,0 +1,346 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha1.cl" +#include "inc_cipher_aes.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct sqlcipher_sha1_tmp +{ + u32 ipad[5]; + u32 opad[5]; + + u32 dgst[10]; + u32 out[10]; + +} sqlcipher_sha1_tmp_t; + +typedef struct sqlcipher +{ + u32 iv_buf[4]; + u32 data_buf[4]; + + u32 type; + +} sqlcipher_t; + +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = 0x80000000; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 20) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m24610_init (KERN_ATTR_TMPS_ESALT (sqlcipher_sha1_tmp_t, sqlcipher_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + sha1_hmac_ctx_t sha1_hmac_ctx; + + sha1_hmac_init_global_swap (&sha1_hmac_ctx, pws[gid].i, pws[gid].pw_len); + + tmps[gid].ipad[0] = sha1_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha1_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha1_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha1_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha1_hmac_ctx.ipad.h[4]; + + tmps[gid].opad[0] = sha1_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha1_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha1_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha1_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha1_hmac_ctx.opad.h[4]; + + sha1_hmac_update_global_swap (&sha1_hmac_ctx, salt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); + + for (u32 i = 0, j = 1; i < 8; i += 5, j += 1) + { + sha1_hmac_ctx_t sha1_hmac_ctx2 = sha1_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha1_hmac_update_64 (&sha1_hmac_ctx2, w0, w1, w2, w3, 4); + + sha1_hmac_final (&sha1_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha1_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha1_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha1_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha1_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha1_hmac_ctx2.opad.h[4]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + } +} + +KERNEL_FQ void m24610_loop (KERN_ATTR_TMPS_ESALT (sqlcipher_sha1_tmp_t, sqlcipher_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u32x ipad[5]; + u32x opad[5]; + + ipad[0] = packv (tmps, ipad, gid, 0); + ipad[1] = packv (tmps, ipad, gid, 1); + ipad[2] = packv (tmps, ipad, gid, 2); + ipad[3] = packv (tmps, ipad, gid, 3); + ipad[4] = packv (tmps, ipad, gid, 4); + + opad[0] = packv (tmps, opad, gid, 0); + opad[1] = packv (tmps, opad, gid, 1); + opad[2] = packv (tmps, opad, gid, 2); + opad[3] = packv (tmps, opad, gid, 3); + opad[4] = packv (tmps, opad, gid, 4); + + for (u32 i = 0; i < 8; i += 5) + { + u32x dgst[5]; + u32x out[5]; + + dgst[0] = packv (tmps, dgst, gid, i + 0); + dgst[1] = packv (tmps, dgst, gid, i + 1); + dgst[2] = packv (tmps, dgst, gid, i + 2); + dgst[3] = packv (tmps, dgst, gid, i + 3); + dgst[4] = packv (tmps, dgst, gid, i + 4); + + out[0] = packv (tmps, out, gid, i + 0); + out[1] = packv (tmps, out, gid, i + 1); + out[2] = packv (tmps, out, gid, i + 2); + out[3] = packv (tmps, out, gid, i + 3); + out[4] = packv (tmps, out, gid, i + 4); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = dgst[0]; + w0[1] = dgst[1]; + w0[2] = dgst[2]; + w0[3] = dgst[3]; + w1[0] = dgst[4]; + w1[1] = 0x80000000; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 20) * 8; + + hmac_sha1_run_V (w0, w1, w2, w3, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + } + + unpackv (tmps, dgst, gid, i + 0, dgst[0]); + unpackv (tmps, dgst, gid, i + 1, dgst[1]); + unpackv (tmps, dgst, gid, i + 2, dgst[2]); + unpackv (tmps, dgst, gid, i + 3, dgst[3]); + unpackv (tmps, dgst, gid, i + 4, dgst[4]); + + unpackv (tmps, out, gid, i + 0, out[0]); + unpackv (tmps, out, gid, i + 1, out[1]); + unpackv (tmps, out, gid, i + 2, out[2]); + unpackv (tmps, out, gid, i + 3, out[3]); + unpackv (tmps, out, gid, i + 4, out[4]); + } +} + +KERNEL_FQ void m24610_comp (KERN_ATTR_TMPS_ESALT (sqlcipher_sha1_tmp_t, sqlcipher_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + u32 ukey[8]; + + ukey[0] = tmps[gid].out[0]; + ukey[1] = tmps[gid].out[1]; + ukey[2] = tmps[gid].out[2]; + ukey[3] = tmps[gid].out[3]; + ukey[4] = tmps[gid].out[4]; + ukey[5] = tmps[gid].out[5]; + ukey[6] = tmps[gid].out[6]; + ukey[7] = tmps[gid].out[7]; + + u32 ks[60]; + + AES256_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + // first check the padding + + u32 iv_buf[4]; + + iv_buf[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv_buf[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + iv_buf[2] = esalt_bufs[DIGESTS_OFFSET].iv_buf[2]; + iv_buf[3] = esalt_bufs[DIGESTS_OFFSET].iv_buf[3]; + + u32 enc[4]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + u32 dec[4]; + + aes256_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv_buf[0]; + dec[1] ^= iv_buf[1]; + dec[2] ^= iv_buf[2]; + dec[3] ^= iv_buf[3]; + + if (dec[0] != 0) return; + if (dec[1] != 0) return; + if (dec[2] != 0) return; + + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + const u32 r1 = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + const u32 r2 = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + const u32 r3 = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m24620-pure.cl b/OpenCL/m24620-pure.cl new file mode 100644 index 000000000..da67ba36d --- /dev/null +++ b/OpenCL/m24620-pure.cl @@ -0,0 +1,385 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha256.cl" +#include "inc_cipher_aes.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct sqlcipher_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[8]; + u32 out[8]; + +} sqlcipher_sha256_tmp_t; + +typedef struct sqlcipher +{ + u32 iv_buf[4]; + u32 data_buf[4]; + + u32 type; + +} sqlcipher_t; + +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + digest[5] = ipad[5]; + digest[6] = ipad[6]; + digest[7] = ipad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = digest[5]; + w1[2] = digest[6]; + w1[3] = digest[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + digest[5] = opad[5]; + digest[6] = opad[6]; + digest[7] = opad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m24620_init (KERN_ATTR_TMPS_ESALT (sqlcipher_sha256_tmp_t, sqlcipher_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + sha256_hmac_ctx_t sha256_hmac_ctx; + + sha256_hmac_init_global_swap (&sha256_hmac_ctx, pws[gid].i, pws[gid].pw_len); + + tmps[gid].ipad[0] = sha256_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha256_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha256_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha256_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha256_hmac_ctx.ipad.h[4]; + tmps[gid].ipad[5] = sha256_hmac_ctx.ipad.h[5]; + tmps[gid].ipad[6] = sha256_hmac_ctx.ipad.h[6]; + tmps[gid].ipad[7] = sha256_hmac_ctx.ipad.h[7]; + + tmps[gid].opad[0] = sha256_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha256_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha256_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha256_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha256_hmac_ctx.opad.h[4]; + tmps[gid].opad[5] = sha256_hmac_ctx.opad.h[5]; + tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; + tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; + + sha256_hmac_update_global_swap (&sha256_hmac_ctx, salt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); + + for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) + { + sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha256_hmac_update_64 (&sha256_hmac_ctx2, w0, w1, w2, w3, 4); + + sha256_hmac_final (&sha256_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha256_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha256_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha256_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha256_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha256_hmac_ctx2.opad.h[4]; + tmps[gid].dgst[i + 5] = sha256_hmac_ctx2.opad.h[5]; + tmps[gid].dgst[i + 6] = sha256_hmac_ctx2.opad.h[6]; + tmps[gid].dgst[i + 7] = sha256_hmac_ctx2.opad.h[7]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + tmps[gid].out[i + 5] = tmps[gid].dgst[i + 5]; + tmps[gid].out[i + 6] = tmps[gid].dgst[i + 6]; + tmps[gid].out[i + 7] = tmps[gid].dgst[i + 7]; + } +} + +KERNEL_FQ void m24620_loop (KERN_ATTR_TMPS_ESALT (sqlcipher_sha256_tmp_t, sqlcipher_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u32x ipad[8]; + u32x opad[8]; + + ipad[0] = packv (tmps, ipad, gid, 0); + ipad[1] = packv (tmps, ipad, gid, 1); + ipad[2] = packv (tmps, ipad, gid, 2); + ipad[3] = packv (tmps, ipad, gid, 3); + ipad[4] = packv (tmps, ipad, gid, 4); + ipad[5] = packv (tmps, ipad, gid, 5); + ipad[6] = packv (tmps, ipad, gid, 6); + ipad[7] = packv (tmps, ipad, gid, 7); + + opad[0] = packv (tmps, opad, gid, 0); + opad[1] = packv (tmps, opad, gid, 1); + opad[2] = packv (tmps, opad, gid, 2); + opad[3] = packv (tmps, opad, gid, 3); + opad[4] = packv (tmps, opad, gid, 4); + opad[5] = packv (tmps, opad, gid, 5); + opad[6] = packv (tmps, opad, gid, 6); + opad[7] = packv (tmps, opad, gid, 7); + + for (u32 i = 0; i < 8; i += 8) + { + u32x dgst[8]; + u32x out[8]; + + dgst[0] = packv (tmps, dgst, gid, i + 0); + dgst[1] = packv (tmps, dgst, gid, i + 1); + dgst[2] = packv (tmps, dgst, gid, i + 2); + dgst[3] = packv (tmps, dgst, gid, i + 3); + dgst[4] = packv (tmps, dgst, gid, i + 4); + dgst[5] = packv (tmps, dgst, gid, i + 5); + dgst[6] = packv (tmps, dgst, gid, i + 6); + dgst[7] = packv (tmps, dgst, gid, i + 7); + + out[0] = packv (tmps, out, gid, i + 0); + out[1] = packv (tmps, out, gid, i + 1); + out[2] = packv (tmps, out, gid, i + 2); + out[3] = packv (tmps, out, gid, i + 3); + out[4] = packv (tmps, out, gid, i + 4); + out[5] = packv (tmps, out, gid, i + 5); + out[6] = packv (tmps, out, gid, i + 6); + out[7] = packv (tmps, out, gid, i + 7); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = dgst[0]; + w0[1] = dgst[1]; + w0[2] = dgst[2]; + w0[3] = dgst[3]; + w1[0] = dgst[4]; + w1[1] = dgst[5]; + w1[2] = dgst[6]; + w1[3] = dgst[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + hmac_sha256_run_V (w0, w1, w2, w3, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + out[5] ^= dgst[5]; + out[6] ^= dgst[6]; + out[7] ^= dgst[7]; + } + + unpackv (tmps, dgst, gid, i + 0, dgst[0]); + unpackv (tmps, dgst, gid, i + 1, dgst[1]); + unpackv (tmps, dgst, gid, i + 2, dgst[2]); + unpackv (tmps, dgst, gid, i + 3, dgst[3]); + unpackv (tmps, dgst, gid, i + 4, dgst[4]); + unpackv (tmps, dgst, gid, i + 5, dgst[5]); + unpackv (tmps, dgst, gid, i + 6, dgst[6]); + unpackv (tmps, dgst, gid, i + 7, dgst[7]); + + unpackv (tmps, out, gid, i + 0, out[0]); + unpackv (tmps, out, gid, i + 1, out[1]); + unpackv (tmps, out, gid, i + 2, out[2]); + unpackv (tmps, out, gid, i + 3, out[3]); + unpackv (tmps, out, gid, i + 4, out[4]); + unpackv (tmps, out, gid, i + 5, out[5]); + unpackv (tmps, out, gid, i + 6, out[6]); + unpackv (tmps, out, gid, i + 7, out[7]); + } +} + +KERNEL_FQ void m24620_comp (KERN_ATTR_TMPS_ESALT (sqlcipher_sha256_tmp_t, sqlcipher_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + u32 ukey[8]; + + ukey[0] = tmps[gid].out[0]; + ukey[1] = tmps[gid].out[1]; + ukey[2] = tmps[gid].out[2]; + ukey[3] = tmps[gid].out[3]; + ukey[4] = tmps[gid].out[4]; + ukey[5] = tmps[gid].out[5]; + ukey[6] = tmps[gid].out[6]; + ukey[7] = tmps[gid].out[7]; + + u32 ks[60]; + + AES256_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + // first check the padding + + u32 iv_buf[4]; + + iv_buf[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv_buf[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + iv_buf[2] = esalt_bufs[DIGESTS_OFFSET].iv_buf[2]; + iv_buf[3] = esalt_bufs[DIGESTS_OFFSET].iv_buf[3]; + + u32 enc[4]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + u32 dec[4]; + + aes256_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv_buf[0]; + dec[1] ^= iv_buf[1]; + dec[2] ^= iv_buf[2]; + dec[3] ^= iv_buf[3]; + + if (dec[0] != 0) return; + if (dec[1] != 0) return; + if (dec[2] != 0) return; + + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + const u32 r1 = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + const u32 r2 = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + const u32 r3 = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m24630-pure.cl b/OpenCL/m24630-pure.cl new file mode 100644 index 000000000..c54ca9a0b --- /dev/null +++ b/OpenCL/m24630-pure.cl @@ -0,0 +1,441 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha512.cl" +#include "inc_cipher_aes.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct sqlcipher_sha512_tmp +{ + u64 ipad[8]; + u64 opad[8]; + + u64 dgst[8]; + u64 out[8]; + +} sqlcipher_sha512_tmp_t; + +typedef struct sqlcipher +{ + u32 iv_buf[4]; + u32 data_buf[4]; + + u32 type; + +} sqlcipher_t; + +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + digest[5] = ipad[5]; + digest[6] = ipad[6]; + digest[7] = ipad[7]; + + sha512_transform_vector (w0, w1, w2, w3, w4, w5, w6, w7, digest); + + w0[0] = h32_from_64 (digest[0]); + w0[1] = l32_from_64 (digest[0]); + w0[2] = h32_from_64 (digest[1]); + w0[3] = l32_from_64 (digest[1]); + w1[0] = h32_from_64 (digest[2]); + w1[1] = l32_from_64 (digest[2]); + w1[2] = h32_from_64 (digest[3]); + w1[3] = l32_from_64 (digest[3]); + w2[0] = h32_from_64 (digest[4]); + w2[1] = l32_from_64 (digest[4]); + w2[2] = h32_from_64 (digest[5]); + w2[3] = l32_from_64 (digest[5]); + w3[0] = h32_from_64 (digest[6]); + w3[1] = l32_from_64 (digest[6]); + w3[2] = h32_from_64 (digest[7]); + w3[3] = l32_from_64 (digest[7]); + w4[0] = 0x80000000; + w4[1] = 0; + w4[2] = 0; + w4[3] = 0; + w5[0] = 0; + w5[1] = 0; + w5[2] = 0; + w5[3] = 0; + w6[0] = 0; + w6[1] = 0; + w6[2] = 0; + w6[3] = 0; + w7[0] = 0; + w7[1] = 0; + w7[2] = 0; + w7[3] = (128 + 64) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + digest[5] = opad[5]; + digest[6] = opad[6]; + digest[7] = opad[7]; + + sha512_transform_vector (w0, w1, w2, w3, w4, w5, w6, w7, digest); +} + +KERNEL_FQ void m24630_init (KERN_ATTR_TMPS_ESALT (sqlcipher_sha512_tmp_t, sqlcipher_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + sha512_hmac_ctx_t sha512_hmac_ctx; + + sha512_hmac_init_global_swap (&sha512_hmac_ctx, pws[gid].i, pws[gid].pw_len); + + tmps[gid].ipad[0] = sha512_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha512_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha512_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha512_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha512_hmac_ctx.ipad.h[4]; + tmps[gid].ipad[5] = sha512_hmac_ctx.ipad.h[5]; + tmps[gid].ipad[6] = sha512_hmac_ctx.ipad.h[6]; + tmps[gid].ipad[7] = sha512_hmac_ctx.ipad.h[7]; + + tmps[gid].opad[0] = sha512_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha512_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha512_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha512_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha512_hmac_ctx.opad.h[4]; + tmps[gid].opad[5] = sha512_hmac_ctx.opad.h[5]; + tmps[gid].opad[6] = sha512_hmac_ctx.opad.h[6]; + tmps[gid].opad[7] = sha512_hmac_ctx.opad.h[7]; + + sha512_hmac_update_global_swap (&sha512_hmac_ctx, salt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); + + for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) + { + sha512_hmac_ctx_t sha512_hmac_ctx2 = sha512_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + u32 w4[4]; + u32 w5[4]; + u32 w6[4]; + u32 w7[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + w4[0] = 0; + w4[1] = 0; + w4[2] = 0; + w4[3] = 0; + w5[0] = 0; + w5[1] = 0; + w5[2] = 0; + w5[3] = 0; + w6[0] = 0; + w6[1] = 0; + w6[2] = 0; + w6[3] = 0; + w7[0] = 0; + w7[1] = 0; + w7[2] = 0; + w7[3] = 0; + + sha512_hmac_update_128 (&sha512_hmac_ctx2, w0, w1, w2, w3, w4, w5, w6, w7, 4); + + sha512_hmac_final (&sha512_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha512_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha512_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha512_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha512_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha512_hmac_ctx2.opad.h[4]; + tmps[gid].dgst[i + 5] = sha512_hmac_ctx2.opad.h[5]; + tmps[gid].dgst[i + 6] = sha512_hmac_ctx2.opad.h[6]; + tmps[gid].dgst[i + 7] = sha512_hmac_ctx2.opad.h[7]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + tmps[gid].out[i + 5] = tmps[gid].dgst[i + 5]; + tmps[gid].out[i + 6] = tmps[gid].dgst[i + 6]; + tmps[gid].out[i + 7] = tmps[gid].dgst[i + 7]; + } +} + +KERNEL_FQ void m24630_loop (KERN_ATTR_TMPS_ESALT (sqlcipher_sha512_tmp_t, sqlcipher_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u64x ipad[8]; + u64x opad[8]; + + ipad[0] = pack64v (tmps, ipad, gid, 0); + ipad[1] = pack64v (tmps, ipad, gid, 1); + ipad[2] = pack64v (tmps, ipad, gid, 2); + ipad[3] = pack64v (tmps, ipad, gid, 3); + ipad[4] = pack64v (tmps, ipad, gid, 4); + ipad[5] = pack64v (tmps, ipad, gid, 5); + ipad[6] = pack64v (tmps, ipad, gid, 6); + ipad[7] = pack64v (tmps, ipad, gid, 7); + + opad[0] = pack64v (tmps, opad, gid, 0); + opad[1] = pack64v (tmps, opad, gid, 1); + opad[2] = pack64v (tmps, opad, gid, 2); + opad[3] = pack64v (tmps, opad, gid, 3); + opad[4] = pack64v (tmps, opad, gid, 4); + opad[5] = pack64v (tmps, opad, gid, 5); + opad[6] = pack64v (tmps, opad, gid, 6); + opad[7] = pack64v (tmps, opad, gid, 7); + + for (u32 i = 0; i < 8; i += 8) + { + u64x dgst[8]; + u64x out[8]; + + dgst[0] = pack64v (tmps, dgst, gid, i + 0); + dgst[1] = pack64v (tmps, dgst, gid, i + 1); + dgst[2] = pack64v (tmps, dgst, gid, i + 2); + dgst[3] = pack64v (tmps, dgst, gid, i + 3); + dgst[4] = pack64v (tmps, dgst, gid, i + 4); + dgst[5] = pack64v (tmps, dgst, gid, i + 5); + dgst[6] = pack64v (tmps, dgst, gid, i + 6); + dgst[7] = pack64v (tmps, dgst, gid, i + 7); + + out[0] = pack64v (tmps, out, gid, i + 0); + out[1] = pack64v (tmps, out, gid, i + 1); + out[2] = pack64v (tmps, out, gid, i + 2); + out[3] = pack64v (tmps, out, gid, i + 3); + out[4] = pack64v (tmps, out, gid, i + 4); + out[5] = pack64v (tmps, out, gid, i + 5); + out[6] = pack64v (tmps, out, gid, i + 6); + out[7] = pack64v (tmps, out, gid, i + 7); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + u32x w4[4]; + u32x w5[4]; + u32x w6[4]; + u32x w7[4]; + + w0[0] = h32_from_64 (dgst[0]); + w0[1] = l32_from_64 (dgst[0]); + w0[2] = h32_from_64 (dgst[1]); + w0[3] = l32_from_64 (dgst[1]); + w1[0] = h32_from_64 (dgst[2]); + w1[1] = l32_from_64 (dgst[2]); + w1[2] = h32_from_64 (dgst[3]); + w1[3] = l32_from_64 (dgst[3]); + w2[0] = h32_from_64 (dgst[4]); + w2[1] = l32_from_64 (dgst[4]); + w2[2] = h32_from_64 (dgst[5]); + w2[3] = l32_from_64 (dgst[5]); + w3[0] = h32_from_64 (dgst[6]); + w3[1] = l32_from_64 (dgst[6]); + w3[2] = h32_from_64 (dgst[7]); + w3[3] = l32_from_64 (dgst[7]); + w4[0] = 0x80000000; + w4[1] = 0; + w4[2] = 0; + w4[3] = 0; + w5[0] = 0; + w5[1] = 0; + w5[2] = 0; + w5[3] = 0; + w6[0] = 0; + w6[1] = 0; + w6[2] = 0; + w6[3] = 0; + w7[0] = 0; + w7[1] = 0; + w7[2] = 0; + w7[3] = (128 + 64) * 8; + + hmac_sha512_run_V (w0, w1, w2, w3, w4, w5, w6, w7, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + out[5] ^= dgst[5]; + out[6] ^= dgst[6]; + out[7] ^= dgst[7]; + } + + unpack64v (tmps, dgst, gid, i + 0, dgst[0]); + unpack64v (tmps, dgst, gid, i + 1, dgst[1]); + unpack64v (tmps, dgst, gid, i + 2, dgst[2]); + unpack64v (tmps, dgst, gid, i + 3, dgst[3]); + unpack64v (tmps, dgst, gid, i + 4, dgst[4]); + unpack64v (tmps, dgst, gid, i + 5, dgst[5]); + unpack64v (tmps, dgst, gid, i + 6, dgst[6]); + unpack64v (tmps, dgst, gid, i + 7, dgst[7]); + + unpack64v (tmps, out, gid, i + 0, out[0]); + unpack64v (tmps, out, gid, i + 1, out[1]); + unpack64v (tmps, out, gid, i + 2, out[2]); + unpack64v (tmps, out, gid, i + 3, out[3]); + unpack64v (tmps, out, gid, i + 4, out[4]); + unpack64v (tmps, out, gid, i + 5, out[5]); + unpack64v (tmps, out, gid, i + 6, out[6]); + unpack64v (tmps, out, gid, i + 7, out[7]); + } +} + +KERNEL_FQ void m24630_comp (KERN_ATTR_TMPS_ESALT (sqlcipher_sha512_tmp_t, sqlcipher_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + u32 ukey[8]; + + ukey[0] = h32_from_64_S (tmps[gid].out[0]); + ukey[1] = l32_from_64_S (tmps[gid].out[0]); + ukey[2] = h32_from_64_S (tmps[gid].out[1]); + ukey[3] = l32_from_64_S (tmps[gid].out[1]); + ukey[4] = h32_from_64_S (tmps[gid].out[2]); + ukey[5] = l32_from_64_S (tmps[gid].out[2]); + ukey[6] = h32_from_64_S (tmps[gid].out[3]); + ukey[7] = l32_from_64_S (tmps[gid].out[3]); + + u32 ks[60]; + + AES256_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + + // first check the padding + + u32 iv_buf[4]; + + iv_buf[0] = esalt_bufs[DIGESTS_OFFSET].iv_buf[0]; + iv_buf[1] = esalt_bufs[DIGESTS_OFFSET].iv_buf[1]; + iv_buf[2] = esalt_bufs[DIGESTS_OFFSET].iv_buf[2]; + iv_buf[3] = esalt_bufs[DIGESTS_OFFSET].iv_buf[3]; + + u32 enc[4]; + + enc[0] = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + enc[1] = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + enc[2] = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + enc[3] = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + u32 dec[4]; + + aes256_decrypt (ks, enc, dec, s_td0, s_td1, s_td2, s_td3, s_td4); + + dec[0] ^= iv_buf[0]; + dec[1] ^= iv_buf[1]; + dec[2] ^= iv_buf[2]; + dec[3] ^= iv_buf[3]; + + if (dec[0] != 0) return; + if (dec[1] != 0) return; + if (dec[2] != 0) return; + + const u32 r0 = esalt_bufs[DIGESTS_OFFSET].data_buf[0]; + const u32 r1 = esalt_bufs[DIGESTS_OFFSET].data_buf[1]; + const u32 r2 = esalt_bufs[DIGESTS_OFFSET].data_buf[2]; + const u32 r3 = esalt_bufs[DIGESTS_OFFSET].data_buf[3]; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m24700_a0-optimized.cl b/OpenCL/m24700_a0-optimized.cl new file mode 100644 index 000000000..50bc227b3 --- /dev/null +++ b/OpenCL/m24700_a0-optimized.cl @@ -0,0 +1,496 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_rp_optimized.h" +#include "inc_rp_optimized.cl" +#include "inc_simd.cl" +#include "inc_hash_md5.cl" +#endif + +KERNEL_FQ void m24700_m04 (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + u32x w0[4] = { 0 }; + u32x w1[4] = { 0 }; + u32x w2[4] = { 0 }; + u32x w3[4] = { 0 }; + + const u32x out_len = apply_rules_vect_optimized (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1); + + append_0x80_2x4_VV (w0, w1, out_len); + + w3[2] = out_len * 8; + w3[3] = 0; + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + w0[0] = a; + w0[1] = b & 0xff; w0[1] |= 0x8000; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 5 * 8; + w3[3] = 0; + + a = MD5M_A; + b = MD5M_B; + c = MD5M_C; + d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + b &= 0xff; + c = 0; + d = 0; + + COMPARE_M_SIMD (a, b, c, d); + } +} + +KERNEL_FQ void m24700_m08 (KERN_ATTR_RULES ()) +{ +} + +KERNEL_FQ void m24700_m16 (KERN_ATTR_RULES ()) +{ +} + +KERNEL_FQ void m24700_s04 (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + 0, + 0 + }; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + u32x w0[4] = { 0 }; + u32x w1[4] = { 0 }; + u32x w2[4] = { 0 }; + u32x w3[4] = { 0 }; + + const u32x out_len = apply_rules_vect_optimized (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1); + + append_0x80_2x4_VV (w0, w1, out_len); + + w3[2] = out_len * 8; + w3[3] = 0; + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + w0[0] = a; + w0[1] = b & 0xff; w0[1] |= 0x8000; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 5 * 8; + w3[3] = 0; + + a = MD5M_A; + b = MD5M_B; + c = MD5M_C; + d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + + if (MATCHES_NONE_VS (a, search[0])) continue; + + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + b &= 0xff; + c = 0; + d = 0; + + COMPARE_S_SIMD (a, b, c, d); + } +} + +KERNEL_FQ void m24700_s08 (KERN_ATTR_RULES ()) +{ +} + +KERNEL_FQ void m24700_s16 (KERN_ATTR_RULES ()) +{ +} diff --git a/OpenCL/m24700_a0-pure.cl b/OpenCL/m24700_a0-pure.cl new file mode 100644 index 000000000..796eca01d --- /dev/null +++ b/OpenCL/m24700_a0-pure.cl @@ -0,0 +1,143 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +//#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_rp.h" +#include "inc_rp.cl" +#include "inc_scalar.cl" +#include "inc_hash_md5.cl" +#endif + +KERNEL_FQ void m24700_mxx (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + COPY_PW (pws[gid]); + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos++) + { + pw_t tmp = PASTE_PW; + + tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len); + + md5_ctx_t ctx0; + + md5_init (&ctx0); + + md5_update (&ctx0, tmp.i, tmp.pw_len); + + md5_final (&ctx0); + + const u32 a = ctx0.h[0]; + const u32 b = ctx0.h[1] & 0xff; + + md5_ctx_t ctx; + + md5_init (&ctx); + + ctx.w0[0] = a; + ctx.w0[1] = b; + + ctx.len = 5; + + md5_final (&ctx); + + const u32 r0 = ctx.h[DGST_R0]; + const u32 r1 = ctx.h[DGST_R1] & 0xff; + const u32 r2 = 0; + const u32 r3 = 0; + + COMPARE_M_SCALAR (r0, r1, r2, r3); + } +} + +KERNEL_FQ void m24700_sxx (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + 0, + 0 + }; + + /** + * base + */ + + COPY_PW (pws[gid]); + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos++) + { + pw_t tmp = PASTE_PW; + + tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len); + + md5_ctx_t ctx0; + + md5_init (&ctx0); + + md5_update (&ctx0, tmp.i, tmp.pw_len); + + md5_final (&ctx0); + + const u32 a = ctx0.h[0]; + const u32 b = ctx0.h[1] & 0xff; + + md5_ctx_t ctx; + + md5_init (&ctx); + + ctx.w0[0] = a; + ctx.w0[1] = b; + + ctx.len = 5; + + md5_final (&ctx); + + const u32 r0 = ctx.h[DGST_R0]; + const u32 r1 = ctx.h[DGST_R1] & 0xff; + const u32 r2 = 0; + const u32 r3 = 0; + + COMPARE_S_SCALAR (r0, r1, r2, r3); + } +} diff --git a/OpenCL/m24700_a1-optimized.cl b/OpenCL/m24700_a1-optimized.cl new file mode 100644 index 000000000..c9570e955 --- /dev/null +++ b/OpenCL/m24700_a1-optimized.cl @@ -0,0 +1,612 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_md5.cl" +#endif + +KERNEL_FQ void m24700_m04 (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_l_len = pws[gid].pw_len & 63; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos) & 63; + + const u32x pw_len = (pw_l_len + pw_r_len) & 63; + + /** + * concat password candidate + */ + + u32x wordl0[4] = { 0 }; + u32x wordl1[4] = { 0 }; + u32x wordl2[4] = { 0 }; + u32x wordl3[4] = { 0 }; + + wordl0[0] = pw_buf0[0]; + wordl0[1] = pw_buf0[1]; + wordl0[2] = pw_buf0[2]; + wordl0[3] = pw_buf0[3]; + wordl1[0] = pw_buf1[0]; + wordl1[1] = pw_buf1[1]; + wordl1[2] = pw_buf1[2]; + wordl1[3] = pw_buf1[3]; + + u32x wordr0[4] = { 0 }; + u32x wordr1[4] = { 0 }; + u32x wordr2[4] = { 0 }; + u32x wordr3[4] = { 0 }; + + wordr0[0] = ix_create_combt (combs_buf, il_pos, 0); + wordr0[1] = ix_create_combt (combs_buf, il_pos, 1); + wordr0[2] = ix_create_combt (combs_buf, il_pos, 2); + wordr0[3] = ix_create_combt (combs_buf, il_pos, 3); + wordr1[0] = ix_create_combt (combs_buf, il_pos, 4); + wordr1[1] = ix_create_combt (combs_buf, il_pos, 5); + wordr1[2] = ix_create_combt (combs_buf, il_pos, 6); + wordr1[3] = ix_create_combt (combs_buf, il_pos, 7); + + if (combs_mode == COMBINATOR_MODE_BASE_LEFT) + { + switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len); + } + else + { + switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len); + } + + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = wordl0[0] | wordr0[0]; + w0[1] = wordl0[1] | wordr0[1]; + w0[2] = wordl0[2] | wordr0[2]; + w0[3] = wordl0[3] | wordr0[3]; + w1[0] = wordl1[0] | wordr1[0]; + w1[1] = wordl1[1] | wordr1[1]; + w1[2] = wordl1[2] | wordr1[2]; + w1[3] = wordl1[3] | wordr1[3]; + w2[0] = wordl2[0] | wordr2[0]; + w2[1] = wordl2[1] | wordr2[1]; + w2[2] = wordl2[2] | wordr2[2]; + w2[3] = wordl2[3] | wordr2[3]; + w3[0] = wordl3[0] | wordr3[0]; + w3[1] = wordl3[1] | wordr3[1]; + w3[2] = pw_len * 8; + w3[3] = 0; + + /** + * md5 + */ + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + w0[0] = a; + w0[1] = b & 0xff; w0[1] |= 0x8000; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 5 * 8; + w3[3] = 0; + + a = MD5M_A; + b = MD5M_B; + c = MD5M_C; + d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + b &= 0xff; + c = 0; + d = 0; + + COMPARE_M_SIMD (a, b, c, d); + } +} + +KERNEL_FQ void m24700_m08 (KERN_ATTR_BASIC ()) +{ +} + +KERNEL_FQ void m24700_m16 (KERN_ATTR_BASIC ()) +{ +} + +KERNEL_FQ void m24700_s04 (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_l_len = pws[gid].pw_len & 63; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + 0, + 0 + }; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos) & 63; + + const u32x pw_len = (pw_l_len + pw_r_len) & 63; + + /** + * concat password candidate + */ + + u32x wordl0[4] = { 0 }; + u32x wordl1[4] = { 0 }; + u32x wordl2[4] = { 0 }; + u32x wordl3[4] = { 0 }; + + wordl0[0] = pw_buf0[0]; + wordl0[1] = pw_buf0[1]; + wordl0[2] = pw_buf0[2]; + wordl0[3] = pw_buf0[3]; + wordl1[0] = pw_buf1[0]; + wordl1[1] = pw_buf1[1]; + wordl1[2] = pw_buf1[2]; + wordl1[3] = pw_buf1[3]; + + u32x wordr0[4] = { 0 }; + u32x wordr1[4] = { 0 }; + u32x wordr2[4] = { 0 }; + u32x wordr3[4] = { 0 }; + + wordr0[0] = ix_create_combt (combs_buf, il_pos, 0); + wordr0[1] = ix_create_combt (combs_buf, il_pos, 1); + wordr0[2] = ix_create_combt (combs_buf, il_pos, 2); + wordr0[3] = ix_create_combt (combs_buf, il_pos, 3); + wordr1[0] = ix_create_combt (combs_buf, il_pos, 4); + wordr1[1] = ix_create_combt (combs_buf, il_pos, 5); + wordr1[2] = ix_create_combt (combs_buf, il_pos, 6); + wordr1[3] = ix_create_combt (combs_buf, il_pos, 7); + + if (combs_mode == COMBINATOR_MODE_BASE_LEFT) + { + switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len); + } + else + { + switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len); + } + + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = wordl0[0] | wordr0[0]; + w0[1] = wordl0[1] | wordr0[1]; + w0[2] = wordl0[2] | wordr0[2]; + w0[3] = wordl0[3] | wordr0[3]; + w1[0] = wordl1[0] | wordr1[0]; + w1[1] = wordl1[1] | wordr1[1]; + w1[2] = wordl1[2] | wordr1[2]; + w1[3] = wordl1[3] | wordr1[3]; + w2[0] = wordl2[0] | wordr2[0]; + w2[1] = wordl2[1] | wordr2[1]; + w2[2] = wordl2[2] | wordr2[2]; + w2[3] = wordl2[3] | wordr2[3]; + w3[0] = wordl3[0] | wordr3[0]; + w3[1] = wordl3[1] | wordr3[1]; + w3[2] = pw_len * 8; + w3[3] = 0; + + /** + * md5 + */ + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + w0[0] = a; + w0[1] = b & 0xff; w0[1] |= 0x8000; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 5 * 8; + w3[3] = 0; + + a = MD5M_A; + b = MD5M_B; + c = MD5M_C; + d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + + if (MATCHES_NONE_VS (a, search[0])) continue; + + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + b &= 0xff; + c = 0; + d = 0; + + COMPARE_S_SIMD (a, b, c, d); + } +} + +KERNEL_FQ void m24700_s08 (KERN_ATTR_BASIC ()) +{ +} + +KERNEL_FQ void m24700_s16 (KERN_ATTR_BASIC ()) +{ +} diff --git a/OpenCL/m24700_a1-pure.cl b/OpenCL/m24700_a1-pure.cl new file mode 100644 index 000000000..3e2fbf662 --- /dev/null +++ b/OpenCL/m24700_a1-pure.cl @@ -0,0 +1,137 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +//#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_scalar.cl" +#include "inc_hash_md5.cl" +#endif + +KERNEL_FQ void m24700_mxx (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + md5_ctx_t ctx0; + + md5_init (&ctx0); + + md5_update_global (&ctx0, pws[gid].i, pws[gid].pw_len); + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos++) + { + md5_ctx_t ctx1 = ctx0; + + md5_update_global (&ctx1, combs_buf[il_pos].i, combs_buf[il_pos].pw_len); + + md5_final (&ctx1); + + const u32 a = ctx1.h[0]; + const u32 b = ctx1.h[1] & 0xff; + + md5_ctx_t ctx; + + md5_init (&ctx); + + ctx.w0[0] = a; + ctx.w0[1] = b; + + ctx.len = 5; + + md5_final (&ctx); + + const u32 r0 = ctx.h[DGST_R0]; + const u32 r1 = ctx.h[DGST_R1] & 0xff; + const u32 r2 = 0; + const u32 r3 = 0; + + COMPARE_M_SCALAR (r0, r1, r2, r3); + } +} + +KERNEL_FQ void m24700_sxx (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + 0, + 0 + }; + + /** + * base + */ + + md5_ctx_t ctx0; + + md5_init (&ctx0); + + md5_update_global (&ctx0, pws[gid].i, pws[gid].pw_len); + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos++) + { + md5_ctx_t ctx1 = ctx0; + + md5_update_global (&ctx1, combs_buf[il_pos].i, combs_buf[il_pos].pw_len); + + md5_final (&ctx1); + + const u32 a = ctx1.h[0]; + const u32 b = ctx1.h[1] & 0xff; + + md5_ctx_t ctx; + + md5_init (&ctx); + + ctx.w0[0] = a; + ctx.w0[1] = b; + + ctx.len = 5; + + md5_final (&ctx); + + const u32 r0 = ctx.h[DGST_R0]; + const u32 r1 = ctx.h[DGST_R1] & 0xff; + const u32 r2 = 0; + const u32 r3 = 0; + + COMPARE_S_SCALAR (r0, r1, r2, r3); + } +} diff --git a/OpenCL/m24700_a3-optimized.cl b/OpenCL/m24700_a3-optimized.cl new file mode 100644 index 000000000..0c5c99397 --- /dev/null +++ b/OpenCL/m24700_a3-optimized.cl @@ -0,0 +1,784 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_md5.cl" +#endif + +DECLSPEC void m24700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + /** + * loop + */ + + u32 w0l = w0[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = ix_create_bft (bfs_buf, il_pos); + + const u32x w0lr = w0l | w0r; + + u32x w0_t[4]; + u32x w1_t[4]; + u32x w2_t[4]; + u32x w3_t[4]; + + w0_t[0] = w0lr; + w0_t[1] = w0[1]; + w0_t[2] = w0[2]; + w0_t[3] = w0[3]; + w1_t[0] = w1[0]; + w1_t[1] = w1[1]; + w1_t[2] = w1[2]; + w1_t[3] = w1[3]; + w2_t[0] = w2[0]; + w2_t[1] = w2[1]; + w2_t[2] = w2[2]; + w2_t[3] = w2[3]; + w3_t[0] = w3[0]; + w3_t[1] = w3[1]; + w3_t[2] = w3[2]; + w3_t[3] = w3[3]; + + /** + * md5 + */ + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + w0_t[0] = a; + w0_t[1] = b & 0xff; w0_t[1] |= 0x8000; + w0_t[2] = 0; + w0_t[3] = 0; + w1_t[0] = 0; + w1_t[1] = 0; + w1_t[2] = 0; + w1_t[3] = 0; + w2_t[0] = 0; + w2_t[1] = 0; + w2_t[2] = 0; + w2_t[3] = 0; + w3_t[0] = 0; + w3_t[1] = 0; + w3_t[2] = 5 * 8; + w3_t[3] = 0; + + a = MD5M_A; + b = MD5M_B; + c = MD5M_C; + d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13); + + MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33); + + b &= 0xff; + c = 0; + d = 0; + + COMPARE_M_SIMD (a, b, c, d); + } +} + +DECLSPEC void m24700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + 0, + 0 + }; + + /** + * loop + */ + + u32 w0l = w0[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = ix_create_bft (bfs_buf, il_pos); + + const u32x w0lr = w0l | w0r; + + u32x w0_t[4]; + u32x w1_t[4]; + u32x w2_t[4]; + u32x w3_t[4]; + + w0_t[0] = w0lr; + w0_t[1] = w0[1]; + w0_t[2] = w0[2]; + w0_t[3] = w0[3]; + w1_t[0] = w1[0]; + w1_t[1] = w1[1]; + w1_t[2] = w1[2]; + w1_t[3] = w1[3]; + w2_t[0] = w2[0]; + w2_t[1] = w2[1]; + w2_t[2] = w2[2]; + w2_t[3] = w2[3]; + w3_t[0] = w3[0]; + w3_t[1] = w3[1]; + w3_t[2] = w3[2]; + w3_t[3] = w3[3]; + + /** + * md5 + */ + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + w0_t[0] = a; + w0_t[1] = b & 0xff; w0_t[1] |= 0x8000; + w0_t[2] = 0; + w0_t[3] = 0; + w1_t[0] = 0; + w1_t[1] = 0; + w1_t[2] = 0; + w1_t[3] = 0; + w2_t[0] = 0; + w2_t[1] = 0; + w2_t[2] = 0; + w2_t[3] = 0; + w3_t[0] = 0; + w3_t[1] = 0; + w3_t[2] = 5 * 8; + w3_t[3] = 0; + + a = MD5M_A; + b = MD5M_B; + c = MD5M_C; + d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13); + + MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30); + + if (MATCHES_NONE_VS (a, search[0])) continue; + + MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33); + + b &= 0xff; + c = 0; + d = 0; + + COMPARE_S_SIMD (a, b, c, d); + } +} + +KERNEL_FQ void m24700_m04 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + /** + * modifier + */ + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = pws[gid].i[14]; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + if (gid >= gid_max) return; + + /** + * main + */ + + m24700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24700_m08 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + /** + * modifier + */ + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = pws[gid].i[14]; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + if (gid >= gid_max) return; + + /** + * main + */ + + m24700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24700_m16 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + /** + * modifier + */ + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = pws[gid].i[ 8]; + w2[1] = pws[gid].i[ 9]; + w2[2] = pws[gid].i[10]; + w2[3] = pws[gid].i[11]; + + u32 w3[4]; + + w3[0] = pws[gid].i[12]; + w3[1] = pws[gid].i[13]; + w3[2] = pws[gid].i[14]; + w3[3] = pws[gid].i[15]; + + const u32 pw_len = pws[gid].pw_len & 63; + + if (gid >= gid_max) return; + + /** + * main + */ + + m24700m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24700_s04 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + /** + * modifier + */ + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = pws[gid].i[14]; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + if (gid >= gid_max) return; + + /** + * main + */ + + m24700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24700_s08 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + /** + * modifier + */ + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = pws[gid].i[14]; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + if (gid >= gid_max) return; + + /** + * main + */ + + m24700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24700_s16 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + /** + * modifier + */ + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = pws[gid].i[ 8]; + w2[1] = pws[gid].i[ 9]; + w2[2] = pws[gid].i[10]; + w2[3] = pws[gid].i[11]; + + u32 w3[4]; + + w3[0] = pws[gid].i[12]; + w3[1] = pws[gid].i[13]; + w3[2] = pws[gid].i[14]; + w3[3] = pws[gid].i[15]; + + const u32 pw_len = pws[gid].pw_len & 63; + + if (gid >= gid_max) return; + + /** + * main + */ + + m24700s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} diff --git a/OpenCL/m24700_a3-pure.cl b/OpenCL/m24700_a3-pure.cl new file mode 100644 index 000000000..9942c4415 --- /dev/null +++ b/OpenCL/m24700_a3-pure.cl @@ -0,0 +1,163 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_md5.cl" +#endif + +KERNEL_FQ void m24700_mxx (KERN_ATTR_VECTOR ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + const u32 pw_len = pws[gid].pw_len; + + u32x w[64] = { 0 }; + + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + { + w[idx] = pws[gid].i[idx]; + } + + /** + * loop + */ + + u32x w0l = w[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = words_buf_r[il_pos / VECT_SIZE]; + + const u32x w0 = w0l | w0r; + + w[0] = w0; + + md5_ctx_vector_t ctx0; + + md5_init_vector (&ctx0); + + md5_update_vector (&ctx0, w, pw_len); + + md5_final_vector (&ctx0); + + const u32x a = ctx0.h[0]; + const u32x b = ctx0.h[1] & 0xff; + + md5_ctx_vector_t ctx; + + md5_init_vector (&ctx); + + ctx.w0[0] = a; + ctx.w0[1] = b; + + ctx.len = 5; + + md5_final_vector (&ctx); + + const u32x r0 = ctx.h[DGST_R0]; + const u32x r1 = ctx.h[DGST_R1] & 0xff; + const u32x r2 = 0; + const u32x r3 = 0; + + COMPARE_M_SIMD (r0, r1, r2, r3); + } +} + +KERNEL_FQ void m24700_sxx (KERN_ATTR_VECTOR ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + 0, + 0 + }; + + /** + * base + */ + + const u32 pw_len = pws[gid].pw_len; + + u32x w[64] = { 0 }; + + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + { + w[idx] = pws[gid].i[idx]; + } + + /** + * loop + */ + + u32x w0l = w[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = words_buf_r[il_pos / VECT_SIZE]; + + const u32x w0 = w0l | w0r; + + w[0] = w0; + + md5_ctx_vector_t ctx0; + + md5_init_vector (&ctx0); + + md5_update_vector (&ctx0, w, pw_len); + + md5_final_vector (&ctx0); + + const u32x a = ctx0.h[0]; + const u32x b = ctx0.h[1] & 0xff; + + md5_ctx_vector_t ctx; + + md5_init_vector (&ctx); + + ctx.w0[0] = a; + ctx.w0[1] = b; + + ctx.len = 5; + + md5_final_vector (&ctx); + + const u32x r0 = ctx.h[DGST_R0]; + const u32x r1 = ctx.h[DGST_R1] & 0xff; + const u32x r2 = 0; + const u32x r3 = 0; + + COMPARE_S_SIMD (r0, r1, r2, r3); + } +} diff --git a/OpenCL/m24800_a0-optimized.cl b/OpenCL/m24800_a0-optimized.cl new file mode 100644 index 000000000..9ef086f7c --- /dev/null +++ b/OpenCL/m24800_a0-optimized.cl @@ -0,0 +1,362 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_rp_optimized.h" +#include "inc_rp_optimized.cl" +#include "inc_simd.cl" +#include "inc_hash_sha1.cl" +#endif + +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +{ + w0[0] = w0[0] ^ 0x36363636; + w0[1] = w0[1] ^ 0x36363636; + w0[2] = w0[2] ^ 0x36363636; + w0[3] = w0[3] ^ 0x36363636; + w1[0] = w1[0] ^ 0x36363636; + w1[1] = w1[1] ^ 0x36363636; + w1[2] = w1[2] ^ 0x36363636; + w1[3] = w1[3] ^ 0x36363636; + w2[0] = w2[0] ^ 0x36363636; + w2[1] = w2[1] ^ 0x36363636; + w2[2] = w2[2] ^ 0x36363636; + w2[3] = w2[3] ^ 0x36363636; + w3[0] = w3[0] ^ 0x36363636; + w3[1] = w3[1] ^ 0x36363636; + w3[2] = w3[2] ^ 0x36363636; + w3[3] = w3[3] ^ 0x36363636; + + ipad[0] = SHA1M_A; + ipad[1] = SHA1M_B; + ipad[2] = SHA1M_C; + ipad[3] = SHA1M_D; + ipad[4] = SHA1M_E; + + sha1_transform_vector (w0, w1, w2, w3, ipad); + + w0[0] = w0[0] ^ 0x6a6a6a6a; + w0[1] = w0[1] ^ 0x6a6a6a6a; + w0[2] = w0[2] ^ 0x6a6a6a6a; + w0[3] = w0[3] ^ 0x6a6a6a6a; + w1[0] = w1[0] ^ 0x6a6a6a6a; + w1[1] = w1[1] ^ 0x6a6a6a6a; + w1[2] = w1[2] ^ 0x6a6a6a6a; + w1[3] = w1[3] ^ 0x6a6a6a6a; + w2[0] = w2[0] ^ 0x6a6a6a6a; + w2[1] = w2[1] ^ 0x6a6a6a6a; + w2[2] = w2[2] ^ 0x6a6a6a6a; + w2[3] = w2[3] ^ 0x6a6a6a6a; + w3[0] = w3[0] ^ 0x6a6a6a6a; + w3[1] = w3[1] ^ 0x6a6a6a6a; + w3[2] = w3[2] ^ 0x6a6a6a6a; + w3[3] = w3[3] ^ 0x6a6a6a6a; + + opad[0] = SHA1M_A; + opad[1] = SHA1M_B; + opad[2] = SHA1M_C; + opad[3] = SHA1M_D; + opad[4] = SHA1M_E; + + sha1_transform_vector (w0, w1, w2, w3, opad); +} + +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = 0x80000000; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 20) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m24800_m04 (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + u32x w0[4] = { 0 }; + u32x w1[4] = { 0 }; + u32x w2[4] = { 0 }; + u32x w3[4] = { 0 }; + + const u32x out_len = apply_rules_vect_optimized (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1); + + const u32x out_len2 = out_len * 2; + + w0[0] = hc_swap32 (w0[0]); + w0[1] = hc_swap32 (w0[1]); + w0[2] = hc_swap32 (w0[2]); + w0[3] = hc_swap32 (w0[3]); + w1[0] = hc_swap32 (w1[0]); + w1[1] = hc_swap32 (w1[1]); + w1[2] = hc_swap32 (w1[2]); + w1[3] = hc_swap32 (w1[3]); + + make_utf16beN (w1, w2, w3); + make_utf16beN (w0, w0, w1); + + u32x x0_t[4]; + u32x x1_t[4]; + u32x x2_t[4]; + u32x x3_t[4]; + + x0_t[0] = w0[0]; + x0_t[1] = w0[1]; + x0_t[2] = w0[2]; + x0_t[3] = w0[3]; + x1_t[0] = w1[0]; + x1_t[1] = w1[1]; + x1_t[2] = w1[2]; + x1_t[3] = w1[3]; + x2_t[0] = w2[0]; + x2_t[1] = w2[1]; + x2_t[2] = w2[2]; + x2_t[3] = w2[3]; + x3_t[0] = w3[0]; + x3_t[1] = w3[1]; + x3_t[2] = w3[2]; + x3_t[3] = w3[3]; + + u32x ipad[5]; + u32x opad[5]; + + hmac_sha1_pad (x0_t, x1_t, x2_t, x3_t, ipad, opad); + + x0_t[0] = w0[0]; + x0_t[1] = w0[1]; + x0_t[2] = w0[2]; + x0_t[3] = w0[3]; + x1_t[0] = w1[0]; + x1_t[1] = w1[1]; + x1_t[2] = w1[2]; + x1_t[3] = w1[3]; + x2_t[0] = w2[0]; + x2_t[1] = w2[1]; + x2_t[2] = w2[2]; + x2_t[3] = w2[3]; + x3_t[0] = w3[0]; + x3_t[1] = w3[1]; + x3_t[2] = w3[2]; + x3_t[3] = w3[3]; + + append_0x80_4x4_VV (x0_t, x1_t, x2_t, x3_t, out_len2 ^ 3); + + x3_t[2] = 0; + x3_t[3] = (64 + out_len2) * 8; + + u32x digest[5]; + + hmac_sha1_run (x0_t, x1_t, x2_t, x3_t, ipad, opad, digest); + + COMPARE_M_SIMD (digest[3], digest[4], digest[2], digest[1]); + } +} + +KERNEL_FQ void m24800_m08 (KERN_ATTR_RULES ()) +{ +} + +KERNEL_FQ void m24800_m16 (KERN_ATTR_RULES ()) +{ +} + +KERNEL_FQ void m24800_s04 (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] + }; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + u32x w0[4] = { 0 }; + u32x w1[4] = { 0 }; + u32x w2[4] = { 0 }; + u32x w3[4] = { 0 }; + + const u32x out_len = apply_rules_vect_optimized (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1); + + const u32x out_len2 = out_len * 2; + + w0[0] = hc_swap32 (w0[0]); + w0[1] = hc_swap32 (w0[1]); + w0[2] = hc_swap32 (w0[2]); + w0[3] = hc_swap32 (w0[3]); + w1[0] = hc_swap32 (w1[0]); + w1[1] = hc_swap32 (w1[1]); + w1[2] = hc_swap32 (w1[2]); + w1[3] = hc_swap32 (w1[3]); + + make_utf16beN (w1, w2, w3); + make_utf16beN (w0, w0, w1); + + u32x x0_t[4]; + u32x x1_t[4]; + u32x x2_t[4]; + u32x x3_t[4]; + + x0_t[0] = w0[0]; + x0_t[1] = w0[1]; + x0_t[2] = w0[2]; + x0_t[3] = w0[3]; + x1_t[0] = w1[0]; + x1_t[1] = w1[1]; + x1_t[2] = w1[2]; + x1_t[3] = w1[3]; + x2_t[0] = w2[0]; + x2_t[1] = w2[1]; + x2_t[2] = w2[2]; + x2_t[3] = w2[3]; + x3_t[0] = w3[0]; + x3_t[1] = w3[1]; + x3_t[2] = w3[2]; + x3_t[3] = w3[3]; + + u32x ipad[5]; + u32x opad[5]; + + hmac_sha1_pad (x0_t, x1_t, x2_t, x3_t, ipad, opad); + + x0_t[0] = w0[0]; + x0_t[1] = w0[1]; + x0_t[2] = w0[2]; + x0_t[3] = w0[3]; + x1_t[0] = w1[0]; + x1_t[1] = w1[1]; + x1_t[2] = w1[2]; + x1_t[3] = w1[3]; + x2_t[0] = w2[0]; + x2_t[1] = w2[1]; + x2_t[2] = w2[2]; + x2_t[3] = w2[3]; + x3_t[0] = w3[0]; + x3_t[1] = w3[1]; + x3_t[2] = w3[2]; + x3_t[3] = w3[3]; + + append_0x80_4x4_VV (x0_t, x1_t, x2_t, x3_t, out_len2 ^ 3); + + x3_t[2] = 0; + x3_t[3] = (64 + out_len2) * 8; + + u32x digest[5]; + + hmac_sha1_run (x0_t, x1_t, x2_t, x3_t, ipad, opad, digest); + + COMPARE_S_SIMD (digest[3], digest[4], digest[2], digest[1]); + } +} + +KERNEL_FQ void m24800_s08 (KERN_ATTR_RULES ()) +{ +} + +KERNEL_FQ void m24800_s16 (KERN_ATTR_RULES ()) +{ +} diff --git a/OpenCL/m24800_a0-pure.cl b/OpenCL/m24800_a0-pure.cl new file mode 100644 index 000000000..4140ed966 --- /dev/null +++ b/OpenCL/m24800_a0-pure.cl @@ -0,0 +1,147 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +//#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_rp.h" +#include "inc_rp.cl" +#include "inc_scalar.cl" +#include "inc_hash_sha1.cl" +#endif + +KERNEL_FQ void m24800_mxx (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + COPY_PW (pws[gid]); + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos++) + { + pw_t tmp = PASTE_PW; + + tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len); + + // swap endian + for (u32 i = 0, idx = 0; i < tmp.pw_len; i += 4, idx += 1) + { + tmp.i[idx] = hc_swap32 (tmp.i[idx]); + } + + u32 t[128] = { 0 }; + + // make it unicode. + for (u32 i = 0, idx = 0; idx < tmp.pw_len; i += 2, idx += 1) + { + make_utf16beN (&tmp.i[idx], &t[i], &t[i+1]); + } + + // hash time + sha1_hmac_ctx_t ctx; + + sha1_hmac_init (&ctx, t, tmp.pw_len * 2); + + sha1_hmac_update (&ctx, t, tmp.pw_len * 2); + + sha1_hmac_final (&ctx); + + const u32 r0 = ctx.opad.h[DGST_R0]; + const u32 r1 = ctx.opad.h[DGST_R1]; + const u32 r2 = ctx.opad.h[DGST_R2]; + const u32 r3 = ctx.opad.h[DGST_R3]; + + COMPARE_M_SCALAR (r0, r1, r2, r3); + } +} + +KERNEL_FQ void m24800_sxx (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] + }; + + /** + * base + */ + + COPY_PW (pws[gid]); + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos++) + { + pw_t tmp = PASTE_PW; + + tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len); + + // swap endian + for (u32 i = 0, idx = 0; i < tmp.pw_len; i += 4, idx += 1) + { + tmp.i[idx] = hc_swap32 (tmp.i[idx]); + } + + u32 t[128] = { 0 }; + + // make it unicode. + for (u32 i = 0, idx = 0; idx < tmp.pw_len; i += 2, idx += 1) + { + make_utf16beN (&tmp.i[idx], &t[i], &t[i+1]); + } + + // hash time + sha1_hmac_ctx_t ctx; + + sha1_hmac_init (&ctx, t, tmp.pw_len * 2); + + sha1_hmac_update (&ctx, t, tmp.pw_len * 2); + + sha1_hmac_final (&ctx); + + const u32 r0 = ctx.opad.h[DGST_R0]; + const u32 r1 = ctx.opad.h[DGST_R1]; + const u32 r2 = ctx.opad.h[DGST_R2]; + const u32 r3 = ctx.opad.h[DGST_R3]; + + COMPARE_S_SCALAR (r0, r1, r2, r3); + } +} diff --git a/OpenCL/m24800_a1-optimized.cl b/OpenCL/m24800_a1-optimized.cl new file mode 100644 index 000000000..02451900c --- /dev/null +++ b/OpenCL/m24800_a1-optimized.cl @@ -0,0 +1,464 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha1.cl" +#endif + +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +{ + w0[0] = w0[0] ^ 0x36363636; + w0[1] = w0[1] ^ 0x36363636; + w0[2] = w0[2] ^ 0x36363636; + w0[3] = w0[3] ^ 0x36363636; + w1[0] = w1[0] ^ 0x36363636; + w1[1] = w1[1] ^ 0x36363636; + w1[2] = w1[2] ^ 0x36363636; + w1[3] = w1[3] ^ 0x36363636; + w2[0] = w2[0] ^ 0x36363636; + w2[1] = w2[1] ^ 0x36363636; + w2[2] = w2[2] ^ 0x36363636; + w2[3] = w2[3] ^ 0x36363636; + w3[0] = w3[0] ^ 0x36363636; + w3[1] = w3[1] ^ 0x36363636; + w3[2] = w3[2] ^ 0x36363636; + w3[3] = w3[3] ^ 0x36363636; + + ipad[0] = SHA1M_A; + ipad[1] = SHA1M_B; + ipad[2] = SHA1M_C; + ipad[3] = SHA1M_D; + ipad[4] = SHA1M_E; + + sha1_transform_vector (w0, w1, w2, w3, ipad); + + w0[0] = w0[0] ^ 0x6a6a6a6a; + w0[1] = w0[1] ^ 0x6a6a6a6a; + w0[2] = w0[2] ^ 0x6a6a6a6a; + w0[3] = w0[3] ^ 0x6a6a6a6a; + w1[0] = w1[0] ^ 0x6a6a6a6a; + w1[1] = w1[1] ^ 0x6a6a6a6a; + w1[2] = w1[2] ^ 0x6a6a6a6a; + w1[3] = w1[3] ^ 0x6a6a6a6a; + w2[0] = w2[0] ^ 0x6a6a6a6a; + w2[1] = w2[1] ^ 0x6a6a6a6a; + w2[2] = w2[2] ^ 0x6a6a6a6a; + w2[3] = w2[3] ^ 0x6a6a6a6a; + w3[0] = w3[0] ^ 0x6a6a6a6a; + w3[1] = w3[1] ^ 0x6a6a6a6a; + w3[2] = w3[2] ^ 0x6a6a6a6a; + w3[3] = w3[3] ^ 0x6a6a6a6a; + + opad[0] = SHA1M_A; + opad[1] = SHA1M_B; + opad[2] = SHA1M_C; + opad[3] = SHA1M_D; + opad[4] = SHA1M_E; + + sha1_transform_vector (w0, w1, w2, w3, opad); +} + +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = 0x80000000; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 20) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m24800_m04 (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_l_len = pws[gid].pw_len & 63; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos) & 63; + + const u32x pw_len = (pw_l_len + pw_r_len) & 63; + + const u32x pw_len2 = pw_len * 2; + + /** + * concat password candidate + */ + + u32x wordl0[4] = { 0 }; + u32x wordl1[4] = { 0 }; + u32x wordl2[4] = { 0 }; + u32x wordl3[4] = { 0 }; + + wordl0[0] = pw_buf0[0]; + wordl0[1] = pw_buf0[1]; + wordl0[2] = pw_buf0[2]; + wordl0[3] = pw_buf0[3]; + wordl1[0] = pw_buf1[0]; + wordl1[1] = pw_buf1[1]; + wordl1[2] = pw_buf1[2]; + wordl1[3] = pw_buf1[3]; + + u32x wordr0[4] = { 0 }; + u32x wordr1[4] = { 0 }; + u32x wordr2[4] = { 0 }; + u32x wordr3[4] = { 0 }; + + wordr0[0] = ix_create_combt (combs_buf, il_pos, 0); + wordr0[1] = ix_create_combt (combs_buf, il_pos, 1); + wordr0[2] = ix_create_combt (combs_buf, il_pos, 2); + wordr0[3] = ix_create_combt (combs_buf, il_pos, 3); + wordr1[0] = ix_create_combt (combs_buf, il_pos, 4); + wordr1[1] = ix_create_combt (combs_buf, il_pos, 5); + wordr1[2] = ix_create_combt (combs_buf, il_pos, 6); + wordr1[3] = ix_create_combt (combs_buf, il_pos, 7); + + if (combs_mode == COMBINATOR_MODE_BASE_LEFT) + { + switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len); + } + else + { + switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len); + } + + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = wordl0[0] | wordr0[0]; + w0[1] = wordl0[1] | wordr0[1]; + w0[2] = wordl0[2] | wordr0[2]; + w0[3] = wordl0[3] | wordr0[3]; + w1[0] = wordl1[0] | wordr1[0]; + w1[1] = wordl1[1] | wordr1[1]; + w1[2] = wordl1[2] | wordr1[2]; + w1[3] = wordl1[3] | wordr1[3]; + + w0[0] = hc_swap32 (w0[0]); + w0[1] = hc_swap32 (w0[1]); + w0[2] = hc_swap32 (w0[2]); + w0[3] = hc_swap32 (w0[3]); + w1[0] = hc_swap32 (w1[0]); + w1[1] = hc_swap32 (w1[1]); + w1[2] = hc_swap32 (w1[2]); + w1[3] = hc_swap32 (w1[3]); + + make_utf16beN (w1, w2, w3); + make_utf16beN (w0, w0, w1); + + u32x x0_t[4]; + u32x x1_t[4]; + u32x x2_t[4]; + u32x x3_t[4]; + + x0_t[0] = w0[0]; + x0_t[1] = w0[1]; + x0_t[2] = w0[2]; + x0_t[3] = w0[3]; + x1_t[0] = w1[0]; + x1_t[1] = w1[1]; + x1_t[2] = w1[2]; + x1_t[3] = w1[3]; + x2_t[0] = w2[0]; + x2_t[1] = w2[1]; + x2_t[2] = w2[2]; + x2_t[3] = w2[3]; + x3_t[0] = w3[0]; + x3_t[1] = w3[1]; + x3_t[2] = w3[2]; + x3_t[3] = w3[3]; + + u32x ipad[5]; + u32x opad[5]; + + hmac_sha1_pad (x0_t, x1_t, x2_t, x3_t, ipad, opad); + + x0_t[0] = w0[0]; + x0_t[1] = w0[1]; + x0_t[2] = w0[2]; + x0_t[3] = w0[3]; + x1_t[0] = w1[0]; + x1_t[1] = w1[1]; + x1_t[2] = w1[2]; + x1_t[3] = w1[3]; + x2_t[0] = w2[0]; + x2_t[1] = w2[1]; + x2_t[2] = w2[2]; + x2_t[3] = w2[3]; + x3_t[0] = w3[0]; + x3_t[1] = w3[1]; + x3_t[2] = w3[2]; + x3_t[3] = w3[3]; + + append_0x80_4x4_VV (x0_t, x1_t, x2_t, x3_t, pw_len2 ^ 3); + + x3_t[2] = 0; + x3_t[3] = (64 + pw_len2) * 8; + + u32x digest[5]; + + hmac_sha1_run (x0_t, x1_t, x2_t, x3_t, ipad, opad, digest); + + COMPARE_M_SIMD (digest[3], digest[4], digest[2], digest[1]); + } +} + +KERNEL_FQ void m24800_m08 (KERN_ATTR_BASIC ()) +{ +} + +KERNEL_FQ void m24800_m16 (KERN_ATTR_BASIC ()) +{ +} + +KERNEL_FQ void m24800_s04 (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_l_len = pws[gid].pw_len & 63; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] + }; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos) & 63; + + const u32x pw_len = (pw_l_len + pw_r_len) & 63; + + const u32x pw_len2 = pw_len * 2; + + /** + * concat password candidate + */ + + u32x wordl0[4] = { 0 }; + u32x wordl1[4] = { 0 }; + u32x wordl2[4] = { 0 }; + u32x wordl3[4] = { 0 }; + + wordl0[0] = pw_buf0[0]; + wordl0[1] = pw_buf0[1]; + wordl0[2] = pw_buf0[2]; + wordl0[3] = pw_buf0[3]; + wordl1[0] = pw_buf1[0]; + wordl1[1] = pw_buf1[1]; + wordl1[2] = pw_buf1[2]; + wordl1[3] = pw_buf1[3]; + + u32x wordr0[4] = { 0 }; + u32x wordr1[4] = { 0 }; + u32x wordr2[4] = { 0 }; + u32x wordr3[4] = { 0 }; + + wordr0[0] = ix_create_combt (combs_buf, il_pos, 0); + wordr0[1] = ix_create_combt (combs_buf, il_pos, 1); + wordr0[2] = ix_create_combt (combs_buf, il_pos, 2); + wordr0[3] = ix_create_combt (combs_buf, il_pos, 3); + wordr1[0] = ix_create_combt (combs_buf, il_pos, 4); + wordr1[1] = ix_create_combt (combs_buf, il_pos, 5); + wordr1[2] = ix_create_combt (combs_buf, il_pos, 6); + wordr1[3] = ix_create_combt (combs_buf, il_pos, 7); + + if (combs_mode == COMBINATOR_MODE_BASE_LEFT) + { + switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len); + } + else + { + switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len); + } + + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = wordl0[0] | wordr0[0]; + w0[1] = wordl0[1] | wordr0[1]; + w0[2] = wordl0[2] | wordr0[2]; + w0[3] = wordl0[3] | wordr0[3]; + w1[0] = wordl1[0] | wordr1[0]; + w1[1] = wordl1[1] | wordr1[1]; + w1[2] = wordl1[2] | wordr1[2]; + w1[3] = wordl1[3] | wordr1[3]; + + w0[0] = hc_swap32 (w0[0]); + w0[1] = hc_swap32 (w0[1]); + w0[2] = hc_swap32 (w0[2]); + w0[3] = hc_swap32 (w0[3]); + w1[0] = hc_swap32 (w1[0]); + w1[1] = hc_swap32 (w1[1]); + w1[2] = hc_swap32 (w1[2]); + w1[3] = hc_swap32 (w1[3]); + + make_utf16beN (w1, w2, w3); + make_utf16beN (w0, w0, w1); + + u32x x0_t[4]; + u32x x1_t[4]; + u32x x2_t[4]; + u32x x3_t[4]; + + x0_t[0] = w0[0]; + x0_t[1] = w0[1]; + x0_t[2] = w0[2]; + x0_t[3] = w0[3]; + x1_t[0] = w1[0]; + x1_t[1] = w1[1]; + x1_t[2] = w1[2]; + x1_t[3] = w1[3]; + x2_t[0] = w2[0]; + x2_t[1] = w2[1]; + x2_t[2] = w2[2]; + x2_t[3] = w2[3]; + x3_t[0] = w3[0]; + x3_t[1] = w3[1]; + x3_t[2] = w3[2]; + x3_t[3] = w3[3]; + + u32x ipad[5]; + u32x opad[5]; + + hmac_sha1_pad (x0_t, x1_t, x2_t, x3_t, ipad, opad); + + x0_t[0] = w0[0]; + x0_t[1] = w0[1]; + x0_t[2] = w0[2]; + x0_t[3] = w0[3]; + x1_t[0] = w1[0]; + x1_t[1] = w1[1]; + x1_t[2] = w1[2]; + x1_t[3] = w1[3]; + x2_t[0] = w2[0]; + x2_t[1] = w2[1]; + x2_t[2] = w2[2]; + x2_t[3] = w2[3]; + x3_t[0] = w3[0]; + x3_t[1] = w3[1]; + x3_t[2] = w3[2]; + x3_t[3] = w3[3]; + + append_0x80_4x4_VV (x0_t, x1_t, x2_t, x3_t, pw_len2 ^ 3); + + x3_t[2] = 0; + x3_t[3] = (64 + pw_len2) * 8; + + u32x digest[5]; + + hmac_sha1_run (x0_t, x1_t, x2_t, x3_t, ipad, opad, digest); + + COMPARE_S_SIMD (digest[3], digest[4], digest[2], digest[1]); + } +} + +KERNEL_FQ void m24800_s08 (KERN_ATTR_BASIC ()) +{ +} + +KERNEL_FQ void m24800_s16 (KERN_ATTR_BASIC ()) +{ +} diff --git a/OpenCL/m24800_a1-pure.cl b/OpenCL/m24800_a1-pure.cl new file mode 100644 index 000000000..df4733feb --- /dev/null +++ b/OpenCL/m24800_a1-pure.cl @@ -0,0 +1,181 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +//#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_scalar.cl" +#include "inc_hash_sha1.cl" +#endif + +KERNEL_FQ void m24800_mxx (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + const u32 pw_len = pws[gid].pw_len; + + u32 w[64] = { 0 }; + + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + { + w[idx] = hc_swap32_S (pws[gid].i[idx]); + } + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos++) + { + const u32 comb_len = combs_buf[il_pos].pw_len; + + u32 c[64]; + + #ifdef _unroll + #pragma unroll + #endif + for (int idx = 0; idx < 64; idx++) + { + c[idx] = hc_swap32_S (combs_buf[il_pos].i[idx]); + } + + switch_buffer_by_offset_1x64_be_S (c, pw_len); + + #ifdef _unroll + #pragma unroll + #endif + for (int i = 0; i < 64; i++) + { + c[i] |= w[i]; + } + + u32 t[128] = { 0 }; + + // make it unicode. + for (u32 i = 0, idx = 0; idx < pw_len + comb_len; i += 2, idx += 1) + { + make_utf16beN (&c[idx], &t[i], &t[i+1]); + } + + sha1_hmac_ctx_t ctx; + + sha1_hmac_init (&ctx, t, (pw_len + comb_len) * 2); + + sha1_hmac_update (&ctx, t, (pw_len + comb_len) * 2); + + sha1_hmac_final (&ctx); + + const u32 r0 = ctx.opad.h[DGST_R0]; + const u32 r1 = ctx.opad.h[DGST_R1]; + const u32 r2 = ctx.opad.h[DGST_R2]; + const u32 r3 = ctx.opad.h[DGST_R3]; + + COMPARE_M_SCALAR (r0, r1, r2, r3); + } +} + +KERNEL_FQ void m24800_sxx (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] + }; + + /** + * base + */ + + const u32 pw_len = pws[gid].pw_len; + + u32 w[64] = { 0 }; + + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + { + w[idx] = hc_swap32_S (pws[gid].i[idx]); + } + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos++) + { + const u32 comb_len = combs_buf[il_pos].pw_len; + + u32 c[64]; + + #ifdef _unroll + #pragma unroll + #endif + for (int idx = 0; idx < 64; idx++) + { + c[idx] = hc_swap32_S (combs_buf[il_pos].i[idx]); + } + + switch_buffer_by_offset_1x64_be_S (c, pw_len); + + #ifdef _unroll + #pragma unroll + #endif + for (int i = 0; i < 64; i++) + { + c[i] |= w[i]; + } + + u32 t[128] = { 0 }; + + // make it unicode. + for (u32 i = 0, idx = 0; idx < pw_len + comb_len; i += 2, idx += 1) + { + make_utf16beN (&c[idx], &t[i], &t[i+1]); + } + + sha1_hmac_ctx_t ctx; + + sha1_hmac_init (&ctx, t, (pw_len + comb_len) * 2); + + sha1_hmac_update (&ctx, t, (pw_len + comb_len) * 2); + + sha1_hmac_final (&ctx); + + const u32 r0 = ctx.opad.h[DGST_R0]; + const u32 r1 = ctx.opad.h[DGST_R1]; + const u32 r2 = ctx.opad.h[DGST_R2]; + const u32 r3 = ctx.opad.h[DGST_R3]; + + COMPARE_S_SCALAR (r0, r1, r2, r3); + } +} diff --git a/OpenCL/m24800_a3-optimized.cl b/OpenCL/m24800_a3-optimized.cl new file mode 100644 index 000000000..f64f8af3c --- /dev/null +++ b/OpenCL/m24800_a3-optimized.cl @@ -0,0 +1,612 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha1.cl" +#endif + +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +{ + w0[0] = w0[0] ^ 0x36363636; + w0[1] = w0[1] ^ 0x36363636; + w0[2] = w0[2] ^ 0x36363636; + w0[3] = w0[3] ^ 0x36363636; + w1[0] = w1[0] ^ 0x36363636; + w1[1] = w1[1] ^ 0x36363636; + w1[2] = w1[2] ^ 0x36363636; + w1[3] = w1[3] ^ 0x36363636; + w2[0] = w2[0] ^ 0x36363636; + w2[1] = w2[1] ^ 0x36363636; + w2[2] = w2[2] ^ 0x36363636; + w2[3] = w2[3] ^ 0x36363636; + w3[0] = w3[0] ^ 0x36363636; + w3[1] = w3[1] ^ 0x36363636; + w3[2] = w3[2] ^ 0x36363636; + w3[3] = w3[3] ^ 0x36363636; + + ipad[0] = SHA1M_A; + ipad[1] = SHA1M_B; + ipad[2] = SHA1M_C; + ipad[3] = SHA1M_D; + ipad[4] = SHA1M_E; + + sha1_transform_vector (w0, w1, w2, w3, ipad); + + w0[0] = w0[0] ^ 0x6a6a6a6a; + w0[1] = w0[1] ^ 0x6a6a6a6a; + w0[2] = w0[2] ^ 0x6a6a6a6a; + w0[3] = w0[3] ^ 0x6a6a6a6a; + w1[0] = w1[0] ^ 0x6a6a6a6a; + w1[1] = w1[1] ^ 0x6a6a6a6a; + w1[2] = w1[2] ^ 0x6a6a6a6a; + w1[3] = w1[3] ^ 0x6a6a6a6a; + w2[0] = w2[0] ^ 0x6a6a6a6a; + w2[1] = w2[1] ^ 0x6a6a6a6a; + w2[2] = w2[2] ^ 0x6a6a6a6a; + w2[3] = w2[3] ^ 0x6a6a6a6a; + w3[0] = w3[0] ^ 0x6a6a6a6a; + w3[1] = w3[1] ^ 0x6a6a6a6a; + w3[2] = w3[2] ^ 0x6a6a6a6a; + w3[3] = w3[3] ^ 0x6a6a6a6a; + + opad[0] = SHA1M_A; + opad[1] = SHA1M_B; + opad[2] = SHA1M_C; + opad[3] = SHA1M_D; + opad[4] = SHA1M_E; + + sha1_transform_vector (w0, w1, w2, w3, opad); +} + +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = 0x80000000; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 20) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + + sha1_transform_vector (w0, w1, w2, w3, digest); +} + +DECLSPEC void m24800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + + /** + * loop + */ + + u32 w0l = w0[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = ix_create_bft (bfs_buf, il_pos); + + const u32x w0lr = w0l | w0r; + + /** + * pads + */ + + u32x w0_t[4]; + u32x w1_t[4]; + u32x w2_t[4]; + u32x w3_t[4]; + + w0_t[0] = w0lr; + w0_t[1] = w0[1]; + w0_t[2] = w0[2]; + w0_t[3] = w0[3]; + w1_t[0] = w1[0]; + w1_t[1] = w1[1]; + w1_t[2] = w1[2]; + w1_t[3] = w1[3]; + w2_t[0] = w2[0]; + w2_t[1] = w2[1]; + w2_t[2] = w2[2]; + w2_t[3] = w2[3]; + w3_t[0] = w3[0]; + w3_t[1] = w3[1]; + w3_t[2] = w3[2]; + w3_t[3] = w3[3]; + + //make_utf16beN (w1_t, w2_t, w3_t); + //make_utf16beN (w0_t, w0_t, w1_t); + + u32x x0_t[4]; + u32x x1_t[4]; + u32x x2_t[4]; + u32x x3_t[4]; + + x0_t[0] = w0_t[0]; + x0_t[1] = w0_t[1]; + x0_t[2] = w0_t[2]; + x0_t[3] = w0_t[3]; + x1_t[0] = w1_t[0]; + x1_t[1] = w1_t[1]; + x1_t[2] = w1_t[2]; + x1_t[3] = w1_t[3]; + x2_t[0] = w2_t[0]; + x2_t[1] = w2_t[1]; + x2_t[2] = w2_t[2]; + x2_t[3] = w2_t[3]; + x3_t[0] = w3_t[0]; + x3_t[1] = w3_t[1]; + x3_t[2] = w3_t[2]; + x3_t[3] = w3_t[3]; + + u32x ipad[5]; + u32x opad[5]; + + hmac_sha1_pad (x0_t, x1_t, x2_t, x3_t, ipad, opad); + + x0_t[0] = w0_t[0]; + x0_t[1] = w0_t[1]; + x0_t[2] = w0_t[2]; + x0_t[3] = w0_t[3]; + x1_t[0] = w1_t[0]; + x1_t[1] = w1_t[1]; + x1_t[2] = w1_t[2]; + x1_t[3] = w1_t[3]; + x2_t[0] = w2_t[0]; + x2_t[1] = w2_t[1]; + x2_t[2] = w2_t[2]; + x2_t[3] = w2_t[3]; + x3_t[0] = w3_t[0]; + x3_t[1] = w3_t[1]; + x3_t[2] = w3_t[2]; + x3_t[3] = w3_t[3]; + + append_0x80_4x4 (x0_t, x1_t, x2_t, x3_t, pw_len ^ 3); + + x3_t[2] = 0; + x3_t[3] = (64 + pw_len) * 8; + + u32x digest[5]; + + hmac_sha1_run (x0_t, x1_t, x2_t, x3_t, ipad, opad, digest); + + COMPARE_M_SIMD (digest[3], digest[4], digest[2], digest[1]); + } +} + +DECLSPEC void m24800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] + }; + + /** + * loop + */ + + u32 w0l = w0[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = ix_create_bft (bfs_buf, il_pos); + + const u32x w0lr = w0l | w0r; + + /** + * pads + */ + + u32x w0_t[4]; + u32x w1_t[4]; + u32x w2_t[4]; + u32x w3_t[4]; + + w0_t[0] = w0lr; + w0_t[1] = w0[1]; + w0_t[2] = w0[2]; + w0_t[3] = w0[3]; + w1_t[0] = w1[0]; + w1_t[1] = w1[1]; + w1_t[2] = w1[2]; + w1_t[3] = w1[3]; + w2_t[0] = w2[0]; + w2_t[1] = w2[1]; + w2_t[2] = w2[2]; + w2_t[3] = w2[3]; + w3_t[0] = w3[0]; + w3_t[1] = w3[1]; + w3_t[2] = w3[2]; + w3_t[3] = w3[3]; + + //make_utf16beN (w1_t, w2_t, w3_t); + //make_utf16beN (w0_t, w0_t, w1_t); + + u32x x0_t[4]; + u32x x1_t[4]; + u32x x2_t[4]; + u32x x3_t[4]; + + x0_t[0] = w0_t[0]; + x0_t[1] = w0_t[1]; + x0_t[2] = w0_t[2]; + x0_t[3] = w0_t[3]; + x1_t[0] = w1_t[0]; + x1_t[1] = w1_t[1]; + x1_t[2] = w1_t[2]; + x1_t[3] = w1_t[3]; + x2_t[0] = w2_t[0]; + x2_t[1] = w2_t[1]; + x2_t[2] = w2_t[2]; + x2_t[3] = w2_t[3]; + x3_t[0] = w3_t[0]; + x3_t[1] = w3_t[1]; + x3_t[2] = w3_t[2]; + x3_t[3] = w3_t[3]; + + u32x ipad[5]; + u32x opad[5]; + + hmac_sha1_pad (x0_t, x1_t, x2_t, x3_t, ipad, opad); + + x0_t[0] = w0_t[0]; + x0_t[1] = w0_t[1]; + x0_t[2] = w0_t[2]; + x0_t[3] = w0_t[3]; + x1_t[0] = w1_t[0]; + x1_t[1] = w1_t[1]; + x1_t[2] = w1_t[2]; + x1_t[3] = w1_t[3]; + x2_t[0] = w2_t[0]; + x2_t[1] = w2_t[1]; + x2_t[2] = w2_t[2]; + x2_t[3] = w2_t[3]; + x3_t[0] = w3_t[0]; + x3_t[1] = w3_t[1]; + x3_t[2] = w3_t[2]; + x3_t[3] = w3_t[3]; + + append_0x80_4x4 (x0_t, x1_t, x2_t, x3_t, pw_len ^ 3); + + x3_t[2] = 0; + x3_t[3] = (64 + pw_len) * 8; + + u32x digest[5]; + + hmac_sha1_run (x0_t, x1_t, x2_t, x3_t, ipad, opad, digest); + + COMPARE_S_SIMD (digest[3], digest[4], digest[2], digest[1]); + } +} + +KERNEL_FQ void m24800_m04 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24800_m08 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24800_m16 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = pws[gid].i[ 8]; + w2[1] = pws[gid].i[ 9]; + w2[2] = pws[gid].i[10]; + w2[3] = pws[gid].i[11]; + + u32 w3[4]; + + w3[0] = pws[gid].i[12]; + w3[1] = pws[gid].i[13]; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24800_s04 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24800_s08 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24800_s16 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = pws[gid].i[ 8]; + w2[1] = pws[gid].i[ 9]; + w2[2] = pws[gid].i[10]; + w2[3] = pws[gid].i[11]; + + u32 w3[4]; + + w3[0] = pws[gid].i[12]; + w3[1] = pws[gid].i[13]; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} diff --git a/OpenCL/m24800_a3-pure.cl b/OpenCL/m24800_a3-pure.cl new file mode 100644 index 000000000..825b256ca --- /dev/null +++ b/OpenCL/m24800_a3-pure.cl @@ -0,0 +1,151 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha1.cl" +#endif + +KERNEL_FQ void m24800_mxx (KERN_ATTR_VECTOR ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * base + */ + + const u32 pw_len = pws[gid].pw_len; + + u32x w[64] = { 0 }; + + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + { + w[idx] = pws[gid].i[idx]; + } + + /** + * loop + */ + + u32x w0l = w[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = words_buf_r[il_pos / VECT_SIZE]; + + const u32x w0 = w0l | w0r; + + w[0] = w0; + + u32x t[128] = { 0 }; + + for (u32 i = 0, idx = 0; idx < pw_len; i += 2, idx += 1) + { + make_utf16beN (&w[idx], &t[i + 0], &t[i + 1]); + } + + sha1_hmac_ctx_vector_t ctx; + + sha1_hmac_init_vector (&ctx, t, pw_len * 2); + + sha1_hmac_update_vector (&ctx, t, pw_len * 2); + + sha1_hmac_final_vector (&ctx); + + const u32x r0 = ctx.opad.h[DGST_R0]; + const u32x r1 = ctx.opad.h[DGST_R1]; + const u32x r2 = ctx.opad.h[DGST_R2]; + const u32x r3 = ctx.opad.h[DGST_R3]; + + COMPARE_M_SIMD (r0, r1, r2, r3); + } +} + +KERNEL_FQ void m24800_sxx (KERN_ATTR_VECTOR ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] + }; + + /** + * base + */ + + const u32 pw_len = pws[gid].pw_len; + + u32x w[64] = { 0 }; + + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + { + w[idx] = pws[gid].i[idx]; + } + + /** + * loop + */ + + u32x w0l = w[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = words_buf_r[il_pos / VECT_SIZE]; + + const u32x w0 = w0l | w0r; + + w[0] = w0; + + u32x t[128] = { 0 }; + + for (u32 i = 0, idx = 0; idx < pw_len; i += 2, idx += 1) + { + make_utf16beN (&w[idx], &t[i + 0], &t[i + 1]); + } + + sha1_hmac_ctx_vector_t ctx; + + sha1_hmac_init_vector (&ctx, t, pw_len * 2); + + sha1_hmac_update_vector (&ctx, t, pw_len * 2); + + sha1_hmac_final_vector (&ctx); + + const u32x r0 = ctx.opad.h[DGST_R0]; + const u32x r1 = ctx.opad.h[DGST_R1]; + const u32x r2 = ctx.opad.h[DGST_R2]; + const u32x r3 = ctx.opad.h[DGST_R3]; + + COMPARE_S_SIMD (r0, r1, r2, r3); + } +} diff --git a/OpenCL/m24900_a0-optimized.cl b/OpenCL/m24900_a0-optimized.cl new file mode 100644 index 000000000..312691021 --- /dev/null +++ b/OpenCL/m24900_a0-optimized.cl @@ -0,0 +1,337 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_rp_optimized.h" +#include "inc_rp_optimized.cl" +#include "inc_simd.cl" +#include "inc_hash_md5.cl" +#endif + +KERNEL_FQ void m24900_m04 (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + u32x w0[4] = { 0 }; + u32x w1[4] = { 0 }; + u32x w2[4] = { 0 }; + u32x w3[4] = { 0 }; + + const u32x out_len = apply_rules_vect_optimized (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1); + + append_0x80_2x4_VV (w0, w1, out_len); + + w3[2] = out_len * 8; + w3[3] = 0; + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + const u32x a0 = (((a >> 0) & 0xff) + ((a >> 8) & 0xff)) % 62; + const u32x a1 = (((a >> 16) & 0xff) + ((a >> 24) & 0xff)) % 62; + const u32x b0 = (((b >> 0) & 0xff) + ((b >> 8) & 0xff)) % 62; + const u32x b1 = (((b >> 16) & 0xff) + ((b >> 24) & 0xff)) % 62; + const u32x c0 = (((c >> 0) & 0xff) + ((c >> 8) & 0xff)) % 62; + const u32x c1 = (((c >> 16) & 0xff) + ((c >> 24) & 0xff)) % 62; + const u32x d0 = (((d >> 0) & 0xff) + ((d >> 8) & 0xff)) % 62; + const u32x d1 = (((d >> 16) & 0xff) + ((d >> 24) & 0xff)) % 62; + + const u32x ax = (a0 << 0) | (a1 << 8); + const u32x bx = (b0 << 0) | (b1 << 8); + const u32x cx = (c0 << 0) | (c1 << 8); + const u32x dx = (d0 << 0) | (d1 << 8); + + COMPARE_M_SIMD (ax, bx, cx, dx); + } +} + +KERNEL_FQ void m24900_m08 (KERN_ATTR_RULES ()) +{ +} + +KERNEL_FQ void m24900_m16 (KERN_ATTR_RULES ()) +{ +} + +KERNEL_FQ void m24900_s04 (KERN_ATTR_RULES ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] + }; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + u32x w0[4] = { 0 }; + u32x w1[4] = { 0 }; + u32x w2[4] = { 0 }; + u32x w3[4] = { 0 }; + + const u32x out_len = apply_rules_vect_optimized (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1); + + append_0x80_2x4_VV (w0, w1, out_len); + + w3[2] = out_len * 8; + w3[3] = 0; + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + const u32x a0 = (((a >> 0) & 0xff) + ((a >> 8) & 0xff)) % 62; + const u32x a1 = (((a >> 16) & 0xff) + ((a >> 24) & 0xff)) % 62; + const u32x b0 = (((b >> 0) & 0xff) + ((b >> 8) & 0xff)) % 62; + const u32x b1 = (((b >> 16) & 0xff) + ((b >> 24) & 0xff)) % 62; + const u32x c0 = (((c >> 0) & 0xff) + ((c >> 8) & 0xff)) % 62; + const u32x c1 = (((c >> 16) & 0xff) + ((c >> 24) & 0xff)) % 62; + const u32x d0 = (((d >> 0) & 0xff) + ((d >> 8) & 0xff)) % 62; + const u32x d1 = (((d >> 16) & 0xff) + ((d >> 24) & 0xff)) % 62; + + const u32x ax = (a0 << 0) | (a1 << 8); + const u32x bx = (b0 << 0) | (b1 << 8); + const u32x cx = (c0 << 0) | (c1 << 8); + const u32x dx = (d0 << 0) | (d1 << 8); + + COMPARE_S_SIMD (ax, bx, cx, dx); + } +} + +KERNEL_FQ void m24900_s08 (KERN_ATTR_RULES ()) +{ +} + +KERNEL_FQ void m24900_s16 (KERN_ATTR_RULES ()) +{ +} diff --git a/OpenCL/m24900_a1-optimized.cl b/OpenCL/m24900_a1-optimized.cl new file mode 100644 index 000000000..a25797ee2 --- /dev/null +++ b/OpenCL/m24900_a1-optimized.cl @@ -0,0 +1,454 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_scalar.cl" +#include "inc_simd.cl" +#include "inc_hash_md5.cl" +#endif + +KERNEL_FQ void m24900_m04 (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_l_len = pws[gid].pw_len & 63; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos) & 63; + + const u32x pw_len = (pw_l_len + pw_r_len) & 63; + + /** + * concat password candidate + */ + + u32x wordl0[4] = { 0 }; + u32x wordl1[4] = { 0 }; + u32x wordl2[4] = { 0 }; + u32x wordl3[4] = { 0 }; + + wordl0[0] = pw_buf0[0]; + wordl0[1] = pw_buf0[1]; + wordl0[2] = pw_buf0[2]; + wordl0[3] = pw_buf0[3]; + wordl1[0] = pw_buf1[0]; + wordl1[1] = pw_buf1[1]; + wordl1[2] = pw_buf1[2]; + wordl1[3] = pw_buf1[3]; + + u32x wordr0[4] = { 0 }; + u32x wordr1[4] = { 0 }; + u32x wordr2[4] = { 0 }; + u32x wordr3[4] = { 0 }; + + wordr0[0] = ix_create_combt (combs_buf, il_pos, 0); + wordr0[1] = ix_create_combt (combs_buf, il_pos, 1); + wordr0[2] = ix_create_combt (combs_buf, il_pos, 2); + wordr0[3] = ix_create_combt (combs_buf, il_pos, 3); + wordr1[0] = ix_create_combt (combs_buf, il_pos, 4); + wordr1[1] = ix_create_combt (combs_buf, il_pos, 5); + wordr1[2] = ix_create_combt (combs_buf, il_pos, 6); + wordr1[3] = ix_create_combt (combs_buf, il_pos, 7); + + if (combs_mode == COMBINATOR_MODE_BASE_LEFT) + { + switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len); + } + else + { + switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len); + } + + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = wordl0[0] | wordr0[0]; + w0[1] = wordl0[1] | wordr0[1]; + w0[2] = wordl0[2] | wordr0[2]; + w0[3] = wordl0[3] | wordr0[3]; + w1[0] = wordl1[0] | wordr1[0]; + w1[1] = wordl1[1] | wordr1[1]; + w1[2] = wordl1[2] | wordr1[2]; + w1[3] = wordl1[3] | wordr1[3]; + w2[0] = wordl2[0] | wordr2[0]; + w2[1] = wordl2[1] | wordr2[1]; + w2[2] = wordl2[2] | wordr2[2]; + w2[3] = wordl2[3] | wordr2[3]; + w3[0] = wordl3[0] | wordr3[0]; + w3[1] = wordl3[1] | wordr3[1]; + w3[2] = pw_len * 8; + w3[3] = 0; + + /** + * md5 + */ + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + const u32x a0 = (((a >> 0) & 0xff) + ((a >> 8) & 0xff)) % 62; + const u32x a1 = (((a >> 16) & 0xff) + ((a >> 24) & 0xff)) % 62; + const u32x b0 = (((b >> 0) & 0xff) + ((b >> 8) & 0xff)) % 62; + const u32x b1 = (((b >> 16) & 0xff) + ((b >> 24) & 0xff)) % 62; + const u32x c0 = (((c >> 0) & 0xff) + ((c >> 8) & 0xff)) % 62; + const u32x c1 = (((c >> 16) & 0xff) + ((c >> 24) & 0xff)) % 62; + const u32x d0 = (((d >> 0) & 0xff) + ((d >> 8) & 0xff)) % 62; + const u32x d1 = (((d >> 16) & 0xff) + ((d >> 24) & 0xff)) % 62; + + const u32x ax = (a0 << 0) | (a1 << 8); + const u32x bx = (b0 << 0) | (b1 << 8); + const u32x cx = (c0 << 0) | (c1 << 8); + const u32x dx = (d0 << 0) | (d1 << 8); + + COMPARE_M_SIMD (ax, bx, cx, dx); + } +} + +KERNEL_FQ void m24900_m08 (KERN_ATTR_BASIC ()) +{ +} + +KERNEL_FQ void m24900_m16 (KERN_ATTR_BASIC ()) +{ +} + +KERNEL_FQ void m24900_s04 (KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 lid = get_local_id (0); + + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 pw_buf0[4]; + u32 pw_buf1[4]; + + pw_buf0[0] = pws[gid].i[0]; + pw_buf0[1] = pws[gid].i[1]; + pw_buf0[2] = pws[gid].i[2]; + pw_buf0[3] = pws[gid].i[3]; + pw_buf1[0] = pws[gid].i[4]; + pw_buf1[1] = pws[gid].i[5]; + pw_buf1[2] = pws[gid].i[6]; + pw_buf1[3] = pws[gid].i[7]; + + const u32 pw_l_len = pws[gid].pw_len & 63; + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3] + }; + + /** + * loop + */ + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos) & 63; + + const u32x pw_len = (pw_l_len + pw_r_len) & 63; + + /** + * concat password candidate + */ + + u32x wordl0[4] = { 0 }; + u32x wordl1[4] = { 0 }; + u32x wordl2[4] = { 0 }; + u32x wordl3[4] = { 0 }; + + wordl0[0] = pw_buf0[0]; + wordl0[1] = pw_buf0[1]; + wordl0[2] = pw_buf0[2]; + wordl0[3] = pw_buf0[3]; + wordl1[0] = pw_buf1[0]; + wordl1[1] = pw_buf1[1]; + wordl1[2] = pw_buf1[2]; + wordl1[3] = pw_buf1[3]; + + u32x wordr0[4] = { 0 }; + u32x wordr1[4] = { 0 }; + u32x wordr2[4] = { 0 }; + u32x wordr3[4] = { 0 }; + + wordr0[0] = ix_create_combt (combs_buf, il_pos, 0); + wordr0[1] = ix_create_combt (combs_buf, il_pos, 1); + wordr0[2] = ix_create_combt (combs_buf, il_pos, 2); + wordr0[3] = ix_create_combt (combs_buf, il_pos, 3); + wordr1[0] = ix_create_combt (combs_buf, il_pos, 4); + wordr1[1] = ix_create_combt (combs_buf, il_pos, 5); + wordr1[2] = ix_create_combt (combs_buf, il_pos, 6); + wordr1[3] = ix_create_combt (combs_buf, il_pos, 7); + + if (combs_mode == COMBINATOR_MODE_BASE_LEFT) + { + switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len); + } + else + { + switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len); + } + + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = wordl0[0] | wordr0[0]; + w0[1] = wordl0[1] | wordr0[1]; + w0[2] = wordl0[2] | wordr0[2]; + w0[3] = wordl0[3] | wordr0[3]; + w1[0] = wordl1[0] | wordr1[0]; + w1[1] = wordl1[1] | wordr1[1]; + w1[2] = wordl1[2] | wordr1[2]; + w1[3] = wordl1[3] | wordr1[3]; + w2[0] = wordl2[0] | wordr2[0]; + w2[1] = wordl2[1] | wordr2[1]; + w2[2] = wordl2[2] | wordr2[2]; + w2[3] = wordl2[3] | wordr2[3]; + w3[0] = wordl3[0] | wordr3[0]; + w3[1] = wordl3[1] | wordr3[1]; + w3[2] = pw_len * 8; + w3[3] = 0; + + /** + * md5 + */ + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + const u32x a0 = (((a >> 0) & 0xff) + ((a >> 8) & 0xff)) % 62; + const u32x a1 = (((a >> 16) & 0xff) + ((a >> 24) & 0xff)) % 62; + const u32x b0 = (((b >> 0) & 0xff) + ((b >> 8) & 0xff)) % 62; + const u32x b1 = (((b >> 16) & 0xff) + ((b >> 24) & 0xff)) % 62; + const u32x c0 = (((c >> 0) & 0xff) + ((c >> 8) & 0xff)) % 62; + const u32x c1 = (((c >> 16) & 0xff) + ((c >> 24) & 0xff)) % 62; + const u32x d0 = (((d >> 0) & 0xff) + ((d >> 8) & 0xff)) % 62; + const u32x d1 = (((d >> 16) & 0xff) + ((d >> 24) & 0xff)) % 62; + + const u32x ax = (a0 << 0) | (a1 << 8); + const u32x bx = (b0 << 0) | (b1 << 8); + const u32x cx = (c0 << 0) | (c1 << 8); + const u32x dx = (d0 << 0) | (d1 << 8); + + COMPARE_S_SIMD (ax, bx, cx, dx); + } +} + +KERNEL_FQ void m24900_s08 (KERN_ATTR_BASIC ()) +{ +} + +KERNEL_FQ void m24900_s16 (KERN_ATTR_BASIC ()) +{ +} diff --git a/OpenCL/m24900_a3-optimized.cl b/OpenCL/m24900_a3-optimized.cl new file mode 100644 index 000000000..42b8bbbfa --- /dev/null +++ b/OpenCL/m24900_a3-optimized.cl @@ -0,0 +1,599 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_md5.cl" +#endif + +DECLSPEC void m24900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + + /** + * loop + */ + + const u32 w0l = w0[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = ix_create_bft (bfs_buf, il_pos); + + const u32x w0lr = w0l | w0r; + + u32x t0[4]; + u32x t1[4]; + u32x t2[4]; + u32x t3[4]; + + t0[0] = w0lr; + t0[1] = w0[1]; + t0[2] = w0[2]; + t0[3] = w0[3]; + t1[0] = w1[0]; + t1[1] = w1[1]; + t1[2] = w1[2]; + t1[3] = w1[3]; + t2[0] = w2[0]; + t2[1] = w2[1]; + t2[2] = w2[2]; + t2[3] = w2[3]; + t3[0] = w3[0]; + t3[1] = w3[1]; + t3[2] = pw_len * 8; + t3[3] = 0; + + /** + * md5 + */ + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, t0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, t0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, t0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, t0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, t1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, t1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, t1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, t1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, t2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, t2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, t2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, t2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, t3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, t3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, t3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, t3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, t0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, t1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, t2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, t0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, t1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, t2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, t3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, t1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, t2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, t3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, t0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, t2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, t3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, t0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, t1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, t3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, t1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, t2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, t2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, t3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, t0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, t1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, t1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, t2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, t3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, t0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, t0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, t1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, t2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, t3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, t3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, t0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, t0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, t1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, t3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, t1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, t3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, t0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, t2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, t0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, t2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, t3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, t1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, t3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, t1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, t2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, t0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, t2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + const u32x a0 = (((a >> 0) & 0xff) + ((a >> 8) & 0xff)) % 62; + const u32x a1 = (((a >> 16) & 0xff) + ((a >> 24) & 0xff)) % 62; + const u32x b0 = (((b >> 0) & 0xff) + ((b >> 8) & 0xff)) % 62; + const u32x b1 = (((b >> 16) & 0xff) + ((b >> 24) & 0xff)) % 62; + const u32x c0 = (((c >> 0) & 0xff) + ((c >> 8) & 0xff)) % 62; + const u32x c1 = (((c >> 16) & 0xff) + ((c >> 24) & 0xff)) % 62; + const u32x d0 = (((d >> 0) & 0xff) + ((d >> 8) & 0xff)) % 62; + const u32x d1 = (((d >> 16) & 0xff) + ((d >> 24) & 0xff)) % 62; + + const u32x ax = (a0 << 0) | (a1 << 8); + const u32x bx = (b0 << 0) | (b1 << 8); + const u32x cx = (c0 << 0) | (c1 << 8); + const u32x dx = (d0 << 0) | (d1 << 8); + + COMPARE_M_SIMD (ax, bx, cx, dx); + } +} + +DECLSPEC void m24900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + + /** + * digest + */ + + const u32 search[4] = + { + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2], + digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3], + }; + + /** + * loop + */ + + const u32 w0l = w0[0]; + + for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) + { + const u32x w0r = ix_create_bft (bfs_buf, il_pos); + + const u32x w0lr = w0l | w0r; + + u32x t0[4]; + u32x t1[4]; + u32x t2[4]; + u32x t3[4]; + + t0[0] = w0lr; + t0[1] = w0[1]; + t0[2] = w0[2]; + t0[3] = w0[3]; + t1[0] = w1[0]; + t1[1] = w1[1]; + t1[2] = w1[2]; + t1[3] = w1[3]; + t2[0] = w2[0]; + t2[1] = w2[1]; + t2[2] = w2[2]; + t2[3] = w2[3]; + t3[0] = w3[0]; + t3[1] = w3[1]; + t3[2] = pw_len * 8; + t3[3] = 0; + + /** + * md5 + */ + + u32x a = MD5M_A; + u32x b = MD5M_B; + u32x c = MD5M_C; + u32x d = MD5M_D; + + MD5_STEP (MD5_Fo, a, b, c, d, t0[0], MD5C00, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, t0[1], MD5C01, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, t0[2], MD5C02, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, t0[3], MD5C03, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, t1[0], MD5C04, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, t1[1], MD5C05, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, t1[2], MD5C06, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, t1[3], MD5C07, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, t2[0], MD5C08, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, t2[1], MD5C09, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, t2[2], MD5C0a, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, t2[3], MD5C0b, MD5S03); + MD5_STEP (MD5_Fo, a, b, c, d, t3[0], MD5C0c, MD5S00); + MD5_STEP (MD5_Fo, d, a, b, c, t3[1], MD5C0d, MD5S01); + MD5_STEP (MD5_Fo, c, d, a, b, t3[2], MD5C0e, MD5S02); + MD5_STEP (MD5_Fo, b, c, d, a, t3[3], MD5C0f, MD5S03); + + MD5_STEP (MD5_Go, a, b, c, d, t0[1], MD5C10, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, t1[2], MD5C11, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, t2[3], MD5C12, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, t0[0], MD5C13, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, t1[1], MD5C14, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, t2[2], MD5C15, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, t3[3], MD5C16, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, t1[0], MD5C17, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, t2[1], MD5C18, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, t3[2], MD5C19, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, t0[3], MD5C1a, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, t2[0], MD5C1b, MD5S13); + MD5_STEP (MD5_Go, a, b, c, d, t3[1], MD5C1c, MD5S10); + MD5_STEP (MD5_Go, d, a, b, c, t0[2], MD5C1d, MD5S11); + MD5_STEP (MD5_Go, c, d, a, b, t1[3], MD5C1e, MD5S12); + MD5_STEP (MD5_Go, b, c, d, a, t3[0], MD5C1f, MD5S13); + + u32x t; + + MD5_STEP (MD5_H1, a, b, c, d, t1[1], MD5C20, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, t2[0], MD5C21, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, t2[3], MD5C22, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, t3[2], MD5C23, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, t0[1], MD5C24, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, t1[0], MD5C25, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, t1[3], MD5C26, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, t2[2], MD5C27, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, t3[1], MD5C28, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, t0[0], MD5C29, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, t0[3], MD5C2a, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, t1[2], MD5C2b, MD5S23); + MD5_STEP (MD5_H1, a, b, c, d, t2[1], MD5C2c, MD5S20); + MD5_STEP (MD5_H2, d, a, b, c, t3[0], MD5C2d, MD5S21); + MD5_STEP (MD5_H1, c, d, a, b, t3[3], MD5C2e, MD5S22); + MD5_STEP (MD5_H2, b, c, d, a, t0[2], MD5C2f, MD5S23); + + MD5_STEP (MD5_I , a, b, c, d, t0[0], MD5C30, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, t1[3], MD5C31, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, t3[2], MD5C32, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, t1[1], MD5C33, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, t3[0], MD5C34, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, t0[3], MD5C35, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, t2[2], MD5C36, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, t0[1], MD5C37, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, t2[0], MD5C38, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, t3[3], MD5C39, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, t1[2], MD5C3a, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, t3[1], MD5C3b, MD5S33); + MD5_STEP (MD5_I , a, b, c, d, t1[0], MD5C3c, MD5S30); + MD5_STEP (MD5_I , d, a, b, c, t2[3], MD5C3d, MD5S31); + MD5_STEP (MD5_I , c, d, a, b, t0[2], MD5C3e, MD5S32); + MD5_STEP (MD5_I , b, c, d, a, t2[1], MD5C3f, MD5S33); + + a += MD5M_A; + b += MD5M_B; + c += MD5M_C; + d += MD5M_D; + + const u32x a0 = (((a >> 0) & 0xff) + ((a >> 8) & 0xff)) % 62; + const u32x a1 = (((a >> 16) & 0xff) + ((a >> 24) & 0xff)) % 62; + const u32x b0 = (((b >> 0) & 0xff) + ((b >> 8) & 0xff)) % 62; + const u32x b1 = (((b >> 16) & 0xff) + ((b >> 24) & 0xff)) % 62; + const u32x c0 = (((c >> 0) & 0xff) + ((c >> 8) & 0xff)) % 62; + const u32x c1 = (((c >> 16) & 0xff) + ((c >> 24) & 0xff)) % 62; + const u32x d0 = (((d >> 0) & 0xff) + ((d >> 8) & 0xff)) % 62; + const u32x d1 = (((d >> 16) & 0xff) + ((d >> 24) & 0xff)) % 62; + + const u32x ax = (a0 << 0) | (a1 << 8); + const u32x bx = (b0 << 0) | (b1 << 8); + const u32x cx = (c0 << 0) | (c1 << 8); + const u32x dx = (d0 << 0) | (d1 << 8); + + COMPARE_S_SIMD (ax, bx, cx, dx); + } +} + +KERNEL_FQ void m24900_m04 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24900_m08 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24900_m16 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = pws[gid].i[ 8]; + w2[1] = pws[gid].i[ 9]; + w2[2] = pws[gid].i[10]; + w2[3] = pws[gid].i[11]; + + u32 w3[4]; + + w3[0] = pws[gid].i[12]; + w3[1] = pws[gid].i[13]; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24900m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24900_s04 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24900_s08 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + + u32 w3[4]; + + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} + +KERNEL_FQ void m24900_s16 (KERN_ATTR_BASIC ()) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + u32 w2[4]; + + w2[0] = pws[gid].i[ 8]; + w2[1] = pws[gid].i[ 9]; + w2[2] = pws[gid].i[10]; + w2[3] = pws[gid].i[11]; + + u32 w3[4]; + + w3[0] = pws[gid].i[12]; + w3[1] = pws[gid].i[13]; + w3[2] = 0; + w3[3] = 0; + + const u32 pw_len = pws[gid].pw_len & 63; + + /** + * main + */ + + m24900s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, SALT_POS, loop_pos, loop_cnt, il_cnt, digests_cnt, DIGESTS_OFFSET, combs_mode, pws_pos, gid_max); +} diff --git a/OpenCL/m25300-pure.cl b/OpenCL/m25300-pure.cl new file mode 100644 index 000000000..ef23a0446 --- /dev/null +++ b/OpenCL/m25300-pure.cl @@ -0,0 +1,182 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha512.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct office2016_tmp +{ + u64 out[8]; + +} office2016_tmp_t; + +KERNEL_FQ void m25300_init (KERN_ATTR_TMPS (office2016_tmp_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + sha512_ctx_t ctx; + + sha512_init (&ctx); + + sha512_update_global_swap (&ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); + + sha512_update_global_utf16le_swap (&ctx, pws[gid].i, pws[gid].pw_len); + + sha512_final (&ctx); + + tmps[gid].out[0] = ctx.h[0]; + tmps[gid].out[1] = ctx.h[1]; + tmps[gid].out[2] = ctx.h[2]; + tmps[gid].out[3] = ctx.h[3]; + tmps[gid].out[4] = ctx.h[4]; + tmps[gid].out[5] = ctx.h[5]; + tmps[gid].out[6] = ctx.h[6]; + tmps[gid].out[7] = ctx.h[7]; +} + +KERNEL_FQ void m25300_loop (KERN_ATTR_TMPS (office2016_tmp_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u64x t0 = pack64v (tmps, out, gid, 0); + u64x t1 = pack64v (tmps, out, gid, 1); + u64x t2 = pack64v (tmps, out, gid, 2); + u64x t3 = pack64v (tmps, out, gid, 3); + u64x t4 = pack64v (tmps, out, gid, 4); + u64x t5 = pack64v (tmps, out, gid, 5); + u64x t6 = pack64v (tmps, out, gid, 6); + u64x t7 = pack64v (tmps, out, gid, 7); + + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + u32x w4[4]; + u32x w5[4]; + u32x w6[4]; + u32x w7[4]; + + w0[0] = 0; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + w4[0] = 0; + w4[1] = 0x80000000; + w4[2] = 0; + w4[3] = 0; + w5[0] = 0; + w5[1] = 0; + w5[2] = 0; + w5[3] = 0; + w6[0] = 0; + w6[1] = 0; + w6[2] = 0; + w6[3] = 0; + w7[0] = 0; + w7[1] = 0; + w7[2] = 0; + w7[3] = (64 + 4) * 8; + + for (u32 i = 0, j = loop_pos; i < loop_cnt; i++, j++) + { + w0[0] = h32_from_64 (t0); + w0[1] = l32_from_64 (t0); + w0[2] = h32_from_64 (t1); + w0[3] = l32_from_64 (t1); + w1[0] = h32_from_64 (t2); + w1[1] = l32_from_64 (t2); + w1[2] = h32_from_64 (t3); + w1[3] = l32_from_64 (t3); + w2[0] = h32_from_64 (t4); + w2[1] = l32_from_64 (t4); + w2[2] = h32_from_64 (t5); + w2[3] = l32_from_64 (t5); + w3[0] = h32_from_64 (t6); + w3[1] = l32_from_64 (t6); + w3[2] = h32_from_64 (t7); + w3[3] = l32_from_64 (t7); + w4[0] = hc_swap32 (j); + + u64x digest[8]; + + digest[0] = SHA512M_A; + digest[1] = SHA512M_B; + digest[2] = SHA512M_C; + digest[3] = SHA512M_D; + digest[4] = SHA512M_E; + digest[5] = SHA512M_F; + digest[6] = SHA512M_G; + digest[7] = SHA512M_H; + + sha512_transform_vector (w0, w1, w2, w3, w4, w5, w6, w7, digest); + + t0 = digest[0]; + t1 = digest[1]; + t2 = digest[2]; + t3 = digest[3]; + t4 = digest[4]; + t5 = digest[5]; + t6 = digest[6]; + t7 = digest[7]; + } + + unpack64v (tmps, out, gid, 0, t0); + unpack64v (tmps, out, gid, 1, t1); + unpack64v (tmps, out, gid, 2, t2); + unpack64v (tmps, out, gid, 3, t3); + unpack64v (tmps, out, gid, 4, t4); + unpack64v (tmps, out, gid, 5, t5); + unpack64v (tmps, out, gid, 6, t6); + unpack64v (tmps, out, gid, 7, t7); +} + +KERNEL_FQ void m25300_comp (KERN_ATTR_TMPS (office2016_tmp_t)) +{ + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + const u32 r0 = l32_from_64_S (tmps[gid].out[7]); + const u32 r1 = h32_from_64_S (tmps[gid].out[7]); + const u32 r2 = l32_from_64_S (tmps[gid].out[3]); + const u32 r3 = h32_from_64_S (tmps[gid].out[3]); + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m25400-pure.cl b/OpenCL/m25400-pure.cl new file mode 100644 index 000000000..0a0aba524 --- /dev/null +++ b/OpenCL/m25400-pure.cl @@ -0,0 +1,444 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +// TODO use user password as input for md5 of o_digest if no owner password is set +// TODO dynamically add user password including padding to the RC4 input for the computation of the pdf o-value + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_hash_md5.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +CONSTANT_VK u32a padding[8] = +{ + 0x5e4ebf28, + 0x418a754e, + 0x564e0064, + 0x0801faff, + 0xb6002e2e, + 0x803e68d0, + 0xfea90c2f, + 0x7a695364 +}; + +typedef struct pdf +{ + int V; + int R; + int P; + + int enc_md; + + u32 id_buf[8]; + u32 u_buf[32]; + u32 o_buf[32]; + + int id_len; + int o_len; + int u_len; + + u32 rc4key[2]; + u32 rc4data[2]; + +} pdf_t; + +typedef struct pdf14_tmp +{ + u32 digest[4]; + u32 out[4]; + +} pdf14_tmp_t; + +typedef struct +{ + u8 S[256]; + + u32 wtf_its_faster; + +} RC4_KEY; + +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +{ + u8 tmp; + + tmp = rc4_key->S[i]; + rc4_key->S[i] = rc4_key->S[j]; + rc4_key->S[j] = tmp; +} + +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +{ + u32 v = 0x03020100; + u32 a = 0x04040404; + + LOCAL_AS u32 *ptr = (LOCAL_AS u32 *) rc4_key->S; + + #ifdef _unroll + #pragma unroll + #endif + for (u32 i = 0; i < 64; i++) + { + *ptr++ = v; v += a; + } + + u32 j = 0; + + #ifdef _unroll + #pragma unroll + #endif + for (u32 i = 0; i < 16; i++) + { + u32 idx = i * 16; + + u32 v; + + v = data[0]; + + j += rc4_key->S[idx] + (v >> 0); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 8); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++; + + v = data[1]; + + j += rc4_key->S[idx] + (v >> 0); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 8); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++; + + v = data[2]; + + j += rc4_key->S[idx] + (v >> 0); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 8); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++; + + v = data[3]; + + j += rc4_key->S[idx] + (v >> 0); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 8); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++; + j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++; + } +} + +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +{ + #ifdef _unroll + #pragma unroll + #endif + for (u32 k = 0; k < 4; k++) + { + u32 xor4 = 0; + + u8 idx; + + i += 1; + j += rc4_key->S[i]; + + swap (rc4_key, i, j); + + idx = rc4_key->S[i] + rc4_key->S[j]; + + xor4 |= rc4_key->S[idx] << 0; + + i += 1; + j += rc4_key->S[i]; + + swap (rc4_key, i, j); + + idx = rc4_key->S[i] + rc4_key->S[j]; + + xor4 |= rc4_key->S[idx] << 8; + + i += 1; + j += rc4_key->S[i]; + + swap (rc4_key, i, j); + + idx = rc4_key->S[i] + rc4_key->S[j]; + + xor4 |= rc4_key->S[idx] << 16; + + i += 1; + j += rc4_key->S[i]; + + swap (rc4_key, i, j); + + idx = rc4_key->S[i] + rc4_key->S[j]; + + xor4 |= rc4_key->S[idx] << 24; + + out[k] = in[k] ^ xor4; + } + + return j; +} + +KERNEL_FQ void m25400_init (KERN_ATTR_TMPS_ESALT (pdf14_tmp_t, pdf_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + //const u64 lid = get_local_id (0); + + if (gid >= gid_max) return; + + u32 w0[4]; + + w0[0] = pws[gid].i[ 0]; + w0[1] = pws[gid].i[ 1]; + w0[2] = pws[gid].i[ 2]; + w0[3] = pws[gid].i[ 3]; + + u32 w1[4]; + + w1[0] = pws[gid].i[ 4]; + w1[1] = pws[gid].i[ 5]; + w1[2] = pws[gid].i[ 6]; + w1[3] = pws[gid].i[ 7]; + + const u32 pw_len = pws[gid].pw_len; + + /** + * shared + */ + + //LOCAL_AS RC4_KEY rc4_keys[64]; + //LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; + + u32 P = esalt_bufs[DIGESTS_OFFSET].P; + + u32 id_buf[12]; + + id_buf[ 0] = esalt_bufs[DIGESTS_OFFSET].id_buf[0]; + id_buf[ 1] = esalt_bufs[DIGESTS_OFFSET].id_buf[1]; + id_buf[ 2] = esalt_bufs[DIGESTS_OFFSET].id_buf[2]; + id_buf[ 3] = esalt_bufs[DIGESTS_OFFSET].id_buf[3]; + + id_buf[ 4] = esalt_bufs[DIGESTS_OFFSET].id_buf[4]; + id_buf[ 5] = esalt_bufs[DIGESTS_OFFSET].id_buf[5]; + id_buf[ 6] = esalt_bufs[DIGESTS_OFFSET].id_buf[6]; + id_buf[ 7] = esalt_bufs[DIGESTS_OFFSET].id_buf[7]; + + id_buf[ 8] = 0; + id_buf[ 9] = 0; + id_buf[10] = 0; + id_buf[11] = 0; + + u32 rc4data[2]; + + rc4data[0] = padding[0]; + rc4data[1] = padding[1]; + + /** + * main init + */ + + u32 w0_t[4]; + u32 w1_t[4]; + u32 w2_t[4]; + u32 w3_t[4]; + + // max length supported by pdf11 is 32 + + w0_t[0] = padding[0]; + w0_t[1] = padding[1]; + w0_t[2] = padding[2]; + w0_t[3] = padding[3]; + w1_t[0] = padding[4]; + w1_t[1] = padding[5]; + w1_t[2] = padding[6]; + w1_t[3] = padding[7]; + w2_t[0] = 0; + w2_t[1] = 0; + w2_t[2] = 0; + w2_t[3] = 0; + w3_t[0] = 0; + w3_t[1] = 0; + w3_t[2] = 0; + w3_t[3] = 0; + + switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, pw_len); + + // add password + // truncate at 32 is wanted, not a bug! + // add padding + + w0_t[0] |= w0[0]; + w0_t[1] |= w0[1]; + w0_t[2] |= w0[2]; + w0_t[3] |= w0[3]; + w1_t[0] |= w1[0]; + w1_t[1] |= w1[1]; + w1_t[2] |= w1[2]; + w1_t[3] |= w1[3]; + w2_t[0] = 0x80; + w2_t[1] = 0; + w2_t[2] = 0; + w2_t[3] = 0; + w3_t[0] = 0; + w3_t[1] = 0; + w3_t[2] = 32 * 8; + w3_t[3] = 0; + + u32 digest[4]; + + digest[0] = MD5M_A; + digest[1] = MD5M_B; + digest[2] = MD5M_C; + digest[3] = MD5M_D; + + md5_transform (w0_t, w1_t, w2_t, w3_t, digest); + + tmps[gid].digest[0] = digest[0]; + tmps[gid].digest[1] = digest[1]; + tmps[gid].digest[2] = digest[2]; + tmps[gid].digest[3] = digest[3]; + + tmps[gid].out[0] = rc4data[0]; + tmps[gid].out[1] = rc4data[1]; + tmps[gid].out[2] = 0; + tmps[gid].out[3] = 0; +} + +KERNEL_FQ void m25400_loop (KERN_ATTR_TMPS_ESALT (pdf14_tmp_t, pdf_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + + if (gid >= gid_max) return; + + /** + * shared + */ + + LOCAL_VK RC4_KEY rc4_keys[64]; + + LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid]; + + /** + * loop + */ + + u32 digest[4]; + + digest[0] = tmps[gid].digest[0]; + digest[1] = tmps[gid].digest[1]; + digest[2] = tmps[gid].digest[2]; + digest[3] = tmps[gid].digest[3]; + + u32 out[4]; + + out[0] = tmps[gid].out[0]; + out[1] = tmps[gid].out[1]; + out[2] = tmps[gid].out[2]; + out[3] = tmps[gid].out[3]; + + for (u32 i = 0, j = loop_pos; i < loop_cnt; i++, j++) + { + if (j < 50) + { + u32 w0_t[4]; + u32 w1_t[4]; + u32 w2_t[4]; + u32 w3_t[4]; + + w0_t[0] = digest[0]; + w0_t[1] = digest[1]; + w0_t[2] = digest[2]; + w0_t[3] = digest[3]; + w1_t[0] = 0x80; + w1_t[1] = 0; + w1_t[2] = 0; + w1_t[3] = 0; + w2_t[0] = 0; + w2_t[1] = 0; + w2_t[2] = 0; + w2_t[3] = 0; + w3_t[0] = 0; + w3_t[1] = 0; + w3_t[2] = 16 * 8; + w3_t[3] = 0; + + digest[0] = MD5M_A; + digest[1] = MD5M_B; + digest[2] = MD5M_C; + digest[3] = MD5M_D; + + md5_transform (w0_t, w1_t, w2_t, w3_t, digest); + } + else + { + const u32 x = j - 50; + + const u32 xv = x << 0 + | x << 8 + | x << 16 + | x << 24; + + u32 tmp[4]; + + tmp[0] = digest[0] ^ xv; + tmp[1] = digest[1] ^ xv; + tmp[2] = digest[2] ^ xv; + tmp[3] = digest[3] ^ xv; + + rc4_init_16 (rc4_key, tmp); + + rc4_next_16 (rc4_key, 0, 0, out, out); + } + } + + tmps[gid].digest[0] = digest[0]; + tmps[gid].digest[1] = digest[1]; + tmps[gid].digest[2] = digest[2]; + tmps[gid].digest[3] = digest[3]; + + tmps[gid].out[0] = out[0]; + tmps[gid].out[1] = out[1]; + tmps[gid].out[2] = out[2]; + tmps[gid].out[3] = out[3]; +} + +KERNEL_FQ void m25400_comp (KERN_ATTR_TMPS_ESALT (pdf14_tmp_t, pdf_t)) +{ + /** + * modifier + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + const u64 lid = get_local_id (0); + + /** + * digest + */ + + const u32 r0 = tmps[gid].out[0]; + const u32 r1 = tmps[gid].out[1]; + const u32 r2 = 0; + const u32 r3 = 0; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m25500-optimized.cl b/OpenCL/m25500-optimized.cl new file mode 100644 index 000000000..dfc292a26 --- /dev/null +++ b/OpenCL/m25500-optimized.cl @@ -0,0 +1,455 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha256.cl" +#include "inc_cipher_aes.cl" +#include "inc_cipher_aes-gcm.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct pbkdf2_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[32]; + u32 out[32]; + +} pbkdf2_sha256_tmp_t; + +typedef struct pbkdf2_sha256_aes_gcm +{ + u32 salt_buf[64]; + u32 iv_buf[4]; + u32 iv_len; + u32 ct_buf[16]; + u32 ct_len; + +} pbkdf2_sha256_aes_gcm_t; + +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + digest[5] = ipad[5]; + digest[6] = ipad[6]; + digest[7] = ipad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = digest[5]; + w1[2] = digest[6]; + w1[3] = digest[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + digest[5] = opad[5]; + digest[6] = opad[6]; + digest[7] = opad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m25500_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sha256_aes_gcm_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + sha256_hmac_ctx_t sha256_hmac_ctx; + + sha256_hmac_init_global_swap (&sha256_hmac_ctx, pws[gid].i, pws[gid].pw_len); + + tmps[gid].ipad[0] = sha256_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha256_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha256_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha256_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha256_hmac_ctx.ipad.h[4]; + tmps[gid].ipad[5] = sha256_hmac_ctx.ipad.h[5]; + tmps[gid].ipad[6] = sha256_hmac_ctx.ipad.h[6]; + tmps[gid].ipad[7] = sha256_hmac_ctx.ipad.h[7]; + + tmps[gid].opad[0] = sha256_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha256_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha256_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha256_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha256_hmac_ctx.opad.h[4]; + tmps[gid].opad[5] = sha256_hmac_ctx.opad.h[5]; + tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; + tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; + + sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); + + for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) + { + sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha256_hmac_update_64 (&sha256_hmac_ctx2, w0, w1, w2, w3, 4); + + sha256_hmac_final (&sha256_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha256_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha256_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha256_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha256_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha256_hmac_ctx2.opad.h[4]; + tmps[gid].dgst[i + 5] = sha256_hmac_ctx2.opad.h[5]; + tmps[gid].dgst[i + 6] = sha256_hmac_ctx2.opad.h[6]; + tmps[gid].dgst[i + 7] = sha256_hmac_ctx2.opad.h[7]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + tmps[gid].out[i + 5] = tmps[gid].dgst[i + 5]; + tmps[gid].out[i + 6] = tmps[gid].dgst[i + 6]; + tmps[gid].out[i + 7] = tmps[gid].dgst[i + 7]; + } +} + +KERNEL_FQ void m25500_loop (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sha256_aes_gcm_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u32x ipad[8]; + u32x opad[8]; + + ipad[0] = packv (tmps, ipad, gid, 0); + ipad[1] = packv (tmps, ipad, gid, 1); + ipad[2] = packv (tmps, ipad, gid, 2); + ipad[3] = packv (tmps, ipad, gid, 3); + ipad[4] = packv (tmps, ipad, gid, 4); + ipad[5] = packv (tmps, ipad, gid, 5); + ipad[6] = packv (tmps, ipad, gid, 6); + ipad[7] = packv (tmps, ipad, gid, 7); + + opad[0] = packv (tmps, opad, gid, 0); + opad[1] = packv (tmps, opad, gid, 1); + opad[2] = packv (tmps, opad, gid, 2); + opad[3] = packv (tmps, opad, gid, 3); + opad[4] = packv (tmps, opad, gid, 4); + opad[5] = packv (tmps, opad, gid, 5); + opad[6] = packv (tmps, opad, gid, 6); + opad[7] = packv (tmps, opad, gid, 7); + + for (u32 i = 0; i < 8; i += 8) + { + u32x dgst[8]; + u32x out[8]; + + dgst[0] = packv (tmps, dgst, gid, i + 0); + dgst[1] = packv (tmps, dgst, gid, i + 1); + dgst[2] = packv (tmps, dgst, gid, i + 2); + dgst[3] = packv (tmps, dgst, gid, i + 3); + dgst[4] = packv (tmps, dgst, gid, i + 4); + dgst[5] = packv (tmps, dgst, gid, i + 5); + dgst[6] = packv (tmps, dgst, gid, i + 6); + dgst[7] = packv (tmps, dgst, gid, i + 7); + + out[0] = packv (tmps, out, gid, i + 0); + out[1] = packv (tmps, out, gid, i + 1); + out[2] = packv (tmps, out, gid, i + 2); + out[3] = packv (tmps, out, gid, i + 3); + out[4] = packv (tmps, out, gid, i + 4); + out[5] = packv (tmps, out, gid, i + 5); + out[6] = packv (tmps, out, gid, i + 6); + out[7] = packv (tmps, out, gid, i + 7); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = dgst[0]; + w0[1] = dgst[1]; + w0[2] = dgst[2]; + w0[3] = dgst[3]; + w1[0] = dgst[4]; + w1[1] = dgst[5]; + w1[2] = dgst[6]; + w1[3] = dgst[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + hmac_sha256_run_V (w0, w1, w2, w3, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + out[5] ^= dgst[5]; + out[6] ^= dgst[6]; + out[7] ^= dgst[7]; + } + + unpackv (tmps, dgst, gid, i + 0, dgst[0]); + unpackv (tmps, dgst, gid, i + 1, dgst[1]); + unpackv (tmps, dgst, gid, i + 2, dgst[2]); + unpackv (tmps, dgst, gid, i + 3, dgst[3]); + unpackv (tmps, dgst, gid, i + 4, dgst[4]); + unpackv (tmps, dgst, gid, i + 5, dgst[5]); + unpackv (tmps, dgst, gid, i + 6, dgst[6]); + unpackv (tmps, dgst, gid, i + 7, dgst[7]); + + unpackv (tmps, out, gid, i + 0, out[0]); + unpackv (tmps, out, gid, i + 1, out[1]); + unpackv (tmps, out, gid, i + 2, out[2]); + unpackv (tmps, out, gid, i + 3, out[3]); + unpackv (tmps, out, gid, i + 4, out[4]); + unpackv (tmps, out, gid, i + 5, out[5]); + unpackv (tmps, out, gid, i + 6, out[6]); + unpackv (tmps, out, gid, i + 7, out[7]); + } +} + +KERNEL_FQ void m25500_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sha256_aes_gcm_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + // keys + + u32 ukey[8]; + + ukey[0] = tmps[gid].out[0]; + ukey[1] = tmps[gid].out[1]; + ukey[2] = tmps[gid].out[2]; + ukey[3] = tmps[gid].out[3]; + ukey[4] = tmps[gid].out[4]; + ukey[5] = tmps[gid].out[5]; + ukey[6] = tmps[gid].out[6]; + ukey[7] = tmps[gid].out[7]; + + u32 key[60] = { 0 }; + + u32 subKey[4] = { 0 }; + + AES256_set_encrypt_key (key, ukey, s_te0, s_te1, s_te2, s_te3); + + AES256_encrypt (key, subKey, subKey, s_te0, s_te1, s_te2, s_te3, s_te4); + + // iv + + const u32 iv[4] = { + esalt_bufs[DIGESTS_OFFSET].iv_buf[0], + esalt_bufs[DIGESTS_OFFSET].iv_buf[1], + esalt_bufs[DIGESTS_OFFSET].iv_buf[2], + esalt_bufs[DIGESTS_OFFSET].iv_buf[3] + }; + + u32 J0[4] = { + iv[0], + iv[1], + iv[2], + 0x00000001 + }; + + // ct + + u32 enc[14] = { 0 }; + + enc[ 0] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 0]; + enc[ 1] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 1]; + enc[ 2] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 2]; + enc[ 3] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 3]; + enc[ 4] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 4]; + enc[ 5] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 5]; + enc[ 6] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 6]; + enc[ 7] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 7]; + enc[ 8] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 8]; + enc[ 9] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 9]; + enc[10] = esalt_bufs[DIGESTS_OFFSET].ct_buf[10]; + enc[11] = esalt_bufs[DIGESTS_OFFSET].ct_buf[11]; + enc[12] = esalt_bufs[DIGESTS_OFFSET].ct_buf[12]; + enc[13] = esalt_bufs[DIGESTS_OFFSET].ct_buf[13]; + + u32 enc_len = esalt_bufs[DIGESTS_OFFSET].ct_len; + + u32 S[4] = { 0 }; + + u32 t[4] = { 0 }; + + S[0] ^= enc[0]; + S[1] ^= enc[1]; + S[2] ^= enc[2]; + S[3] ^= enc[3]; + + AES_GCM_gf_mult (S, subKey, t); + + S[0] = t[0] ^ enc[4]; + S[1] = t[1] ^ enc[5]; + S[2] = t[2] ^ enc[6]; + S[3] = t[3] ^ enc[7]; + + AES_GCM_gf_mult (S, subKey, t); + + S[0] = t[0] ^ enc[8]; + S[1] = t[1] ^ enc[9]; + S[2] = t[2] ^ enc[10]; + S[3] = t[3] ^ enc[11]; + + AES_GCM_gf_mult (S, subKey, t); + + S[0] = t[0]; + S[1] = t[1]; + S[2] = t[2]; + S[3] = t[3]; + + t[0] = enc[12]; + t[1] = enc[13]; + t[2] = 0; + t[3] = 0; + + S[0] ^= t[0]; + S[1] ^= t[1]; + S[2] ^= t[2]; + S[3] ^= t[3]; + + AES_GCM_gf_mult (S, subKey, t); + + S[0] = t[0]; + S[1] = t[1]; + S[2] = t[2]; + S[3] = t[3]; + + u32 len_buf[4] = { 0 }; + + len_buf[0] = 0; + len_buf[3] = enc_len * 8; + + S[0] ^= len_buf[0]; + S[1] ^= len_buf[1]; + S[2] ^= len_buf[2]; + S[3] ^= len_buf[3]; + + AES_GCM_gf_mult (S, subKey, t); + + S[0] = t[0]; + S[1] = t[1]; + S[2] = t[2]; + S[3] = t[3]; + + J0[3] = 0x00000001; + + u32 T[4] = { 0 }; + + AES256_encrypt (key, J0, T, s_te0, s_te1, s_te2, s_te3, s_te4); + + /* compare tag */ + + const u32 r0 = T[0] ^ S[0]; + const u32 r1 = T[1] ^ S[1]; + const u32 r2 = T[2] ^ S[2]; + const u32 r3 = T[3] ^ S[3]; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m25500-pure.cl b/OpenCL/m25500-pure.cl new file mode 100644 index 000000000..56dddb096 --- /dev/null +++ b/OpenCL/m25500-pure.cl @@ -0,0 +1,405 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha256.cl" +#include "inc_cipher_aes.cl" +#include "inc_cipher_aes-gcm.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct pbkdf2_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[32]; + u32 out[32]; + +} pbkdf2_sha256_tmp_t; + +typedef struct pbkdf2_sha256_aes_gcm +{ + u32 salt_buf[64]; + u32 iv_buf[4]; + u32 iv_len; + u32 ct_buf[16]; + u32 ct_len; + +} pbkdf2_sha256_aes_gcm_t; + +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + digest[5] = ipad[5]; + digest[6] = ipad[6]; + digest[7] = ipad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = digest[5]; + w1[2] = digest[6]; + w1[3] = digest[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + digest[5] = opad[5]; + digest[6] = opad[6]; + digest[7] = opad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); +} + +KERNEL_FQ void m25500_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sha256_aes_gcm_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id (0); + + if (gid >= gid_max) return; + + sha256_hmac_ctx_t sha256_hmac_ctx; + + sha256_hmac_init_global_swap (&sha256_hmac_ctx, pws[gid].i, pws[gid].pw_len); + + tmps[gid].ipad[0] = sha256_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha256_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha256_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha256_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha256_hmac_ctx.ipad.h[4]; + tmps[gid].ipad[5] = sha256_hmac_ctx.ipad.h[5]; + tmps[gid].ipad[6] = sha256_hmac_ctx.ipad.h[6]; + tmps[gid].ipad[7] = sha256_hmac_ctx.ipad.h[7]; + + tmps[gid].opad[0] = sha256_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha256_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha256_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha256_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha256_hmac_ctx.opad.h[4]; + tmps[gid].opad[5] = sha256_hmac_ctx.opad.h[5]; + tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; + tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; + + sha256_hmac_update_global_swap (&sha256_hmac_ctx, esalt_bufs[DIGESTS_OFFSET].salt_buf, salt_bufs[SALT_POS].salt_len); + + for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) + { + sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha256_hmac_update_64 (&sha256_hmac_ctx2, w0, w1, w2, w3, 4); + + sha256_hmac_final (&sha256_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha256_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha256_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha256_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha256_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha256_hmac_ctx2.opad.h[4]; + tmps[gid].dgst[i + 5] = sha256_hmac_ctx2.opad.h[5]; + tmps[gid].dgst[i + 6] = sha256_hmac_ctx2.opad.h[6]; + tmps[gid].dgst[i + 7] = sha256_hmac_ctx2.opad.h[7]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + tmps[gid].out[i + 5] = tmps[gid].dgst[i + 5]; + tmps[gid].out[i + 6] = tmps[gid].dgst[i + 6]; + tmps[gid].out[i + 7] = tmps[gid].dgst[i + 7]; + } +} + +KERNEL_FQ void m25500_loop (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sha256_aes_gcm_t)) +{ + const u64 gid = get_global_id (0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u32x ipad[8]; + u32x opad[8]; + + ipad[0] = packv (tmps, ipad, gid, 0); + ipad[1] = packv (tmps, ipad, gid, 1); + ipad[2] = packv (tmps, ipad, gid, 2); + ipad[3] = packv (tmps, ipad, gid, 3); + ipad[4] = packv (tmps, ipad, gid, 4); + ipad[5] = packv (tmps, ipad, gid, 5); + ipad[6] = packv (tmps, ipad, gid, 6); + ipad[7] = packv (tmps, ipad, gid, 7); + + opad[0] = packv (tmps, opad, gid, 0); + opad[1] = packv (tmps, opad, gid, 1); + opad[2] = packv (tmps, opad, gid, 2); + opad[3] = packv (tmps, opad, gid, 3); + opad[4] = packv (tmps, opad, gid, 4); + opad[5] = packv (tmps, opad, gid, 5); + opad[6] = packv (tmps, opad, gid, 6); + opad[7] = packv (tmps, opad, gid, 7); + + for (u32 i = 0; i < 8; i += 8) + { + u32x dgst[8]; + u32x out[8]; + + dgst[0] = packv (tmps, dgst, gid, i + 0); + dgst[1] = packv (tmps, dgst, gid, i + 1); + dgst[2] = packv (tmps, dgst, gid, i + 2); + dgst[3] = packv (tmps, dgst, gid, i + 3); + dgst[4] = packv (tmps, dgst, gid, i + 4); + dgst[5] = packv (tmps, dgst, gid, i + 5); + dgst[6] = packv (tmps, dgst, gid, i + 6); + dgst[7] = packv (tmps, dgst, gid, i + 7); + + out[0] = packv (tmps, out, gid, i + 0); + out[1] = packv (tmps, out, gid, i + 1); + out[2] = packv (tmps, out, gid, i + 2); + out[3] = packv (tmps, out, gid, i + 3); + out[4] = packv (tmps, out, gid, i + 4); + out[5] = packv (tmps, out, gid, i + 5); + out[6] = packv (tmps, out, gid, i + 6); + out[7] = packv (tmps, out, gid, i + 7); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = dgst[0]; + w0[1] = dgst[1]; + w0[2] = dgst[2]; + w0[3] = dgst[3]; + w1[0] = dgst[4]; + w1[1] = dgst[5]; + w1[2] = dgst[6]; + w1[3] = dgst[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + hmac_sha256_run_V (w0, w1, w2, w3, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + out[5] ^= dgst[5]; + out[6] ^= dgst[6]; + out[7] ^= dgst[7]; + } + + unpackv (tmps, dgst, gid, i + 0, dgst[0]); + unpackv (tmps, dgst, gid, i + 1, dgst[1]); + unpackv (tmps, dgst, gid, i + 2, dgst[2]); + unpackv (tmps, dgst, gid, i + 3, dgst[3]); + unpackv (tmps, dgst, gid, i + 4, dgst[4]); + unpackv (tmps, dgst, gid, i + 5, dgst[5]); + unpackv (tmps, dgst, gid, i + 6, dgst[6]); + unpackv (tmps, dgst, gid, i + 7, dgst[7]); + + unpackv (tmps, out, gid, i + 0, out[0]); + unpackv (tmps, out, gid, i + 1, out[1]); + unpackv (tmps, out, gid, i + 2, out[2]); + unpackv (tmps, out, gid, i + 3, out[3]); + unpackv (tmps, out, gid, i + 4, out[4]); + unpackv (tmps, out, gid, i + 5, out[5]); + unpackv (tmps, out, gid, i + 6, out[6]); + unpackv (tmps, out, gid, i + 7, out[7]); + } +} + +KERNEL_FQ void m25500_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, pbkdf2_sha256_aes_gcm_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + // keys + + u32 ukey[8]; + + ukey[0] = tmps[gid].out[0]; + ukey[1] = tmps[gid].out[1]; + ukey[2] = tmps[gid].out[2]; + ukey[3] = tmps[gid].out[3]; + ukey[4] = tmps[gid].out[4]; + ukey[5] = tmps[gid].out[5]; + ukey[6] = tmps[gid].out[6]; + ukey[7] = tmps[gid].out[7]; + + u32 key_len = 32 * 8; + + u32 key[60] = { 0 }; + u32 subKey[4] = { 0 }; + + AES_GCM_Init (ukey, key_len, key, subKey, s_te0, s_te1, s_te2, s_te3, s_te4); + + // iv + + const u32 iv[4] = { + esalt_bufs[DIGESTS_OFFSET].iv_buf[0], + esalt_bufs[DIGESTS_OFFSET].iv_buf[1], + esalt_bufs[DIGESTS_OFFSET].iv_buf[2], + esalt_bufs[DIGESTS_OFFSET].iv_buf[3] + }; + + const u32 iv_len = esalt_bufs[DIGESTS_OFFSET].iv_len; + + u32 J0[4] = { 0 }; + + AES_GCM_Prepare_J0 (iv, iv_len, subKey, J0); + + // ct + + /* + u32 enc[14] = { 0 }; + + enc[ 0] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 0]; + enc[ 1] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 1]; + enc[ 2] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 2]; + enc[ 3] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 3]; + enc[ 4] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 4]; + enc[ 5] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 5]; + enc[ 6] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 6]; + enc[ 7] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 7]; + enc[ 8] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 8]; + enc[ 9] = esalt_bufs[DIGESTS_OFFSET].ct_buf[ 9]; + enc[10] = esalt_bufs[DIGESTS_OFFSET].ct_buf[10]; + enc[11] = esalt_bufs[DIGESTS_OFFSET].ct_buf[11]; + enc[12] = esalt_bufs[DIGESTS_OFFSET].ct_buf[12]; + enc[13] = esalt_bufs[DIGESTS_OFFSET].ct_buf[13]; + + u32 enc_len = esalt_bufs[DIGESTS_OFFSET].ct_len; + */ + + /* + // decrypt buffer is not usefull here, skip + u32 dec[14] = { 0 }; + + AES_GCM_GCTR (key, J0, enc, enc_len, dec, s_te0, s_te1, s_te2, s_te3, s_te4); + */ + + u32 T[4] = { 0 }; + u32 S[4] = { 0 }; + + u32 S_len = 16; + u32 aad_buf[4] = { 0 }; + u32 aad_len = 0; + + //AES_GCM_GHASH (subKey, aad_buf, aad_len, enc, enc_len, S); + + AES_GCM_GHASH_GLOBAL (subKey, aad_buf, aad_len, esalt_bufs[DIGESTS_OFFSET].ct_buf, esalt_bufs[DIGESTS_OFFSET].ct_len, S); + + AES_GCM_GCTR (key, J0, S, S_len, T, s_te0, s_te1, s_te2, s_te3, s_te4); + + /* compare tag */ + + const u32 r0 = T[0]; + const u32 r1 = T[1]; + const u32 r2 = T[2]; + const u32 r3 = T[3]; + + #define il_pos 0 + + #ifdef KERNEL_STATIC + #include COMPARE_M + #endif +} diff --git a/OpenCL/m25900-pure.cl b/OpenCL/m25900-pure.cl new file mode 100644 index 000000000..36ecd286a --- /dev/null +++ b/OpenCL/m25900-pure.cl @@ -0,0 +1,423 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#define NEW_SIMD_CODE + +#ifdef KERNEL_STATIC +#include "inc_vendor.h" +#include "inc_types.h" +#include "inc_platform.cl" +#include "inc_common.cl" +#include "inc_simd.cl" +#include "inc_hash_sha256.cl" +#include "inc_cipher_aes.cl" +#endif + +#define COMPARE_S "inc_comp_single.cl" +#define COMPARE_M "inc_comp_multi.cl" + +typedef struct blocks +{ + u32 b1[4]; + u32 b2[4]; + u32 b3[4]; + +} blocks_t; + +typedef struct pbkdf2_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[32]; + u32 out[32]; + +} pbkdf2_sha256_tmp_t; + +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +{ + digest[0] = ipad[0]; + digest[1] = ipad[1]; + digest[2] = ipad[2]; + digest[3] = ipad[3]; + digest[4] = ipad[4]; + digest[5] = ipad[5]; + digest[6] = ipad[6]; + digest[7] = ipad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); + + w0[0] = digest[0]; + w0[1] = digest[1]; + w0[2] = digest[2]; + w0[3] = digest[3]; + w1[0] = digest[4]; + w1[1] = digest[5]; + w1[2] = digest[6]; + w1[3] = digest[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + digest[0] = opad[0]; + digest[1] = opad[1]; + digest[2] = opad[2]; + digest[3] = opad[3]; + digest[4] = opad[4]; + digest[5] = opad[5]; + digest[6] = opad[6]; + digest[7] = opad[7]; + + sha256_transform_vector (w0, w1, w2, w3, digest); +} + +DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +{ + u32 in_s[4]; + + in_s[0] = in[0]; + in_s[1] = in[1]; + in_s[2] = in[2]; + in_s[3] = in[3]; + + in_s[0] ^= aes_iv[0]; + in_s[1] ^= aes_iv[1]; + in_s[2] ^= aes_iv[2]; + in_s[3] ^= aes_iv[3]; + + aes128_encrypt (aes_ks, in_s, out, s_te0, s_te1, s_te2, s_te3, s_te4); + + aes_iv[0] = out[0]; + aes_iv[1] = out[1]; + aes_iv[2] = out[2]; + aes_iv[3] = out[3]; +} + +KERNEL_FQ void m25900_init(KERN_ATTR_TMPS(pbkdf2_sha256_tmp_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id(0); + + if (gid >= gid_max) return; + + sha256_hmac_ctx_t sha256_hmac_ctx; + + sha256_hmac_init_global_swap(&sha256_hmac_ctx, pws[gid].i, pws[gid].pw_len); + + tmps[gid].ipad[0] = sha256_hmac_ctx.ipad.h[0]; + tmps[gid].ipad[1] = sha256_hmac_ctx.ipad.h[1]; + tmps[gid].ipad[2] = sha256_hmac_ctx.ipad.h[2]; + tmps[gid].ipad[3] = sha256_hmac_ctx.ipad.h[3]; + tmps[gid].ipad[4] = sha256_hmac_ctx.ipad.h[4]; + tmps[gid].ipad[5] = sha256_hmac_ctx.ipad.h[5]; + tmps[gid].ipad[6] = sha256_hmac_ctx.ipad.h[6]; + tmps[gid].ipad[7] = sha256_hmac_ctx.ipad.h[7]; + + tmps[gid].opad[0] = sha256_hmac_ctx.opad.h[0]; + tmps[gid].opad[1] = sha256_hmac_ctx.opad.h[1]; + tmps[gid].opad[2] = sha256_hmac_ctx.opad.h[2]; + tmps[gid].opad[3] = sha256_hmac_ctx.opad.h[3]; + tmps[gid].opad[4] = sha256_hmac_ctx.opad.h[4]; + tmps[gid].opad[5] = sha256_hmac_ctx.opad.h[5]; + tmps[gid].opad[6] = sha256_hmac_ctx.opad.h[6]; + tmps[gid].opad[7] = sha256_hmac_ctx.opad.h[7]; + + sha256_hmac_update_global_swap(&sha256_hmac_ctx, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len); + + for (u32 i = 0, j = 1; i < 8; i += 8, j += 1) + { + sha256_hmac_ctx_t sha256_hmac_ctx2 = sha256_hmac_ctx; + + u32 w0[4]; + u32 w1[4]; + u32 w2[4]; + u32 w3[4]; + + w0[0] = j; + w0[1] = 0; + w0[2] = 0; + w0[3] = 0; + w1[0] = 0; + w1[1] = 0; + w1[2] = 0; + w1[3] = 0; + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; + + sha256_hmac_update_64(&sha256_hmac_ctx2, w0, w1, w2, w3, 4); + + sha256_hmac_final(&sha256_hmac_ctx2); + + tmps[gid].dgst[i + 0] = sha256_hmac_ctx2.opad.h[0]; + tmps[gid].dgst[i + 1] = sha256_hmac_ctx2.opad.h[1]; + tmps[gid].dgst[i + 2] = sha256_hmac_ctx2.opad.h[2]; + tmps[gid].dgst[i + 3] = sha256_hmac_ctx2.opad.h[3]; + tmps[gid].dgst[i + 4] = sha256_hmac_ctx2.opad.h[4]; + tmps[gid].dgst[i + 5] = sha256_hmac_ctx2.opad.h[5]; + tmps[gid].dgst[i + 6] = sha256_hmac_ctx2.opad.h[6]; + tmps[gid].dgst[i + 7] = sha256_hmac_ctx2.opad.h[7]; + + tmps[gid].out[i + 0] = tmps[gid].dgst[i + 0]; + tmps[gid].out[i + 1] = tmps[gid].dgst[i + 1]; + tmps[gid].out[i + 2] = tmps[gid].dgst[i + 2]; + tmps[gid].out[i + 3] = tmps[gid].dgst[i + 3]; + tmps[gid].out[i + 4] = tmps[gid].dgst[i + 4]; + tmps[gid].out[i + 5] = tmps[gid].dgst[i + 5]; + tmps[gid].out[i + 6] = tmps[gid].dgst[i + 6]; + tmps[gid].out[i + 7] = tmps[gid].dgst[i + 7]; + } +} + +KERNEL_FQ void m25900_loop(KERN_ATTR_TMPS(pbkdf2_sha256_tmp_t)) +{ + const u64 gid = get_global_id(0); + + if ((gid * VECT_SIZE) >= gid_max) return; + + u32x ipad[8]; + u32x opad[8]; + + ipad[0] = packv (tmps, ipad, gid, 0); + ipad[1] = packv (tmps, ipad, gid, 1); + ipad[2] = packv (tmps, ipad, gid, 2); + ipad[3] = packv (tmps, ipad, gid, 3); + ipad[4] = packv (tmps, ipad, gid, 4); + ipad[5] = packv (tmps, ipad, gid, 5); + ipad[6] = packv (tmps, ipad, gid, 6); + ipad[7] = packv (tmps, ipad, gid, 7); + + opad[0] = packv (tmps, opad, gid, 0); + opad[1] = packv (tmps, opad, gid, 1); + opad[2] = packv (tmps, opad, gid, 2); + opad[3] = packv (tmps, opad, gid, 3); + opad[4] = packv (tmps, opad, gid, 4); + opad[5] = packv (tmps, opad, gid, 5); + opad[6] = packv (tmps, opad, gid, 6); + opad[7] = packv (tmps, opad, gid, 7); + + for (u32 i = 0; i < 8; i += 8) + { + u32x dgst[8]; + u32x out[8]; + + dgst[0] = packv (tmps, dgst, gid, i + 0); + dgst[1] = packv (tmps, dgst, gid, i + 1); + dgst[2] = packv (tmps, dgst, gid, i + 2); + dgst[3] = packv (tmps, dgst, gid, i + 3); + dgst[4] = packv (tmps, dgst, gid, i + 4); + dgst[5] = packv (tmps, dgst, gid, i + 5); + dgst[6] = packv (tmps, dgst, gid, i + 6); + dgst[7] = packv (tmps, dgst, gid, i + 7); + + out[0] = packv (tmps, out, gid, i + 0); + out[1] = packv (tmps, out, gid, i + 1); + out[2] = packv (tmps, out, gid, i + 2); + out[3] = packv (tmps, out, gid, i + 3); + out[4] = packv (tmps, out, gid, i + 4); + out[5] = packv (tmps, out, gid, i + 5); + out[6] = packv (tmps, out, gid, i + 6); + out[7] = packv (tmps, out, gid, i + 7); + + for (u32 j = 0; j < loop_cnt; j++) + { + u32x w0[4]; + u32x w1[4]; + u32x w2[4]; + u32x w3[4]; + + w0[0] = dgst[0]; + w0[1] = dgst[1]; + w0[2] = dgst[2]; + w0[3] = dgst[3]; + w1[0] = dgst[4]; + w1[1] = dgst[5]; + w1[2] = dgst[6]; + w1[3] = dgst[7]; + w2[0] = 0x80000000; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = (64 + 32) * 8; + + hmac_sha256_run_V (w0, w1, w2, w3, ipad, opad, dgst); + + out[0] ^= dgst[0]; + out[1] ^= dgst[1]; + out[2] ^= dgst[2]; + out[3] ^= dgst[3]; + out[4] ^= dgst[4]; + out[5] ^= dgst[5]; + out[6] ^= dgst[6]; + out[7] ^= dgst[7]; + } + + unpackv (tmps, dgst, gid, i + 0, dgst[0]); + unpackv (tmps, dgst, gid, i + 1, dgst[1]); + unpackv (tmps, dgst, gid, i + 2, dgst[2]); + unpackv (tmps, dgst, gid, i + 3, dgst[3]); + unpackv (tmps, dgst, gid, i + 4, dgst[4]); + unpackv (tmps, dgst, gid, i + 5, dgst[5]); + unpackv (tmps, dgst, gid, i + 6, dgst[6]); + unpackv (tmps, dgst, gid, i + 7, dgst[7]); + + unpackv (tmps, out, gid, i + 0, out[0]); + unpackv (tmps, out, gid, i + 1, out[1]); + unpackv (tmps, out, gid, i + 2, out[2]); + unpackv (tmps, out, gid, i + 3, out[3]); + unpackv (tmps, out, gid, i + 4, out[4]); + unpackv (tmps, out, gid, i + 5, out[5]); + unpackv (tmps, out, gid, i + 6, out[6]); + unpackv (tmps, out, gid, i + 7, out[7]); + } +} + +KERNEL_FQ void m25900_comp(KERN_ATTR_TMPS_ESALT(pbkdf2_sha256_tmp_t, blocks_t)) +{ + /** + * base + */ + + const u64 gid = get_global_id(0); + const u64 lid = get_local_id(0); + const u64 lsz = get_local_size(0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS(); + + #else + + CONSTANT_AS u32a* s_td0 = td0; + CONSTANT_AS u32a* s_td1 = td1; + CONSTANT_AS u32a* s_td2 = td2; + CONSTANT_AS u32a* s_td3 = td3; + CONSTANT_AS u32a* s_td4 = td4; + + CONSTANT_AS u32a* s_te0 = te0; + CONSTANT_AS u32a* s_te1 = te1; + CONSTANT_AS u32a* s_te2 = te2; + CONSTANT_AS u32a* s_te3 = te3; + CONSTANT_AS u32a* s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + u32 key[4]; + + key[0] = tmps[gid].out[DGST_R0]; + key[1] = tmps[gid].out[DGST_R1]; + key[2] = tmps[gid].out[DGST_R2]; + key[3] = tmps[gid].out[DGST_R3]; + + u32 aes_ks[44]; + + AES128_set_encrypt_key (aes_ks, key, s_te0, s_te1, s_te2, s_te3); + + u32 b0[4] = { 0 }; + + u32 aes_cbc_iv[4] = { 0 }; + + u32 yn[4]; + + const u32 digest_pos = loop_pos; + const u32 digest_cur = DIGESTS_OFFSET + digest_pos; + + u32 b1[4]; + + b1[0] = esalt_bufs[digest_cur].b1[0]; + b1[1] = esalt_bufs[digest_cur].b1[1]; + b1[2] = esalt_bufs[digest_cur].b1[2]; + b1[3] = esalt_bufs[digest_cur].b1[3]; + + u32 b2[4]; + + b2[0] = esalt_bufs[digest_cur].b2[0]; + b2[1] = esalt_bufs[digest_cur].b2[1]; + b2[2] = esalt_bufs[digest_cur].b2[2]; + b2[3] = esalt_bufs[digest_cur].b2[3]; + + u32 b3[4]; + + b3[0] = esalt_bufs[digest_cur].b3[0]; + b3[1] = esalt_bufs[digest_cur].b3[1]; + b3[2] = esalt_bufs[digest_cur].b3[2]; + b3[3] = esalt_bufs[digest_cur].b3[3]; + + aes128_encrypt_cbc (aes_ks, aes_cbc_iv, b0, yn, s_te0, s_te1, s_te2, s_te3, s_te4); + aes128_encrypt_cbc (aes_ks, aes_cbc_iv, b1, yn, s_te0, s_te1, s_te2, s_te3, s_te4); + aes128_encrypt_cbc (aes_ks, aes_cbc_iv, b2, yn, s_te0, s_te1, s_te2, s_te3, s_te4); + aes128_encrypt_cbc (aes_ks, aes_cbc_iv, b3, yn, s_te0, s_te1, s_te2, s_te3, s_te4); + + u32 nonce[4]; + + nonce[0] = 0; + nonce[1] = 0; + nonce[2] = 0; + nonce[3] = 0x00ff0000; // already swapped + + u32 s0[4]; + + aes128_encrypt(aes_ks, nonce, s0, s_te0, s_te1, s_te2, s_te3, s_te4); + + const u32 r0 = yn[0] ^ s0[0]; + const u32 r1 = yn[1] ^ s0[1]; + const u32 r2 = yn[2] ^ s0[2]; + const u32 r3 = yn[3] ^ s0[3]; + +#define il_pos 0 + +#ifdef KERNEL_STATIC +#include COMPARE_M +#endif +} diff --git a/docs/changes.txt b/docs/changes.txt index 238aab1f0..477e6e295 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -4,16 +4,35 @@ ## Algorithms ## -- Added hash-mode: Bitwarden -- Added hash-mode: BestCrypt v3 Volume Encryption - Added hash-mode: Apple iWork - Added hash-mode: AxCrypt 2 AES-128 - Added hash-mode: AxCrypt 2 AES-256 +- Added hash-mode: BestCrypt v3 Volume Encryption +- Added hash-mode: Bitwarden +- Added hash-mode: Dahua Authentication MD5 +- Added hash-mode: MongoDB ServerKey SCRAM-SHA-1 +- Added hash-mode: MongoDB ServerKey SCRAM-SHA-256 +- Added hash-mode: MS Office 2016 - SheetProtection +- Added hash-mode: PDF 1.4 - 1.6 (Acrobat 5 - 8) - edit password +- Added hash-mode: PKCS#8 Private Keys - Added hash-mode: RAR3-p (Compressed) - Added hash-mode: RAR3-p (Uncompressed) - Added hash-mode: RSA/DSA/EC/OPENSSH Private Keys -- Added hash-mode: sha1(sha1($pass).$salt) +- Added hash-mode: SQLCipher +- Added hash-mode: Stargazer Stellar Wallet XLM +- Added hash-mode: Stuffit5 +- Added hash-mode: Telegram Desktop >= v2.1.14 (PBKDF2-HMAC-SHA512) +- Added hash-mode: Umbraco HMAC-SHA1 - Added hash-mode: sha1($salt.sha1($pass.$salt)) +- Added hash-mode: sha1(sha1($pass).$salt) + +## +## Features +## + +- Added support for true UTF8 to UTF16 conversion in kernel crypto library +- Added option --hash-info to show generic information for each hash-mode +- Removed option --example-hashes, now is an alias of --hash-info ## ## Bugs @@ -26,6 +45,7 @@ - Fixed rare case of misalignment of the status prompt when other user warnings are shown within the hashcat output - Fixed password reassembling for cracked hashes on host for slow hashes in optimized mode that are longer than 32 characters - Fixed incorrect maximum password length support for -m 400 in optimized mode (reduced from 55 to 39) +- Fixed invalid handling of outfile folder entries for -m 22000 ## ## Improvements @@ -35,6 +55,7 @@ - CUDA Backend: Give detailed warning if either the NVIDIA CUDA or the NVIDIA RTC library cannot be initialized - CUDA Backend: Do not warn about missing CUDA SDK installation if --backend-ignore-cuda is used - CUDA Backend: Use blocking events to avoid 100% CPU core usage (per GPU) +- OpenCL Runtime: Workaround JiT compiler deadlock on NVIDIA driver >= 465.89 - RAR3 Kernels: Improved loop code, improving performance by 23% - Startup time: Improved the startup time by avoiding some time intensive operations for skipped devices @@ -47,7 +68,8 @@ - Hash-Mode 11600 (7-Zip): Improved memory handling (alloc and free) for the hook function - Hash-Mode 13200 (AxCrypt): Changed the name to AxCrypt 1 to avoid confusion - Hash-Mode 13300 (AxCrypt in-memory SHA1): Changed the name to AxCrypt 1 in-memory SHA1 -- OpenCL Runtime: Switched default OpenCL device type on macOS from GPU to CPU. Use -D 2 to enable GPU devices. +- Kernel Crypto Library: Removed unnecessary utf16 conversion functions which would apply on HMAC data portion +- OpenCL Runtime: Switched default OpenCL device type on macOS from GPU to CPU. Use -D 2 to enable GPU devices - Unit tests: Added Python 3 support for all of the Python code in our test framework - Unit tests: Fixed the packaging of test (-p) feature diff --git a/docs/license_libs/MINIZ_LICENSE.txt b/docs/license_libs/MINIZ_LICENSE.txt new file mode 100644 index 000000000..b6ff45a30 --- /dev/null +++ b/docs/license_libs/MINIZ_LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2013-2014 RAD Game Tools and Valve Software +Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/docs/readme.txt b/docs/readme.txt index d6a47ef8e..603f0cd54 100644 --- a/docs/readme.txt +++ b/docs/readme.txt @@ -161,10 +161,13 @@ NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or - NetNTLMv1 / NetNTLMv1+ESS - NetNTLMv2 - Skype -- Telegram Desktop App Passcode (PBKDF2-HMAC-SHA1) +- Telegram Desktop < v2.1.14 (PBKDF2-HMAC-SHA1) +- Telegram Desktop >= v2.1.14 (PBKDF2-HMAC-SHA512) - Telegram Mobile App Passcode (SHA256) -- PostgreSQL CRAM (MD5) +- MongoDB ServerKey SCRAM-SHA-1 +- MongoDB ServerKey SCRAM-SHA-256 - MySQL CRAM (SHA1) +- PostgreSQL CRAM (MD5) - XMPP SCRAM - RACF - AIX {smd5} @@ -217,6 +220,7 @@ NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or - MySQL4.1/MySQL5 - MySQL $A$ (sha256crypt) - Sybase ASE +- SQLCipher - hMailServer - DNSSEC (NSEC3) - CRAM-MD5 Dovecot @@ -260,12 +264,14 @@ NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or - PDF 1.1 - 1.3 (Acrobat 2 - 4), collider #1 - PDF 1.1 - 1.3 (Acrobat 2 - 4), collider #2 - PDF 1.4 - 1.6 (Acrobat 5 - 8) +- PDF 1.4 - 1.6 (Acrobat 5 - 8) - edit password - PDF 1.7 Level 3 (Acrobat 9) - PDF 1.7 Level 8 (Acrobat 10 - 11) - Apple iWork - MS Office 2007 - MS Office 2010 - MS Office 2013 +- MS Office 2016 - SheetProtection - MS Office <= 2003 $0/$1, MD5 + RC4 - MS Office <= 2003 $0/$1, MD5 + RC4, collider #1 - MS Office <= 2003 $0/$1, MD5 + RC4, collider #2 @@ -291,6 +297,7 @@ NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or - Blockchain, My Wallet - Blockchain, My Wallet, V2 - Blockchain, My Wallet, Second Password (SHA256) +- Stargazer Stellar Wallet XLM - Ethereum Pre-Sale Wallet, PBKDF2-HMAC-SHA256 - Ethereum Wallet, PBKDF2-HMAC-SHA256 - Ethereum Wallet, SCRYPT @@ -314,6 +321,7 @@ NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or - iTunes backup >= 10.0 - WinZip - Android Backup +- Stuffit5 - AxCrypt 1 - AxCrypt 1 in-memory SHA1 - AxCrypt 2 AES-128 @@ -325,6 +333,7 @@ NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or - SMF (Simple Machines Forum) > v1.1 - MediaWiki B type - Redmine +- Umbraco HMAC-SHA1 - Joomla < 2.5.18 - OpenCart - PrestaShop @@ -337,6 +346,7 @@ NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or - Django (SHA-1) - Web2py pbkdf2-sha512 - TOTP (HMAC-SHA1) +- Dahua Authentication MD5 ## ## Attack-Modes diff --git a/docs/user_manuals.txt b/docs/user_manuals.txt index d6dd7829f..17186e217 100644 --- a/docs/user_manuals.txt +++ b/docs/user_manuals.txt @@ -1,3 +1,3 @@ -The user manuals are constantly updated. Thats why they are not part of the distribtion. +The user manuals are constantly updated. That's why they are not part of the distribution. -For more detailed Informations and advanced hashcat usage visit our Wiki: http://hashcat.net/wiki +For more detailed information and advanced hashcat usage visit our Wiki: https://hashcat.net/wiki diff --git a/extra/tab_completion/hashcat.sh b/extra/tab_completion/hashcat.sh index 100d16af4..2bc62b1c8 100644 --- a/extra/tab_completion/hashcat.sh +++ b/extra/tab_completion/hashcat.sh @@ -426,7 +426,7 @@ _hashcat () local BUILD_IN_CHARSETS='?l ?u ?d ?a ?b ?s ?h ?H' local SHORT_OPTS="-m -a -V -h -b -t -T -o -p -c -d -D -w -n -u -j -k -r -g -1 -2 -3 -4 -i -I -s -l -O -S -z" - local LONG_OPTS="--hash-type --attack-mode --version --help --quiet --benchmark --benchmark-all --hex-salt --hex-wordlist --hex-charset --force --status --status-json --status-timer --stdin-timeout-abort --machine-readable --loopback --markov-hcstat2 --markov-disable --markov-classic --markov-threshold --runtime --session --speed-only --progress-only --restore --restore-file-path --restore-disable --outfile --outfile-format --outfile-autohex-disable --outfile-check-timer --outfile-check-dir --wordlist-autohex-disable --separator --show --left --username --remove --remove-timer --potfile-disable --potfile-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --example-hashes --backend-ignore-cuda --backend-ignore-opencl --backend-info --backend-devices --opencl-device-types --backend-vector-width --workload-profile --kernel-accel --kernel-loops --kernel-threads --spin-damp --hwmon-disable --hwmon-temp-abort --skip --limit --keyspace --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --hook-threads --increment --increment-min --increment-max --logfile-disable --scrypt-tmto --keyboard-layout-mapping --truecrypt-keyfiles --veracrypt-keyfiles --veracrypt-pim-start --veracrypt-pim-stop --stdout --keep-guessing --hccapx-message-pair --nonce-error-corrections --encoding-from --encoding-to --optimized-kernel-enable --self-test-disable --slow-candidates --brain-server --brain-server-timer --brain-client --brain-client-features --brain-host --brain-port --brain-session --brain-session-whitelist --brain-password" + local LONG_OPTS="--hash-type --attack-mode --version --help --quiet --benchmark --benchmark-all --hex-salt --hex-wordlist --hex-charset --force --status --status-json --status-timer --stdin-timeout-abort --machine-readable --loopback --markov-hcstat2 --markov-disable --markov-classic --markov-threshold --runtime --session --speed-only --progress-only --restore --restore-file-path --restore-disable --outfile --outfile-format --outfile-autohex-disable --outfile-check-timer --outfile-check-dir --wordlist-autohex-disable --separator --show --left --username --remove --remove-timer --potfile-disable --potfile-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --example-hashes --hash-info --backend-ignore-cuda --backend-ignore-opencl --backend-info --backend-devices --opencl-device-types --backend-vector-width --workload-profile --kernel-accel --kernel-loops --kernel-threads --spin-damp --hwmon-disable --hwmon-temp-abort --skip --limit --keyspace --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --hook-threads --increment --increment-min --increment-max --logfile-disable --scrypt-tmto --keyboard-layout-mapping --truecrypt-keyfiles --veracrypt-keyfiles --veracrypt-pim-start --veracrypt-pim-stop --stdout --keep-guessing --hccapx-message-pair --nonce-error-corrections --encoding-from --encoding-to --optimized-kernel-enable --self-test-disable --slow-candidates --brain-server --brain-server-timer --brain-client --brain-client-features --brain-host --brain-port --brain-session --brain-session-whitelist --brain-password" local OPTIONS="-m -a -t -o -p -c -d -w -n -u -j -k -r -g -1 -2 -3 -4 -s -l --hash-type --attack-mode --status-timer --stdin-timeout-abort --markov-hcstat2 --markov-threshold --runtime --session --timer --outfile --outfile-format --outfile-check-timer --outfile-check-dir --separator --remove-timer --potfile-path --restore-file-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --backend-devices --opencl-device-types --backend-vector-width --workload-profile --kernel-accel --kernel-loops --kernel-threads --spin-damp --hwmon-temp-abort --skip --limit --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --hook-threads --increment-min --increment-max --scrypt-tmto --keyboard-layout-mapping --truecrypt-keyfiles --veracrypt-keyfiles --veracrypt-pim-start --veracrypt-pim-stop --hccapx-message-pair --nonce-error-corrections --encoding-from --encoding-to --brain-server-timer --brain-client-features --brain-host --brain-password --brain-port --brain-session --brain-session-whitelist" COMPREPLY=() diff --git a/include/backend.h b/include/backend.h index 920f015cf..e9b7a9d4f 100644 --- a/include/backend.h +++ b/include/backend.h @@ -80,6 +80,7 @@ int hc_cuLinkDestroy (hashcat_ctx_t *hashcat_ctx, CUlinkState state) int hc_cuLinkComplete (hashcat_ctx_t *hashcat_ctx, CUlinkState state, void **cubinOut, size_t *sizeOut); int hc_clBuildProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data); +int hc_clCompileProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, cl_uint num_input_headers, const cl_program *input_headers, const char **header_include_names, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data); int hc_clCreateBuffer (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_mem_flags flags, size_t size, void *host_ptr, cl_mem *mem); int hc_clCreateCommandQueue (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_command_queue *command_queue); int hc_clCreateContext (hashcat_ctx_t *hashcat_ctx, const cl_context_properties *properties, cl_uint num_devices, const cl_device_id *devices, void (CL_CALLBACK *pfn_notify) (const char *errinfo, const void *private_info, size_t cb, void *user_data), void *user_data, cl_context *context); @@ -103,6 +104,7 @@ int hc_clGetPlatformIDs (hashcat_ctx_t *hashcat_ctx, cl_uint num_entrie int hc_clGetPlatformInfo (hashcat_ctx_t *hashcat_ctx, cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret); int hc_clGetProgramBuildInfo (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret); int hc_clGetProgramInfo (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_program_info param_name, size_t param_value_size, void *param_value, size_t * param_value_size_ret); +int hc_clLinkProgram (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_uint num_devices, const cl_device_id *device_list, const char *options, cl_uint num_input_programs, const cl_program *input_programs, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data, cl_program *program); int hc_clReleaseCommandQueue (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue); int hc_clReleaseContext (hashcat_ctx_t *hashcat_ctx, cl_context context); int hc_clReleaseEvent (hashcat_ctx_t *hashcat_ctx, cl_event event); @@ -114,7 +116,7 @@ int hc_clWaitForEvents (hashcat_ctx_t *hashcat_ctx, cl_uint num_events int gidd_to_pw_t (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw); -int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 highest_pw_len, const u64 pws_cnt, const u32 fast_iteration, const u32 salt_pos); +int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 highest_pw_len, const u64 pws_pos, const u64 pws_cnt, const u32 fast_iteration, const u32 salt_pos); void rebuild_pws_compressed_append (hc_device_param_t *device_param, const u64 pws_cnt, const u8 chr); @@ -126,13 +128,13 @@ int run_opencl_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *de int run_opencl_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u32 value, const u64 size); int run_opencl_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 size); -int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 kern_run, const u64 num, const u32 event_update, const u32 iteration); +int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 kern_run, const u64 pws_pos, const u64 num, const u32 event_update, const u32 iteration); int run_kernel_mp (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 kern_run, const u64 num); int run_kernel_tm (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param); int run_kernel_amp (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 num); int run_kernel_decompress (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 num); int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_cnt); -int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_cnt); +int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_pos, const u64 pws_cnt); void generate_source_kernel_filename (const bool slow_candidates, const u32 attack_exec, const u32 attack_kern, const u32 kern_type, const u32 opti_type, char *shared_dir, char *source_file); void generate_cached_kernel_filename (const bool slow_candidates, const u32 attack_exec, const u32 attack_kern, const u32 kern_type, const u32 opti_type, char *profile_dir, const char *device_name_chksum, char *cached_file); diff --git a/include/ext_OpenCL.h b/include/ext_OpenCL.h index 0fc0d01b9..54f3b4182 100644 --- a/include/ext_OpenCL.h +++ b/include/ext_OpenCL.h @@ -38,6 +38,7 @@ typedef union #define CL_PLATFORMS_MAX 16 typedef cl_int (CL_API_CALL *OCL_CLBUILDPROGRAM) (cl_program, cl_uint, const cl_device_id *, const char *, void (CL_CALLBACK *)(cl_program, void *), void *); +typedef cl_int (CL_API_CALL *OCL_CLCOMPILEPROGRAM) (cl_program, cl_uint, const cl_device_id *, const char *, cl_uint, const cl_program *, const char **, void (CL_CALLBACK *)(cl_program, void *), void *); typedef cl_mem (CL_API_CALL *OCL_CLCREATEBUFFER) (cl_context, cl_mem_flags, size_t, void *, cl_int *); typedef cl_command_queue (CL_API_CALL *OCL_CLCREATECOMMANDQUEUE) (cl_context, cl_device_id, cl_command_queue_properties, cl_int *); typedef cl_context (CL_API_CALL *OCL_CLCREATECONTEXT) (const cl_context_properties *, cl_uint, const cl_device_id *, void (CL_CALLBACK *)(const char *, const void *, size_t, void *), void *, cl_int *); @@ -61,6 +62,7 @@ typedef cl_int (CL_API_CALL *OCL_CLGETPLATFORMIDS) (cl_uint, typedef cl_int (CL_API_CALL *OCL_CLGETPLATFORMINFO) (cl_platform_id, cl_platform_info, size_t, void *, size_t *); typedef cl_int (CL_API_CALL *OCL_CLGETPROGRAMBUILDINFO) (cl_program, cl_device_id, cl_program_build_info, size_t, void *, size_t *); typedef cl_int (CL_API_CALL *OCL_CLGETPROGRAMINFO) (cl_program, cl_program_info, size_t, void *, size_t *); +typedef cl_program (CL_API_CALL *OCL_CLLINKPROGRAM) (cl_context, cl_uint, const cl_device_id *, const char *, cl_uint, const cl_program *, void (CL_CALLBACK *) (cl_program, void *), void *, cl_int *); typedef cl_int (CL_API_CALL *OCL_CLRELEASECOMMANDQUEUE) (cl_command_queue); typedef cl_int (CL_API_CALL *OCL_CLRELEASECONTEXT) (cl_context); typedef cl_int (CL_API_CALL *OCL_CLRELEASEEVENT) (cl_event); @@ -75,6 +77,7 @@ typedef struct hc_opencl_lib hc_dynlib_t lib; OCL_CLBUILDPROGRAM clBuildProgram; + OCL_CLCOMPILEPROGRAM clCompileProgram; OCL_CLCREATEBUFFER clCreateBuffer; OCL_CLCREATECOMMANDQUEUE clCreateCommandQueue; OCL_CLCREATECONTEXT clCreateContext; @@ -98,6 +101,7 @@ typedef struct hc_opencl_lib OCL_CLGETPLATFORMINFO clGetPlatformInfo; OCL_CLGETPROGRAMBUILDINFO clGetProgramBuildInfo; OCL_CLGETPROGRAMINFO clGetProgramInfo; + OCL_CLLINKPROGRAM clLinkProgram; OCL_CLRELEASECOMMANDQUEUE clReleaseCommandQueue; OCL_CLRELEASECONTEXT clReleaseContext; OCL_CLRELEASEEVENT clReleaseEvent; diff --git a/include/ext_lzma.h b/include/ext_lzma.h index a346a8e22..194067ba7 100644 --- a/include/ext_lzma.h +++ b/include/ext_lzma.h @@ -4,6 +4,7 @@ */ #ifndef _EXT_LZMA_H +#define _EXT_LZMA_H #include #include diff --git a/include/folder.h b/include/folder.h index 75f214b1a..34b4618bf 100644 --- a/include/folder.h +++ b/include/folder.h @@ -3,6 +3,9 @@ * License.....: MIT */ +#ifndef _FOLDER_H +#define _FOLDER_H + #include #include #include @@ -34,3 +37,5 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char void folder_config_destroy (hashcat_ctx_t *hashcat_ctx); int hc_mkdir (const char *name, MAYBE_UNUSED const int mode); + +#endif // _FOLDER_H diff --git a/include/hashes.h b/include/hashes.h index 236db5c9a..b222f6b3d 100644 --- a/include/hashes.h +++ b/include/hashes.h @@ -17,7 +17,8 @@ int save_hash (hashcat_ctx_t *hashcat_ctx); void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain); -int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 salt_pos); +//int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 salt_pos); +int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param); int hashes_init_filename (hashcat_ctx_t *hashcat_ctx); int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx); diff --git a/include/terminal.h b/include/terminal.h index e15d4ef9c..b40ec9ed3 100644 --- a/include/terminal.h +++ b/include/terminal.h @@ -41,7 +41,7 @@ int tty_fix(void); void compress_terminal_line_length (char *out_buf, const size_t keep_from_beginning, const size_t keep_from_end); -void example_hashes (hashcat_ctx_t *hashcat_ctx); +void hash_info (hashcat_ctx_t *hashcat_ctx); void backend_info (hashcat_ctx_t *hashcat_ctx); void backend_info_compact (hashcat_ctx_t *hashcat_ctx); diff --git a/include/types.h b/include/types.h index a727bd558..e6dd881a7 100644 --- a/include/types.h +++ b/include/types.h @@ -239,6 +239,7 @@ typedef enum attack_mode ATTACK_MODE_TABLE = 5, ATTACK_MODE_HYBRID1 = 6, ATTACK_MODE_HYBRID2 = 7, + ATTACK_MODE_ASSOCIATION = 9, ATTACK_MODE_NONE = 100 } attack_mode_t; @@ -422,6 +423,8 @@ typedef enum opts_type OPTS_TYPE_AUX3 = (1ULL << 37), OPTS_TYPE_AUX4 = (1ULL << 38), OPTS_TYPE_BINARY_HASHFILE = (1ULL << 39), + OPTS_TYPE_BINARY_HASHFILE_OPTIONAL + = (1ULL << 40), // this allows us to not enforce the use of a binary file. requires OPTS_TYPE_BINARY_HASHFILE set to be effective. OPTS_TYPE_PT_ADD06 = (1ULL << 41), OPTS_TYPE_KEYBOARD_MAPPING = (1ULL << 42), OPTS_TYPE_DEEP_COMP_KERNEL = (1ULL << 43), // if we have to iterate through each hash inside the comp kernel, for example if each hash has to be decrypted separately @@ -431,6 +434,8 @@ typedef enum opts_type OPTS_TYPE_POTFILE_NOPASS = (1ULL << 47), // sometimes the password should not be printed to potfile OPTS_TYPE_DYNAMIC_SHARED = (1ULL << 48), // use dynamic shared memory (note: needs special kernel changes) OPTS_TYPE_SELF_TEST_DISABLE = (1ULL << 49), // some algos use JiT in combinations with a salt or create too much startup time + OPTS_TYPE_MP_MULTI_DISABLE = (1ULL << 50), // do not multiply the kernel-accel with the multiprocessor count per device to allow more fine-tuned workload settings + OPTS_TYPE_NATIVE_THREADS = (1ULL << 51), // forces "native" thread count: CPU=1, GPU-Intel=8, GPU-AMD=64 (wavefront), GPU-NV=32 (warps) } opts_type_t; @@ -541,6 +546,8 @@ typedef enum parser_rc PARSER_BLOCK_SIZE = -39, PARSER_CIPHER = -40, PARSER_FILE_SIZE = -41, + PARSER_IV_LENGTH = -42, + PARSER_CT_LENGTH = -43, PARSER_HAVE_ERRNO = -100, PARSER_UNKNOWN_ERROR = -255 @@ -590,10 +597,10 @@ typedef enum user_options_defaults BRAIN_SESSION = 0, #endif DEBUG_MODE = 0, - EXAMPLE_HASHES = false, FORCE = false, HWMON_DISABLE = false, HWMON_TEMP_ABORT = 90, + HASH_INFO = false, HASH_MODE = 0, HCCAPX_MESSAGE_PAIR = 0, HEX_CHARSET = false, @@ -695,7 +702,7 @@ typedef enum user_options_map IDX_DEBUG_MODE = 0xff11, IDX_ENCODING_FROM = 0xff12, IDX_ENCODING_TO = 0xff13, - IDX_EXAMPLE_HASHES = 0xff14, + IDX_HASH_INFO = 0xff14, IDX_FORCE = 0xff15, IDX_HWMON_DISABLE = 0xff16, IDX_HWMON_TEMP_ABORT = 0xff17, @@ -1937,9 +1944,9 @@ typedef struct user_options bool brain_client; bool brain_server; #endif - bool example_hashes; bool force; bool hwmon_disable; + bool hash_info; bool hex_charset; bool hex_salt; bool hex_wordlist; @@ -2612,8 +2619,6 @@ typedef struct token } token_t; -#endif // _TYPES_H - /** * hash category is relevant in usage.c (--help screen) */ @@ -2647,3 +2652,5 @@ typedef enum hash_category // hash specific typedef aes_ctx AES_KEY; + +#endif // _TYPES_H diff --git a/src/Makefile b/src/Makefile index 00a55b509..38bb17c40 100644 --- a/src/Makefile +++ b/src/Makefile @@ -74,7 +74,7 @@ CXX := clang++ AR := /usr/bin/ar SED := /usr/bin/sed SED_IN_PLACE := -i "" -PROD_VERS := $(shell sw_vers -productVersion | cut -d. -f2) +DARWIN_VERSION := $(shell uname -r | cut -d. -f1) endif ifeq ($(UNAME),FreeBSD) @@ -299,7 +299,7 @@ ifeq ($(UNAME),Darwin) export MACOSX_DEPLOYMENT_TARGET=10.9 CFLAGS_NATIVE := $(CFLAGS) -ifeq ($(shell test $(PROD_VERS) -le 11; echo $$?), 0) +ifeq ($(shell test $(DARWIN_VERSION) -le 15; echo $$?), 0) CFLAGS_NATIVE += -DMISSING_CLOCK_GETTIME endif diff --git a/src/autotune.c b/src/autotune.c index 0af2d3841..04f8bc4c5 100644 --- a/src/autotune.c +++ b/src/autotune.c @@ -12,13 +12,26 @@ static double try_run (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 kernel_accel, const u32 kernel_loops) { - hashconfig_t *hashconfig = hashcat_ctx->hashconfig; + hashconfig_t *hashconfig = hashcat_ctx->hashconfig; + user_options_t *user_options = hashcat_ctx->user_options; device_param->kernel_params_buf32[28] = 0; device_param->kernel_params_buf32[29] = kernel_loops; // not a bug, both need to be set device_param->kernel_params_buf32[30] = kernel_loops; // because there's two variables for inner iters for slow and fast hashes - const u32 kernel_power_try = device_param->hardware_power * kernel_accel; + u32 kernel_power_try = device_param->hardware_power * kernel_accel; + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + hashes_t *hashes = hashcat_ctx->hashes; + + const u32 salts_cnt = hashes->salts_cnt; + + if (kernel_power_try > salts_cnt) + { + kernel_power_try = salts_cnt; + } + } const double spin_damp_sav = device_param->spin_damp; @@ -28,16 +41,16 @@ static double try_run (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par { if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) { - run_kernel (hashcat_ctx, device_param, KERN_RUN_1, kernel_power_try, true, 0); + run_kernel (hashcat_ctx, device_param, KERN_RUN_1, 0, kernel_power_try, true, 0); } else { - run_kernel (hashcat_ctx, device_param, KERN_RUN_4, kernel_power_try, true, 0); + run_kernel (hashcat_ctx, device_param, KERN_RUN_4, 0, kernel_power_try, true, 0); } } else { - run_kernel (hashcat_ctx, device_param, KERN_RUN_2, kernel_power_try, true, 0); + run_kernel (hashcat_ctx, device_param, KERN_RUN_2, 0, kernel_power_try, true, 0); } device_param->spin_damp = spin_damp_sav; @@ -70,20 +83,20 @@ static double try_run_preferred (hashcat_ctx_t *hashcat_ctx, hc_device_param_t * { device_param->kernel_threads = device_param->kernel_preferred_wgs_multiple1; - run_kernel (hashcat_ctx, device_param, KERN_RUN_1, kernel_power_try, true, 0); + run_kernel (hashcat_ctx, device_param, KERN_RUN_1, 0, kernel_power_try, true, 0); } else { device_param->kernel_threads = device_param->kernel_preferred_wgs_multiple4; - run_kernel (hashcat_ctx, device_param, KERN_RUN_4, kernel_power_try, true, 0); + run_kernel (hashcat_ctx, device_param, KERN_RUN_4, 0, kernel_power_try, true, 0); } } else { device_param->kernel_threads = device_param->kernel_preferred_wgs_multiple2; - run_kernel (hashcat_ctx, device_param, KERN_RUN_2, kernel_power_try, true, 0); + run_kernel (hashcat_ctx, device_param, KERN_RUN_2, 0, kernel_power_try, true, 0); } device_param->kernel_threads = kernel_threads_sav; diff --git a/src/backend.c b/src/backend.c index 5c6b442f4..ef544858c 100644 --- a/src/backend.c +++ b/src/backend.c @@ -2183,6 +2183,7 @@ int ocl_init (hashcat_ctx_t *hashcat_ctx) if (ocl->lib == NULL) return -1; HC_LOAD_FUNC (ocl, clBuildProgram, OCL_CLBUILDPROGRAM, OpenCL, 1); + HC_LOAD_FUNC (ocl, clCompileProgram, OCL_CLCOMPILEPROGRAM, OpenCL, 1); HC_LOAD_FUNC (ocl, clCreateBuffer, OCL_CLCREATEBUFFER, OpenCL, 1); HC_LOAD_FUNC (ocl, clCreateCommandQueue, OCL_CLCREATECOMMANDQUEUE, OpenCL, 1); HC_LOAD_FUNC (ocl, clCreateContext, OCL_CLCREATECONTEXT, OpenCL, 1); @@ -2205,6 +2206,7 @@ int ocl_init (hashcat_ctx_t *hashcat_ctx) HC_LOAD_FUNC (ocl, clGetPlatformInfo, OCL_CLGETPLATFORMINFO, OpenCL, 1); HC_LOAD_FUNC (ocl, clGetProgramBuildInfo, OCL_CLGETPROGRAMBUILDINFO, OpenCL, 1); HC_LOAD_FUNC (ocl, clGetProgramInfo, OCL_CLGETPROGRAMINFO, OpenCL, 1); + HC_LOAD_FUNC (ocl, clLinkProgram, OCL_CLLINKPROGRAM, OpenCL, 1); HC_LOAD_FUNC (ocl, clReleaseCommandQueue, OCL_CLRELEASECOMMANDQUEUE, OpenCL, 1); HC_LOAD_FUNC (ocl, clReleaseContext, OCL_CLRELEASECONTEXT, OpenCL, 1); HC_LOAD_FUNC (ocl, clReleaseKernel, OCL_CLRELEASEKERNEL, OpenCL, 1); @@ -2571,6 +2573,44 @@ int hc_clBuildProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint n return 0; } +int hc_clCompileProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, cl_uint num_input_headers, const cl_program *input_headers, const char **header_include_names, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data) +{ + backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; + + OCL_PTR *ocl = (OCL_PTR *) backend_ctx->ocl; + + const cl_int CL_err = ocl->clCompileProgram (program, num_devices, device_list, options, num_input_headers, input_headers, header_include_names, pfn_notify, user_data); + + if (CL_err != CL_SUCCESS) + { + event_log_error (hashcat_ctx, "clCompileProgram(): %s", val2cstr_cl (CL_err)); + + return -1; + } + + return 0; +} + +int hc_clLinkProgram (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_uint num_devices, const cl_device_id *device_list, const char *options, cl_uint num_input_programs, const cl_program *input_programs, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data, cl_program *program) +{ + backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; + + OCL_PTR *ocl = (OCL_PTR *) backend_ctx->ocl; + + cl_int CL_err; + + *program = ocl->clLinkProgram (context, num_devices, device_list, options, num_input_programs, input_programs, pfn_notify, user_data, &CL_err); + + if (CL_err != CL_SUCCESS) + { + event_log_error (hashcat_ctx, "clLinkProgram(): %s", val2cstr_cl (CL_err)); + + return -1; + } + + return 0; +} + int hc_clCreateKernel (hashcat_ctx_t *hashcat_ctx, cl_program program, const char *kernel_name, cl_kernel *kernel) { backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; @@ -2885,7 +2925,7 @@ int gidd_to_pw_t (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, c return 0; } -int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 highest_pw_len, const u64 pws_cnt, const u32 fast_iteration, const u32 salt_pos) +int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 highest_pw_len, const u64 pws_pos, const u64 pws_cnt, const u32 fast_iteration, const u32 salt_pos) { hashconfig_t *hashconfig = hashcat_ctx->hashconfig; hashes_t *hashes = hashcat_ctx->hashes; @@ -2940,20 +2980,20 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, { if (highest_pw_len < 16) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_1, pws_cnt, true, fast_iteration) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_1, pws_pos, pws_cnt, true, fast_iteration) == -1) return -1; } else if (highest_pw_len < 32) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, pws_cnt, true, fast_iteration) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, pws_pos, pws_cnt, true, fast_iteration) == -1) return -1; } else { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_3, pws_cnt, true, fast_iteration) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_3, pws_pos, pws_cnt, true, fast_iteration) == -1) return -1; } } else { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_4, pws_cnt, true, fast_iteration) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_4, pws_pos, pws_cnt, true, fast_iteration) == -1) return -1; } } else @@ -2982,11 +3022,11 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, if (run_kernel_amp (hashcat_ctx, device_param, pws_cnt) == -1) return -1; } - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_1, pws_cnt, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_1, pws_pos, pws_cnt, false, 0) == -1) return -1; if (hashconfig->opts_type & OPTS_TYPE_HOOK12) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_12, pws_cnt, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_12, pws_pos, pws_cnt, false, 0) == -1) return -1; if (device_param->is_cuda == true) { @@ -3064,11 +3104,11 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, device_param->kernel_params_buf32[28] = loop_pos; device_param->kernel_params_buf32[29] = loop_left; - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, pws_cnt, true, slow_iteration) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, pws_pos, pws_cnt, true, slow_iteration) == -1) return -1; if (hashconfig->opts_type & OPTS_TYPE_LOOP_EXTENDED) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2E, pws_cnt, true, slow_iteration) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2E, pws_pos, pws_cnt, true, slow_iteration) == -1) return -1; } //bug? @@ -3108,7 +3148,7 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, if (hashconfig->opts_type & OPTS_TYPE_HOOK23) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_23, pws_cnt, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_23, pws_pos, pws_cnt, false, 0) == -1) return -1; if (device_param->is_cuda == true) { @@ -3180,7 +3220,7 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, if (hashconfig->opts_type & OPTS_TYPE_INIT2) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_INIT2, pws_cnt, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_INIT2, pws_pos, pws_cnt, false, 0) == -1) return -1; } if (hashconfig->opts_type & OPTS_TYPE_LOOP2) @@ -3198,7 +3238,7 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, device_param->kernel_params_buf32[28] = loop_pos; device_param->kernel_params_buf32[29] = loop_left; - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_LOOP2, pws_cnt, true, slow_iteration) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_LOOP2, pws_pos, pws_cnt, true, slow_iteration) == -1) return -1; //bug? //while (status_ctx->run_thread_level2 == false) break; @@ -3220,14 +3260,14 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 deep_comp_kernel = module_ctx->module_deep_comp_kernel (hashes, salt_pos, loops_pos); - if (run_kernel (hashcat_ctx, device_param, deep_comp_kernel, pws_cnt, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, deep_comp_kernel, pws_pos, pws_cnt, false, 0) == -1) return -1; if (status_ctx->run_thread_level2 == false) break; } } else { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_3, pws_cnt, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_3, pws_pos, pws_cnt, false, 0) == -1) return -1; } } @@ -3467,7 +3507,7 @@ int run_opencl_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *devi return run_opencl_kernel_memset (hashcat_ctx, device_param, buf, 0, size); } -int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 kern_run, const u64 num, const u32 event_update, const u32 iteration) +int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 kern_run, const u64 pws_pos, const u64 num, const u32 event_update, const u32 iteration) { const hashconfig_t *hashconfig = hashcat_ctx->hashconfig; const status_ctx_t *status_ctx = hashcat_ctx->status_ctx; @@ -3550,7 +3590,8 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con kernel_threads = MIN (kernel_threads, device_param->kernel_threads); - device_param->kernel_params_buf64[34] = num; + device_param->kernel_params_buf64[34] = pws_pos; + device_param->kernel_params_buf64[35] = num; u64 num_elements = num; @@ -3685,7 +3726,7 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con if (hc_clSetKernelArg (hashcat_ctx, opencl_kernel, i, sizeof (cl_uint), device_param->kernel_params[i]) == -1) return -1; } - for (u32 i = 34; i <= 34; i++) + for (u32 i = 34; i <= 35; i++) { if (hc_clSetKernelArg (hashcat_ctx, opencl_kernel, i, sizeof (cl_ulong), device_param->kernel_params[i]) == -1) return -1; } @@ -4282,7 +4323,7 @@ int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const return 0; } -int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_cnt) +int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_pos, const u64 pws_cnt) { combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx; hashconfig_t *hashconfig = hashcat_ctx->hashconfig; @@ -4358,7 +4399,16 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co // loop start: most outer loop = salt iteration, then innerloops (if multi) - for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++) + u32 salts_cnt = hashes->salts_cnt; + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + // We will replace in-kernel salt_pos with GID via macro + + salts_cnt = 1; + } + + for (u32 salt_pos = 0; salt_pos < salts_cnt; salt_pos++) { while (status_ctx->devices_status == STATUS_PAUSED) sleep (1); @@ -4429,11 +4479,18 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co hc_thread_mutex_unlock (status_ctx->mux_display); - if (hashes->salts_shown[salt_pos] == 1) + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) { - status_ctx->words_progress_done[salt_pos] += pws_cnt * innerloop_left; + // does not exist here + } + else + { + if (hashes->salts_shown[salt_pos] == 1) + { + status_ctx->words_progress_done[salt_pos] += pws_cnt * innerloop_left; - continue; + continue; + } } // initialize and copy amplifiers @@ -4489,7 +4546,17 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co if (rule_len_out < 0) { - status_ctx->words_progress_rejected[salt_pos] += pws_cnt; + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + for (u32 association_salt_pos = 0; association_salt_pos < pws_cnt; association_salt_pos++) + { + status_ctx->words_progress_rejected[association_salt_pos] += 1; + } + } + else + { + status_ctx->words_progress_rejected[salt_pos] += pws_cnt; + } continue; } @@ -4634,7 +4701,17 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co if (rule_len_out < 0) { - status_ctx->words_progress_rejected[salt_pos] += pws_cnt; + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + for (u32 association_salt_pos = 0; association_salt_pos < pws_cnt; association_salt_pos++) + { + status_ctx->words_progress_rejected[association_salt_pos] += 1; + } + } + else + { + status_ctx->words_progress_rejected[salt_pos] += pws_cnt; + } continue; } @@ -4752,7 +4829,7 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co } } - if (choose_kernel (hashcat_ctx, device_param, highest_pw_len, pws_cnt, fast_iteration, salt_pos) == -1) return -1; + if (choose_kernel (hashcat_ctx, device_param, highest_pw_len, pws_pos, pws_cnt, fast_iteration, salt_pos) == -1) return -1; /** * benchmark was aborted because too long kernel runtime (slow hashes only) @@ -4797,7 +4874,17 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co hc_thread_mutex_lock (status_ctx->mux_counter); - status_ctx->words_progress_done[salt_pos] += perf_sum_all; + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + for (u32 association_salt_pos = 0; association_salt_pos < pws_cnt; association_salt_pos++) + { + status_ctx->words_progress_done[pws_pos + association_salt_pos] += innerloop_left; + } + } + else + { + status_ctx->words_progress_done[salt_pos] += perf_sum_all; + } hc_thread_mutex_unlock (status_ctx->mux_counter); } @@ -4864,7 +4951,8 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co * result */ - check_cracked (hashcat_ctx, device_param, salt_pos); +// check_cracked (hashcat_ctx, device_param, salt_pos); + check_cracked (hashcat_ctx, device_param); if (status_ctx->run_thread_level2 == false) break; } @@ -4908,7 +4996,7 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx) backend_ctx->enabled = false; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->show == true) return 0; @@ -5434,7 +5522,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) CUdevice cuda_device; - if (hc_cuDeviceGet (hashcat_ctx, &cuda_device, cuda_devices_idx) == -1) return -1; + if (hc_cuDeviceGet (hashcat_ctx, &cuda_device, cuda_devices_idx) == -1) + { + device_param->skipped = true; + continue; + } device_param->cuda_device = cuda_device; @@ -5450,7 +5542,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) char *device_name = (char *) hcmalloc (HCBUFSIZ_TINY); - if (hc_cuDeviceGetName (hashcat_ctx, device_name, HCBUFSIZ_TINY, cuda_device) == -1) return -1; + if (hc_cuDeviceGetName (hashcat_ctx, device_name, HCBUFSIZ_TINY, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_name = device_name; @@ -5462,7 +5558,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int device_processors = 0; - if (hc_cuDeviceGetAttribute (hashcat_ctx, &device_processors, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &device_processors, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_processors = device_processors; @@ -5470,7 +5570,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) size_t bytes = 0; - if (hc_cuDeviceTotalMem (hashcat_ctx, &bytes, cuda_device) == -1) return -1; + if (hc_cuDeviceTotalMem (hashcat_ctx, &bytes, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_global_mem = (u64) bytes; @@ -5482,7 +5586,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int cuda_warp_size = 0; - if (hc_cuDeviceGetAttribute (hashcat_ctx, &cuda_warp_size, CU_DEVICE_ATTRIBUTE_WARP_SIZE, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &cuda_warp_size, CU_DEVICE_ATTRIBUTE_WARP_SIZE, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } device_param->cuda_warp_size = cuda_warp_size; @@ -5491,9 +5599,17 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int sm_major = 0; int sm_minor = 0; - if (hc_cuDeviceGetAttribute (hashcat_ctx, &sm_major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &sm_major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } - if (hc_cuDeviceGetAttribute (hashcat_ctx, &sm_minor, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &sm_minor, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } device_param->sm_major = sm_major; device_param->sm_minor = sm_minor; @@ -5502,7 +5618,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int device_maxworkgroup_size = 0; - if (hc_cuDeviceGetAttribute (hashcat_ctx, &device_maxworkgroup_size, CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &device_maxworkgroup_size, CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_maxworkgroup_size = device_maxworkgroup_size; @@ -5510,7 +5630,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int device_maxclock_frequency = 0; - if (hc_cuDeviceGetAttribute (hashcat_ctx, &device_maxclock_frequency, CU_DEVICE_ATTRIBUTE_CLOCK_RATE, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &device_maxclock_frequency, CU_DEVICE_ATTRIBUTE_CLOCK_RATE, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_maxclock_frequency = device_maxclock_frequency / 1000; @@ -5520,11 +5644,23 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int pci_bus_id_nv = 0; int pci_slot_id_nv = 0; - if (hc_cuDeviceGetAttribute (hashcat_ctx, &pci_domain_id_nv, CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &pci_domain_id_nv, CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } - if (hc_cuDeviceGetAttribute (hashcat_ctx, &pci_bus_id_nv, CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &pci_bus_id_nv, CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } - if (hc_cuDeviceGetAttribute (hashcat_ctx, &pci_slot_id_nv, CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &pci_slot_id_nv, CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } device_param->pcie_domain = (u8) (pci_domain_id_nv); device_param->pcie_bus = (u8) (pci_bus_id_nv); @@ -5535,7 +5671,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int kernel_exec_timeout = 0; - if (hc_cuDeviceGetAttribute (hashcat_ctx, &kernel_exec_timeout, CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &kernel_exec_timeout, CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } device_param->kernel_exec_timeout = kernel_exec_timeout; @@ -5543,7 +5683,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int max_shared_memory_per_block = 0; - if (hc_cuDeviceGetAttribute (hashcat_ctx, &max_shared_memory_per_block, CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &max_shared_memory_per_block, CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } if (max_shared_memory_per_block < 32768) { @@ -5558,7 +5702,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int device_max_constant_buffer_size = 0; - if (hc_cuDeviceGetAttribute (hashcat_ctx, &device_max_constant_buffer_size, CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, cuda_device) == -1) return -1; + if (hc_cuDeviceGetAttribute (hashcat_ctx, &device_max_constant_buffer_size, CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, cuda_device) == -1) + { + device_param->skipped = true; + continue; + } if (device_max_constant_buffer_size < 65536) { @@ -5630,17 +5778,13 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) if (device_param->kernel_exec_timeout != 0) { - if (user_options->quiet == false) event_log_warning (hashcat_ctx, "* Device #%u: WARNING! Kernel exec timeout is not disabled.", device_id + 1); - if (user_options->quiet == false) event_log_warning (hashcat_ctx, " This may cause \"CL_OUT_OF_RESOURCES\" or related errors."); - if (user_options->quiet == false) event_log_warning (hashcat_ctx, " To disable the timeout, see: https://hashcat.net/q/timeoutpatch"); + if (user_options->quiet == false) event_log_advice (hashcat_ctx, "* Device #%u: WARNING! Kernel exec timeout is not disabled.", device_id + 1); + if (user_options->quiet == false) event_log_advice (hashcat_ctx, " This may cause \"CL_OUT_OF_RESOURCES\" or related errors."); + if (user_options->quiet == false) event_log_advice (hashcat_ctx, " To disable the timeout, see: https://hashcat.net/q/timeoutpatch"); } } - /** - * activate device - */ - - cuda_devices_active++; + // activate device moved below, at end } // instruction set @@ -5665,18 +5809,40 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) CUcontext cuda_context; - if (hc_cuCtxCreate (hashcat_ctx, &cuda_context, CU_CTX_SCHED_BLOCKING_SYNC, device_param->cuda_device) == -1) return -1; + if (hc_cuCtxCreate (hashcat_ctx, &cuda_context, CU_CTX_SCHED_BLOCKING_SYNC, device_param->cuda_device) == -1) + { + device_param->skipped = true; + continue; + } - if (hc_cuCtxSetCurrent (hashcat_ctx, cuda_context) == -1) return -1; + if (hc_cuCtxSetCurrent (hashcat_ctx, cuda_context) == -1) + { + device_param->skipped = true; + continue; + } size_t free = 0; size_t total = 0; - if (hc_cuMemGetInfo (hashcat_ctx, &free, &total) == -1) return -1; + if (hc_cuMemGetInfo (hashcat_ctx, &free, &total) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_available_mem = (u64) free; - if (hc_cuCtxDestroy (hashcat_ctx, cuda_context) == -1) return -1; + if (hc_cuCtxDestroy (hashcat_ctx, cuda_context) == -1) + { + device_param->skipped = true; + continue; + } + + /** + * activate device + */ + + if (device_param->skipped == false) cuda_devices_active++; } } @@ -5762,7 +5928,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_device_type opencl_device_type; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_TYPE, sizeof (opencl_device_type), &opencl_device_type, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_TYPE, sizeof (opencl_device_type), &opencl_device_type, NULL) == -1) + { + device_param->skipped = true; + continue; + } opencl_device_type &= ~CL_DEVICE_TYPE_DEFAULT; @@ -5770,11 +5940,19 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) // device_name - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NAME, 0, NULL, ¶m_value_size) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NAME, 0, NULL, ¶m_value_size) == -1) + { + device_param->skipped = true; + continue; + } char *device_name = (char *) hcmalloc (param_value_size); - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NAME, param_value_size, device_name, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NAME, param_value_size, device_name, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_name = device_name; @@ -5784,11 +5962,19 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) // device_vendor - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_VENDOR, 0, NULL, ¶m_value_size) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_VENDOR, 0, NULL, ¶m_value_size) == -1) + { + device_param->skipped = true; + continue; + } char *opencl_device_vendor = (char *) hcmalloc (param_value_size); - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_VENDOR, param_value_size, opencl_device_vendor, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_VENDOR, param_value_size, opencl_device_vendor, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->opencl_device_vendor = opencl_device_vendor; @@ -5851,21 +6037,37 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) // device_version - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_VERSION, 0, NULL, ¶m_value_size) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_VERSION, 0, NULL, ¶m_value_size) == -1) + { + device_param->skipped = true; + continue; + } char *opencl_device_version = (char *) hcmalloc (param_value_size); - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_VERSION, param_value_size, opencl_device_version, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_VERSION, param_value_size, opencl_device_version, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->opencl_device_version = opencl_device_version; // opencl_device_c_version - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_OPENCL_C_VERSION, 0, NULL, ¶m_value_size) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_OPENCL_C_VERSION, 0, NULL, ¶m_value_size) == -1) + { + device_param->skipped = true; + continue; + } char *opencl_device_c_version = (char *) hcmalloc (param_value_size); - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_OPENCL_C_VERSION, param_value_size, opencl_device_c_version, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_OPENCL_C_VERSION, param_value_size, opencl_device_c_version, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->opencl_device_c_version = opencl_device_c_version; @@ -5873,7 +6075,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_uint device_processors = 0; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_COMPUTE_UNITS, sizeof (device_processors), &device_processors, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_COMPUTE_UNITS, sizeof (device_processors), &device_processors, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_processors = device_processors; @@ -5881,7 +6087,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_ulong device_global_mem = 0; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_GLOBAL_MEM_SIZE, sizeof (device_global_mem), &device_global_mem, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_GLOBAL_MEM_SIZE, sizeof (device_global_mem), &device_global_mem, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_global_mem = device_global_mem; @@ -5891,7 +6101,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_ulong device_maxmem_alloc = 0; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof (device_maxmem_alloc), &device_maxmem_alloc, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof (device_maxmem_alloc), &device_maxmem_alloc, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_maxmem_alloc = device_maxmem_alloc; @@ -5903,7 +6117,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) size_t device_maxworkgroup_size = 0; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_WORK_GROUP_SIZE, sizeof (device_maxworkgroup_size), &device_maxworkgroup_size, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_WORK_GROUP_SIZE, sizeof (device_maxworkgroup_size), &device_maxworkgroup_size, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_maxworkgroup_size = device_maxworkgroup_size; @@ -5911,7 +6129,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_uint device_maxclock_frequency = 0; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_CLOCK_FREQUENCY, sizeof (device_maxclock_frequency), &device_maxclock_frequency, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_CLOCK_FREQUENCY, sizeof (device_maxclock_frequency), &device_maxclock_frequency, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_maxclock_frequency = device_maxclock_frequency; @@ -5919,7 +6141,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_bool device_endian_little = CL_FALSE; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_ENDIAN_LITTLE, sizeof (device_endian_little), &device_endian_little, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_ENDIAN_LITTLE, sizeof (device_endian_little), &device_endian_little, NULL) == -1) + { + device_param->skipped = true; + continue; + } if (device_endian_little == CL_FALSE) { @@ -5932,7 +6158,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_bool device_available = CL_FALSE; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_AVAILABLE, sizeof (device_available), &device_available, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_AVAILABLE, sizeof (device_available), &device_available, NULL) == -1) + { + device_param->skipped = true; + continue; + } if (device_available == CL_FALSE) { @@ -5945,7 +6175,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_bool device_compiler_available = CL_FALSE; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_COMPILER_AVAILABLE, sizeof (device_compiler_available), &device_compiler_available, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_COMPILER_AVAILABLE, sizeof (device_compiler_available), &device_compiler_available, NULL) == -1) + { + device_param->skipped = true; + continue; + } if (device_compiler_available == CL_FALSE) { @@ -5958,7 +6192,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_device_exec_capabilities device_execution_capabilities; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_EXECUTION_CAPABILITIES, sizeof (device_execution_capabilities), &device_execution_capabilities, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_EXECUTION_CAPABILITIES, sizeof (device_execution_capabilities), &device_execution_capabilities, NULL) == -1) + { + device_param->skipped = true; + continue; + } if ((device_execution_capabilities & CL_EXEC_KERNEL) == 0) { @@ -5971,11 +6209,19 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) size_t device_extensions_size; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_EXTENSIONS, 0, NULL, &device_extensions_size) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_EXTENSIONS, 0, NULL, &device_extensions_size) == -1) + { + device_param->skipped = true; + continue; + } char *device_extensions = (char *) hcmalloc (device_extensions_size + 1); - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_EXTENSIONS, device_extensions_size, device_extensions, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_EXTENSIONS, device_extensions_size, device_extensions, NULL) == -1) + { + device_param->skipped = true; + continue; + } if (strstr (device_extensions, "base_atomics") == 0) { @@ -5997,7 +6243,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_device_local_mem_type device_local_mem_type; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_LOCAL_MEM_TYPE, sizeof (device_local_mem_type), &device_local_mem_type, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_LOCAL_MEM_TYPE, sizeof (device_local_mem_type), &device_local_mem_type, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->device_local_mem_type = device_local_mem_type; @@ -6005,7 +6255,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_ulong device_max_constant_buffer_size; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, sizeof (device_max_constant_buffer_size), &device_max_constant_buffer_size, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, sizeof (device_max_constant_buffer_size), &device_max_constant_buffer_size, NULL) == -1) + { + device_param->skipped = true; + continue; + } if (device_local_mem_type == CL_LOCAL) { @@ -6021,7 +6275,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_ulong device_local_mem_size = 0; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_LOCAL_MEM_SIZE, sizeof (device_local_mem_size), &device_local_mem_size, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_LOCAL_MEM_SIZE, sizeof (device_local_mem_size), &device_local_mem_size, NULL) == -1) + { + device_param->skipped = true; + continue; + } if (device_local_mem_type == CL_LOCAL) { @@ -6180,11 +6438,19 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) // driver_version - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DRIVER_VERSION, 0, NULL, ¶m_value_size) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DRIVER_VERSION, 0, NULL, ¶m_value_size) == -1) + { + device_param->skipped = true; + continue; + } char *opencl_driver_version = (char *) hcmalloc (param_value_size); - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DRIVER_VERSION, param_value_size, opencl_driver_version, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DRIVER_VERSION, param_value_size, opencl_driver_version, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->opencl_driver_version = opencl_driver_version; @@ -6217,7 +6483,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) { cl_device_topology_amd amdtopo; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_TOPOLOGY_AMD, sizeof (amdtopo), &amdtopo, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_TOPOLOGY_AMD, sizeof (amdtopo), &amdtopo, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->pcie_domain = 0; // no attribute to query device_param->pcie_bus = amdtopo.pcie.bus; @@ -6230,9 +6500,17 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_uint pci_bus_id_nv; // is cl_uint the right type for them?? cl_uint pci_slot_id_nv; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_PCI_BUS_ID_NV, sizeof (pci_bus_id_nv), &pci_bus_id_nv, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_PCI_BUS_ID_NV, sizeof (pci_bus_id_nv), &pci_bus_id_nv, NULL) == -1) + { + device_param->skipped = true; + continue; + } - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_PCI_SLOT_ID_NV, sizeof (pci_slot_id_nv), &pci_slot_id_nv, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_PCI_SLOT_ID_NV, sizeof (pci_slot_id_nv), &pci_slot_id_nv, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->pcie_domain = 0; // no attribute to query device_param->pcie_bus = (u8) (pci_bus_id_nv); @@ -6242,16 +6520,28 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) int sm_minor = 0; int sm_major = 0; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV, sizeof (sm_minor), &sm_minor, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV, sizeof (sm_minor), &sm_minor, NULL) == -1) + { + device_param->skipped = true; + continue; + } - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV, sizeof (sm_major), &sm_major, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV, sizeof (sm_major), &sm_major, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->sm_minor = sm_minor; device_param->sm_major = sm_major; cl_uint kernel_exec_timeout = 0; - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV, sizeof (kernel_exec_timeout), &kernel_exec_timeout, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV, sizeof (kernel_exec_timeout), &kernel_exec_timeout, NULL) == -1) + { + device_param->skipped = true; + continue; + } device_param->kernel_exec_timeout = kernel_exec_timeout; @@ -6368,7 +6658,8 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) event_log_warning (hashcat_ctx, "You can use --force to override this, but do not report related errors."); event_log_warning (hashcat_ctx, NULL); - return -1; + device_param->skipped = true; + continue; } } } @@ -6406,7 +6697,8 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) event_log_warning (hashcat_ctx, "You can use --force to override this, but do not report related errors."); event_log_warning (hashcat_ctx, NULL); - return -1; + device_param->skipped = true; + continue; } } @@ -6455,7 +6747,8 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) event_log_warning (hashcat_ctx, "You can use --force to override this, but do not report related errors."); event_log_warning (hashcat_ctx, NULL); - return -1; + device_param->skipped = true; + continue; } if (device_param->sm_major < 5) @@ -6622,7 +6915,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) CL_rc = hc_clCreateContext (hashcat_ctx, properties, 1, &device_param->opencl_device, NULL, NULL, &context); */ - if (hc_clCreateContext (hashcat_ctx, NULL, 1, &device_param->opencl_device, NULL, NULL, &context) == -1) return -1; + if (hc_clCreateContext (hashcat_ctx, NULL, 1, &device_param->opencl_device, NULL, NULL, &context) == -1) + { + device_param->skipped = true; + continue; + } /** * create command-queue @@ -6630,7 +6927,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_command_queue command_queue; - if (hc_clCreateCommandQueue (hashcat_ctx, context, device_param->opencl_device, 0, &command_queue) == -1) return -1; + if (hc_clCreateCommandQueue (hashcat_ctx, context, device_param->opencl_device, 0, &command_queue) == -1) + { + device_param->skipped = true; + continue; + } // instruction set @@ -6873,6 +7174,7 @@ void backend_ctx_devices_destroy (hashcat_ctx_t *hashcat_ctx) void backend_ctx_devices_sync_tuning (hashcat_ctx_t *hashcat_ctx) { backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; + hashconfig_t *hashconfig = hashcat_ctx->hashconfig; if (backend_ctx->enabled == false) return; @@ -6898,7 +7200,7 @@ void backend_ctx_devices_sync_tuning (hashcat_ctx_t *hashcat_ctx) device_param_dst->kernel_loops = device_param_src->kernel_loops; device_param_dst->kernel_threads = device_param_src->kernel_threads; - const u32 hardware_power = device_param_dst->device_processors * device_param_dst->kernel_threads; + const u32 hardware_power = ((hashconfig->opts_type & OPTS_TYPE_MP_MULTI_DISABLE) ? 1 : device_param_dst->device_processors) * device_param_dst->kernel_threads; device_param_dst->hardware_power = hardware_power; @@ -7446,17 +7748,17 @@ static bool load_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_p if (device_param->is_opencl == true) { - if (hc_clCreateProgramWithSource (hashcat_ctx, device_param->opencl_context, 1, (const char **) kernel_sources, NULL, opencl_program) == -1) return false; - - const int CL_rc = hc_clBuildProgram (hashcat_ctx, *opencl_program, 1, &device_param->opencl_device, build_options_buf, NULL, NULL); - - //if (CL_rc == -1) return -1; - size_t build_log_size = 0; - hc_clGetProgramBuildInfo (hashcat_ctx, *opencl_program, device_param->opencl_device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size); + int CL_rc; - //if (CL_rc == -1) return -1; + cl_program p1 = NULL; + + if (hc_clCreateProgramWithSource (hashcat_ctx, device_param->opencl_context, 1, (const char **) kernel_sources, NULL, &p1) == -1) return false; + + CL_rc = hc_clCompileProgram (hashcat_ctx, p1, 1, &device_param->opencl_device, build_options_buf, 0, NULL, NULL, NULL, NULL); + + hc_clGetProgramBuildInfo (hashcat_ctx, p1, device_param->opencl_device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size); #if defined (DEBUG) if ((build_log_size > 1) || (CL_rc == -1)) @@ -7466,7 +7768,7 @@ static bool load_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_p { char *build_log = (char *) hcmalloc (build_log_size + 1); - const int rc_clGetProgramBuildInfo = hc_clGetProgramBuildInfo (hashcat_ctx, *opencl_program, device_param->opencl_device, CL_PROGRAM_BUILD_LOG, build_log_size, build_log, NULL); + const int rc_clGetProgramBuildInfo = hc_clGetProgramBuildInfo (hashcat_ctx, p1, device_param->opencl_device, CL_PROGRAM_BUILD_LOG, build_log_size, build_log, NULL); if (rc_clGetProgramBuildInfo == -1) return false; @@ -7477,6 +7779,21 @@ static bool load_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_p if (CL_rc == -1) return false; + cl_program t2[1]; + + t2[0] = p1; + + cl_program fin; + + if (hc_clLinkProgram (hashcat_ctx, device_param->opencl_context, 1, &device_param->opencl_device, NULL, 1, t2, NULL, NULL, &fin) == -1) return false; + + // it seems errors caused by clLinkProgram() do not go into CL_PROGRAM_BUILD + // I couldn't find any information on the web explaining how else to retrieve the error messages from the linker + + *opencl_program = fin; + + hc_clReleaseProgram (hashcat_ctx, p1); + if (cache_disable == false) { size_t binary_size; @@ -7652,7 +7969,11 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) if (device_param->is_opencl == true) { - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, sizeof (vector_width), &vector_width, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, sizeof (vector_width), &vector_width, NULL) == -1) + { + device_param->skipped = true; + continue; + } } } else @@ -7666,7 +7987,11 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) if (device_param->is_opencl == true) { - if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, sizeof (vector_width), &vector_width, NULL) == -1) return -1; + if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, sizeof (vector_width), &vector_width, NULL) == -1) + { + device_param->skipped = true; + continue; + } } } } @@ -7692,6 +8017,14 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } } + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + // not working in this mode because the GID does not align with password candidate count + // and if it cracks, it will crack the same hash twice, running into segfaults + + vector_width = 1; + } + if (vector_width > 16) vector_width = 16; device_param->vector_width = vector_width; @@ -7833,13 +8166,73 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) const u32 device_processors = device_param->device_processors; + if (hashconfig->opts_type & OPTS_TYPE_MP_MULTI_DISABLE) + { + u32 native_accel = device_processors; + + if ((native_accel >= device_param->kernel_accel_min) && (native_accel <= device_param->kernel_accel_max)) + { + device_param->kernel_accel_min = native_accel; + device_param->kernel_accel_max = native_accel; + } + } + + /** + * device threads + */ + + if (hashconfig->opts_type & OPTS_TYPE_NATIVE_THREADS) + { + u32 native_threads = 0; + + if (device_param->opencl_device_type & CL_DEVICE_TYPE_CPU) + { + native_threads = 1; + } + else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) + { + // for GPU we need to distinguish by vendor + + if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK) + { + native_threads = 8; + } + else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD) + { + native_threads = 64; + } + else + { + native_threads = 32; + } + } + else + { + // abort? + } + + if ((native_threads >= device_param->kernel_threads_min) && (native_threads <= device_param->kernel_threads_max)) + { + device_param->kernel_threads_min = native_threads; + device_param->kernel_threads_max = native_threads; + } + else + { + // abort? + } + } + /** * create context for each device */ if (device_param->is_cuda == true) { - if (hc_cuCtxCreate (hashcat_ctx, &device_param->cuda_context, CU_CTX_SCHED_BLOCKING_SYNC, device_param->cuda_device) == -1) return -1; + if (hc_cuCtxCreate (hashcat_ctx, &device_param->cuda_context, CU_CTX_SCHED_BLOCKING_SYNC, device_param->cuda_device) == -1) + { + device_param->skipped = true; + continue; + } } if (device_param->is_opencl == true) @@ -7854,7 +8247,11 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) CL_rc = hc_clCreateContext (hashcat_ctx, properties, 1, &device_param->opencl_device, NULL, NULL, &device_param->opencl_context); */ - if (hc_clCreateContext (hashcat_ctx, NULL, 1, &device_param->opencl_device, NULL, NULL, &device_param->opencl_context) == -1) return -1; + if (hc_clCreateContext (hashcat_ctx, NULL, 1, &device_param->opencl_device, NULL, NULL, &device_param->opencl_context) == -1) + { + device_param->skipped = true; + continue; + } /** * create command-queue @@ -7863,7 +8260,11 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // not supported with NV // device_param->opencl_command_queue = hc_clCreateCommandQueueWithProperties (hashcat_ctx, device_param->opencl_device, NULL); - if (hc_clCreateCommandQueue (hashcat_ctx, device_param->opencl_context, device_param->opencl_device, CL_QUEUE_PROFILING_ENABLE, &device_param->opencl_command_queue) == -1) return -1; + if (hc_clCreateCommandQueue (hashcat_ctx, device_param->opencl_context, device_param->opencl_device, CL_QUEUE_PROFILING_ENABLE, &device_param->opencl_command_queue) == -1) + { + device_param->skipped = true; + continue; + } } /** @@ -7872,7 +8273,11 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) if (device_param->is_cuda == true) { - if (hc_cuStreamCreate (hashcat_ctx, &device_param->cuda_stream, CU_STREAM_DEFAULT) == -1) return -1; + if (hc_cuStreamCreate (hashcat_ctx, &device_param->cuda_stream, CU_STREAM_DEFAULT) == -1) + { + device_param->skipped = true; + continue; + } } /** @@ -7881,9 +8286,17 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) if (device_param->is_cuda == true) { - if (hc_cuEventCreate (hashcat_ctx, &device_param->cuda_event1, CU_EVENT_BLOCKING_SYNC) == -1) return -1; + if (hc_cuEventCreate (hashcat_ctx, &device_param->cuda_event1, CU_EVENT_BLOCKING_SYNC) == -1) + { + device_param->skipped = true; + continue; + } - if (hc_cuEventCreate (hashcat_ctx, &device_param->cuda_event2, CU_EVENT_BLOCKING_SYNC) == -1) return -1; + if (hc_cuEventCreate (hashcat_ctx, &device_param->cuda_event2, CU_EVENT_BLOCKING_SYNC) == -1) + { + device_param->skipped = true; + continue; + } } /** @@ -7944,7 +8357,8 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { event_log_error (hashcat_ctx, "Invalid extra buffer size."); - return -1; + device_param->skipped = true; + continue; } device_param->extra_buffer_size = extra_buffer_size; @@ -8015,9 +8429,9 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // we don't have sm_* on vendors not NV but it doesn't matter #if defined (DEBUG) - build_options_len += snprintf (build_options_buf + build_options_len, build_options_sz - build_options_len, "-D LOCAL_MEM_TYPE=%d -D VENDOR_ID=%u -D CUDA_ARCH=%u -D HAS_ADD=%u -D HAS_ADDC=%u -D HAS_SUB=%u -D HAS_SUBC=%u -D HAS_VADD=%u -D HAS_VADDC=%u -D HAS_VADD_CO=%u -D HAS_VADDC_CO=%u -D HAS_VSUB=%u -D HAS_VSUBB=%u -D HAS_VSUB_CO=%u -D HAS_VSUBB_CO=%u -D HAS_VPERM=%u -D HAS_VADD3=%u -D HAS_VBFE=%u -D HAS_BFE=%u -D HAS_LOP3=%u -D HAS_MOV64=%u -D HAS_PRMT=%u -D VECT_SIZE=%d -D DEVICE_TYPE=%u -D DGST_R0=%u -D DGST_R1=%u -D DGST_R2=%u -D DGST_R3=%u -D DGST_ELEM=%u -D KERN_TYPE=%u -D ATTACK_EXEC=%u -D ATTACK_KERN=%u ", device_param->device_local_mem_type, device_param->opencl_platform_vendor_id, (device_param->sm_major * 100) + (device_param->sm_minor * 10), device_param->has_add, device_param->has_addc, device_param->has_sub, device_param->has_subc, device_param->has_vadd, device_param->has_vaddc, device_param->has_vadd_co, device_param->has_vaddc_co, device_param->has_vsub, device_param->has_vsubb, device_param->has_vsub_co, device_param->has_vsubb_co, device_param->has_vperm, device_param->has_vadd3, device_param->has_vbfe, device_param->has_bfe, device_param->has_lop3, device_param->has_mov64, device_param->has_prmt, device_param->vector_width, (u32) device_param->opencl_device_type, hashconfig->dgst_pos0, hashconfig->dgst_pos1, hashconfig->dgst_pos2, hashconfig->dgst_pos3, hashconfig->dgst_size / 4, kern_type, hashconfig->attack_exec, user_options_extra->attack_kern); + build_options_len += snprintf (build_options_buf + build_options_len, build_options_sz - build_options_len, "-D LOCAL_MEM_TYPE=%d -D VENDOR_ID=%u -D CUDA_ARCH=%u -D HAS_ADD=%u -D HAS_ADDC=%u -D HAS_SUB=%u -D HAS_SUBC=%u -D HAS_VADD=%u -D HAS_VADDC=%u -D HAS_VADD_CO=%u -D HAS_VADDC_CO=%u -D HAS_VSUB=%u -D HAS_VSUBB=%u -D HAS_VSUB_CO=%u -D HAS_VSUBB_CO=%u -D HAS_VPERM=%u -D HAS_VADD3=%u -D HAS_VBFE=%u -D HAS_BFE=%u -D HAS_LOP3=%u -D HAS_MOV64=%u -D HAS_PRMT=%u -D VECT_SIZE=%d -D DEVICE_TYPE=%u -D DGST_R0=%u -D DGST_R1=%u -D DGST_R2=%u -D DGST_R3=%u -D DGST_ELEM=%u -D KERN_TYPE=%u -D ATTACK_EXEC=%u -D ATTACK_KERN=%u -D ATTACK_MODE=%u ", device_param->device_local_mem_type, device_param->opencl_platform_vendor_id, (device_param->sm_major * 100) + (device_param->sm_minor * 10), device_param->has_add, device_param->has_addc, device_param->has_sub, device_param->has_subc, device_param->has_vadd, device_param->has_vaddc, device_param->has_vadd_co, device_param->has_vaddc_co, device_param->has_vsub, device_param->has_vsubb, device_param->has_vsub_co, device_param->has_vsubb_co, device_param->has_vperm, device_param->has_vadd3, device_param->has_vbfe, device_param->has_bfe, device_param->has_lop3, device_param->has_mov64, device_param->has_prmt, device_param->vector_width, (u32) device_param->opencl_device_type, hashconfig->dgst_pos0, hashconfig->dgst_pos1, hashconfig->dgst_pos2, hashconfig->dgst_pos3, hashconfig->dgst_size / 4, kern_type, hashconfig->attack_exec, user_options_extra->attack_kern, user_options->attack_mode); #else - build_options_len += snprintf (build_options_buf + build_options_len, build_options_sz - build_options_len, "-D LOCAL_MEM_TYPE=%d -D VENDOR_ID=%u -D CUDA_ARCH=%u -D HAS_ADD=%u -D HAS_ADDC=%u -D HAS_SUB=%u -D HAS_SUBC=%u -D HAS_VADD=%u -D HAS_VADDC=%u -D HAS_VADD_CO=%u -D HAS_VADDC_CO=%u -D HAS_VSUB=%u -D HAS_VSUBB=%u -D HAS_VSUB_CO=%u -D HAS_VSUBB_CO=%u -D HAS_VPERM=%u -D HAS_VADD3=%u -D HAS_VBFE=%u -D HAS_BFE=%u -D HAS_LOP3=%u -D HAS_MOV64=%u -D HAS_PRMT=%u -D VECT_SIZE=%d -D DEVICE_TYPE=%u -D DGST_R0=%u -D DGST_R1=%u -D DGST_R2=%u -D DGST_R3=%u -D DGST_ELEM=%u -D KERN_TYPE=%u -D ATTACK_EXEC=%u -D ATTACK_KERN=%u -w ", device_param->device_local_mem_type, device_param->opencl_platform_vendor_id, (device_param->sm_major * 100) + (device_param->sm_minor * 10), device_param->has_add, device_param->has_addc, device_param->has_sub, device_param->has_subc, device_param->has_vadd, device_param->has_vaddc, device_param->has_vadd_co, device_param->has_vaddc_co, device_param->has_vsub, device_param->has_vsubb, device_param->has_vsub_co, device_param->has_vsubb_co, device_param->has_vperm, device_param->has_vadd3, device_param->has_vbfe, device_param->has_bfe, device_param->has_lop3, device_param->has_mov64, device_param->has_prmt, device_param->vector_width, (u32) device_param->opencl_device_type, hashconfig->dgst_pos0, hashconfig->dgst_pos1, hashconfig->dgst_pos2, hashconfig->dgst_pos3, hashconfig->dgst_size / 4, kern_type, hashconfig->attack_exec, user_options_extra->attack_kern); + build_options_len += snprintf (build_options_buf + build_options_len, build_options_sz - build_options_len, "-D LOCAL_MEM_TYPE=%d -D VENDOR_ID=%u -D CUDA_ARCH=%u -D HAS_ADD=%u -D HAS_ADDC=%u -D HAS_SUB=%u -D HAS_SUBC=%u -D HAS_VADD=%u -D HAS_VADDC=%u -D HAS_VADD_CO=%u -D HAS_VADDC_CO=%u -D HAS_VSUB=%u -D HAS_VSUBB=%u -D HAS_VSUB_CO=%u -D HAS_VSUBB_CO=%u -D HAS_VPERM=%u -D HAS_VADD3=%u -D HAS_VBFE=%u -D HAS_BFE=%u -D HAS_LOP3=%u -D HAS_MOV64=%u -D HAS_PRMT=%u -D VECT_SIZE=%d -D DEVICE_TYPE=%u -D DGST_R0=%u -D DGST_R1=%u -D DGST_R2=%u -D DGST_R3=%u -D DGST_ELEM=%u -D KERN_TYPE=%u -D ATTACK_EXEC=%u -D ATTACK_KERN=%u -D ATTACK_MODE=%u -w ", device_param->device_local_mem_type, device_param->opencl_platform_vendor_id, (device_param->sm_major * 100) + (device_param->sm_minor * 10), device_param->has_add, device_param->has_addc, device_param->has_sub, device_param->has_subc, device_param->has_vadd, device_param->has_vaddc, device_param->has_vadd_co, device_param->has_vaddc_co, device_param->has_vsub, device_param->has_vsubb, device_param->has_vsub_co, device_param->has_vsubb_co, device_param->has_vperm, device_param->has_vadd3, device_param->has_vbfe, device_param->has_bfe, device_param->has_lop3, device_param->has_mov64, device_param->has_prmt, device_param->vector_width, (u32) device_param->opencl_device_type, hashconfig->dgst_pos0, hashconfig->dgst_pos1, hashconfig->dgst_pos2, hashconfig->dgst_pos3, hashconfig->dgst_size / 4, kern_type, hashconfig->attack_exec, user_options_extra->attack_kern, user_options->attack_mode); #endif build_options_buf[build_options_len] = 0; @@ -8043,7 +8457,12 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) char *device_name_chksum = (char *) hcmalloc (HCBUFSIZ_TINY); char *device_name_chksum_amp_mp = (char *) hcmalloc (HCBUFSIZ_TINY); - const size_t dnclen = snprintf (device_name_chksum, HCBUFSIZ_TINY, "%d-%d-%d-%u-%s-%s-%s-%d-%u", + // The kernel source can depend on some JiT compiler macros which themself depend on the attack_modes. + // ATM this is relevant only for ATTACK_MODE_ASSOCIATION which slightly modifies ATTACK_MODE_STRAIGHT kernels. + + const u32 extra_value = (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) ? ATTACK_MODE_ASSOCIATION : ATTACK_MODE_NONE; + + const size_t dnclen = snprintf (device_name_chksum, HCBUFSIZ_TINY, "%d-%d-%d-%u-%s-%s-%s-%d-%u-%u", backend_ctx->comptime, backend_ctx->cuda_driver_version, device_param->is_opencl, @@ -8052,7 +8471,8 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) device_param->opencl_device_version, device_param->opencl_driver_version, device_param->vector_width, - hashconfig->kern_type); + hashconfig->kern_type, + extra_value); const size_t dnclen_amp_mp = snprintf (device_name_chksum_amp_mp, HCBUFSIZ_TINY, "%d-%d-%d-%u-%s-%s-%s", backend_ctx->comptime, @@ -8308,7 +8728,7 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else { - if (user_options->attack_mode != ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode != ATTACK_MODE_STRAIGHT) && (user_options->attack_mode != ATTACK_MODE_ASSOCIATION)) { /** * kernel mp source filename @@ -8656,7 +9076,8 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) device_param->kernel_params_buf32[31] = 0; // digests_cnt device_param->kernel_params_buf32[32] = 0; // digests_offset device_param->kernel_params_buf32[33] = 0; // combs_mode - device_param->kernel_params_buf64[34] = 0; // gid_max + device_param->kernel_params_buf64[34] = 0; // pws_pos + device_param->kernel_params_buf64[35] = 0; // gid_max if (device_param->is_cuda == true) { @@ -8725,6 +9146,7 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) device_param->kernel_params[32] = &device_param->kernel_params_buf32[32]; device_param->kernel_params[33] = &device_param->kernel_params_buf32[33]; device_param->kernel_params[34] = &device_param->kernel_params_buf64[34]; + device_param->kernel_params[35] = &device_param->kernel_params_buf64[35]; if (user_options->slow_candidates == true) { @@ -10069,7 +10491,7 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // this is required because inside the kernels there is this: // __local pw_t s_pws[64]; - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { if (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) { @@ -10088,11 +10510,20 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) * now everything that depends on threads and accel, basically dynamic workload */ - const u32 kernel_threads = get_kernel_threads (device_param); + u32 kernel_threads = get_kernel_threads (device_param); + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + // the smaller the kernel_threads the more accurate we can set kernel_accel + // in autotune. in this attack mode kernel_power is limited by salts_cnt so we + // do not have a lot of options left. + + kernel_threads = MIN (kernel_threads, 64); + } device_param->kernel_threads = kernel_threads; - device_param->hardware_power = device_processors * kernel_threads; + device_param->hardware_power = ((hashconfig->opts_type & OPTS_TYPE_MP_MULTI_DISABLE) ? 1 : device_processors) * kernel_threads; u32 kernel_accel_min = device_param->kernel_accel_min; u32 kernel_accel_max = device_param->kernel_accel_max; @@ -10134,16 +10565,6 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) const u64 PWS_SPACE = 1024ULL * 1024ULL * 1024ULL; - // sometimes device_available_mem and device_maxmem_alloc reported back from the opencl runtime are a bit inaccurate. - // let's add some extra space just to be sure. - - //const u64 EXTRA_SPACE = 64ULL * 1024ULL * 1024ULL; - - // it seems the returned values to device_available_mem are inaccurate - // we need more room - - const u64 EXTRA_SPACE = device_param->device_maxmem_alloc / 4; - while (kernel_accel_max >= kernel_accel_min) { const u64 kernel_power_max = device_param->hardware_power * kernel_accel_max; @@ -10195,6 +10616,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) if (size_pws > PWS_SPACE) memory_limit_hit = 1; + // sometimes device_available_mem and device_maxmem_alloc reported back from the opencl runtime are a bit inaccurate. + // let's add some extra space just to be sure. + // now depends on the kernel-accel value (where scrypt and similar benefits), but also hard minimum 64mb and maximum 1024mb limit + + u64 EXTRA_SPACE = (1024ULL * 1024ULL) * kernel_accel_max; + + EXTRA_SPACE = MAX (EXTRA_SPACE, ( 64ULL * 1024ULL * 1024ULL)); + EXTRA_SPACE = MIN (EXTRA_SPACE, (1024ULL * 1024ULL * 1024ULL)); + if ((size_pws + EXTRA_SPACE) > device_param->device_maxmem_alloc) memory_limit_hit = 1; if ((size_tmps + EXTRA_SPACE) > device_param->device_maxmem_alloc) memory_limit_hit = 1; if ((size_hooks + EXTRA_SPACE) > device_param->device_maxmem_alloc) memory_limit_hit = 1; @@ -10264,6 +10694,26 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) return -1; } + // similar process for association attack + // there's no need to have a device_power > salts_cnt since salt_pos is set to GID in kernel + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + while (kernel_accel_max > kernel_accel_min) + { + const u64 kernel_power_max = device_param->hardware_power * kernel_accel_max; + + if (kernel_power_max > hashes->salts_cnt) + { + kernel_accel_max--; + + continue; + } + + break; + } + } + device_param->kernel_accel_min = kernel_accel_min; device_param->kernel_accel_max = kernel_accel_max; diff --git a/src/bitmap.c b/src/bitmap.c index d2184acf0..f161d3027 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -79,7 +79,7 @@ int bitmap_ctx_init (hashcat_ctx_t *hashcat_ctx) bitmap_ctx->enabled = false; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/brain.c b/src/brain.c index ed0fad804..1243d936a 100644 --- a/src/brain.c +++ b/src/brain.c @@ -522,6 +522,46 @@ u32 brain_compute_attack (hashcat_ctx_t *hashcat_ctx) XXH64_update (state, rule_buf_r, strlen (rule_buf_r)); } } + else if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + if (straight_ctx->dict) + { + const u64 wordlist_hash = brain_compute_attack_wordlist (straight_ctx->dict); + + XXH64_update (state, &wordlist_hash, sizeof (wordlist_hash)); + } + + const int hex_wordlist = user_options->hex_wordlist; + + XXH64_update (state, &hex_wordlist, sizeof (hex_wordlist)); + + const int wordlist_autohex_disable = user_options->wordlist_autohex_disable; + + XXH64_update (state, &wordlist_autohex_disable, sizeof (wordlist_autohex_disable)); + + if (user_options->encoding_from) + { + const char *encoding_from = user_options->encoding_from; + + XXH64_update (state, encoding_from, strlen (encoding_from)); + } + + if (user_options->encoding_to) + { + const char *encoding_to = user_options->encoding_to; + + XXH64_update (state, encoding_to, strlen (encoding_to)); + } + + if (user_options->rule_buf_l) + { + const char *rule_buf_l = user_options->rule_buf_l; + + XXH64_update (state, rule_buf_l, strlen (rule_buf_l)); + } + + XXH64_update (state, straight_ctx->kernel_rules_buf, straight_ctx->kernel_rules_cnt * sizeof (kernel_rule_t)); + } const u32 brain_attack = (const u32) XXH64_digest (state); diff --git a/src/combinator.c b/src/combinator.c index bb4efb322..b695d7fff 100644 --- a/src/combinator.c +++ b/src/combinator.c @@ -19,7 +19,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) combinator_ctx->enabled = false; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->show == true) return 0; diff --git a/src/cpt.c b/src/cpt.c index 72db45415..dc40d612c 100644 --- a/src/cpt.c +++ b/src/cpt.c @@ -15,7 +15,7 @@ int cpt_ctx_init (hashcat_ctx_t *hashcat_ctx) cpt_ctx->enabled = false; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/debugfile.c b/src/debugfile.c index a6ffd3826..041b46f28 100644 --- a/src/debugfile.c +++ b/src/debugfile.c @@ -87,7 +87,7 @@ int debugfile_init (hashcat_ctx_t *hashcat_ctx) debugfile_ctx->enabled = false; if (user_options->benchmark == true) return 0; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/dictstat.c b/src/dictstat.c index 03736e74b..66d49ccce 100644 --- a/src/dictstat.c +++ b/src/dictstat.c @@ -57,7 +57,7 @@ int dictstat_init (hashcat_ctx_t *hashcat_ctx) dictstat_ctx->enabled = false; if (user_options->benchmark == true) return 0; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/dispatch.c b/src/dispatch.c index 428be4371..95becf6bc 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -298,7 +298,7 @@ static int calc_stdin (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par return -1; } - if (run_cracker (hashcat_ctx, device_param, device_param->pws_cnt) == -1) + if (run_cracker (hashcat_ctx, device_param, -1, device_param->pws_cnt) == -1) // no pws_pos? { hcfree (buf); @@ -650,7 +650,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) return -1; } - if (run_cracker (hashcat_ctx, device_param, pws_cnt) == -1) + if (run_cracker (hashcat_ctx, device_param, -1, pws_cnt) == -1) { hc_fclose (&extra_info_straight.fp); @@ -963,7 +963,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) return -1; } - if (run_cracker (hashcat_ctx, device_param, pws_cnt) == -1) + if (run_cracker (hashcat_ctx, device_param, -1, pws_cnt) == -1) { hc_fclose (&extra_info_combi.base_fp); hc_fclose (&extra_info_combi.combs_fp); @@ -1202,7 +1202,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) if (pws_cnt) { if (run_copy (hashcat_ctx, device_param, pws_cnt) == -1) return -1; - if (run_cracker (hashcat_ctx, device_param, pws_cnt) == -1) return -1; + if (run_cracker (hashcat_ctx, device_param, -1, pws_cnt) == -1) return -1; #ifdef WITH_BRAIN if (user_options->brain_client == true) @@ -1274,7 +1274,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) device_param->pws_cnt = work; if (run_copy (hashcat_ctx, device_param, device_param->pws_cnt) == -1) return -1; - if (run_cracker (hashcat_ctx, device_param, device_param->pws_cnt) == -1) return -1; + if (run_cracker (hashcat_ctx, device_param, -1, device_param->pws_cnt) == -1) return -1; device_param->pws_cnt = 0; @@ -1479,7 +1479,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) return -1; } - if (run_cracker (hashcat_ctx, device_param, pws_cnt) == -1) + if (run_cracker (hashcat_ctx, device_param, device_param->words_off, pws_cnt) == -1) { if (attack_mode == ATTACK_MODE_COMBI) hc_fclose (&device_param->combs_fp); diff --git a/src/filehandling.c b/src/filehandling.c index b9fe2c6cc..43256943e 100644 --- a/src/filehandling.c +++ b/src/filehandling.c @@ -74,7 +74,7 @@ bool hc_fopen (HCFILE *fp, const char *path, char *mode) if (read (fd_tmp, check, sizeof (check)) > 0) { - if (check[0] == 0x1f && check[1] == 0x8b && check[2] == 0x08 && check[3] == 0x08) fp->is_gzip = true; + if (check[0] == 0x1f && check[1] == 0x8b && check[2] == 0x08) fp->is_gzip = true; if (check[0] == 0x50 && check[1] == 0x4b && check[2] == 0x03 && check[3] == 0x04) fp->is_zip = true; } diff --git a/src/hashes.c b/src/hashes.c index 240c2496a..e3935aae4 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -56,6 +56,10 @@ int sort_by_salt (const void *v1, const void *v2) const salt_t *s1 = (const salt_t *) v1; const salt_t *s2 = (const salt_t *) v2; + const int res_pos = (int) s1->orig_pos - (int) s2->orig_pos; + + if (res_pos != 0) return (res_pos); + const int res1 = (int) s1->salt_len - (int) s2->salt_len; if (res1 != 0) return (res1); @@ -465,7 +469,8 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl } } -int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 salt_pos) +//int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 salt_pos) +int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) { cpt_ctx_t *cpt_ctx = hashcat_ctx->cpt_ctx; hashconfig_t *hashconfig = hashcat_ctx->hashconfig; @@ -473,8 +478,6 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, status_ctx_t *status_ctx = hashcat_ctx->status_ctx; user_options_t *user_options = hashcat_ctx->user_options; - salt_t *salt_buf = &hashes->salts_buf[salt_pos]; - u32 num_cracked = 0; int CU_rc; @@ -538,6 +541,10 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cpt_cracked++; + const u32 salt_pos = cracked[i].salt_pos; + + salt_t *salt_buf = &hashes->salts_buf[salt_pos]; + salt_buf->digests_done++; if (salt_buf->digests_done == salt_buf->digests_cnt) @@ -546,6 +553,26 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hashes->salts_done++; } + + // we need to reset cracked state on the device + // otherwise host thinks again and again the hash was cracked + // and returns invalid password each time + + memset (hashes->digests_shown_tmp, 0, salt_buf->digests_cnt * sizeof (u32)); + + if (device_param->is_cuda == true) + { + CU_rc = hc_cuMemcpyHtoD (hashcat_ctx, device_param->cuda_d_digests_shown + (salt_buf->digests_offset * sizeof (u32)), &hashes->digests_shown_tmp[salt_buf->digests_offset], salt_buf->digests_cnt * sizeof (u32)); + + if (CU_rc == -1) return -1; + } + + if (device_param->is_opencl == true) + { + CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_digests_shown, CL_TRUE, salt_buf->digests_offset * sizeof (u32), salt_buf->digests_cnt * sizeof (u32), &hashes->digests_shown_tmp[salt_buf->digests_offset], 0, NULL, NULL); + + if (CL_rc == -1) return -1; + } } if (hashes->salts_done == hashes->salts_cnt) mycracked (hashcat_ctx); @@ -573,29 +600,6 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hc_thread_mutex_unlock (status_ctx->mux_display); } - if (hashconfig->opts_type & OPTS_TYPE_PT_NEVERCRACK) - { - // we need to reset cracked state on the device - // otherwise host thinks again and again the hash was cracked - // and returns invalid password each time - - memset (hashes->digests_shown_tmp, 0, salt_buf->digests_cnt * sizeof (u32)); - - if (device_param->is_cuda == true) - { - CU_rc = hc_cuMemcpyHtoD (hashcat_ctx, device_param->cuda_d_digests_shown + (salt_buf->digests_offset * sizeof (u32)), &hashes->digests_shown_tmp[salt_buf->digests_offset], salt_buf->digests_cnt * sizeof (u32)); - - if (CU_rc == -1) return -1; - } - - if (device_param->is_opencl == true) - { - CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_digests_shown, CL_TRUE, salt_buf->digests_offset * sizeof (u32), salt_buf->digests_cnt * sizeof (u32), &hashes->digests_shown_tmp[salt_buf->digests_offset], 0, NULL, NULL); - - if (CL_rc == -1) return -1; - } - } - num_cracked = 0; if (device_param->is_cuda == true) @@ -629,18 +633,33 @@ int hashes_init_filename (hashcat_ctx_t *hashcat_ctx) if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE) { - hashes->hashlist_mode = HL_MODE_FILE_BINARY; - - if ((user_options->benchmark == false) && (user_options->keyspace == false)) + if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE_OPTIONAL) { - if (hc_path_read (user_options_extra->hc_hash) == false) + if ((user_options->benchmark == false) && (user_options->keyspace == false)) { - event_log_error (hashcat_ctx, "%s: %s", user_options_extra->hc_hash, strerror (errno)); + hashes->hashlist_mode = (hc_path_exist (user_options_extra->hc_hash) == true) ? HL_MODE_FILE_PLAIN : HL_MODE_ARG; - return -1; + if (hashes->hashlist_mode == HL_MODE_FILE_PLAIN) + { + hashes->hashfile = user_options_extra->hc_hash; + } } + } + else + { + hashes->hashlist_mode = HL_MODE_FILE_BINARY; - hashes->hashfile = user_options_extra->hc_hash; + if ((user_options->benchmark == false) && (user_options->keyspace == false)) + { + if (hc_path_read (user_options_extra->hc_hash) == false) + { + event_log_error (hashcat_ctx, "%s: %s", user_options_extra->hc_hash, strerror (errno)); + + return -1; + } + + hashes->hashfile = user_options_extra->hc_hash; + } } } else @@ -817,6 +836,23 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) { salts_buf = (salt_t *) hccalloc (hashes_avail, sizeof (salt_t)); + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + // this disables: + // - sorting by salt value + // - grouping by salt value + // - keep the salt in position relative to hashfile (not equal because of some hashes maybe failed to load) + + u64 hash_pos; + + for (hash_pos = 0; hash_pos < hashes_avail; hash_pos++) + { + salt_t *salt = &salts_buf[hash_pos]; + + salt->orig_pos = hash_pos; + } + } + if (hashconfig->esalt_size > 0) { esalts_buf = hccalloc (hashes_avail, hashconfig->esalt_size); @@ -880,7 +916,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) hashes_cnt = 1; } - else if (user_options->example_hashes == true) + else if (user_options->hash_info == true) { } else if (user_options->keyspace == true) @@ -1116,7 +1152,11 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) if (hashconfig->is_salted == true) { + const u32 orig_pos = hashes_buf[hashes_cnt].salt->orig_pos; + memset (hashes_buf[hashes_cnt].salt, 0, sizeof (salt_t)); + + hashes_buf[hashes_cnt].salt->orig_pos = orig_pos; } if (hashconfig->esalt_size > 0) @@ -1147,7 +1187,17 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) compress_terminal_line_length (tmp_line_buf, 38, 32); - event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, tmp_line_buf, strparser (parser_status)); + if (user_options->machine_readable == true) { + event_log_warning(hashcat_ctx, "%s:%u:%s:%s", hashes->hashfile, + line_num, tmp_line_buf, + strparser(parser_status)); + + } else { + event_log_warning(hashcat_ctx, + "Hashfile '%s' on line %u (%s): %s", + hashes->hashfile, line_num, tmp_line_buf, + strparser(parser_status)); + } hcfree (tmp_line_buf); @@ -1171,7 +1221,17 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) compress_terminal_line_length (tmp_line_buf, 38, 32); - event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, tmp_line_buf, strparser (parser_status)); + if (user_options->machine_readable == true) { + event_log_warning(hashcat_ctx, "%s:%u:%s:%s", hashes->hashfile, + line_num, tmp_line_buf, + strparser(parser_status)); + + } else { + event_log_warning(hashcat_ctx, + "Hashfile '%s' on line %u (%s): %s", + hashes->hashfile, line_num, tmp_line_buf, + strparser(parser_status)); + } hcfree (tmp_line_buf); @@ -1197,7 +1257,17 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) compress_terminal_line_length (tmp_line_buf, 38, 32); - event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, tmp_line_buf, strparser (parser_status)); + if (user_options->machine_readable == true) { + event_log_warning(hashcat_ctx, "%s:%u:%s:%s", hashes->hashfile, + line_num, tmp_line_buf, + strparser(parser_status)); + + } else { + event_log_warning(hashcat_ctx, + "Hashfile '%s' on line %u (%s): %s", + hashes->hashfile, line_num, tmp_line_buf, + strparser(parser_status)); + } hcfree (tmp_line_buf); @@ -1224,7 +1294,17 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) compress_terminal_line_length (tmp_line_buf, 38, 32); - event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, tmp_line_buf, strparser (parser_status)); + if (user_options->machine_readable == true) { + event_log_warning(hashcat_ctx, "%s:%u:%s:%s", hashes->hashfile, + line_num, tmp_line_buf, + strparser(parser_status)); + + } else { + event_log_warning(hashcat_ctx, + "Hashfile '%s' on line %u (%s): %s", + hashes->hashfile, line_num, tmp_line_buf, + strparser(parser_status)); + } hcfree (tmp_line_buf); @@ -1715,6 +1795,23 @@ int hashes_init_stage4 (hashcat_ctx_t *hashcat_ctx) } } + // test iteration count in association attack + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + salt_t *salts_buf = hashes->salts_buf; + + for (u32 salt_idx = 1; salt_idx < hashes->salts_cnt; salt_idx++) + { + if (salts_buf[salt_idx - 1].salt_iter != salts_buf[salt_idx].salt_iter) + { + event_log_error (hashcat_ctx, "Mixed iteration counts are not supported in association attack-mode."); + + return -1; + } + } + } + // time to update extra_tmp_size which is tmp_size value based on hash configuration if (module_ctx->module_extra_tmp_size != MODULE_DEFAULT) @@ -1816,30 +1913,37 @@ int hashes_init_selftest (hashcat_ctx_t *hashcat_ctx) { if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE) { - char *tmpfile_bin; - - hc_asprintf (&tmpfile_bin, "%s/selftest.hash", folder_config->session_dir); - - HCFILE fp; - - hc_fopen (&fp, tmpfile_bin, "wb"); - - const size_t st_hash_len = strlen (hashconfig->st_hash); - - for (size_t i = 0; i < st_hash_len; i += 2) + if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE_OPTIONAL) { - const u8 c = hex_to_u8 ((const u8 *) hashconfig->st_hash + i); - - hc_fputc (c, &fp); + parser_status = module_ctx->module_hash_decode (hashconfig, hash.digest, hash.salt, hash.esalt, hash.hook_salt, hash.hash_info, hashconfig->st_hash, strlen (hashconfig->st_hash)); } + else + { + char *tmpfile_bin; - hc_fclose (&fp); + hc_asprintf (&tmpfile_bin, "%s/selftest.hash", folder_config->session_dir); - parser_status = module_ctx->module_hash_decode (hashconfig, hash.digest, hash.salt, hash.esalt, hash.hook_salt, hash.hash_info, tmpfile_bin, strlen (tmpfile_bin)); + HCFILE fp; - unlink (tmpfile_bin); + hc_fopen (&fp, tmpfile_bin, "wb"); - hcfree (tmpfile_bin); + const size_t st_hash_len = strlen (hashconfig->st_hash); + + for (size_t i = 0; i < st_hash_len; i += 2) + { + const u8 c = hex_to_u8 ((const u8 *) hashconfig->st_hash + i); + + hc_fputc (c, &fp); + } + + hc_fclose (&fp); + + parser_status = module_ctx->module_hash_decode (hashconfig, hash.digest, hash.salt, hash.esalt, hash.hook_salt, hash.hash_info, tmpfile_bin, strlen (tmpfile_bin)); + + unlink (tmpfile_bin); + + hcfree (tmpfile_bin); + } } else { diff --git a/src/hwmon.c b/src/hwmon.c index a2de81bc9..824aa767b 100644 --- a/src/hwmon.c +++ b/src/hwmon.c @@ -2225,7 +2225,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) return 0; #endif // WITH_HWMON - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/induct.c b/src/induct.c index 46dc26eb2..b11befb79 100644 --- a/src/induct.c +++ b/src/induct.c @@ -40,7 +40,7 @@ int induct_ctx_init (hashcat_ctx_t *hashcat_ctx) induct_ctx->enabled = false; if (user_options->benchmark == true) return 0; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; @@ -51,7 +51,8 @@ int induct_ctx_init (hashcat_ctx_t *hashcat_ctx) if (user_options->usage == true) return 0; if (user_options->version == true) return 0; - if (user_options->attack_mode != ATTACK_MODE_STRAIGHT) return 0; + if ((user_options->attack_mode != ATTACK_MODE_STRAIGHT) + && (user_options->attack_mode != ATTACK_MODE_ASSOCIATION)) return 0; induct_ctx->enabled = true; diff --git a/src/interface.c b/src/interface.c index 64995a90b..c49f30610 100644 --- a/src/interface.c +++ b/src/interface.c @@ -333,7 +333,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) hashconfig->has_optimized_kernel = hc_path_read (source_file); - if (user_options->example_hashes == false) + if (user_options->hash_info == false) { if (user_options->optimized_kernel_enable == true) { @@ -342,7 +342,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) if (user_options->quiet == false) { event_log_warning (hashcat_ctx, "Kernel %s:", source_file); - event_log_warning (hashcat_ctx, "Optimized kernel requested but not needed - falling back to pure kernel"); + event_log_warning (hashcat_ctx, "Optimized kernel requested but not available or not required - falling back to pure kernel"); event_log_warning (hashcat_ctx, NULL); } } diff --git a/src/loopback.c b/src/loopback.c index 2568971d7..694ef1a87 100644 --- a/src/loopback.c +++ b/src/loopback.c @@ -61,7 +61,7 @@ int loopback_init (hashcat_ctx_t *hashcat_ctx) loopback_ctx->enabled = false; if (user_options->benchmark == true) return 0; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/main.c b/src/main.c index 83300493d..86aa4749c 100644 --- a/src/main.c +++ b/src/main.c @@ -184,16 +184,19 @@ static void main_outerloop_starting (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MA status_ctx->shutdown_outer = false; - if ((user_options->example_hashes == false) && (user_options->keyspace == false) && (user_options->stdout_flag == false) && (user_options->backend_info == false) && (user_options->speed_only == false)) + if (user_options->hash_info == true) return; + if (user_options->keyspace == true) return; + if (user_options->stdout_flag == true) return; + if (user_options->backend_info == true) return; + if (user_options->speed_only == true) return; + + if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) { - if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) - { - // see thread_keypress() how to access status information + // see thread_keypress() how to access status information - hc_thread_create (hashcat_user->outer_threads[hashcat_user->outer_threads_cnt], thread_keypress, hashcat_ctx); + hc_thread_create (hashcat_user->outer_threads[hashcat_user->outer_threads_cnt], thread_keypress, hashcat_ctx); - hashcat_user->outer_threads_cnt++; - } + hashcat_user->outer_threads_cnt++; } } @@ -257,7 +260,7 @@ static void main_cracker_finished (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYB const user_options_t *user_options = hashcat_ctx->user_options; const user_options_extra_t *user_options_extra = hashcat_ctx->user_options_extra; - if (user_options->example_hashes == true) return; + if (user_options->hash_info == true) return; if (user_options->keyspace == true) return; if (user_options->backend_info == true) return; if (user_options->stdout_flag == true) return; @@ -464,7 +467,7 @@ static void main_outerloop_mainscreen (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, event_log_info (hashcat_ctx, "Hashes: %u digests; %u unique digests, %u unique salts", hashes->hashes_cnt_orig, hashes->digests_cnt, hashes->salts_cnt); event_log_info (hashcat_ctx, "Bitmaps: %u bits, %u entries, 0x%08x mask, %u bytes, %u/%u rotates", bitmap_ctx->bitmap_bits, bitmap_ctx->bitmap_nums, bitmap_ctx->bitmap_mask, bitmap_ctx->bitmap_size, bitmap_ctx->bitmap_shift1, bitmap_ctx->bitmap_shift2); - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { event_log_info (hashcat_ctx, "Rules: %u", straight_ctx->kernel_rules_cnt); } @@ -1157,9 +1160,9 @@ int main (int argc, char **argv) rc_final = 0; } - else if (user_options->example_hashes == true) + else if (user_options->hash_info == true) { - example_hashes (hashcat_ctx); + hash_info (hashcat_ctx); rc_final = 0; } diff --git a/src/modules/module_02500.c b/src/modules/module_02500.c index 7ad0db1dd..b46ffc4f1 100644 --- a/src/modules/module_02500.c +++ b/src/modules/module_02500.c @@ -579,6 +579,7 @@ bool module_potfile_custom_check (MAYBE_UNUSED const hashconfig_t *hashconfig, M 1, // digests_cnt 0, // digests_offset 0, // combs_mode + 0, // pws_pos 1 // gid_max ); diff --git a/src/modules/module_02501.c b/src/modules/module_02501.c index e320a90d9..80d41ebba 100644 --- a/src/modules/module_02501.c +++ b/src/modules/module_02501.c @@ -554,6 +554,7 @@ bool module_potfile_custom_check (MAYBE_UNUSED const hashconfig_t *hashconfig, M 1, // digests_cnt 0, // digests_offset 0, // combs_mode + 0, // pws_pos 1 // gid_max ); diff --git a/src/modules/module_16800.c b/src/modules/module_16800.c index e03680530..15c0e343f 100644 --- a/src/modules/module_16800.c +++ b/src/modules/module_16800.c @@ -290,6 +290,7 @@ bool module_potfile_custom_check (MAYBE_UNUSED const hashconfig_t *hashconfig, M 1, // digests_cnt 0, // digests_offset 0, // combs_mode + 0, // pws_pos 1 // gid_max ); diff --git a/src/modules/module_16801.c b/src/modules/module_16801.c index 154585a04..3324fa005 100644 --- a/src/modules/module_16801.c +++ b/src/modules/module_16801.c @@ -312,6 +312,7 @@ bool module_potfile_custom_check (MAYBE_UNUSED const hashconfig_t *hashconfig, M 1, // digests_cnt 0, // digests_offset 0, // combs_mode + 0, // pws_pos 1 // gid_max ); diff --git a/src/modules/module_22000.c b/src/modules/module_22000.c index 534b29e97..996f6eda5 100644 --- a/src/modules/module_22000.c +++ b/src/modules/module_22000.c @@ -35,6 +35,7 @@ static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_AUX3 | OPTS_TYPE_AUX4 | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_BINARY_HASHFILE_OPTIONAL | OPTS_TYPE_DEEP_COMP_KERNEL | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; @@ -599,6 +600,7 @@ bool module_potfile_custom_check (MAYBE_UNUSED const hashconfig_t *hashconfig, M 1, // digests_cnt 0, // digests_offset 0, // combs_mode + 0, // pws_pos 1 // gid_max ); diff --git a/src/modules/module_22001.c b/src/modules/module_22001.c index 47b726b09..5b8737c3d 100644 --- a/src/modules/module_22001.c +++ b/src/modules/module_22001.c @@ -35,6 +35,7 @@ static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_AUX3 | OPTS_TYPE_AUX4 | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_BINARY_HASHFILE_OPTIONAL | OPTS_TYPE_DEEP_COMP_KERNEL | OPTS_TYPE_COPY_TMPS | OPTS_TYPE_POTFILE_NOPASS; @@ -600,6 +601,7 @@ bool module_potfile_custom_check (MAYBE_UNUSED const hashconfig_t *hashconfig, M 1, // digests_cnt 0, // digests_offset 0, // combs_mode + 0, // pws_pos 1 // gid_max ); diff --git a/src/modules/module_22600.c b/src/modules/module_22600.c index a9005381d..cff245991 100644 --- a/src/modules/module_22600.c +++ b/src/modules/module_22600.c @@ -17,7 +17,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_4; static const u32 HASH_CATEGORY = HASH_CATEGORY_NETWORK_PROTOCOL; -static const char *HASH_NAME = "Telegram Desktop App Passcode (PBKDF2-HMAC-SHA1)"; +static const char *HASH_NAME = "Telegram Desktop < v2.1.14 (PBKDF2-HMAC-SHA1)"; static const u64 KERN_TYPE = 22600; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; diff --git a/src/modules/module_24100.c b/src/modules/module_24100.c new file mode 100644 index 000000000..cd9b4d9c9 --- /dev/null +++ b/src/modules/module_24100.c @@ -0,0 +1,350 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_5; +static const u32 HASH_CATEGORY = HASH_CATEGORY_DATABASE_SERVER; +static const char *HASH_NAME = "MongoDB ServerKey SCRAM-SHA-1"; +static const u64 KERN_TYPE = 24100; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_ST_BASE64; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "$mongodb-scram$*0*dXNlcg==*10000*4p+f1tKpK18hQqrVr0UGOw==*Jv9lrpUQ2bVg2ZkXvRm2rppsqNw="; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +typedef struct mongodb_sha1_tmp +{ + u32 ipad[5]; + u32 opad[5]; + + u32 dgst[5]; + u32 out[5]; + +} mongodb_sha1_tmp_t; + +typedef struct mongodb_sha1 +{ + u32 salt[16]; + u32 user[16]; + + u32 user_len; + +} mongodb_sha1_t; + +static const char *SIGNATURE_MONGODB_SHA1 = "$mongodb-scram$"; + +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (mongodb_sha1_t); + + return esalt_size; +} + +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (mongodb_sha1_tmp_t); + + return tmp_size; +} + +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + // this overrides the reductions of PW_MAX in case optimized kernel is selected + // IOW, even in optimized kernel mode it support length 256 + + const u32 pw_max = PW_MAX; + + return pw_max; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + mongodb_sha1_t *mongodb_sha1 = (mongodb_sha1_t *) esalt_buf; + + token_t token; + + token.token_cnt = 6; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_MONGODB_SHA1; + + token.sep[0] = '*'; + token.len_min[0] = 15; + token.len_max[0] = 15; + token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + token.sep[1] = '*'; + token.len_min[1] = 1; + token.len_max[1] = 1; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[2] = '*'; + token.len_min[2] = 0; + token.len_max[2] = 76; // BASE64 encoded user (57 / 3 * 4) + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + token.sep[3] = '*'; + token.len_min[3] = 1; + token.len_max[3] = 7; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[4] = '*'; + token.len_min[4] = 24; + token.len_max[4] = 24; + token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + token.len[5] = 28; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + // version + + const u8 *version_pos = token.buf[1]; + + if (version_pos[0] != '0') return (PARSER_SIGNATURE_UNMATCHED); + + // user + + const u8 *user_pos = token.buf[2]; + const u32 user_len = token.len[2]; + + u8 tmp_buf[100] = { 0 }; + + int tmp_len = base64_decode (base64_to_int, user_pos, user_len, tmp_buf); + + if (tmp_len > 57) return (PARSER_SALT_LENGTH); + + memcpy ((char *) mongodb_sha1->user, tmp_buf, tmp_len); + + memcpy ((char *) mongodb_sha1->user + tmp_len, ":mongo:", 7); + + mongodb_sha1->user_len = tmp_len + 7; + + // iter + + const u8 *iter_pos = token.buf[3]; + + const u32 iter = hc_strtoul ((const char *) iter_pos, NULL, 10); + + if (iter < 1) return (PARSER_SALT_ITERATION); + + salt->salt_iter = iter - 1; + + // salt + + const u8 *salt_pos = token.buf[4]; + const int salt_len = token.len[4]; + + memset (tmp_buf, 0, sizeof (tmp_buf)); + + tmp_len = base64_decode (base64_to_int, salt_pos, salt_len, tmp_buf); + + if (tmp_len != 16) return (PARSER_SALT_LENGTH); + + memcpy (mongodb_sha1->salt, tmp_buf, tmp_len); + + mongodb_sha1->salt[0] = byte_swap_32 (mongodb_sha1->salt[0]); + mongodb_sha1->salt[1] = byte_swap_32 (mongodb_sha1->salt[1]); + mongodb_sha1->salt[2] = byte_swap_32 (mongodb_sha1->salt[2]); + mongodb_sha1->salt[3] = byte_swap_32 (mongodb_sha1->salt[3]); + + salt->salt_len = tmp_len; + + salt->salt_buf[0] = mongodb_sha1->salt[0]; + salt->salt_buf[1] = mongodb_sha1->salt[1]; + salt->salt_buf[2] = mongodb_sha1->salt[2]; + salt->salt_buf[3] = mongodb_sha1->salt[3]; + + // hash + + const u8 *hash_pos = token.buf[5]; + const int hash_len = token.len[5]; + + memset (tmp_buf, 0, sizeof (tmp_buf)); + + tmp_len = base64_decode (base64_to_int, hash_pos, hash_len, tmp_buf); + + if (tmp_len != 20) return (PARSER_HASH_LENGTH); + + memcpy (digest, tmp_buf, 20); + + digest[0] = byte_swap_32 (digest[0]); + digest[1] = byte_swap_32 (digest[1]); + digest[2] = byte_swap_32 (digest[2]); + digest[3] = byte_swap_32 (digest[3]); + digest[4] = byte_swap_32 (digest[4]); + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + u32 *digest = (u32 *) digest_buf; + + mongodb_sha1_t *mongodb_sha1 = (mongodb_sha1_t *) esalt_buf; + + // salt + + u32 salt_buf[8] = { 0 }; // make the buffer large enough for base64_encode () + + salt_buf[0] = byte_swap_32 (mongodb_sha1->salt[0]); + salt_buf[1] = byte_swap_32 (mongodb_sha1->salt[1]); + salt_buf[2] = byte_swap_32 (mongodb_sha1->salt[2]); + salt_buf[3] = byte_swap_32 (mongodb_sha1->salt[3]); + + u8 salt_base64[32] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) salt_buf, 16, salt_base64); + + // digest + + u32 hash[8] = { 0 }; // make the buffer large enough for base64_encode () + + hash[0] = byte_swap_32 (digest[0]); + hash[1] = byte_swap_32 (digest[1]); + hash[2] = byte_swap_32 (digest[2]); + hash[3] = byte_swap_32 (digest[3]); + hash[4] = byte_swap_32 (digest[4]); + + u8 dgst_base64[32] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) hash, 20, dgst_base64); + + // user + + u32 user_len = mongodb_sha1->user_len - 7; + + u8 user[100] = { 0 }; // actually: 64 - 7 (:mongo:) + + memcpy (user, (char *) mongodb_sha1->user, user_len); + + u8 user_base64[100] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) user, user_len, user_base64); + + const int line_len = snprintf (line_buf, line_size, "%s*0*%s*%u*%s*%s", + SIGNATURE_MONGODB_SHA1, + user_base64, + salt->salt_iter + 1, + salt_base64, + dgst_base64); + + return line_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = MODULE_DEFAULT; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_24200.c b/src/modules/module_24200.c new file mode 100644 index 000000000..b1da70c9a --- /dev/null +++ b/src/modules/module_24200.c @@ -0,0 +1,384 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_8; +static const u32 HASH_CATEGORY = HASH_CATEGORY_DATABASE_SERVER; +static const char *HASH_NAME = "MongoDB ServerKey SCRAM-SHA-256"; +static const u64 KERN_TYPE = 24200; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_ST_BASE64; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "$mongodb-scram$*1*dXNlcg==*15000*qYaA1K1ZZSSpWfY+yqShlcTn0XVcrNipxiYCLQ==*QWVry9aTS/JW+y5CWCBr8lcEH9Kr/D4je60ncooPer8="; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +typedef struct mongodb_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[8]; + u32 out[8]; + +} mongodb_sha256_tmp_t; + +typedef struct mongodb_sha256 +{ + u32 salt[16]; + u32 user[16]; + + u32 user_len; + +} mongodb_sha256_t; + +static const char *SIGNATURE_MONGODB_SHA256 = "$mongodb-scram$"; + +char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + char *jit_build_options = NULL; + + // Extra treatment for Apple systems + if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) + { + return jit_build_options; + } + + // NVIDIA GPU + if (device_param->opencl_device_vendor_id == VENDOR_ID_NV) + { + hc_asprintf (&jit_build_options, "-D _unroll"); + } + + // ROCM + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) + { + hc_asprintf (&jit_build_options, "-D _unroll"); + } + + return jit_build_options; +} + +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (mongodb_sha256_t); + + return esalt_size; +} + +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (mongodb_sha256_tmp_t); + + return tmp_size; +} + +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + // this overrides the reductions of PW_MAX in case optimized kernel is selected + // IOW, even in optimized kernel mode it support length 256 + + const u32 pw_max = PW_MAX; + + return pw_max; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + mongodb_sha256_t *mongodb_sha256 = (mongodb_sha256_t *) esalt_buf; + + token_t token; + + token.token_cnt = 6; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_MONGODB_SHA256; + + token.sep[0] = '*'; + token.len_min[0] = 15; + token.len_max[0] = 15; + token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + token.sep[1] = '*'; + token.len_min[1] = 1; + token.len_max[1] = 1; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[2] = '*'; + token.len_min[2] = 0; + token.len_max[2] = 88; // BASE64 encoded user (64 / 3 * 4) + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + token.sep[3] = '*'; + token.len_min[3] = 1; + token.len_max[3] = 7; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[4] = '*'; + token.len_min[4] = 40; + token.len_max[4] = 40; + token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + token.len[5] = 44; + token.attr[5] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + // version + + const u8 *version_pos = token.buf[1]; + + if (version_pos[0] != '1') return (PARSER_SIGNATURE_UNMATCHED); + + // user + + const u8 *user_pos = token.buf[2]; + const u32 user_len = token.len[2]; + + u8 tmp_buf[100] = { 0 }; + + int tmp_len = base64_decode (base64_to_int, user_pos, user_len, tmp_buf); + + if (tmp_len > 64) return (PARSER_SALT_LENGTH); + + memcpy ((char *) mongodb_sha256->user, tmp_buf, tmp_len); + + mongodb_sha256->user_len = tmp_len; + + // iter + + const u8 *iter_pos = token.buf[3]; + + const u32 iter = hc_strtoul ((const char *) iter_pos, NULL, 10); + + if (iter < 1) return (PARSER_SALT_ITERATION); + + salt->salt_iter = iter - 1; + + // salt + + const u8 *salt_pos = token.buf[4]; + const int salt_len = token.len[4]; + + tmp_len = base64_decode (base64_to_int, salt_pos, salt_len, tmp_buf); + + if (tmp_len != 28) return (PARSER_SALT_LENGTH); + + memcpy (mongodb_sha256->salt, tmp_buf, tmp_len); + + mongodb_sha256->salt[0] = byte_swap_32 (mongodb_sha256->salt[0]); + mongodb_sha256->salt[1] = byte_swap_32 (mongodb_sha256->salt[1]); + mongodb_sha256->salt[2] = byte_swap_32 (mongodb_sha256->salt[2]); + mongodb_sha256->salt[3] = byte_swap_32 (mongodb_sha256->salt[3]); + mongodb_sha256->salt[4] = byte_swap_32 (mongodb_sha256->salt[4]); + mongodb_sha256->salt[5] = byte_swap_32 (mongodb_sha256->salt[5]); + mongodb_sha256->salt[6] = byte_swap_32 (mongodb_sha256->salt[6]); + + salt->salt_len = tmp_len; + + salt->salt_buf[0] = mongodb_sha256->salt[0]; + salt->salt_buf[1] = mongodb_sha256->salt[1]; + salt->salt_buf[2] = mongodb_sha256->salt[2]; + salt->salt_buf[3] = mongodb_sha256->salt[3]; + salt->salt_buf[4] = mongodb_sha256->salt[4]; + salt->salt_buf[5] = mongodb_sha256->salt[5]; + salt->salt_buf[6] = mongodb_sha256->salt[6]; + + // hash + + const u8 *hash_pos = token.buf[5]; + const int hash_len = token.len[5]; + + memset (tmp_buf, 0, sizeof (tmp_buf)); + + tmp_len = base64_decode (base64_to_int, hash_pos, hash_len, tmp_buf); + + if (tmp_len != 32) return (PARSER_HASH_LENGTH); + + memcpy (digest, tmp_buf, 32); + + digest[0] = byte_swap_32 (digest[0]); + digest[1] = byte_swap_32 (digest[1]); + digest[2] = byte_swap_32 (digest[2]); + digest[3] = byte_swap_32 (digest[3]); + digest[4] = byte_swap_32 (digest[4]); + digest[5] = byte_swap_32 (digest[5]); + digest[6] = byte_swap_32 (digest[6]); + digest[7] = byte_swap_32 (digest[7]); + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + u32 *digest = (u32 *) digest_buf; + + mongodb_sha256_t *mongodb_sha256 = (mongodb_sha256_t *) esalt_buf; + + // salt + + u32 salt_buf[8] = { 0 }; // make the buffer large enough for base64_encode () + + salt_buf[0] = byte_swap_32 (mongodb_sha256->salt[0]); + salt_buf[1] = byte_swap_32 (mongodb_sha256->salt[1]); + salt_buf[2] = byte_swap_32 (mongodb_sha256->salt[2]); + salt_buf[3] = byte_swap_32 (mongodb_sha256->salt[3]); + salt_buf[4] = byte_swap_32 (mongodb_sha256->salt[4]); + salt_buf[5] = byte_swap_32 (mongodb_sha256->salt[5]); + salt_buf[6] = byte_swap_32 (mongodb_sha256->salt[6]); + + u8 salt_base64[64] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) salt_buf, 28, salt_base64); + + // digest + + u32 hash[8] = { 0 }; // make the buffer large enough for base64_encode () + + hash[0] = byte_swap_32 (digest[0]); + hash[1] = byte_swap_32 (digest[1]); + hash[2] = byte_swap_32 (digest[2]); + hash[3] = byte_swap_32 (digest[3]); + hash[4] = byte_swap_32 (digest[4]); + hash[5] = byte_swap_32 (digest[5]); + hash[6] = byte_swap_32 (digest[6]); + hash[7] = byte_swap_32 (digest[7]); + + u8 dgst_base64[64] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) hash, 32, dgst_base64); + + // user + + u8 user[100] = { 0 }; + + memcpy (user, (char *) mongodb_sha256->user, 64); + + u8 user_base64[100] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) user, mongodb_sha256->user_len, user_base64); + + const int line_len = snprintf (line_buf, line_size, "%s*1*%s*%u*%s*%s", + SIGNATURE_MONGODB_SHA256, + user_base64, + salt->salt_iter + 1, + salt_base64, + dgst_base64); + + return line_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = module_jit_build_options; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_24410.c b/src/modules/module_24410.c new file mode 100644 index 000000000..1a6b4274c --- /dev/null +++ b/src/modules/module_24410.c @@ -0,0 +1,363 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_4; +static const u32 HASH_CATEGORY = HASH_CATEGORY_PRIVATE_KEY; +static const char *HASH_NAME = "PKCS#8 Private Keys (PBKDF2-HMAC-SHA1 + 3DES/AES)"; +static const u64 KERN_TYPE = 24410; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_SUGGEST_KG; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "$PEM$1$4$f5662bd8383b4b40$2048$2993b585d3fb2e7b235ed13d90f637e2$1232$73984f2cba4d5e1d327a3f5a538a946099976ab865349091a452a838dc6855b6e539f920a078b14d949d8c739ea7ce26769dc0ba1619a9c0ee1864d1cfca9e61ddf6d9582439f2b65d00a3ff57c78d3176e9e88fc12da7acd421b624ba76f3d5f12926a3a9acd82f502d7638cfe2063fb2c773a56299ae1ec2c85641d33f5f8b3edfc6687fa9898325d384b3db7a7686704facb880c3898f69dd353a5d5d136b58a1e00e4711d3a01e0c632a5f3d5eff64c9e88166296b9b26f072a52bdc4893377e247b5cdb052f34e0b5d4de10a5dffe443a03b1a23f1edbcb00361334dbd6a6d31e16887b5290da2f865fbe1fef7b43c8f8f3432815ca860946560cb601ab83d417e6a4734aaf75692195566bde61e04610a9eff752c08f9ff85a48959daa7c65d03a0eca62e92bf10a55fb4834a49745a6c53d9c79d0591cb13cfa54f0d437d001b7924fd9dd69c98aa25e5d3f19649f79913bca827e7636ede04bf7c41ef54c42936b4eb93c75d941853dc7dda42b51ac5e4f5602fe2c3e62f252d28e02398943780598cf2bd41d183425daf34e86099c748eda2d5372029ebd089f619dab327ea728eb90342f2b48cd364e914a6078599afdb22a6fac6b55e1bf28b3284a0edc748b59c2eaa97e35d457d4c049f86fd3fc618c4c52f08776c0efb33011b96ef6f0b0e6ecf6d37dc20da8ab7d9b8154371c8e396d9b89ee02e6e6b013a0985b1f47c91f3b5a9e6c33736840e6044f46be1dbea4ec7730eccc6e993cb522bb220de4ed55156129f821d7df19439ab86990991cfd1992681716b5ff012ffa5519ad0baa01885f77f6a522469979f449232d408379558fcdfe5253371da835e0c77706dfa67ff28b1cd8d7fdf9e386899838532d8e57ec1ed3d31a96ae03f37b976fb6c503cc247113deaa070697728e3b36ce43de051ce13a4df91d22157c6281e8f9a16de007c6dddf03ffc79a9f4cfc3eaddd637a9a902fdba1c9e857a9ccd7c318db17cd40d8b588b5d97c7d03c0404473dd201aa5c6637e952c6299e35374127276b3eb4aeba754f3176fecea1731a0f917dd049fcdab34264a8c635ba90eec941aeb449a7eca263aaec9e46758bdf21caa896adb4652e9564d75c20e296fcdf28cbdeb702a1e7acf2374d24b51e6492b0bcc72a58748666a7278e2cb54fbdb68c6736ceb85dd92cd0465b19a65f7ad47e25658a34c3531db48c37ef279574e1892d80d80f3e9dee385ab65e6a4537f6e318817a785228160939d01632b8269858ce9092359048b09ae8b9c17ceb575216988bbeb91c1b5861c931f21e07d888ceb9b89d89d17608e2d5f0ae66b6e756f1eac9f80e13749f866ea6b741158296d3ced761999ad901a2121e233bf173865b6c0b32d68e6ef1d39bb411a1ee9d4d1cde870645b9922051b31cc0df640fb01d23c613091ba538999254b873fbb5996efdfbde5c933e1b6ef6d1c7d5e1a9bff6800c8625b07aba2c14143c1a33a0661c357e5db59a2f49aab35c13531774fb5b3795ed853d7f4e38910c7eeb3435353e2cfd0c94e61c16c8126928343f86222c5ef320b9e043d3cd357af4e065500f50e6bf9c260ca298bd5507c9498dbcea4ceec834449b7fb7249fdf199f66aa98d0a820b1057df1d67c43f49c6d18c3c902466b2b2b528075489261ef73bf711c7988fed65693798568bed43e4d70a800cd25b1773c455aaa153cea8f7013eae1e8f24c6793f590c8f6a112b46"; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +typedef struct pkcs_sha1_tmp +{ + u32 ipad[5]; + u32 opad[5]; + + u32 dgst[32]; + u32 out[32]; + +} pkcs_sha1_tmp_t; + +typedef struct pkcs +{ + int cipher; + + u32 data_buf[16384]; + int data_len; + + u32 iv_buf[4]; + +} pkcs_t; + +static const char *SIGNATURE_PEM = "$PEM$"; + +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (pkcs_t); + + return esalt_size; +} + +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (pkcs_sha1_tmp_t); + + return tmp_size; +} + +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + // this overrides the reductions of PW_MAX in case optimized kernel is selected + // IOW, even in optimized kernel mode it support length 256 + + const u32 pw_max = PW_MAX; + + return pw_max; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + pkcs_t *pkcs = (pkcs_t *) esalt_buf; + + token_t token; + + token.token_cnt = 8; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_PEM; + + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + token.sep[1] = '$'; + token.len_min[1] = 1; + token.len_max[1] = 1; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[2] = '$'; + token.len_min[2] = 1; + token.len_max[2] = 1; + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[3] = '$'; + token.len_min[3] = 16; + token.len_max[3] = 16; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.sep[4] = '$'; + token.len_min[4] = 1; + token.len_max[4] = 8; + token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[5] = '$'; + token.len_min[5] = 16; // can be either 16 or 32 + token.len_max[5] = 32; // exact check deeper in decoder code + token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.sep[6] = '$'; + token.len_min[6] = 1; + token.len_max[6] = 8; + token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[7] = '$'; + token.len_min[7] = 64; // 64 = minimum size (32 byte) to avoid out of boundary read in kernel + token.len_max[7] = 65536; // 65536 = maximum asn.1 size fitting into 2 byte length integer + token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + // type + + const u8 *type_pos = token.buf[1]; + + if (type_pos[0] != '1') return (PARSER_SIGNATURE_UNMATCHED); + + // cipher + + const u8 *cipher_pos = token.buf[2]; + + int cipher = hc_strtoul ((const char *) cipher_pos, NULL, 10); + + if ((cipher != 1) + && (cipher != 2) + && (cipher != 3) + && (cipher != 4)) return (PARSER_CIPHER); + + pkcs->cipher = cipher; + + // salt buffer + + const u8 *salt_pos = token.buf[3]; + + salt->salt_buf[0] = hex_to_u32 (salt_pos + 0); + salt->salt_buf[1] = hex_to_u32 (salt_pos + 8); + + salt->salt_len = 8; + + // iter + + const u8 *iter_pos = token.buf[4]; + + const u32 iter = hc_strtoul ((const char *) iter_pos, NULL, 10); + + salt->salt_iter = iter - 1; + + // IV buffer + + const u8 *iv_pos = token.buf[5]; + const int iv_len = token.len[5]; + + if (cipher == 1) + { + if (iv_len != 16) return (PARSER_SALT_LENGTH); + + pkcs->iv_buf[0] = hex_to_u32 (iv_pos + 0); + pkcs->iv_buf[1] = hex_to_u32 (iv_pos + 8); + } + else + { + if (iv_len != 32) return (PARSER_SALT_LENGTH); + + pkcs->iv_buf[0] = hex_to_u32 (iv_pos + 0); + pkcs->iv_buf[1] = hex_to_u32 (iv_pos + 8); + pkcs->iv_buf[2] = hex_to_u32 (iv_pos + 16); + pkcs->iv_buf[3] = hex_to_u32 (iv_pos + 24); + } + + // data length + + const u8 *data_len_verify_pos = token.buf[6]; + + const int data_len_verify = hc_strtoul ((const char *) data_len_verify_pos, NULL, 10); + + // data + + const u8 *data_pos = token.buf[7]; + const int data_len = token.len[7]; + + pkcs->data_len = hex_decode (data_pos, data_len, (u8 *) pkcs->data_buf); + + if (data_len_verify != pkcs->data_len) return (PARSER_HASH_LENGTH); + + // data has to be a multiple of cipher block size + + int cipher_bs = 0; + + if (cipher == 1) { cipher_bs = 8; } + else if (cipher == 2) { cipher_bs = 16; } + else if (cipher == 3) { cipher_bs = 16; } + else if (cipher == 4) { cipher_bs = 16; } + + if (pkcs->data_len % cipher_bs) return (PARSER_HASH_LENGTH); + + // hash + + digest[0] = pkcs->data_buf[0]; + digest[1] = pkcs->data_buf[1]; + digest[2] = pkcs->data_buf[2]; + digest[3] = pkcs->data_buf[3]; + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + pkcs_t *pkcs = (pkcs_t *) esalt_buf; + + u8 *out_buf = (u8 *) line_buf; + + int out_len; + + if (pkcs->cipher == 1) + { + out_len = snprintf ((char *) out_buf, line_size, "%s1$%d$%08x%08x$%d$%08x%08x$%d$", + SIGNATURE_PEM, + pkcs->cipher, + byte_swap_32 (salt->salt_buf[0]), + byte_swap_32 (salt->salt_buf[1]), + salt->salt_iter + 1, + byte_swap_32 (pkcs->iv_buf[0]), + byte_swap_32 (pkcs->iv_buf[1]), + pkcs->data_len); + } + else + { + out_len = snprintf ((char *) out_buf, line_size, "%s1$%d$%08x%08x$%d$%08x%08x%08x%08x$%d$", + SIGNATURE_PEM, + pkcs->cipher, + byte_swap_32 (salt->salt_buf[0]), + byte_swap_32 (salt->salt_buf[1]), + salt->salt_iter + 1, + byte_swap_32 (pkcs->iv_buf[0]), + byte_swap_32 (pkcs->iv_buf[1]), + byte_swap_32 (pkcs->iv_buf[2]), + byte_swap_32 (pkcs->iv_buf[3]), + pkcs->data_len); + } + + out_len += hex_encode ((const u8 *) pkcs->data_buf, pkcs->data_len, (u8 *) out_buf + out_len); + + return out_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = MODULE_DEFAULT; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_24420.c b/src/modules/module_24420.c new file mode 100644 index 000000000..c45de065e --- /dev/null +++ b/src/modules/module_24420.c @@ -0,0 +1,363 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_4; +static const u32 HASH_CATEGORY = HASH_CATEGORY_PRIVATE_KEY; +static const char *HASH_NAME = "PKCS#8 Private Keys (PBKDF2-HMAC-SHA256 + 3DES/AES)"; +static const u64 KERN_TYPE = 24420; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_SUGGEST_KG; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "$PEM$2$4$ed02960b8a10b1f1$2048$a634c482a95f23bd8fada558e1bac2cf$1232$50b21db4aededb96417a9b88131e6bc3727739b4aa1413417338efaa6a756f27c32db5c339d9c3ba61c746bbe3d6c5e0a023f965e70fb617e78a00890b8c7fc7c9f5e0ab39f35bf58ab40f6ed15441338134d041ca59783437ef681a51132c085abb3830df95e9f94d11da54d61679ca6e40136da96ffe205ce191002458143f03cba3aeca6b22a3f0689d5582b3e6c01baee7a04d875ed44bb84fa0ed0a3aae1ed392645cced385498eef4ec25bf6d1399f1487f3625fad9fee25aabf18edb1ce5e640e834d31251b882601f23c2b2d77a45c84e0fc8a3a42e3ff9f75e7ac815c57a7e943ad803ab3672f85a37c6b92d0813590d47a31788643449dce67f135363a0c14f089629a1274b124539535df5f50df5d4402f7a109738f56467725a8aa3884562c8b4c42c068c3502be86e20ac9c52c0daec22e47dcbefebe902b1dc791ed3cd069c7f9211e43f5a3274450f4b0f0b7c6f59adeca8b39ed130b6cbda7cf98e15bbba21fa1758a28dc2edf2e2f17fc353853dc881458e59184f5a8f6e09456e4d71d90135a8ce67350f7bcb3d900e75585e3a87c0c8482f3917347fcfad4fdb8915991cffd20dae1502d0f69d385244e489e50cc9f24b15a5f9d0b00d62805026db5378b5408d7d719786eb043659a452096736e4a7501548655df83045dc4e86bd3319f2982e6db2bbb239019202cebf2ca68c05b578ba95cef82397b145c80208cd7ffd9b0cd5fc3d0d7ea26401c8e11c28ab8d1a524b884962e7fee597943a5e38137abb8b26a7772f0ad6dad074dcfd0b5794822aa7e43d10cab2c95e63b6459706dc21a1cbbd7ae4c96b40ee4d7039cf84c416cb879b2d30b7ac5e1860dcd2ab5479c39b748f5fd9336934c9c1e8064ffb0906c0c2898479209d1a9c97c3cd1782d7514e94d01b242a371a2df5592d620ebd6e18e63ff24ee8ba182f17e6c578431d738e955a957469e8069a919fd3a15532d460201d4e38ac04ac494b9cde1731d4511bf8faf8420a9de4f8c7d3d721fc30d8c3664683fd91ad3515e97092fb652205fb087890cb594947f5372c9b0b27f08b4b57bf610f777fcf040e6e7b8cedf85113dfd909cbac4b774c7580686f2e1f261898da4c6804d573fb22248005f5e0d3b256a0f3dcb71c47b3d674352bda82c22a513e381f990b6100328185511de9b3352126c5aedb9b0bde15743b42e231ef7227c0fe478044ce69474a740366058f07e56dde7d6089cb76e606482e7ba206355fc0fa180c4a41ae781e4723120e3d5a1dd40224db2c959ecbc9bce88bfeed64082d07b111e88a2d8a6a6fe097c9a298a6c3f76beb5b3b5aecedbbbcd404aac8fd25c069c747338ca0c81e6b63d87fc4f0bc18a86b721e3a16e9875741e0313057de8476ee84e36efe557dc33a7d23a9426f2e359781147607ad79235c9d7846320fe2d963fac79a5c92ff3067595273931174d2173f63cfceb9f62a873e7c240d3c260bcfb02b2697911321a72455cacc6929133d0af2cdf6d59a63293ac508786a4850267f90993fff3b6c07bbf3af0e3c08638148101ae1495da3360614866e238c4f60ca00f615877be80cc708da5ea1c30032acffd0e55429ba29dca409349d901a49831db44c1e58b7530b383d3f7e1cac79200cad9bdf87451783f2ffdab09b230aab52b41fa42fdd9f1f05a3dda0fa16b011c51e330d044adf394bbbb7fa25efc860f3082e42824be3b96943afbe641fe6bb"; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +typedef struct pkcs_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[32]; + u32 out[32]; + +} pkcs_sha256_tmp_t; + +typedef struct pkcs +{ + int cipher; + + u32 data_buf[16384]; + int data_len; + + u32 iv_buf[4]; + +} pkcs_t; + +static const char *SIGNATURE_PEM = "$PEM$"; + +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (pkcs_t); + + return esalt_size; +} + +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (pkcs_sha256_tmp_t); + + return tmp_size; +} + +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + // this overrides the reductions of PW_MAX in case optimized kernel is selected + // IOW, even in optimized kernel mode it support length 256 + + const u32 pw_max = PW_MAX; + + return pw_max; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + pkcs_t *pkcs = (pkcs_t *) esalt_buf; + + token_t token; + + token.token_cnt = 8; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_PEM; + + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + token.sep[1] = '$'; + token.len_min[1] = 1; + token.len_max[1] = 1; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[2] = '$'; + token.len_min[2] = 1; + token.len_max[2] = 1; + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[3] = '$'; + token.len_min[3] = 16; + token.len_max[3] = 16; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.sep[4] = '$'; + token.len_min[4] = 1; + token.len_max[4] = 8; + token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[5] = '$'; + token.len_min[5] = 16; // can be either 16 or 32 + token.len_max[5] = 32; // exact check deeper in decoder code + token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.sep[6] = '$'; + token.len_min[6] = 1; + token.len_max[6] = 8; + token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[7] = '$'; + token.len_min[7] = 64; // 64 = minimum size (32 byte) to avoid out of boundary read in kernel + token.len_max[7] = 65536; // 65536 = maximum asn.1 size fitting into 2 byte length integer + token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + // type + + const u8 *type_pos = token.buf[1]; + + if (type_pos[0] != '2') return (PARSER_SIGNATURE_UNMATCHED); + + // cipher + + const u8 *cipher_pos = token.buf[2]; + + int cipher = hc_strtoul ((const char *) cipher_pos, NULL, 10); + + if ((cipher != 1) + && (cipher != 2) + && (cipher != 3) + && (cipher != 4)) return (PARSER_CIPHER); + + pkcs->cipher = cipher; + + // salt buffer + + const u8 *salt_pos = token.buf[3]; + + salt->salt_buf[0] = hex_to_u32 (salt_pos + 0); + salt->salt_buf[1] = hex_to_u32 (salt_pos + 8); + + salt->salt_len = 8; + + // iter + + const u8 *iter_pos = token.buf[4]; + + const u32 iter = hc_strtoul ((const char *) iter_pos, NULL, 10); + + salt->salt_iter = iter - 1; + + // IV buffer + + const u8 *iv_pos = token.buf[5]; + const int iv_len = token.len[5]; + + if (cipher == 1) + { + if (iv_len != 16) return (PARSER_SALT_LENGTH); + + pkcs->iv_buf[0] = hex_to_u32 (iv_pos + 0); + pkcs->iv_buf[1] = hex_to_u32 (iv_pos + 8); + } + else + { + if (iv_len != 32) return (PARSER_SALT_LENGTH); + + pkcs->iv_buf[0] = hex_to_u32 (iv_pos + 0); + pkcs->iv_buf[1] = hex_to_u32 (iv_pos + 8); + pkcs->iv_buf[2] = hex_to_u32 (iv_pos + 16); + pkcs->iv_buf[3] = hex_to_u32 (iv_pos + 24); + } + + // data length + + const u8 *data_len_verify_pos = token.buf[6]; + + const int data_len_verify = hc_strtoul ((const char *) data_len_verify_pos, NULL, 10); + + // data + + const u8 *data_pos = token.buf[7]; + const int data_len = token.len[7]; + + pkcs->data_len = hex_decode (data_pos, data_len, (u8 *) pkcs->data_buf); + + if (data_len_verify != pkcs->data_len) return (PARSER_HASH_LENGTH); + + // data has to be a multiple of cipher block size + + int cipher_bs = 0; + + if (cipher == 1) { cipher_bs = 8; } + else if (cipher == 2) { cipher_bs = 16; } + else if (cipher == 3) { cipher_bs = 16; } + else if (cipher == 4) { cipher_bs = 16; } + + if (pkcs->data_len % cipher_bs) return (PARSER_HASH_LENGTH); + + // hash + + digest[0] = pkcs->data_buf[0]; + digest[1] = pkcs->data_buf[1]; + digest[2] = pkcs->data_buf[2]; + digest[3] = pkcs->data_buf[3]; + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + pkcs_t *pkcs = (pkcs_t *) esalt_buf; + + u8 *out_buf = (u8 *) line_buf; + + int out_len; + + if (pkcs->cipher == 1) + { + out_len = snprintf ((char *) out_buf, line_size, "%s2$%d$%08x%08x$%d$%08x%08x$%d$", + SIGNATURE_PEM, + pkcs->cipher, + byte_swap_32 (salt->salt_buf[0]), + byte_swap_32 (salt->salt_buf[1]), + salt->salt_iter + 1, + byte_swap_32 (pkcs->iv_buf[0]), + byte_swap_32 (pkcs->iv_buf[1]), + pkcs->data_len); + } + else + { + out_len = snprintf ((char *) out_buf, line_size, "%s2$%d$%08x%08x$%d$%08x%08x%08x%08x$%d$", + SIGNATURE_PEM, + pkcs->cipher, + byte_swap_32 (salt->salt_buf[0]), + byte_swap_32 (salt->salt_buf[1]), + salt->salt_iter + 1, + byte_swap_32 (pkcs->iv_buf[0]), + byte_swap_32 (pkcs->iv_buf[1]), + byte_swap_32 (pkcs->iv_buf[2]), + byte_swap_32 (pkcs->iv_buf[3]), + pkcs->data_len); + } + + out_len += hex_encode ((const u8 *) pkcs->data_buf, pkcs->data_len, (u8 *) out_buf + out_len); + + return out_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = MODULE_DEFAULT; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_24500.c b/src/modules/module_24500.c new file mode 100644 index 000000000..d23e5d7ae --- /dev/null +++ b/src/modules/module_24500.c @@ -0,0 +1,320 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_8; +static const u32 HASH_CATEGORY = HASH_CATEGORY_NETWORK_PROTOCOL; +static const char *HASH_NAME = "Telegram Desktop >= v2.1.14 (PBKDF2-HMAC-SHA512)"; +static const u64 KERN_TYPE = 24500; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "$telegram$2*100000*77461dcb457ce9539f8e4235d33bd12455b4a38446e63b52ecdf2e7b65af4476*f705dda3247df6d690dfc7f44d8c666979737cae9505d961130071bcc18eeadaef0320ac6985e4a116834c0761e55314464aae56dadb8f80ab8886c16f72f8b95adca08b56a60c4303d84210f75cfd78a3e1a197c84a747988ce2e1b247397b61041823bdb33932714ba16ca7279e6c36b75d3f994479a469b50a7b2c7299a4d7aadb775fb030d3bb55ca77b7ce8ac2f5cf5eb7bdbcc10821b8953a4734b448060246e5bb93f130d6d3f2e28b9e04f2a064820be562274c040cd849f1473d45141559fc45da4c54abeaf5ca40d2d57f8f8e33bdb232c7279872f758b3fb452713b5d91c855383f7cec8376649a53b83951cf8edd519a99e91b8a6cb90153088e35d9fed332c7253771740f49f9dc40c7da50352656395bbfeae63e10f754d24a"; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +typedef struct telegram_tmp +{ + u64 ipad[8]; + u64 opad[8]; + + u64 dgst[24]; + u64 out [24]; + +} telegram_tmp_t; + +typedef struct telegram +{ + u32 data[72]; + +} telegram_t; + +static const char *SIGNATURE_TELEGRAM = "$telegram$"; +static const int DATA_LEN_TELEGRAM = 288; +static const int SALT_LEN_TELEGRAM = 32; + +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // amdgpu-pro-19.30-934563-ubuntu-18.04: password not found + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) + { + return true; + } + + return false; +} + +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (telegram_t); + + return esalt_size; +} + +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (telegram_tmp_t); + + return tmp_size; +} + +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + // this overrides the reductions of PW_MAX in case optimized kernel is selected + // IOW, even in optimized kernel mode it support length 256 + + const u32 pw_max = PW_MAX; + + return pw_max; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + telegram_t *telegram = (telegram_t *) esalt_buf; + + token_t token; + + token.token_cnt = 5; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_TELEGRAM; + + token.len[0] = 10; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + token.sep[1] = '*'; + token.len_min[1] = 1; + token.len_max[1] = 1; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[2] = '*'; + token.len_min[2] = 1; + token.len_max[2] = 6; + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[3] = '*'; + token.len_min[3] = 64; + token.len_max[3] = 64; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.sep[4] = '*'; + token.len_min[4] = DATA_LEN_TELEGRAM * 2; + token.len_max[4] = DATA_LEN_TELEGRAM * 2; + token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + u8 version = token.buf[1][0]; + + if (version != '2') return (PARSER_SALT_VALUE); + + // iter + + const u8 *iter_pos = token.buf[2]; + + salt->salt_iter = hc_strtoul ((const char *) iter_pos, NULL, 10); + + if (salt->salt_iter < 2) return (PARSER_SALT_ITERATION); + + salt->salt_iter--; + + // salt + + const u8 *salt_pos = token.buf[3]; + + salt->salt_buf[0] = hex_to_u32 (salt_pos + 0); + salt->salt_buf[1] = hex_to_u32 (salt_pos + 8); + salt->salt_buf[2] = hex_to_u32 (salt_pos + 16); + salt->salt_buf[3] = hex_to_u32 (salt_pos + 24); + salt->salt_buf[4] = hex_to_u32 (salt_pos + 32); + salt->salt_buf[5] = hex_to_u32 (salt_pos + 40); + salt->salt_buf[6] = hex_to_u32 (salt_pos + 48); + salt->salt_buf[7] = hex_to_u32 (salt_pos + 56); + + salt->salt_buf[0] = byte_swap_32 (salt->salt_buf[0]); + salt->salt_buf[1] = byte_swap_32 (salt->salt_buf[1]); + salt->salt_buf[2] = byte_swap_32 (salt->salt_buf[2]); + salt->salt_buf[3] = byte_swap_32 (salt->salt_buf[3]); + salt->salt_buf[4] = byte_swap_32 (salt->salt_buf[4]); + salt->salt_buf[5] = byte_swap_32 (salt->salt_buf[5]); + salt->salt_buf[6] = byte_swap_32 (salt->salt_buf[6]); + salt->salt_buf[7] = byte_swap_32 (salt->salt_buf[7]); + + salt->salt_len = SALT_LEN_TELEGRAM; + + // digest + + const u8 *data_pos = token.buf[4]; + + digest[0] = hex_to_u32 (data_pos + 0); + digest[1] = hex_to_u32 (data_pos + 8); + digest[2] = hex_to_u32 (data_pos + 16); + digest[3] = hex_to_u32 (data_pos + 24); + + // data + + for (int i = 0, j = 0; i < DATA_LEN_TELEGRAM / 4; i += 1, j += 8) + { + telegram->data[i] = hex_to_u32 (data_pos + j); + + telegram->data[i] = byte_swap_32 (telegram->data[i]); + } + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + const telegram_t *telegram = (const telegram_t *) esalt_buf; + + // salt + + #define SALT_BUF_LEN (SALT_LEN_TELEGRAM * 2 + 1) + + char salt_buf[SALT_BUF_LEN]; + + memset (salt_buf, 0, SALT_BUF_LEN); + + for (int i = 0, j = 0; i < SALT_LEN_TELEGRAM / 4; i += 1, j += 8) + { + snprintf (salt_buf + j, SALT_BUF_LEN - j, "%08x", salt->salt_buf[i]); + } + + // data + + #define DATA_BUF_LEN (DATA_LEN_TELEGRAM * 2 + 1) + + char data[DATA_BUF_LEN]; + + memset (data, 0, DATA_BUF_LEN); + + for (int i = 0, j = 0; i < DATA_LEN_TELEGRAM / 4; i += 1, j += 8) + { + snprintf (data + j, DATA_BUF_LEN - j, "%08x", telegram->data[i]); + } + + // output + + const int line_len = snprintf (line_buf, line_size, "%s%i*%i*%s*%s", + SIGNATURE_TELEGRAM, + 2, + salt->salt_iter + 1, + salt_buf, + data); + + return line_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = MODULE_DEFAULT; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_24600.c b/src/modules/module_24600.c new file mode 100644 index 000000000..7a2ef5dc6 --- /dev/null +++ b/src/modules/module_24600.c @@ -0,0 +1,355 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_4; +static const u32 HASH_CATEGORY = HASH_CATEGORY_DATABASE_SERVER; +static const char *HASH_NAME = "SQLCipher"; +static const u64 KERN_TYPE = 24610; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_SELF_TEST_DISABLE; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "SQLCIPHER*1*64000*25548249195677404156261816261456*85b5e156e1cf1e0be5e9f4217186817b*33435c230bbc7989bbd027630e3f47cd"; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +typedef struct sqlcipher_sha1_tmp +{ + u32 ipad[5]; + u32 opad[5]; + + u32 dgst[10]; + u32 out[10]; + +} sqlcipher_sha1_tmp_t; + +typedef struct sqlcipher_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[8]; + u32 out[8]; + +} sqlcipher_sha256_tmp_t; + +typedef struct sqlcipher_sha512_tmp +{ + u64 ipad[8]; + u64 opad[8]; + + u64 dgst[8]; + u64 out[8]; + +} sqlcipher_sha512_tmp_t; + +typedef struct sqlcipher +{ + u32 iv_buf[4]; + u32 data_buf[4]; + + u32 type; + +} sqlcipher_t; + +typedef enum kern_type_sqlcipher +{ + KERN_TYPE_SQLCIPHER_SHA1 = 24610, + KERN_TYPE_SQLCIPHER_SHA256 = 24620, + KERN_TYPE_SQLCIPHER_SHA512 = 24630, + +} kern_type_sqlcipher_t; + +static const char *SIGNATURE_SQLCIPHER = "SQLCIPHER"; + +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (sqlcipher_t); + + return esalt_size; +} + +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (sqlcipher_sha512_tmp_t); // we just select the largest + + return tmp_size; +} + +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + // this overrides the reductions of PW_MAX in case optimized kernel is selected + // IOW, even in optimized kernel mode it support length 256 + + const u32 pw_max = PW_MAX; + + return pw_max; +} + +u64 module_kern_type_dynamic (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info) +{ + const sqlcipher_t *sqlcipher = (const sqlcipher_t *) esalt_buf; + + u64 kern_type = -1; + + if (sqlcipher->type == 1) + { + kern_type = KERN_TYPE_SQLCIPHER_SHA1; + } + else if (sqlcipher->type == 2) + { + kern_type = KERN_TYPE_SQLCIPHER_SHA256; + } + else if (sqlcipher->type == 3) + { + kern_type = KERN_TYPE_SQLCIPHER_SHA512; + } + else + { + return (PARSER_HASH_LENGTH); + } + + return kern_type; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + sqlcipher_t *sqlcipher = (sqlcipher_t *) esalt_buf; + + token_t token; + + token.token_cnt = 6; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_SQLCIPHER; + + token.sep[0] = '*'; + token.len_min[0] = 9; + token.len_max[0] = 9; + token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + token.sep[1] = '*'; + token.len_min[1] = 1; + token.len_max[1] = 1; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[2] = '*'; + token.len_min[2] = 1; + token.len_max[2] = 6; + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[3] = '*'; + token.len_min[3] = 32; + token.len_max[3] = 32; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.sep[4] = '*'; + token.len_min[4] = 32; + token.len_max[4] = 32; + token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.sep[5] = '*'; + token.len_min[5] = 32; + token.len_max[5] = 32; + token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + // type + + const u8 *type_pos = token.buf[1]; + + const int type = hc_strtoul ((const char *) type_pos, NULL, 10); + + if ((type != 1) && (type != 2) && (type != 3)) return (PARSER_SIGNATURE_UNMATCHED); + + sqlcipher->type = type; + + // cipher + + const u8 *iter_pos = token.buf[2]; + + int iter = hc_strtoul ((const char *) iter_pos, NULL, 10); + + salt->salt_iter = iter - 1; + + // salt buffer + + const u8 *salt_pos = token.buf[3]; + + salt->salt_buf[0] = hex_to_u32 (salt_pos + 0); + salt->salt_buf[1] = hex_to_u32 (salt_pos + 8); + salt->salt_buf[2] = hex_to_u32 (salt_pos + 16); + salt->salt_buf[3] = hex_to_u32 (salt_pos + 24); + + salt->salt_len = 16; + + // IV buffer + + const u8 *iv_pos = token.buf[4]; + + sqlcipher->iv_buf[0] = hex_to_u32 (iv_pos + 0); + sqlcipher->iv_buf[1] = hex_to_u32 (iv_pos + 8); + sqlcipher->iv_buf[2] = hex_to_u32 (iv_pos + 16); + sqlcipher->iv_buf[3] = hex_to_u32 (iv_pos + 24); + + // data buffer + + const u8 *data_pos = token.buf[5]; + + sqlcipher->data_buf[0] = hex_to_u32 (data_pos + 0); + sqlcipher->data_buf[1] = hex_to_u32 (data_pos + 8); + sqlcipher->data_buf[2] = hex_to_u32 (data_pos + 16); + sqlcipher->data_buf[3] = hex_to_u32 (data_pos + 24); + + // hash + + digest[0] = sqlcipher->data_buf[0]; + digest[1] = sqlcipher->data_buf[1]; + digest[2] = sqlcipher->data_buf[2]; + digest[3] = sqlcipher->data_buf[3]; + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + sqlcipher_t *sqlcipher = (sqlcipher_t *) esalt_buf; + + u8 *out_buf = (u8 *) line_buf; + + const int out_len = snprintf ((char *) out_buf, line_size, "%s*%d*%d*%08x%08x%08x%08x*%08x%08x%08x%08x*%08x%08x%08x%08x", + SIGNATURE_SQLCIPHER, + sqlcipher->type, + salt->salt_iter + 1, + byte_swap_32 (salt->salt_buf[0]), + byte_swap_32 (salt->salt_buf[1]), + byte_swap_32 (salt->salt_buf[2]), + byte_swap_32 (salt->salt_buf[3]), + byte_swap_32 (sqlcipher->iv_buf[0]), + byte_swap_32 (sqlcipher->iv_buf[1]), + byte_swap_32 (sqlcipher->iv_buf[2]), + byte_swap_32 (sqlcipher->iv_buf[3]), + byte_swap_32 (sqlcipher->data_buf[0]), + byte_swap_32 (sqlcipher->data_buf[1]), + byte_swap_32 (sqlcipher->data_buf[2]), + byte_swap_32 (sqlcipher->data_buf[3])); + + return out_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = MODULE_DEFAULT; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = module_kern_type_dynamic; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_24700.c b/src/modules/module_24700.c new file mode 100644 index 000000000..04163dc37 --- /dev/null +++ b/src/modules/module_24700.c @@ -0,0 +1,182 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_INSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_4; +static const u32 HASH_CATEGORY = HASH_CATEGORY_ARCHIVE; +static const char *HASH_NAME = "Stuffit5"; +static const u64 KERN_TYPE = 24700; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_PRECOMPUTE_INIT + | OPTI_TYPE_EARLY_SKIP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_PT_ADD80 + | OPTS_TYPE_PT_ADDBITS14; +static const u32 SALT_TYPE = SALT_TYPE_NONE; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "66a75cb059"; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + token_t token; + + token.token_cnt = 1; + + token.len_min[0] = 10; + token.len_max[0] = 10; + token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + const u8 *hash_pos = token.buf[0]; + + digest[0] = hex_to_u32 (hash_pos + 0); + digest[1] = hex_to_u32 (hash_pos + 8); + + if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) + { + digest[0] -= MD5M_A; + digest[1] -= MD5M_B; + } + + digest[1] &= 0x000000ff; + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + const u32 *digest = (const u32 *) digest_buf; + + // we can not change anything in the original buffer, otherwise destroying sorting + // therefore create some local buffer + + u32 tmp[2]; + + tmp[0] = digest[0]; + tmp[1] = digest[1]; + + if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) + { + tmp[0] += MD5M_A; + tmp[1] += MD5M_B; + } + + u8 *out_buf = (u8 *) line_buf; + + int out_len = 0; + + u32_to_hex (tmp[0], out_buf + out_len); out_len += 8; + u32_to_hex (tmp[1], out_buf + out_len); out_len += 2; + + return out_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = MODULE_DEFAULT; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = MODULE_DEFAULT; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = MODULE_DEFAULT; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = MODULE_DEFAULT; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_24800.c b/src/modules/module_24800.c new file mode 100644 index 000000000..f7abd0acf --- /dev/null +++ b/src/modules/module_24800.c @@ -0,0 +1,186 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_INSIDE_KERNEL; +static const u32 DGST_POS0 = 3; +static const u32 DGST_POS1 = 4; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 1; +static const u32 DGST_SIZE = DGST_SIZE_4_5; +static const u32 HASH_CATEGORY = HASH_CATEGORY_FORUM_SOFTWARE; +static const char *HASH_NAME = "Umbraco HMAC-SHA1"; +static const u64 KERN_TYPE = 24800; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_NOT_ITERATED; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_BE + | OPTS_TYPE_PT_UTF16LE; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "8uigXlGMNI7BzwLCJlDbcKR2FP4="; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + token_t token; + + token.token_cnt = 1; + + token.len_min[0] = 28; + token.len_max[0] = 28; + token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + const u8 *hash_pos = token.buf[0]; + const int hash_len = token.len[0]; + + u8 tmp_buf[32] = { 0 }; + + const int decoded_len = base64_decode (base64_to_int, hash_pos, hash_len, tmp_buf); + + if (decoded_len != 20) return (PARSER_HASH_LENGTH); + + memcpy (digest, tmp_buf, 20); + + digest[0] = byte_swap_32 (digest[0]); + digest[1] = byte_swap_32 (digest[1]); + digest[2] = byte_swap_32 (digest[2]); + digest[3] = byte_swap_32 (digest[3]); + digest[4] = byte_swap_32 (digest[4]); + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + const u32 *digest = (const u32 *) digest_buf; + + // we can not change anything in the original buffer, otherwise destroying sorting + // therefore create some local buffer + + u32 tmp[5]; + + tmp[0] = digest[0]; + tmp[1] = digest[1]; + tmp[2] = digest[2]; + tmp[3] = digest[3]; + tmp[4] = digest[4]; + + tmp[0] = byte_swap_32 (tmp[0]); + tmp[1] = byte_swap_32 (tmp[1]); + tmp[2] = byte_swap_32 (tmp[2]); + tmp[3] = byte_swap_32 (tmp[3]); + tmp[4] = byte_swap_32 (tmp[4]); + + u8 ptr_plain[100] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) tmp, 20, (u8 *) ptr_plain); + + const int out_len = snprintf (line_buf, line_size, "%s", (char *) ptr_plain); + + return out_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = MODULE_DEFAULT; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = MODULE_DEFAULT; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = MODULE_DEFAULT; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = MODULE_DEFAULT; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_24900.c b/src/modules/module_24900.c new file mode 100644 index 000000000..31a218c82 --- /dev/null +++ b/src/modules/module_24900.c @@ -0,0 +1,216 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_INSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_4; +static const u32 HASH_CATEGORY = HASH_CATEGORY_RAW_HASH; +static const char *HASH_NAME = "Dahua Authentication MD5"; +static const u64 KERN_TYPE = 24900; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_PRECOMPUTE_INIT + | OPTI_TYPE_NOT_ITERATED + | OPTI_TYPE_NOT_SALTED + | OPTI_TYPE_RAW_HASH; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_PT_ADD80 + | OPTS_TYPE_PT_ADDBITS14; +static const u32 SALT_TYPE = SALT_TYPE_NONE; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "GRuHbyVp"; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +u32 dahua_decode (const u32 in) +{ + if (in >= 'a') + { + return (in - 61); + } + else if (in >= 'A') + { + return (in - 55); + } + else + { + return (in - 48); + } + + return -1; +} + +u32 dahua_encode (const u32 in) +{ + if (in < 10) + { + return (in + 48); + } + else if (in < 36) + { + return (in + 55); + } + else + { + return (in + 61); + } + + return -1; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + token_t token; + + token.token_cnt = 1; + + token.len_min[0] = 8; + token.len_max[0] = 8; + token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + const u8 *hash_pos = token.buf[0]; + + const u32 a0 = dahua_decode (hash_pos[0]); + const u32 a1 = dahua_decode (hash_pos[1]); + const u32 b0 = dahua_decode (hash_pos[2]); + const u32 b1 = dahua_decode (hash_pos[3]); + const u32 c0 = dahua_decode (hash_pos[4]); + const u32 c1 = dahua_decode (hash_pos[5]); + const u32 d0 = dahua_decode (hash_pos[6]); + const u32 d1 = dahua_decode (hash_pos[7]); + + digest[0] = (a0 << 0) | (a1 << 8); + digest[1] = (b0 << 0) | (b1 << 8); + digest[2] = (c0 << 0) | (c1 << 8); + digest[3] = (d0 << 0) | (d1 << 8); + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + const u32 *digest = (const u32 *) digest_buf; + + u8 *out_buf = (u8 *) line_buf; + + out_buf[0] = (u8) dahua_encode ((digest[0] >> 0) & 0xff); + out_buf[1] = (u8) dahua_encode ((digest[0] >> 8) & 0xff); + out_buf[2] = (u8) dahua_encode ((digest[1] >> 0) & 0xff); + out_buf[3] = (u8) dahua_encode ((digest[1] >> 8) & 0xff); + out_buf[4] = (u8) dahua_encode ((digest[2] >> 0) & 0xff); + out_buf[5] = (u8) dahua_encode ((digest[2] >> 8) & 0xff); + out_buf[6] = (u8) dahua_encode ((digest[3] >> 0) & 0xff); + out_buf[7] = (u8) dahua_encode ((digest[3] >> 8) & 0xff); + + const int out_len = 8; + + return out_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = MODULE_DEFAULT; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = MODULE_DEFAULT; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = MODULE_DEFAULT; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = MODULE_DEFAULT; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} + + diff --git a/src/modules/module_25300.c b/src/modules/module_25300.c new file mode 100644 index 000000000..f736623e1 --- /dev/null +++ b/src/modules/module_25300.c @@ -0,0 +1,330 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 14; +static const u32 DGST_POS1 = 15; +static const u32 DGST_POS2 = 6; +static const u32 DGST_POS3 = 7; +static const u32 DGST_SIZE = DGST_SIZE_8_8; +static const u32 HASH_CATEGORY = HASH_CATEGORY_DOCUMENTS; +static const char *HASH_NAME = "MS Office 2016 - SheetProtection"; +static const u64 KERN_TYPE = 25300; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "$office$2016$0$100000$876MLoKTq42+/DLp415iZQ==$TNDvpvYyvlSUy97UOLKNhXynhUDDA7H8kLql0ISH5SxcP6hbthdjaTo4Z3/MU0dcR2SAd+AduYb3TB5CLZ8+ow=="; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +typedef struct office2016 +{ + u32 salt_buf[24 + 1]; + +} office2016_t; + +typedef struct office2016_tmp +{ + u64 out[8]; + +} office2016_tmp_t; + +static const char *SIGNATURE_OFFICE2016_SHEETPROTECTION = "$office$2016$0$"; + +char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + char *jit_build_options = NULL; + + // Extra treatment for Apple systems + if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) + { + return jit_build_options; + } + + // NVIDIA GPU + if (device_param->opencl_device_vendor_id == VENDOR_ID_NV) + { + hc_asprintf (&jit_build_options, "-D _unroll"); + } + + // ROCM + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) + { + hc_asprintf (&jit_build_options, "-D _unroll"); + } + + return jit_build_options; +} + +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (office2016_t); + + return esalt_size; +} + +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (office2016_tmp_t); + + return tmp_size; +} + +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + // this overrides the reductions of PW_MAX in case optimized kernel is selected + // IOW, even in optimized kernel mode it support length 256 + + const u32 pw_max = PW_MAX; + + return pw_max; +} + +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) + { + // self-test failed + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + } + + // amdgpu-pro-19.30-934563-ubuntu-18.04: self-test failure. + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) + { + return true; + } + + return false; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u64 *digest = (u64 *) digest_buf; + + office2016_t *office2016 = (office2016_t *) esalt_buf; + + token_t token; + + token.token_cnt = 4; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_OFFICE2016_SHEETPROTECTION; + + token.len[0] = 15; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + token.sep[1] = '$'; + token.len_min[1] = 6; + token.len_max[1] = 6; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.sep[2] = '$'; + token.len_min[2] = 24; + token.len_max[2] = 24; + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + token.sep[3] = '$'; + token.len_min[3] = 88; + token.len_max[3] = 88; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + const u8 *spinCount_pos = token.buf[1]; + + const u32 spinCount = hc_strtoul ((const char *) spinCount_pos, NULL, 10); + + if (spinCount != 100000) return (PARSER_SALT_VALUE); + + /** + * salt + */ + + const u8 *salt_pos = token.buf[2]; + const int salt_len = token.len[2]; + + memcpy (office2016->salt_buf, salt_pos, salt_len); + + u8 tmp_buf[256]; + + memset (tmp_buf, 0, sizeof (tmp_buf)); + + int tmp_len = base64_decode (base64_to_int, salt_pos, salt_len, tmp_buf); + + if (tmp_len != 16) return (PARSER_SALT_LENGTH); + + memcpy (salt->salt_buf, tmp_buf, tmp_len); + + salt->salt_len = tmp_len; + salt->salt_iter = spinCount; + + /** + * digest + */ + + const u8 *hash_pos = token.buf[3]; + const int hash_len = token.len[3]; + + memset (tmp_buf, 0, sizeof (tmp_buf)); + + tmp_len = base64_decode (base64_to_int, hash_pos, hash_len, tmp_buf); + + if (tmp_len != 64) return (PARSER_HASH_LENGTH); + + memcpy (digest, tmp_buf, tmp_len); + + digest[0] = byte_swap_64 (digest[0]); + digest[1] = byte_swap_64 (digest[1]); + digest[2] = byte_swap_64 (digest[2]); + digest[3] = byte_swap_64 (digest[3]); + digest[4] = byte_swap_64 (digest[4]); + digest[5] = byte_swap_64 (digest[5]); + digest[6] = byte_swap_64 (digest[6]); + digest[7] = byte_swap_64 (digest[7]); + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + const u64 *digest = (const u64 *) digest_buf; + + const office2016_t *office2016 = (const office2016_t *) esalt_buf; + + const u32 spinCount = salt->salt_iter; + + // hash + + u64 tmp[8]; + + tmp[0] = byte_swap_64 (digest[0]); + tmp[1] = byte_swap_64 (digest[1]); + tmp[2] = byte_swap_64 (digest[2]); + tmp[3] = byte_swap_64 (digest[3]); + tmp[4] = byte_swap_64 (digest[4]); + tmp[5] = byte_swap_64 (digest[5]); + tmp[6] = byte_swap_64 (digest[6]); + tmp[7] = byte_swap_64 (digest[7]); + + char hash_enc[256]; + + memset (hash_enc, 0, sizeof (hash_enc)); + + base64_encode (int_to_base64, (const u8 *) tmp, 64, (u8 *) hash_enc); + + // output + + const int line_len = snprintf (line_buf, line_size, "%s%u$%s$%s", SIGNATURE_OFFICE2016_SHEETPROTECTION, spinCount, (const char *) office2016->salt_buf, hash_enc); + + return line_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = module_jit_build_options; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_25400.c b/src/modules/module_25400.c new file mode 100644 index 000000000..f5af76dde --- /dev/null +++ b/src/modules/module_25400.c @@ -0,0 +1,534 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +// TODO use user password as input for md5 of o_digest if no owner password is set +// TODO dynamically add user password including padding to the RC4 input for the computation of the pdf o-value + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" +#include "emu_inc_hash_md5.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_4; +static const u32 HASH_CATEGORY = HASH_CATEGORY_DOCUMENTS; +static const char *HASH_NAME = "PDF 1.4 - 1.6 (Acrobat 5 - 8) - edit password"; +static const u64 KERN_TYPE = 25400; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_NOT_ITERATED; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "$pdf$2*3*128*-3904*1*16*631ed33746e50fba5caf56bcc39e09c6*32*5f9d0e4f0b39835dace0d306c40cd6b700000000000000000000000000000000*32*842103b0a0dc886db9223b94afe2d7cd63389079b61986a4fcf70095ad630c24"; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +typedef struct pdf +{ + int V; + int R; + int P; + + int enc_md; + + u32 id_buf[8]; + u32 u_buf[32]; + u32 o_buf[32]; + + int id_len; + int o_len; + int u_len; + + u32 rc4key[2]; + u32 rc4data[2]; + +} pdf_t; + +typedef struct pdf14_tmp +{ + u32 digest[4]; + u32 out[4]; + +} pdf14_tmp_t; + +static const char *SIGNATURE_PDF = "$pdf$"; + +static void md5_complete_no_limit (u32 digest[4], const u32 *plain, const u32 plain_len) +{ + // plain = u32 tmp_md5_buf[64] so this is compatible + + md5_ctx_t md5_ctx; + + md5_init (&md5_ctx); + md5_update (&md5_ctx, plain, plain_len); + md5_final (&md5_ctx); + + digest[0] = md5_ctx.h[0]; + digest[1] = md5_ctx.h[1]; + digest[2] = md5_ctx.h[2]; + digest[3] = md5_ctx.h[3]; +} + +char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + char *jit_build_options = NULL; + + // Extra treatment for Apple systems + if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) + { + return jit_build_options; + } + + // Intel CPU + if ((device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK) && (device_param->opencl_device_type & CL_DEVICE_TYPE_CPU)) + { + hc_asprintf (&jit_build_options, "-D _unroll"); + } + + // ROCM + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) + { + hc_asprintf (&jit_build_options, "-D _unroll"); + } + + return jit_build_options; +} + +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (pdf_t); + + return esalt_size; +} + +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (pdf14_tmp_t); + + return tmp_size; +} + +u32 module_kernel_threads_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u32 kernel_threads_min = 64; // RC4 + + return kernel_threads_min; +} + +u32 module_kernel_threads_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u32 kernel_threads_max = 64; // RC4 + + return kernel_threads_max; +} + +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u32 pw_max = 32; // https://www.pdflib.com/knowledge-base/pdf-password-security/encryption/ + + return pw_max; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + pdf_t *pdf = (pdf_t *) esalt_buf; + + token_t token; + + token.token_cnt = 12; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_PDF; + + token.len[0] = 5; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + token.len_min[1] = 1; + token.len_max[1] = 1; + token.sep[1] = '*'; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.len_min[2] = 1; + token.len_max[2] = 1; + token.sep[2] = '*'; + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.len_min[3] = 3; + token.len_max[3] = 3; + token.sep[3] = '*'; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.len_min[4] = 1; + token.len_max[4] = 6; + token.sep[4] = '*'; + token.attr[4] = TOKEN_ATTR_VERIFY_LENGTH; + + token.len_min[5] = 1; + token.len_max[5] = 1; + token.sep[5] = '*'; + token.attr[5] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.len_min[6] = 2; + token.len_max[6] = 2; + token.sep[6] = '*'; + token.attr[6] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.len_min[7] = 32; + token.len_max[7] = 64; + token.sep[7] = '*'; + token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.len_min[8] = 2; + token.len_max[8] = 2; + token.sep[8] = '*'; + token.attr[8] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.len_min[9] = 64; + token.len_max[9] = 64; + token.sep[9] = '*'; + token.attr[9] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + token.len_min[10] = 2; + token.len_max[10] = 2; + token.sep[10] = '*'; + token.attr[10] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_DIGIT; + + token.len_min[11] = 64; + token.len_max[11] = 64; + token.sep[11] = '*'; + token.attr[11] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + const u8 *V_pos = token.buf[1]; + const u8 *R_pos = token.buf[2]; + const u8 *bits_pos = token.buf[3]; + const u8 *P_pos = token.buf[4]; + const u8 *enc_md_pos = token.buf[5]; + const u8 *id_len_pos = token.buf[6]; + const u8 *id_buf_pos = token.buf[7]; + const u8 *u_len_pos = token.buf[8]; + const u8 *u_buf_pos = token.buf[9]; // user hash + const u8 *o_len_pos = token.buf[10]; + const u8 *o_buf_pos = token.buf[11]; // owner hash + + // validate data + + const int V = strtol ((const char *) V_pos, NULL, 10); + const int R = strtol ((const char *) R_pos, NULL, 10); + const int P = strtol ((const char *) P_pos, NULL, 10); + + int vr_ok = 0; + + if ((V == 2) && (R == 3)) vr_ok = 1; + if ((V == 4) && (R == 4)) vr_ok = 1; + + if (vr_ok == 0) return (PARSER_SALT_VALUE); + + const int id_len = strtol ((const char *) id_len_pos, NULL, 10); + const int u_len = strtol ((const char *) u_len_pos, NULL, 10); + const int o_len = strtol ((const char *) o_len_pos, NULL, 10); + + if ((id_len != 16) && (id_len != 32)) return (PARSER_SALT_VALUE); + + if (u_len != 32) return (PARSER_SALT_VALUE); + if (o_len != 32) return (PARSER_SALT_VALUE); + + const int bits = strtol ((const char *) bits_pos, NULL, 10); + + if (bits != 128) return (PARSER_SALT_VALUE); + + int enc_md = 1; + + if (R >= 4) + { + enc_md = strtol ((const char *) enc_md_pos, NULL, 10); + } + + // copy data to esalt + + pdf->V = V; + pdf->R = R; + pdf->P = P; + + pdf->enc_md = enc_md; + + pdf->id_buf[0] = hex_to_u32 (id_buf_pos + 0); + pdf->id_buf[1] = hex_to_u32 (id_buf_pos + 8); + pdf->id_buf[2] = hex_to_u32 (id_buf_pos + 16); + pdf->id_buf[3] = hex_to_u32 (id_buf_pos + 24); + + if (id_len == 32) + { + pdf->id_buf[4] = hex_to_u32 (id_buf_pos + 32); + pdf->id_buf[5] = hex_to_u32 (id_buf_pos + 40); + pdf->id_buf[6] = hex_to_u32 (id_buf_pos + 48); + pdf->id_buf[7] = hex_to_u32 (id_buf_pos + 56); + } + + pdf->id_len = id_len; + + pdf->u_buf[0] = hex_to_u32 (u_buf_pos + 0); + pdf->u_buf[1] = hex_to_u32 (u_buf_pos + 8); + pdf->u_buf[2] = hex_to_u32 (u_buf_pos + 16); + pdf->u_buf[3] = hex_to_u32 (u_buf_pos + 24); + pdf->u_buf[4] = hex_to_u32 (u_buf_pos + 32); + pdf->u_buf[5] = hex_to_u32 (u_buf_pos + 40); + pdf->u_buf[6] = hex_to_u32 (u_buf_pos + 48); + pdf->u_buf[7] = hex_to_u32 (u_buf_pos + 56); + pdf->u_len = u_len; + + pdf->o_buf[0] = hex_to_u32 (o_buf_pos + 0); + pdf->o_buf[1] = hex_to_u32 (o_buf_pos + 8); + pdf->o_buf[2] = hex_to_u32 (o_buf_pos + 16); + pdf->o_buf[3] = hex_to_u32 (o_buf_pos + 24); + pdf->o_buf[4] = hex_to_u32 (o_buf_pos + 32); + pdf->o_buf[5] = hex_to_u32 (o_buf_pos + 40); + pdf->o_buf[6] = hex_to_u32 (o_buf_pos + 48); + pdf->o_buf[7] = hex_to_u32 (o_buf_pos + 56); + pdf->o_len = o_len; + + // precompute rc4 data for later use + + u32 padding[8] = + { + 0x5e4ebf28, + 0x418a754e, + 0x564e0064, + 0x0801faff, + 0xb6002e2e, + 0x803e68d0, + 0xfea90c2f, + 0x7a695364 + }; + + // md5 + + u32 salt_pc_block[32] = { 0 }; + + u8 *salt_pc_ptr = (u8 *) salt_pc_block; + + memcpy (salt_pc_ptr, padding, 32); + memcpy (salt_pc_ptr + 32, pdf->id_buf, pdf->id_len); + + u32 salt_pc_digest[4] = { 0 }; + + md5_complete_no_limit (salt_pc_digest, salt_pc_block, 32 + pdf->id_len); + + pdf->rc4data[0] = salt_pc_digest[0]; + pdf->rc4data[1] = salt_pc_digest[1]; + + // we use ID for salt, maybe needs to change, we will see... + + salt->salt_buf[0] = pdf->id_buf[0]; + salt->salt_buf[1] = pdf->id_buf[1]; + salt->salt_buf[2] = pdf->id_buf[2]; + salt->salt_buf[3] = pdf->id_buf[3]; + salt->salt_buf[4] = pdf->o_buf[0]; // switched u_buf with o_buf vs m10500 + salt->salt_buf[5] = pdf->o_buf[1]; + salt->salt_buf[6] = pdf->u_buf[0]; + salt->salt_buf[7] = pdf->u_buf[1]; + salt->salt_len = pdf->id_len + 16; + + salt->salt_iter = (50 + 20); + + digest[0] = pdf->o_buf[0]; // o_buf instead of u_buf vs m10500 + digest[1] = pdf->o_buf[1]; + digest[2] = 0; + digest[3] = 0; + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + const pdf_t *pdf = (const pdf_t *) esalt_buf; + + int line_len = 0; + + if (pdf->id_len == 32) + { + line_len = snprintf (line_buf, line_size, "$pdf$%d*%d*%d*%d*%d*%d*%08x%08x%08x%08x%08x%08x%08x%08x*%d*%08x%08x%08x%08x%08x%08x%08x%08x*%d*%08x%08x%08x%08x%08x%08x%08x%08x", + pdf->V, + pdf->R, + 128, + pdf->P, + pdf->enc_md, + pdf->id_len, + byte_swap_32 (pdf->id_buf[0]), + byte_swap_32 (pdf->id_buf[1]), + byte_swap_32 (pdf->id_buf[2]), + byte_swap_32 (pdf->id_buf[3]), + byte_swap_32 (pdf->id_buf[4]), + byte_swap_32 (pdf->id_buf[5]), + byte_swap_32 (pdf->id_buf[6]), + byte_swap_32 (pdf->id_buf[7]), + pdf->u_len, + byte_swap_32 (pdf->u_buf[0]), + byte_swap_32 (pdf->u_buf[1]), + byte_swap_32 (pdf->u_buf[2]), + byte_swap_32 (pdf->u_buf[3]), + byte_swap_32 (pdf->u_buf[4]), + byte_swap_32 (pdf->u_buf[5]), + byte_swap_32 (pdf->u_buf[6]), + byte_swap_32 (pdf->u_buf[7]), + pdf->o_len, + byte_swap_32 (pdf->o_buf[0]), + byte_swap_32 (pdf->o_buf[1]), + byte_swap_32 (pdf->o_buf[2]), + byte_swap_32 (pdf->o_buf[3]), + byte_swap_32 (pdf->o_buf[4]), + byte_swap_32 (pdf->o_buf[5]), + byte_swap_32 (pdf->o_buf[6]), + byte_swap_32 (pdf->o_buf[7]) + ); + } + else + { + line_len = snprintf (line_buf, line_size, "$pdf$%d*%d*%d*%d*%d*%d*%08x%08x%08x%08x*%d*%08x%08x%08x%08x%08x%08x%08x%08x*%d*%08x%08x%08x%08x%08x%08x%08x%08x", + pdf->V, + pdf->R, + 128, + pdf->P, + pdf->enc_md, + pdf->id_len, + byte_swap_32 (pdf->id_buf[0]), + byte_swap_32 (pdf->id_buf[1]), + byte_swap_32 (pdf->id_buf[2]), + byte_swap_32 (pdf->id_buf[3]), + pdf->u_len, + byte_swap_32 (pdf->u_buf[0]), + byte_swap_32 (pdf->u_buf[1]), + byte_swap_32 (pdf->u_buf[2]), + byte_swap_32 (pdf->u_buf[3]), + byte_swap_32 (pdf->u_buf[4]), + byte_swap_32 (pdf->u_buf[5]), + byte_swap_32 (pdf->u_buf[6]), + byte_swap_32 (pdf->u_buf[7]), + pdf->o_len, + byte_swap_32 (pdf->o_buf[0]), + byte_swap_32 (pdf->o_buf[1]), + byte_swap_32 (pdf->o_buf[2]), + byte_swap_32 (pdf->o_buf[3]), + byte_swap_32 (pdf->o_buf[4]), + byte_swap_32 (pdf->o_buf[5]), + byte_swap_32 (pdf->o_buf[6]), + byte_swap_32 (pdf->o_buf[7]) + ); + } + + return line_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = module_jit_build_options; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = module_kernel_threads_max; + module_ctx->module_kernel_threads_min = module_kernel_threads_min; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_25500.c b/src/modules/module_25500.c new file mode 100644 index 000000000..5201ef5ed --- /dev/null +++ b/src/modules/module_25500.c @@ -0,0 +1,366 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" +#include "memory.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_4; +static const u32 HASH_CATEGORY = HASH_CATEGORY_PASSWORD_MANAGER; +static const char *HASH_NAME = "Stargazer Stellar Wallet XLM"; +static const u64 KERN_TYPE = 25500; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_ST_BASE64 + | OPTS_TYPE_HASH_COPY; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "lacoin"; +static const char *ST_HASH = "$stellar$ZCtl/+vWiLL358Jz+xnP5A==$GgmFU37DSX4evSMU$CoMGXWHqDmLwxRAgORqjK/MyFEMAkMbqvDEDMjn4veVwpHab9m6Egcwp70qEJsRhjkHjCMWj9zX40tu9UK5QACuB8gD1r9Cu"; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +typedef struct pbkdf2_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[32]; + u32 out[32]; + +} pbkdf2_sha256_tmp_t; + +typedef struct pbkdf2_sha256_aes_gcm +{ + u32 salt_buf[64]; + u32 iv_buf[4]; + u32 iv_len; + u32 ct_buf[16]; + u32 ct_len; + +} pbkdf2_sha256_aes_gcm_t; + +static const char *SIGNATURE_STARGAZER_STELLAR_WALLET_XLM = "$stellar$"; + +char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + char *jit_build_options = NULL; + + // Extra treatment for Apple systems + if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) + { + return jit_build_options; + } + + // ROCM + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) + { + hc_asprintf (&jit_build_options, "-D _unroll"); + } + + return jit_build_options; +} + +u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (pbkdf2_sha256_aes_gcm_t); + + return esalt_size; +} + +u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (pbkdf2_sha256_tmp_t); + + return tmp_size; +} + +u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + // this overrides the reductions of PW_MAX in case optimized kernel is selected + // IOW, even in optimized kernel mode it support length 256 + + const u32 pw_max = PW_MAX; + + return pw_max; +} + +int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + pbkdf2_sha256_aes_gcm_t *stellar = (pbkdf2_sha256_aes_gcm_t *) esalt_buf; + + token_t token; + + token.token_cnt = 4; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_STARGAZER_STELLAR_WALLET_XLM; + + token.len[0] = 9; + token.attr[0] = TOKEN_ATTR_FIXED_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + token.sep[1] = '$'; + token.len_min[1] = 24; + token.len_max[1] = 24; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + token.sep[2] = '$'; + token.len_min[2] = 16; + token.len_max[2] = 16; + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + token.sep[3] = '$'; + token.len_min[3] = 96; + token.len_max[3] = 96; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_BASE64A; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + u8 tmp_buf[512]; + + size_t tmp_len = 0; + + // iter + + salt->salt_iter = 4096 - 1; + + // salt + + const u8 *salt_pos = token.buf[1]; + const int salt_len = token.len[1]; + + memset (tmp_buf, 0, sizeof (tmp_buf)); + + tmp_len = base64_decode (base64_to_int, salt_pos, salt_len, tmp_buf); + + if (tmp_len != 16) return (PARSER_SALT_LENGTH); + + memcpy (salt->salt_buf, tmp_buf, tmp_len); + + salt->salt_len = tmp_len; + + stellar->salt_buf[0] = salt->salt_buf[0]; + stellar->salt_buf[1] = salt->salt_buf[1]; + stellar->salt_buf[2] = salt->salt_buf[2]; + stellar->salt_buf[3] = salt->salt_buf[3]; + + // iv + + const u8 *iv_pos = token.buf[2]; + const int iv_len = token.len[2]; + + memset (tmp_buf, 0, sizeof (tmp_buf)); + + tmp_len = base64_decode (base64_to_int, iv_pos, iv_len, tmp_buf); + + if (tmp_len != 12) return (PARSER_IV_LENGTH); + + memcpy ((u8 *)stellar->iv_buf, tmp_buf, tmp_len); + + stellar->iv_buf[0] = byte_swap_32 (stellar->iv_buf[0]); + stellar->iv_buf[1] = byte_swap_32 (stellar->iv_buf[1]); + stellar->iv_buf[2] = byte_swap_32 (stellar->iv_buf[2]); + stellar->iv_buf[3] = 0x000001; + + stellar->iv_len = tmp_len; + + // ciphertext + + const u8 *ct_pos = token.buf[3]; + const int ct_len = token.len[3]; + + memset (tmp_buf, 0, sizeof (tmp_buf)); + + tmp_len = base64_decode (base64_to_int, ct_pos, ct_len, tmp_buf); + + if (tmp_len != 72) return (PARSER_CT_LENGTH); + + memcpy ((u8 *)stellar->ct_buf, tmp_buf, tmp_len - 16); + + for (u32 i = 0; i < 14; i++) + { + stellar->ct_buf[i] = byte_swap_32 (stellar->ct_buf[i]); + } + + stellar->ct_buf[14] = 0; + stellar->ct_buf[15] = 0; + + stellar->ct_len = tmp_len - 16; + + // tag + + u32 tag_buf[4]; + + memset (tag_buf, 0, sizeof (tag_buf)); + + memcpy ((u8 *)tag_buf, tmp_buf+stellar->ct_len, 16); + + digest[0] = byte_swap_32 (tag_buf[0]); + digest[1] = byte_swap_32 (tag_buf[1]); + digest[2] = byte_swap_32 (tag_buf[2]); + digest[3] = byte_swap_32 (tag_buf[3]); + + return (PARSER_OK); +} + +int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + const u32 *digest = (const u32 *) digest_buf; + + pbkdf2_sha256_aes_gcm_t *stellar = (pbkdf2_sha256_aes_gcm_t *) esalt_buf; + + // salt + + #define SALT_LEN_BASE64 ((16 * 8) / 6) + 3 + #define IV_LEN_BASE64 ((12 * 8) / 6) + 3 + #define CT_LEN_BASE64 ((72 * 8) / 6) + 3 + + u8 salt_buf[SALT_LEN_BASE64] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) salt->salt_buf, (const int) salt->salt_len, salt_buf); + + // iv + + u32 tmp_iv_buf[3] = { 0 }; + + tmp_iv_buf[0] = byte_swap_32 (stellar->iv_buf[0]); + tmp_iv_buf[1] = byte_swap_32 (stellar->iv_buf[1]); + tmp_iv_buf[2] = byte_swap_32 (stellar->iv_buf[2]); + + u8 iv_buf[IV_LEN_BASE64] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) tmp_iv_buf, (const int) stellar->iv_len, iv_buf); + + // ct + + u32 tmp_buf[18] = { 0 }; + + for (int i = 0; i < 14; i++) tmp_buf[i] = byte_swap_32 (stellar->ct_buf[i]); + + tmp_buf[14] = byte_swap_32 (digest[0]); + tmp_buf[15] = byte_swap_32 (digest[1]); + tmp_buf[16] = byte_swap_32 (digest[2]); + tmp_buf[17] = byte_swap_32 (digest[3]); + + u8 ct_buf[CT_LEN_BASE64] = { 0 }; + + base64_encode (int_to_base64, (const u8 *) tmp_buf, (const int) stellar->ct_len+16, ct_buf); + + u8 *out_buf = (u8 *) line_buf; + + int out_len = snprintf ((char *) out_buf, line_size, "%s%s$%s$%s", + SIGNATURE_STARGAZER_STELLAR_WALLET_XLM, + salt_buf, + iv_buf, + ct_buf); + + return out_len; +} + +void module_init (module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = module_jit_build_options; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = MODULE_DEFAULT; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/modules/module_25900.c b/src/modules/module_25900.c new file mode 100644 index 000000000..e02d323c9 --- /dev/null +++ b/src/modules/module_25900.c @@ -0,0 +1,332 @@ +/** + * Author......: Robert Guetzkow + * License.....: MIT + */ + +#include "common.h" +#include "types.h" +#include "modules.h" +#include "bitops.h" +#include "convert.h" +#include "shared.h" + +static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; +static const u32 DGST_POS0 = 0; +static const u32 DGST_POS1 = 1; +static const u32 DGST_POS2 = 2; +static const u32 DGST_POS3 = 3; +static const u32 DGST_SIZE = DGST_SIZE_4_4; +static const u32 HASH_CATEGORY = HASH_CATEGORY_NETWORK_PROTOCOL; +static const char *HASH_NAME = "KNX IP Secure - Device Authentication Code"; +static const u64 KERN_TYPE = 25900; +static const u32 OPTI_TYPE = OPTI_TYPE_SLOW_HASH_SIMD_LOOP; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_DEEP_COMP_KERNEL; +static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; +static const char *ST_PASS = "hashcat"; +static const char *ST_HASH = "$knx-ip-secure-device-authentication-code$*3033*fa7c0d787a9467c209f0a6e7cf16069ed704f3959dce19e45d7935c0a91bce41*f927640d9bbe9a4b0b74dd3289ad41ec"; + +u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } +u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } +u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1; } +u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2; } +u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3; } +u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE; } +u32 module_hash_category (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY; } +const char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME; } +u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE; } +u32 module_opti_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE; } +u64 module_opts_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE; } +u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE; } +const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } +const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } + +/* Details of the protocol design can be found in ISO 22510:2019 and the application notes published by the KNX Association. */ + +typedef struct blocks +{ + u32 b1[4]; + u32 b2[4]; + u32 b3[4]; + +} blocks_t; + +typedef struct pbkdf2_sha256_tmp +{ + u32 ipad[8]; + u32 opad[8]; + + u32 dgst[32]; + u32 out[32]; + +} pbkdf2_sha256_tmp_t; + +static const char *SIGNATURE_DEVICE_AUTHENTICATION_CODE = "$knx-ip-secure-device-authentication-code$"; +static const char *SALT_DEVICE_AUTHENTICATION_CODE = "device-authentication-code.1.secure.ip.knx.org"; +static const int ROUNDS_DEVICE_AUTHENTICATION_CODE = 65536; + +char* module_jit_build_options(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + char* jit_build_options = NULL; + + // Extra treatment for Apple systems + if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) + { + return jit_build_options; + } + + // NVIDIA GPU + if (device_param->opencl_device_vendor_id == VENDOR_ID_NV) + { + hc_asprintf(&jit_build_options, "-D _unroll"); + } + + // ROCM + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) + { + hc_asprintf(&jit_build_options, "-D _unroll"); + } + + return jit_build_options; +} + +u32 module_deep_comp_kernel(MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const u32 salt_pos, MAYBE_UNUSED const u32 digest_pos) +{ + return KERN_RUN_3; +} + +u64 module_esalt_size(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 esalt_size = (const u64) sizeof (blocks_t); + + return esalt_size; +} + +u64 module_tmp_size(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u64 tmp_size = (const u64) sizeof (pbkdf2_sha256_tmp_t); + + return tmp_size; +} + +u32 module_pw_min(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u32 pw_min = 0; + + return pw_min; +} + +u32 module_pw_max(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + // The ETS 5 allows a maximum of 20 ASCII characters for the password used to derive the device authentication code. + const u32 pw_max = 20; + + return pw_max; +} + +int module_hash_decode(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) +{ + u32 *digest = (u32 *) digest_buf; + + blocks_t *blocks = (blocks_t *) esalt_buf; + + token_t token; + + token.token_cnt = 4; + + token.signatures_cnt = 1; + token.signatures_buf[0] = SIGNATURE_DEVICE_AUTHENTICATION_CODE; + + // Signature + token.sep[0] = '*'; + token.len_min[0] = 42; + token.len_max[0] = 42; + token.attr[0] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_SIGNATURE; + + // Secure Session Identifier (from SESSION_RESPONSE) + token.sep[1] = '*'; + token.len_min[1] = 4; + token.len_max[1] = 4; + token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + // XOR of Client Public Value X (from SESSION_REQUEST) + // and Server Public Value Y (from SESSION_RESPONSE) + token.sep[2] = '*'; + token.len_min[2] = 64; + token.len_max[2] = 64; + token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + // Message Authentication Code (from SESSION_RESPONSE) + token.sep[3] = '*'; + token.len_min[3] = 32; + token.len_max[3] = 32; + token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + | TOKEN_ATTR_VERIFY_HEX; + + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); + + if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); + + const u8 *secure_session_identifier_pos = token.buf[1]; + const int secure_session_identifier_len = token.len[1]; + + const u8 *public_value_xor_pos = token.buf[2]; + const int public_value_xor_len = token.len[2]; + + const u8 *mac_pos = token.buf[3]; + + u8 secure_session_identifier[2]; + u8 public_value_xor[32]; + + hex_decode (secure_session_identifier_pos, secure_session_identifier_len, (u8 *) &secure_session_identifier); + hex_decode (public_value_xor_pos, public_value_xor_len, (u8 *) &public_value_xor); + + digest[0] = hex_to_u32 ((const u8 *) &mac_pos[0]); + digest[1] = hex_to_u32 ((const u8 *) &mac_pos[8]); + digest[2] = hex_to_u32 ((const u8 *) &mac_pos[16]); + digest[3] = hex_to_u32 ((const u8 *) &mac_pos[24]); + + u8 b1[16] = { 0x00, //-x Length of the associated data + 0x28, //_| + 0x06, //-x KNX IP Secure header of SESSION_RESPONSE + 0x10, // | + 0x09, // | + 0x52, // | + 0x00, // | + 0x38, //_| + secure_session_identifier[0], + secure_session_identifier[1], + public_value_xor[0], + public_value_xor[1], + public_value_xor[2], + public_value_xor[3], + public_value_xor[4], + public_value_xor[5] }; + memcpy (blocks->b1, b1, sizeof(b1)); + + memcpy (blocks->b2, &public_value_xor[6], 16); + + // The bytes that don't get set are zero padding + memset (blocks->b3, 0, 16); + memcpy (blocks->b3, &public_value_xor[22], 10); + + // The salt used in the derivation of the device authentication code is constant + size_t salt_len = strlen(SALT_DEVICE_AUTHENTICATION_CODE); // exclude the null byte + memcpy (salt->salt_buf, SALT_DEVICE_AUTHENTICATION_CODE, salt_len); + salt->salt_len = salt_len; + salt->salt_iter = ROUNDS_DEVICE_AUTHENTICATION_CODE - 1; + + return (PARSER_OK); +} + +int module_hash_encode(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size) +{ + const u32 *digest = (const u32 *) digest_buf; + + blocks_t *blocks = (blocks_t *) esalt_buf; + + u8 secure_session_identifier[2]; + u8 secure_session_identifier_hex[5] = { 0 }; + u8 public_value_xor[32]; + u8 public_value_xor_hex[65] = { 0 }; + + memcpy (secure_session_identifier, &(blocks->b1[2]), 2); + + memcpy (&public_value_xor[ 0], ((u8 *) &blocks->b1[2]) + 2, 6); + memcpy (&public_value_xor[ 6], &(blocks->b2[0]), 16); + memcpy (&public_value_xor[22], &(blocks->b3[0]), 10); + + hex_encode(secure_session_identifier, 2, secure_session_identifier_hex); + hex_encode(public_value_xor, 32, public_value_xor_hex); + + const int line_len = snprintf (line_buf, line_size, "%s*%s*%s*%08x%08x%08x%08x", + SIGNATURE_DEVICE_AUTHENTICATION_CODE, + secure_session_identifier_hex, + public_value_xor_hex, + byte_swap_32 (digest[0]), + byte_swap_32 (digest[1]), + byte_swap_32 (digest[2]), + byte_swap_32 (digest[3]) + ); + + return line_len; +} + +void module_init(module_ctx_t *module_ctx) +{ + module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT; + module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT; + + module_ctx->module_attack_exec = module_attack_exec; + module_ctx->module_benchmark_esalt = MODULE_DEFAULT; + module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; + module_ctx->module_benchmark_mask = MODULE_DEFAULT; + module_ctx->module_benchmark_salt = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = module_deep_comp_kernel; + module_ctx->module_dgst_pos0 = module_dgst_pos0; + module_ctx->module_dgst_pos1 = module_dgst_pos1; + module_ctx->module_dgst_pos2 = module_dgst_pos2; + module_ctx->module_dgst_pos3 = module_dgst_pos3; + module_ctx->module_dgst_size = module_dgst_size; + module_ctx->module_dictstat_disable = MODULE_DEFAULT; + module_ctx->module_esalt_size = module_esalt_size; + module_ctx->module_extra_buffer_size = MODULE_DEFAULT; + module_ctx->module_extra_tmp_size = MODULE_DEFAULT; + module_ctx->module_forced_outfile_format = MODULE_DEFAULT; + module_ctx->module_hash_binary_count = MODULE_DEFAULT; + module_ctx->module_hash_binary_parse = MODULE_DEFAULT; + module_ctx->module_hash_binary_save = MODULE_DEFAULT; + module_ctx->module_hash_decode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT; + module_ctx->module_hash_decode = module_hash_decode; + module_ctx->module_hash_encode_status = MODULE_DEFAULT; + module_ctx->module_hash_encode_potfile = MODULE_DEFAULT; + module_ctx->module_hash_encode = module_hash_encode; + module_ctx->module_hash_init_selftest = MODULE_DEFAULT; + module_ctx->module_hash_mode = MODULE_DEFAULT; + module_ctx->module_hash_category = module_hash_category; + module_ctx->module_hash_name = module_hash_name; + module_ctx->module_hashes_count_min = MODULE_DEFAULT; + module_ctx->module_hashes_count_max = MODULE_DEFAULT; + module_ctx->module_hlfmt_disable = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_size = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_init = MODULE_DEFAULT; + module_ctx->module_hook_extra_param_term = MODULE_DEFAULT; + module_ctx->module_hook12 = MODULE_DEFAULT; + module_ctx->module_hook23 = MODULE_DEFAULT; + module_ctx->module_hook_salt_size = MODULE_DEFAULT; + module_ctx->module_hook_size = MODULE_DEFAULT; + module_ctx->module_jit_build_options = module_jit_build_options; + module_ctx->module_jit_cache_disable = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_min = MODULE_DEFAULT; + module_ctx->module_kernel_loops_max = MODULE_DEFAULT; + module_ctx->module_kernel_loops_min = MODULE_DEFAULT; + module_ctx->module_kernel_threads_max = MODULE_DEFAULT; + module_ctx->module_kernel_threads_min = MODULE_DEFAULT; + module_ctx->module_kern_type = module_kern_type; + module_ctx->module_kern_type_dynamic = MODULE_DEFAULT; + module_ctx->module_opti_type = module_opti_type; + module_ctx->module_opts_type = module_opts_type; + module_ctx->module_outfile_check_disable = MODULE_DEFAULT; + module_ctx->module_outfile_check_nocomp = MODULE_DEFAULT; + module_ctx->module_potfile_custom_check = MODULE_DEFAULT; + module_ctx->module_potfile_disable = MODULE_DEFAULT; + module_ctx->module_potfile_keep_all_hashes = MODULE_DEFAULT; + module_ctx->module_pwdump_column = MODULE_DEFAULT; + module_ctx->module_pw_max = module_pw_max; + module_ctx->module_pw_min = module_pw_min; + module_ctx->module_salt_max = MODULE_DEFAULT; + module_ctx->module_salt_min = MODULE_DEFAULT; + module_ctx->module_salt_type = module_salt_type; + module_ctx->module_separator = MODULE_DEFAULT; + module_ctx->module_st_hash = module_st_hash; + module_ctx->module_st_pass = module_st_pass; + module_ctx->module_tmp_size = module_tmp_size; + module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_warmup_disable = MODULE_DEFAULT; +} diff --git a/src/mpsp.c b/src/mpsp.c index 96f82c65b..908d0d443 100644 --- a/src/mpsp.c +++ b/src/mpsp.c @@ -1391,7 +1391,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) mask_ctx->enabled = false; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->show == true) return 0; @@ -1400,6 +1400,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) return 0; if (user_options->attack_mode == ATTACK_MODE_COMBI) return 0; + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) return 0; mask_ctx->enabled = true; diff --git a/src/outfile.c b/src/outfile.c index a998a3989..bc18f4520 100644 --- a/src/outfile.c +++ b/src/outfile.c @@ -143,7 +143,7 @@ int build_plain (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl } else { - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { pw_t pw; @@ -428,7 +428,7 @@ int build_debugdata (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param const u64 gidvid = plain->gidvid; const u32 il_pos = plain->il_pos; - if (user_options->attack_mode != ATTACK_MODE_STRAIGHT) return 0; + if ((user_options->attack_mode != ATTACK_MODE_STRAIGHT) && (user_options->attack_mode != ATTACK_MODE_ASSOCIATION)) return 0; const u32 debug_mode = debugfile_ctx->mode; diff --git a/src/outfile_check.c b/src/outfile_check.c index 02e3cb4fa..c7c670c47 100644 --- a/src/outfile_check.c +++ b/src/outfile_check.c @@ -224,22 +224,7 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx) memset (hash_buf.hook_salt, 0, hashconfig->hook_salt_size); } - int parser_status = PARSER_HASH_LENGTH; - - if (module_ctx->module_hash_decode_potfile != MODULE_DEFAULT) - { - void *tmps = hcmalloc (hashconfig->tmp_size); - - parser_status = module_ctx->module_hash_decode_potfile (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_hash_len, tmps); - - hcfree (tmps); - } - else - { - // "normal" case: hash in the outfile is the same as the hash in the original hash file - - parser_status = module_ctx->module_hash_decode (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_hash_len); - } + int parser_status = module_ctx->module_hash_decode (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_hash_len); if (parser_status != PARSER_OK) continue; @@ -360,7 +345,7 @@ int outcheck_ctx_init (hashcat_ctx_t *hashcat_ctx) if (user_options->keyspace == true) return 0; if (user_options->benchmark == true) return 0; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->speed_only == true) return 0; if (user_options->progress_only == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/potfile.c b/src/potfile.c index c8864f7e3..e8059c0c2 100644 --- a/src/potfile.c +++ b/src/potfile.c @@ -111,7 +111,7 @@ int potfile_init (hashcat_ctx_t *hashcat_ctx) potfile_ctx->enabled = false; if (user_options->benchmark == true) return 0; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->stdout_flag == true) return 0; diff --git a/src/restore.c b/src/restore.c index a56c1aa08..7d3c41ff4 100644 --- a/src/restore.c +++ b/src/restore.c @@ -299,7 +299,7 @@ int restore_ctx_init (hashcat_ctx_t *hashcat_ctx, int argc, char **argv) restore_ctx->enabled = false; if (user_options->benchmark == true) return 0; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/selftest.c b/src/selftest.c index 2b381dc35..4b752338d 100644 --- a/src/selftest.c +++ b/src/selftest.c @@ -419,31 +419,31 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param { if (highest_pw_len < 16) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_1, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_1, 0, 1, false, 0) == -1) return -1; } else if (highest_pw_len < 32) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, 0, 1, false, 0) == -1) return -1; } else { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_3, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_3, 0, 1, false, 0) == -1) return -1; } } else { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_4, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_4, 0, 1, false, 0) == -1) return -1; } } else { // missing handling hooks - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_1, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_1, 0, 1, false, 0) == -1) return -1; if (hashconfig->opts_type & OPTS_TYPE_HOOK12) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_12, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_12, 0, 1, false, 0) == -1) return -1; if (device_param->is_cuda == true) { @@ -485,17 +485,17 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param device_param->kernel_params_buf32[28] = loop_pos; device_param->kernel_params_buf32[29] = loop_left; - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, 0, 1, false, 0) == -1) return -1; if (hashconfig->opts_type & OPTS_TYPE_LOOP_EXTENDED) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2E, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2E, 0, 1, false, 0) == -1) return -1; } } if (hashconfig->opts_type & OPTS_TYPE_HOOK23) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_23, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_23, 0, 1, false, 0) == -1) return -1; if (device_param->is_cuda == true) { @@ -522,7 +522,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param if (hashconfig->opts_type & OPTS_TYPE_INIT2) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_INIT2, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_INIT2, 0, 1, false, 0) == -1) return -1; } if (hashconfig->opts_type & OPTS_TYPE_LOOP2) @@ -538,7 +538,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param device_param->kernel_params_buf32[28] = loop_pos; device_param->kernel_params_buf32[29] = loop_left; - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_LOOP2, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_LOOP2, 0, 1, false, 0) == -1) return -1; } } @@ -549,26 +549,26 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param if (hashconfig->opts_type & OPTS_TYPE_AUX1) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_AUX1, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_AUX1, 0, 1, false, 0) == -1) return -1; } if (hashconfig->opts_type & OPTS_TYPE_AUX2) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_AUX2, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_AUX2, 0, 1, false, 0) == -1) return -1; } if (hashconfig->opts_type & OPTS_TYPE_AUX3) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_AUX3, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_AUX3, 0, 1, false, 0) == -1) return -1; } if (hashconfig->opts_type & OPTS_TYPE_AUX4) { - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_AUX4, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_AUX4, 0, 1, false, 0) == -1) return -1; } } - if (run_kernel (hashcat_ctx, device_param, KERN_RUN_3, 1, false, 0) == -1) return -1; + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_3, 0, 1, false, 0) == -1) return -1; } device_param->spin_damp = spin_damp_sav; diff --git a/src/shared.c b/src/shared.c index 3bfda6aec..0150ea917 100644 --- a/src/shared.c +++ b/src/shared.c @@ -57,6 +57,8 @@ static const char *PA_038 = "Invalid key size"; static const char *PA_039 = "Invalid block size"; static const char *PA_040 = "Invalid or unsupported cipher"; static const char *PA_041 = "Invalid filesize"; +static const char *PA_042 = "IV length exception"; +static const char *PA_043 = "CT length exception"; static const char *PA_255 = "Unknown error"; static const char *OPTI_STR_OPTIMIZED_KERNEL = "Optimized-Kernel"; @@ -1032,6 +1034,8 @@ const char *strparser (const u32 parser_status) case PARSER_BLOCK_SIZE: return PA_039; case PARSER_CIPHER: return PA_040; case PARSER_FILE_SIZE: return PA_041; + case PARSER_IV_LENGTH: return PA_042; + case PARSER_CT_LENGTH: return PA_043; } return PA_255; diff --git a/src/status.c b/src/status.c index ebae643cc..a9f56190a 100644 --- a/src/status.c +++ b/src/status.c @@ -330,7 +330,17 @@ char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx) if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE) { - return hcstrdup (hashes->hashfile); + if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE_OPTIONAL) + { + if (hashes->hashfile) + { + return hcstrdup (hashes->hashfile); + } + } + else + { + return hcstrdup (hashes->hashfile); + } } char *tmp_buf = (char *) hcmalloc (HCBUFSIZ_LARGE); @@ -375,7 +385,7 @@ int status_get_guess_mode (const hashcat_ctx_t *hashcat_ctx) if (user_options->custom_charset_3) has_mask_cs = true; if (user_options->custom_charset_4) has_mask_cs = true; - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { if (has_wordlist == true) { @@ -445,7 +455,7 @@ char *status_get_guess_base (const hashcat_ctx_t *hashcat_ctx) const user_options_t *user_options = hashcat_ctx->user_options; const user_options_extra_t *user_options_extra = hashcat_ctx->user_options_extra; - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { if (user_options_extra->wordlist_mode == WL_MODE_FILE) { @@ -501,7 +511,7 @@ int status_get_guess_base_offset (const hashcat_ctx_t *hashcat_ctx) const hashconfig_t *hashconfig = hashcat_ctx->hashconfig; const user_options_t *user_options = hashcat_ctx->user_options; - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx; @@ -549,7 +559,7 @@ int status_get_guess_base_count (const hashcat_ctx_t *hashcat_ctx) const hashconfig_t *hashconfig = hashcat_ctx->hashconfig; const user_options_t *user_options = hashcat_ctx->user_options; - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx; @@ -607,7 +617,7 @@ char *status_get_guess_mod (const hashcat_ctx_t *hashcat_ctx) const hashconfig_t *hashconfig = hashcat_ctx->hashconfig; const user_options_t *user_options = hashcat_ctx->user_options; - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { return status_get_rules_file (hashcat_ctx); } @@ -657,7 +667,7 @@ int status_get_guess_mod_offset (const hashcat_ctx_t *hashcat_ctx) const hashconfig_t *hashconfig = hashcat_ctx->hashconfig; const user_options_t *user_options = hashcat_ctx->user_options; - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { return 1; } @@ -701,7 +711,7 @@ int status_get_guess_mod_count (const hashcat_ctx_t *hashcat_ctx) const hashconfig_t *hashconfig = hashcat_ctx->hashconfig; const user_options_t *user_options = hashcat_ctx->user_options; - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { return 1; } @@ -1028,7 +1038,6 @@ char *status_get_time_estimated_absolute (const hashcat_ctx_t *hashcat_ctx) time_t now; time (&now); - char buf[32] = { 0 }; char *etc; @@ -1242,8 +1251,17 @@ u64 status_get_progress_cur (const hashcat_ctx_t *hashcat_ctx) u64 status_get_progress_ignore (const hashcat_ctx_t *hashcat_ctx) { - const hashes_t *hashes = hashcat_ctx->hashes; - const status_ctx_t *status_ctx = hashcat_ctx->status_ctx; + const hashes_t *hashes = hashcat_ctx->hashes; + const status_ctx_t *status_ctx = hashcat_ctx->status_ctx; + const user_options_t *user_options = hashcat_ctx->user_options; + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + // we have no salt based skips in this attack mode + // ?? words_progress_restored[] + + return 0; + } // Important for ETA only @@ -1273,7 +1291,16 @@ u64 status_get_progress_end (const hashcat_ctx_t *hashcat_ctx) const user_options_t *user_options = hashcat_ctx->user_options; const user_options_extra_t *user_options_extra = hashcat_ctx->user_options_extra; - u64 progress_end = status_ctx->words_cnt * hashes->salts_cnt; + u64 progress_end = status_ctx->words_cnt; + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + // nothing to do + } + else + { + progress_end *= hashes->salts_cnt; + } if (user_options->limit) { @@ -1281,7 +1308,16 @@ u64 status_get_progress_end (const hashcat_ctx_t *hashcat_ctx) const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx; const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx; - progress_end = MIN (user_options->limit, status_ctx->words_base) * hashes->salts_cnt; + progress_end = MIN (user_options->limit, status_ctx->words_base); + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + // nothing to do + } + else + { + progress_end *= hashes->salts_cnt; + } if (user_options->slow_candidates == true) { @@ -1313,7 +1349,16 @@ u64 status_get_progress_skip (const hashcat_ctx_t *hashcat_ctx) const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx; const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx; - progress_skip = MIN (user_options->skip, status_ctx->words_base) * hashes->salts_cnt; + progress_skip = MIN (user_options->skip, status_ctx->words_base); + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + // nothing to do + } + else + { + progress_skip *= hashes->salts_cnt; + } if (user_options->slow_candidates == true) { diff --git a/src/stdout.c b/src/stdout.c index 102b22d79..1fd7542bc 100644 --- a/src/stdout.c +++ b/src/stdout.c @@ -98,7 +98,7 @@ int process_stdout (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 il_cnt = device_param->kernel_params_buf32[30]; // ugly, i know - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { pw_t pw; diff --git a/src/straight.c b/src/straight.c index c00483988..9b91ec30d 100644 --- a/src/straight.c +++ b/src/straight.c @@ -43,6 +43,7 @@ int straight_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) { combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx; induct_ctx_t *induct_ctx = hashcat_ctx->induct_ctx; + hashes_t *hashes = hashcat_ctx->hashes; logfile_ctx_t *logfile_ctx = hashcat_ctx->logfile_ctx; mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx; status_ctx_t *status_ctx = hashcat_ctx->status_ctx; @@ -200,6 +201,54 @@ int straight_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) return 0; } } + else if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + if (user_options_extra->wordlist_mode == WL_MODE_FILE) + { + straight_ctx->dict = straight_ctx->dicts[straight_ctx->dicts_pos]; + + logfile_sub_string (straight_ctx->dict); + + for (u32 i = 0; i < user_options->rp_files_cnt; i++) + { + logfile_sub_var_string ("rulefile", user_options->rp_files[i]); + } + + HCFILE fp; + + if (hc_fopen (&fp, straight_ctx->dict, "rb") == false) + { + event_log_error (hashcat_ctx, "%s: %s", straight_ctx->dict, strerror (errno)); + + return -1; + } + + const int rc = count_words (hashcat_ctx, &fp, straight_ctx->dict, &status_ctx->words_cnt); + + hc_fclose (&fp); + + if (rc == -1) + { + event_log_error (hashcat_ctx, "Integer overflow detected in keyspace of wordlist: %s", straight_ctx->dict); + + return -1; + } + + if ((status_ctx->words_cnt / straight_ctx->kernel_rules_cnt) != hashes->salts_cnt) + { + event_log_error (hashcat_ctx, "Number of words in wordlist %s is not in sync with number of salts (words: %" PRIu64 ", salts: %d)", straight_ctx->dict, status_ctx->words_cnt, hashes->salts_cnt); + + return -1; + } + + if (status_ctx->words_cnt == 0) + { + logfile_sub_msg ("STOP"); + + return 0; + } + } + } return 0; } @@ -212,7 +261,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) straight_ctx->enabled = false; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->show == true) return 0; @@ -251,7 +300,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) * wordlist based work */ - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { if (user_options_extra->wordlist_mode == WL_MODE_FILE) { diff --git a/src/terminal.c b/src/terminal.c index cb26e9d85..403d4a956 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -537,67 +537,119 @@ void compress_terminal_line_length (char *out_buf, const size_t keep_from_beginn *ptr1 = 0; } -void example_hashes (hashcat_ctx_t *hashcat_ctx) +void hash_info_single (hashcat_ctx_t *hashcat_ctx, user_options_t *user_options) +{ + if (hashconfig_init (hashcat_ctx) == 0) + { + hashconfig_t *hashconfig = hashcat_ctx->hashconfig; + + event_log_info (hashcat_ctx, "Hash mode #%u", hashconfig->hash_mode); + event_log_info (hashcat_ctx, " Name................: %s", hashconfig->hash_name); + event_log_info (hashcat_ctx, " Category............: %s", strhashcategory (hashconfig->hash_category)); + event_log_info (hashcat_ctx, " Slow.Hash...........: %s", (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) ? "No" : "Yes"); + + event_log_info (hashcat_ctx, " Password.Len.Min....: %d", hashconfig->pw_min); + event_log_info (hashcat_ctx, " Password.Len.Max....: %d", hashconfig->pw_max); + + if (hashconfig->is_salted == true) + { + u32 t = hashconfig->salt_type; + char *t_desc = (t == SALT_TYPE_EMBEDDED) ? "Embedded\0" : (t == SALT_TYPE_GENERIC) ? "Generic\0" : "Virtual\0"; + event_log_info (hashcat_ctx, " Salt.Type...........: %s", t_desc); + event_log_info (hashcat_ctx, " Salt.Len.Min........: %d", hashconfig->salt_min); + event_log_info (hashcat_ctx, " Salt.Len.Max........: %d", hashconfig->salt_max); + } + + // almost always 1 and -1 + //event_log_info (hashcat_ctx, " Hashes.Count.Min....: %d", hashconfig->hashes_count_min); + //event_log_info (hashcat_ctx, " Hashes.Count.Max....: %u", hashconfig->hashes_count_max); + + if ((hashconfig->has_pure_kernel) && (hashconfig->has_optimized_kernel)) + { + event_log_info (hashcat_ctx, " Kernel.Type(s)......: pure, optimized"); + } + else if (hashconfig->has_pure_kernel) + { + event_log_info (hashcat_ctx, " Kernel.Type(s)......: pure"); + } + else if (hashconfig->has_optimized_kernel) + { + event_log_info (hashcat_ctx, " Kernel.Type(s)......: optimized"); + } + + if ((hashconfig->st_hash != NULL) && (hashconfig->st_pass != NULL)) + { + if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE) + { + event_log_info (hashcat_ctx, " Example.Hash.Format.: hex-encoded"); + event_log_info (hashcat_ctx, " Example.Hash........: %s", hashconfig->st_hash); + } + else + { + event_log_info (hashcat_ctx, " Example.Hash.Format.: plain"); + event_log_info (hashcat_ctx, " Example.Hash........: %s", hashconfig->st_hash); + } + + if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false)) + { + char tmp_buf[HCBUFSIZ_LARGE] = { 0 }; + + int tmp_len = 0; + + tmp_buf[tmp_len++] = '$'; + tmp_buf[tmp_len++] = 'H'; + tmp_buf[tmp_len++] = 'E'; + tmp_buf[tmp_len++] = 'X'; + tmp_buf[tmp_len++] = '['; + + exec_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), (u8 *) tmp_buf + tmp_len); + + tmp_len += strlen (hashconfig->st_pass) * 2; + + tmp_buf[tmp_len++] = ']'; + tmp_buf[tmp_len++] = 0; + + event_log_info (hashcat_ctx, " Example.Pass........: %s", tmp_buf); + } + else + { + event_log_info (hashcat_ctx, " Example.Pass........: %s", hashconfig->st_pass); + } + } + else + { + event_log_info (hashcat_ctx, " Example.Hash.Format.: N/A"); + event_log_info (hashcat_ctx, " Example.Hash........: N/A"); + event_log_info (hashcat_ctx, " Example.Pass........: N/A"); + } + + if (hashconfig->benchmark_mask != NULL) + { + event_log_info (hashcat_ctx, " Benchmark.Mask......: %s", hashconfig->benchmark_mask); + } + else + { + event_log_info (hashcat_ctx, " Benchmark.Mask......: N/A"); + } + + event_log_info (hashcat_ctx, NULL); + } + + hashconfig_destroy (hashcat_ctx); +} + +void hash_info (hashcat_ctx_t *hashcat_ctx) { folder_config_t *folder_config = hashcat_ctx->folder_config; user_options_t *user_options = hashcat_ctx->user_options; + event_log_info (hashcat_ctx, "Hash Info:"); + event_log_info (hashcat_ctx, "=========="); + event_log_info (hashcat_ctx, NULL); + if (user_options->hash_mode_chgd == true) { - if (hashconfig_init (hashcat_ctx) == 0) - { - hashconfig_t *hashconfig = hashcat_ctx->hashconfig; - - event_log_info (hashcat_ctx, "MODE: %u", hashconfig->hash_mode); - event_log_info (hashcat_ctx, "TYPE: %s", hashconfig->hash_name); - - if ((hashconfig->st_hash != NULL) && (hashconfig->st_pass != NULL)) - { - if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE) - { - event_log_info (hashcat_ctx, "HASH (hex-encoded): %s", hashconfig->st_hash); - } - else - { - event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash); - } - - if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false)) - { - char tmp_buf[HCBUFSIZ_LARGE] = { 0 }; - - int tmp_len = 0; - - tmp_buf[tmp_len++] = '$'; - tmp_buf[tmp_len++] = 'H'; - tmp_buf[tmp_len++] = 'E'; - tmp_buf[tmp_len++] = 'X'; - tmp_buf[tmp_len++] = '['; - - exec_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), (u8 *) tmp_buf + tmp_len); - - tmp_len += strlen (hashconfig->st_pass) * 2; - - tmp_buf[tmp_len++] = ']'; - tmp_buf[tmp_len++] = 0; - - event_log_info (hashcat_ctx, "PASS: %s", tmp_buf); - } - else - { - event_log_info (hashcat_ctx, "PASS: %s", hashconfig->st_pass); - } - } - else - { - event_log_info (hashcat_ctx, "HASH: not stored"); - event_log_info (hashcat_ctx, "PASS: not stored"); - } - - event_log_info (hashcat_ctx, NULL); - } - - hashconfig_destroy (hashcat_ctx); + hash_info_single (hashcat_ctx, user_options); } else { @@ -611,53 +663,7 @@ void example_hashes (hashcat_ctx_t *hashcat_ctx) if (hc_path_exist (modulefile) == false) continue; - if (hashconfig_init (hashcat_ctx) == 0) - { - hashconfig_t *hashconfig = hashcat_ctx->hashconfig; - - event_log_info (hashcat_ctx, "MODE: %u", hashconfig->hash_mode); - event_log_info (hashcat_ctx, "TYPE: %s", hashconfig->hash_name); - - if ((hashconfig->st_hash != NULL) && (hashconfig->st_pass != NULL)) - { - event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash); - - if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false)) - { - char tmp_buf[HCBUFSIZ_LARGE] = { 0 }; - - int tmp_len = 0; - - tmp_buf[tmp_len++] = '$'; - tmp_buf[tmp_len++] = 'H'; - tmp_buf[tmp_len++] = 'E'; - tmp_buf[tmp_len++] = 'X'; - tmp_buf[tmp_len++] = '['; - - exec_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), (u8 *) tmp_buf + tmp_len); - - tmp_len += strlen (hashconfig->st_pass) * 2; - - tmp_buf[tmp_len++] = ']'; - tmp_buf[tmp_len++] = 0; - - event_log_info (hashcat_ctx, "PASS: %s", tmp_buf); - } - else - { - event_log_info (hashcat_ctx, "PASS: %s", hashconfig->st_pass); - } - } - else - { - event_log_info (hashcat_ctx, "HASH: not stored"); - event_log_info (hashcat_ctx, "PASS: not stored"); - } - - event_log_info (hashcat_ctx, NULL); - } - - hashconfig_destroy (hashcat_ctx); + hash_info_single (hashcat_ctx, user_options); } hcfree (modulefile); diff --git a/src/tuningdb.c b/src/tuningdb.c index f2a7f9ac5..c06d0b88c 100644 --- a/src/tuningdb.c +++ b/src/tuningdb.c @@ -54,7 +54,7 @@ int tuning_db_init (hashcat_ctx_t *hashcat_ctx) tuning_db->enabled = false; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; @@ -147,6 +147,7 @@ int tuning_db_init (hashcat_ctx_t *hashcat_ctx) if ((token_ptr[1][0] != '0') && (token_ptr[1][0] != '1') && (token_ptr[1][0] != '3') && + (token_ptr[1][0] != '9') && (token_ptr[1][0] != '*')) { event_log_warning (hashcat_ctx, "Tuning-db: Invalid attack_mode '%c' in Line '%d'", token_ptr[1][0], line_num); diff --git a/src/usage.c b/src/usage.c index e494950fc..c0562403b 100644 --- a/src/usage.c +++ b/src/usage.c @@ -36,7 +36,7 @@ static const char *const USAGE_BIG_PRE_HASHMODES[] = " --hex-wordlist | | Assume words in wordlist are given in hex |", " --force | | Ignore warnings |", " --status | | Enable automatic update of the status screen |", - " --status-json | | Enable JSON format for status ouput |", + " --status-json | | Enable JSON format for status output |", " --status-timer | Num | Sets seconds between status screen updates to X | --status-timer=1", " --stdin-timeout-abort | Num | Abort if there is no input from stdin for X seconds | --stdin-timeout-abort=300", " --machine-readable | | Display the status view in a machine-readable format |", @@ -89,7 +89,8 @@ static const char *const USAGE_BIG_PRE_HASHMODES[] = " --bitmap-max | Num | Sets maximum bits allowed for bitmaps to X | --bitmap-max=24", " --cpu-affinity | Str | Locks to CPU devices, separated with commas | --cpu-affinity=1,2,3", " --hook-threads | Num | Sets number of threads for a hook (per compute unit) | --hook-threads=8", - " --example-hashes | | Show an example hash for each hash-mode |", + " --hash-info | | Show information for each hash-mode |", + " --example-hashes | | Alias of --hash-info |", " --backend-ignore-cuda | | Do not try to open CUDA interface on startup |", " --backend-ignore-opencl | | Do not try to open OpenCL interface on startup |", " -I, --backend-info | | Show info about detected backend API devices | -I", @@ -183,6 +184,7 @@ static const char *const USAGE_BIG_POST_HASHMODES[] = " 3 | Brute-force", " 6 | Hybrid Wordlist + Mask", " 7 | Hybrid Mask + Wordlist", + " 9 | Association", "", "- [ Built-in Charsets ] -", "", @@ -228,6 +230,7 @@ static const char *const USAGE_BIG_POST_HASHMODES[] = " Wordlist + Rules | MD5 | hashcat -a 0 -m 0 example0.hash example.dict -r rules/best64.rule", " Brute-Force | MD5 | hashcat -a 3 -m 0 example0.hash ?a?a?a?a?a?a", " Combinator | MD5 | hashcat -a 1 -m 0 example0.hash example.dict example.dict", + " Association | $1$ | hashcat -a 9 -m 500 example500.hash 1word.dict -r rules/best64.rule", "", "If you still have no idea what just happened, try the following pages:", "", diff --git a/src/user_options.c b/src/user_options.c index f22c495b8..8f0955867 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -47,7 +47,7 @@ static const struct option long_options[] = {"debug-mode", required_argument, NULL, IDX_DEBUG_MODE}, {"encoding-from", required_argument, NULL, IDX_ENCODING_FROM}, {"encoding-to", required_argument, NULL, IDX_ENCODING_TO}, - {"example-hashes", no_argument, NULL, IDX_EXAMPLE_HASHES}, + {"example-hashes", no_argument, NULL, IDX_HASH_INFO}, // alias of hash-info {"force", no_argument, NULL, IDX_FORCE}, {"generate-rules-func-max", required_argument, NULL, IDX_RP_GEN_FUNC_MAX}, {"generate-rules-func-min", required_argument, NULL, IDX_RP_GEN_FUNC_MIN}, @@ -55,6 +55,7 @@ static const struct option long_options[] = {"generate-rules-seed", required_argument, NULL, IDX_RP_GEN_SEED}, {"hwmon-disable", no_argument, NULL, IDX_HWMON_DISABLE}, {"hwmon-temp-abort", required_argument, NULL, IDX_HWMON_TEMP_ABORT}, + {"hash-info", no_argument, NULL, IDX_HASH_INFO}, {"hash-type", required_argument, NULL, IDX_HASH_MODE}, {"hccapx-message-pair", required_argument, NULL, IDX_HCCAPX_MESSAGE_PAIR}, {"help", no_argument, NULL, IDX_HELP}, @@ -184,10 +185,10 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx) user_options->debug_mode = DEBUG_MODE; user_options->encoding_from = ENCODING_FROM; user_options->encoding_to = ENCODING_TO; - user_options->example_hashes = EXAMPLE_HASHES; user_options->force = FORCE; user_options->hwmon_disable = HWMON_DISABLE; user_options->hwmon_temp_abort = HWMON_TEMP_ABORT; + user_options->hash_info = HASH_INFO; user_options->hash_mode = HASH_MODE; user_options->hccapx_message_pair = HCCAPX_MESSAGE_PAIR; user_options->hex_charset = HEX_CHARSET; @@ -380,7 +381,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv) case IDX_ENCODING_TO: user_options->encoding_to = optarg; break; case IDX_INDUCTION_DIR: user_options->induction_dir = optarg; break; case IDX_OUTFILE_CHECK_DIR: user_options->outfile_check_dir = optarg; break; - case IDX_EXAMPLE_HASHES: user_options->example_hashes = true; break; + case IDX_HASH_INFO: user_options->hash_info = true; break; case IDX_FORCE: user_options->force = true; break; case IDX_SELF_TEST_DISABLE: user_options->self_test_disable = true; break; case IDX_SKIP: user_options->skip = hc_strtoull (optarg, NULL, 10); @@ -599,6 +600,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) && (user_options->attack_mode != ATTACK_MODE_BF) && (user_options->attack_mode != ATTACK_MODE_HYBRID1) && (user_options->attack_mode != ATTACK_MODE_HYBRID2) + && (user_options->attack_mode != ATTACK_MODE_ASSOCIATION) && (user_options->attack_mode != ATTACK_MODE_NONE)) { event_log_error (hashcat_ctx, "Invalid attack mode (-a) value specified."); @@ -771,6 +773,20 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) return -1; } + if ((user_options->increment == true) && (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) + { + event_log_error (hashcat_ctx, "Increment is not allowed in attack mode 9 (association)."); + + return -1; + } + + if ((user_options->remove == true) && (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) + { + event_log_error (hashcat_ctx, "Remove is not allowed in attack mode 9 (association)."); + + return -1; + } + if ((user_options->increment == false) && (user_options->increment_min_chgd == true)) { event_log_error (hashcat_ctx, "Increment-min is only supported when combined with -i/--increment."); @@ -794,9 +810,9 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if ((user_options->rp_files_cnt > 0) || (user_options->rp_gen > 0)) { - if (user_options->attack_mode != ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode != ATTACK_MODE_STRAIGHT) && (user_options->attack_mode != ATTACK_MODE_ASSOCIATION)) { - event_log_error (hashcat_ctx, "Use of -r/--rules-file and -g/--rules-generate only allowed in attack mode 0."); + event_log_error (hashcat_ctx, "Use of -r/--rules-file and -g/--rules-generate only allowed in attack mode 0 or 9."); return -1; } @@ -1048,6 +1064,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) return -1; } + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + event_log_error (hashcat_ctx, "Use of --induction-dir is not allowed in attack mode 9 (association)."); + + return -1; + } } if (user_options->spin_damp > 100) @@ -1167,7 +1190,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) || (user_options->custom_charset_3 != NULL) || (user_options->custom_charset_4 != NULL)) { - if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) + if ((user_options->attack_mode == ATTACK_MODE_STRAIGHT) || (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)) { event_log_error (hashcat_ctx, "Custom charsets are not supported in benchmark mode."); @@ -1312,6 +1335,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) return -1; } + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + event_log_error (hashcat_ctx, "Custom charsets are not supported in attack mode 9 (association)."); + + return -1; + } + // detect if mask was specified: bool mask_is_missing = true; @@ -1362,7 +1392,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) show_error = false; } } - else if (user_options->example_hashes == true) + else if (user_options->hash_info == true) { if (user_options->hc_argc == 0) { @@ -1420,6 +1450,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) show_error = false; } } + else if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + if (user_options->hc_argc == 1) + { + show_error = false; + } + } } else if (user_options->stdout_flag == true) { @@ -1457,6 +1494,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) show_error = false; } } + else if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + if (user_options->hc_argc >= 1) + { + show_error = false; + } + } } else { @@ -1516,6 +1560,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) show_error = false; } } + else if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + if (user_options->hc_argc >= 2) + { + show_error = false; + } + } } if (show_error == true) @@ -1539,9 +1590,9 @@ void user_options_session_auto (hashcat_ctx_t *hashcat_ctx) user_options->session = "benchmark"; } - if (user_options->example_hashes == true) + if (user_options->hash_info == true) { - user_options->session = "example_hashes"; + user_options->session = "hash_info"; } if (user_options->usage == true) @@ -1617,7 +1668,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) user_options->bitmap_max = 1; } - if (user_options->example_hashes == true + if (user_options->hash_info == true || user_options->backend_info == true || user_options->keyspace == true || user_options->speed_only == true @@ -1673,7 +1724,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) } } - if (user_options->example_hashes == true) + if (user_options->hash_info == true) { user_options->quiet = true; } @@ -1727,6 +1778,10 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) { user_options->kernel_loops = KERNEL_COMBS; } + else if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + user_options->kernel_loops = KERNEL_RULES; + } } if (user_options->backend_info == true) @@ -1783,7 +1838,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) if (user_options->attack_mode == ATTACK_MODE_BF) { - if (user_options->example_hashes == true) + if (user_options->hash_info == true) { } @@ -1829,6 +1884,13 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) } } } + + // association limitations + + if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + user_options->potfile_disable = true; + } } void user_options_postprocess (hashcat_ctx_t *hashcat_ctx) @@ -1979,6 +2041,7 @@ void user_options_extra_init (hashcat_ctx_t *hashcat_ctx) case ATTACK_MODE_BF: user_options_extra->attack_kern = ATTACK_KERN_BF; break; case ATTACK_MODE_HYBRID1: user_options_extra->attack_kern = ATTACK_KERN_COMBI; break; case ATTACK_MODE_HYBRID2: user_options_extra->attack_kern = ATTACK_KERN_COMBI; break; + case ATTACK_MODE_ASSOCIATION: user_options_extra->attack_kern = ATTACK_KERN_STRAIGHT; break; } // rules @@ -1996,7 +2059,7 @@ void user_options_extra_init (hashcat_ctx_t *hashcat_ctx) { } - else if (user_options->example_hashes == true) + else if (user_options->hash_info == true) { } @@ -2441,6 +2504,53 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx) } } } + else if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + for (int i = 0; i < user_options_extra->hc_workc; i++) + { + char *wlfile = user_options_extra->hc_workv[i]; + + if (hc_path_exist (wlfile) == false) + { + event_log_error (hashcat_ctx, "%s: %s", wlfile, strerror (errno)); + + return -1; + } + } + + for (int i = 0; i < (int) user_options->rp_files_cnt; i++) + { + char *rp_file = user_options->rp_files[i]; + + if (hc_path_exist (rp_file) == false) + { + event_log_error (hashcat_ctx, "%s: %s", rp_file, strerror (errno)); + + return -1; + } + + if (hc_path_is_directory (rp_file) == true) + { + event_log_error (hashcat_ctx, "%s: A directory cannot be used as a rulefile argument.", rp_file); + + return -1; + } + + if (hc_path_read (rp_file) == false) + { + event_log_error (hashcat_ctx, "%s: %s", rp_file, strerror (errno)); + + return -1; + } + + if (hc_path_has_bom (rp_file) == true) + { + event_log_error (hashcat_ctx, "%s: Byte Order Mark (BOM) was detected", rp_file); + + return -1; + } + } + } // logfile @@ -2594,6 +2704,20 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx) } } } + else if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION) + { + for (int i = 0; i < user_options_extra->hc_workc; i++) + { + char *wlfile = user_options_extra->hc_workv[i]; + + if (hc_same_files (outfile_ctx->filename, wlfile) == true) + { + event_log_error (hashcat_ctx, "Outfile and wordlist cannot point to the same file."); + + return -1; + } + } + } // pidfile @@ -2878,7 +3002,7 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx) logfile_top_uint (user_options->bitmap_max); logfile_top_uint (user_options->bitmap_min); logfile_top_uint (user_options->debug_mode); - logfile_top_uint (user_options->example_hashes); + logfile_top_uint (user_options->hash_info); logfile_top_uint (user_options->force); logfile_top_uint (user_options->hwmon_disable); logfile_top_uint (user_options->hwmon_temp_abort); diff --git a/src/wordlist.c b/src/wordlist.c index deda8afd2..aa8aaf82e 100644 --- a/src/wordlist.c +++ b/src/wordlist.c @@ -588,7 +588,7 @@ int wl_data_init (hashcat_ctx_t *hashcat_ctx) wl_data->enabled = false; if (user_options->benchmark == true) return 0; - if (user_options->example_hashes == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->usage == true) return 0; diff --git a/tools/install_modules.sh b/tools/install_modules.sh index 731ae89c5..3d57f31d2 100755 --- a/tools/install_modules.sh +++ b/tools/install_modules.sh @@ -64,13 +64,13 @@ cpan install Authen::Passphrase::LANManager \ ERRORS=$((ERRORS+$?)) -pip install pygost +pip3 install pygost -# pip uninstall -y pycryptoplus pycrypto pycryptodome +# pip3 uninstall -y pycryptoplus pycrypto pycryptodome -pip install pycryptoplus -pip uninstall -y pycryptodome -pip install pycrypto +pip3 install pycryptoplus +pip3 uninstall -y pycryptodome +pip3 install pycrypto ERRORS=$((ERRORS+$?)) diff --git a/tools/package_bin.sh b/tools/package_bin.sh index 0beb8a0d9..5cc69d32a 100755 --- a/tools/package_bin.sh +++ b/tools/package_bin.sh @@ -44,6 +44,7 @@ dos2unix $OUT/masks/*.hcmask dos2unix $OUT/rules/*.rule dos2unix $OUT/rules/hybrid/*.rule dos2unix $OUT/docs/* +dos2unix $OUT/docs/license_libs/* dos2unix $OUT/example* unix2dos $OUT/layouts/*.hckmap @@ -51,6 +52,7 @@ unix2dos $OUT/masks/*.hcmask unix2dos $OUT/rules/*.rule unix2dos $OUT/rules/hybrid/*.rule unix2dos $OUT/docs/* +unix2dos $OUT/docs/license_libs/* unix2dos $OUT/example*.cmd unix2dos $OUT/OpenCL/* unix2dos $OUT/hashcat.hctune @@ -60,6 +62,7 @@ chmod 755 $OUT/rules chmod 644 $OUT/rules/* chmod 755 $OUT/docs chmod 644 $OUT/docs/* +chmod 644 $OUT/docs/license_libs/* chmod 755 $OUT/charsets chmod 755 $OUT/charsets/* chmod 755 $OUT/layouts diff --git a/tools/sqlcipher2hashcat.pl b/tools/sqlcipher2hashcat.pl new file mode 100755 index 000000000..930523eff --- /dev/null +++ b/tools/sqlcipher2hashcat.pl @@ -0,0 +1,75 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +# In a first version I wrote a kernel that followed the original sqlcipher scheme which uses a MAC to verify the integrity (and therefore we knew we had guessed the correct password). +# But it turns out it's much easier to exploit the sqlite header format, which guarantees 20 zero bytes starting from offset 72. +# See: https://www.sqlite.org/fileformat.html +# The advantage is the user doesn't need to guess the MAC hash type and/or pagesize (in case it they customized). +# The user still needs to know the KDF hash type and iteration count, but they sqlcipher v3 and v4 come with a default for these. +# We'll check only 12 of 16 bytes from the encrypted block as an optimization so we only need to decrypt one block. +# Another optimization is that since the scheme uses CBC we do not need to find the correct position of the IV. +# This position is depending on the pagesize and the KDF hash type (which could be customized). +# As an alternative, or in case the sqlite header changes, we could also use entropy test. +# -atom + +use strict; +use warnings; + +if (scalar (@ARGV) < 2) +{ + print "usage: $0 encrypted.db preset [hash] [iteration]\n\n"; + print "preset 1 = SQLCIPHER v3\n"; + print "preset 2 = SQLCIPHER v4\n"; + print "preset 3 = CUSTOM, please specify hash type (1 = SHA1, 2 = SHA256, 3 = SHA512) and iteration count\n"; + + exit -1; +} + +my $db = $ARGV[0]; +my $preset = $ARGV[1]; + +my $type = 0; +my $iter = 0; + +if ($preset == 1) +{ + $type = 1; + $iter = 64000; +} +elsif ($preset == 2) +{ + $type = 3; + $iter = 256000; +} +elsif ($preset == 3) +{ + $type = $ARGV[2]; + $iter = $ARGV[3]; +} +else +{ + die "Invalid preset\n"; +} + +open (IN, $db) or die ("$db: $!\n"); + +binmode (IN); + +my $data; + +if (read (IN, $data, 96) != 96) +{ + die "ERROR: Couldn't read data from the file. Maybe incorrect file format?\n"; +} + +close (IN); + +my $salt = substr ($data, 0, 16); +my $iv = substr ($data, 64, 16); +my $enc = substr ($data, 80, 16); + +printf ("SQLCIPHER*%d*%d*%s*%s*%s\n", $type, $iter, unpack ("H*", $salt), unpack ("H*", $iv), unpack ("H*", $enc)); diff --git a/tools/test.sh b/tools/test.sh index ef3d2dd55..3692e02b4 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -655,15 +655,20 @@ function attack_1() cnt=0 min=1 + max=8 if [ "${hash_type}" -eq 14000 ]; then min=0 + max=5 elif [ "${hash_type}" -eq 14100 ]; then min=0 + max=5 elif [ "${hash_type}" -eq 14900 ]; then min=0 + max=5 elif [ "${hash_type}" -eq 15400 ]; then min=0 + max=5 fi echo "> Testing hash type $hash_type with attack mode 1, markov ${MARKOV}, single hash, Device-Type ${TYPE}, vector-width ${VECTOR}." >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.txt" @@ -688,7 +693,9 @@ function attack_1() line_nr=1 - if [ "${i}" -gt 1 ]; then + if [ "$min" -eq 0 ]; then + line_nr=$i + elif [ "${i}" -gt 1 ]; then line_nr=$((i - 1)) fi @@ -778,6 +785,8 @@ function attack_1() fi + if [ $i -eq ${max} ]; then break; fi + i=$((i + 1)) done 9< "${OUTD}/${hash_type}_hashes.txt" diff --git a/tools/test_modules/m11700.pm b/tools/test_modules/m11700.pm index 52e05c9b1..8a0c250f6 100644 --- a/tools/test_modules/m11700.pm +++ b/tools/test_modules/m11700.pm @@ -26,7 +26,7 @@ print (binascii.hexlify (digest[::-1]).decode (), end = "") END_CODE - my $hash = `python -c '$python_code'`; + my $hash = `python3 -c '$python_code'`; return $hash; } diff --git a/tools/test_modules/m11750.pm b/tools/test_modules/m11750.pm index 8175e8b01..26dda12c8 100644 --- a/tools/test_modules/m11750.pm +++ b/tools/test_modules/m11750.pm @@ -27,7 +27,7 @@ print (binascii.hexlify (digest[::-1]).decode (), end = "") END_CODE - my $digest = `python -c '$python_code'`; + my $digest = `python3 -c '$python_code'`; my $hash = sprintf ("%s:%s", $digest, $salt); diff --git a/tools/test_modules/m11760.pm b/tools/test_modules/m11760.pm index badaa1504..d8ee17c63 100644 --- a/tools/test_modules/m11760.pm +++ b/tools/test_modules/m11760.pm @@ -27,7 +27,7 @@ print (binascii.hexlify (digest[::-1]).decode (), end = "") END_CODE - my $digest = `python -c '$python_code'`; + my $digest = `python3 -c '$python_code'`; my $hash = sprintf ("%s:%s", $digest, $salt); diff --git a/tools/test_modules/m11800.pm b/tools/test_modules/m11800.pm index c6b350d4f..bc4ec3c74 100644 --- a/tools/test_modules/m11800.pm +++ b/tools/test_modules/m11800.pm @@ -24,7 +24,7 @@ print (binascii.hexlify (digest[::-1]).decode (), end = "") END_CODE - my $hash = `python -c '$python_code'`; + my $hash = `python3 -c '$python_code'`; return $hash; } diff --git a/tools/test_modules/m11850.pm b/tools/test_modules/m11850.pm index e93a31dac..54fac13c8 100644 --- a/tools/test_modules/m11850.pm +++ b/tools/test_modules/m11850.pm @@ -28,7 +28,7 @@ print (binascii.hexlify (digest[::-1]).decode (), end = "") END_CODE - my $digest = `python -c '$python_code'`; + my $digest = `python3 -c '$python_code'`; my $hash = sprintf ("%s:%s", $digest, $salt); diff --git a/tools/test_modules/m11860.pm b/tools/test_modules/m11860.pm index 37e9cbd8c..705bf81ce 100644 --- a/tools/test_modules/m11860.pm +++ b/tools/test_modules/m11860.pm @@ -28,7 +28,7 @@ print (binascii.hexlify (digest[::-1]).decode (), end = "") END_CODE - my $digest = `python -c '$python_code'`; + my $digest = `python3 -c '$python_code'`; my $hash = sprintf ("%s:%s", $digest, $salt); diff --git a/tools/test_modules/m20011.pm b/tools/test_modules/m20011.pm index 18ef71468..d603545d5 100644 --- a/tools/test_modules/m20011.pm +++ b/tools/test_modules/m20011.pm @@ -48,7 +48,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -91,7 +91,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -136,7 +136,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -179,7 +179,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -224,7 +224,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -267,7 +267,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; diff --git a/tools/test_modules/m20012.pm b/tools/test_modules/m20012.pm index 93ed77dca..0ecb0d142 100644 --- a/tools/test_modules/m20012.pm +++ b/tools/test_modules/m20012.pm @@ -48,7 +48,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -91,7 +91,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -136,7 +136,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -179,7 +179,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -224,7 +224,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -267,7 +267,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; diff --git a/tools/test_modules/m20013.pm b/tools/test_modules/m20013.pm index f5563f339..81cca9454 100644 --- a/tools/test_modules/m20013.pm +++ b/tools/test_modules/m20013.pm @@ -48,7 +48,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -91,7 +91,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -136,7 +136,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -179,7 +179,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -224,7 +224,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; @@ -267,7 +267,7 @@ END_CODE $python_code =~ s/key_tweak/"$key_tweak"/; $python_code =~ s/data/"$data_base64"/; - my $output_buf = `python -c '$python_code'`; + my $output_buf = `python3 -c '$python_code'`; $output_buf =~ s/[\r\n]//g; diff --git a/tools/test_modules/m24100.pm b/tools/test_modules/m24100.pm new file mode 100644 index 000000000..5b469f27f --- /dev/null +++ b/tools/test_modules/m24100.pm @@ -0,0 +1,88 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; + +use MIME::Base64 qw (decode_base64 encode_base64); +use Digest::MD5 qw (md5_hex); +use Digest::SHA1 qw (sha1); +use Digest::HMAC qw (hmac); +use Crypt::PBKDF2; + +sub module_constraints { [[0, 256], [16, 16], [-1, -1], [-1, -1], [-1, -1]] } + +my $ITERATIONS = 10000; +my $MD5_SALT = ":mongo:"; +my $HMAC_SALT = "Server Key"; + +sub module_generate_hash +{ + my $word = shift; + my $salt = shift; + my $iter = shift // $ITERATIONS; + my $user = shift // random_string (random_number (0, 57)); + + my $pbkdf = Crypt::PBKDF2->new + ( + hash_class => 'HMACSHA1', + iterations => $iter, + output_len => 20 + ); + + my $md5_dgst = md5_hex ($user . $MD5_SALT . $word); + + my $pbkdf2_dgst = $pbkdf->PBKDF2 ($salt, $md5_dgst); + + my $hash_buf = hmac ($HMAC_SALT, $pbkdf2_dgst, \&sha1); + + my $hash = sprintf ('$mongodb-scram$*0*%s*%i*%s*%s', encode_base64 ($user, ""), $iter, encode_base64 ($salt, ""), encode_base64 ($hash_buf, "")); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my $idx = index ($line, ':'); + + return unless $idx >= 0; + + my $hash = substr ($line, 0, $idx); + my $word = substr ($line, $idx + 1); + + return unless substr ($hash, 0, 17) eq '$mongodb-scram$*0'; + + my (undef, undef, $user, $iter, $salt) = split ('\*', $hash); + + return unless defined ($user); + return unless defined ($iter); + return unless defined ($salt); + + return unless ($user =~ m/^[A-Za-z0-9+\/=]{0,76}$/); + + $user = decode_base64 ($user); + + return unless (length ($user) <= 57); + + return unless ($iter =~ m/^[1-9][0-9]{0,7}$/); + + $iter = int ($iter); + + return unless ($salt =~ m/^[A-Za-z0-9+\/=]{24}$/); + + $salt = decode_base64 ($salt); + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed, $salt, $iter, $user); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m24200.pm b/tools/test_modules/m24200.pm new file mode 100644 index 000000000..74b4bc4ab --- /dev/null +++ b/tools/test_modules/m24200.pm @@ -0,0 +1,84 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; + +use MIME::Base64 qw (decode_base64 encode_base64); +use Digest::SHA qw (sha256); +use Digest::HMAC qw (hmac); +use Crypt::PBKDF2; + +sub module_constraints { [[0, 256], [28, 28], [-1, -1], [-1, -1], [-1, -1]] } + +my $ITERATIONS = 15000; +my $HMAC_SALT = "Server Key"; + +sub module_generate_hash +{ + my $word = shift; + my $salt = shift; + my $iter = shift // $ITERATIONS; + my $user = shift // random_string (random_number (0, 64)); + + my $pbkdf = Crypt::PBKDF2->new + ( + hasher => Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA2', 256), + iterations => $iter, + output_len => 32 + ); + + my $pbkdf2_dgst = $pbkdf->PBKDF2 ($salt, $word); + + my $hash_buf = hmac ($HMAC_SALT, $pbkdf2_dgst, \&sha256); + + my $hash = sprintf ('$mongodb-scram$*1*%s*%i*%s*%s', encode_base64 ($user, ""), $iter, encode_base64 ($salt, ""), encode_base64 ($hash_buf, "")); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my $idx = index ($line, ':'); + + return unless $idx >= 0; + + my $hash = substr ($line, 0, $idx); + my $word = substr ($line, $idx + 1); + + return unless substr ($hash, 0, 17) eq '$mongodb-scram$*1'; + + my (undef, undef, $user, $iter, $salt) = split ('\*', $hash); + + return unless defined ($user); + return unless defined ($iter); + return unless defined ($salt); + + return unless ($user =~ m/^[A-Za-z0-9+\/=]{0,88}$/); + + $user = decode_base64 ($user); + + return unless (length ($user) <= 64); + + return unless ($iter =~ m/^[1-9][0-9]{0,7}$/); + + $iter = int ($iter); + + return unless ($salt =~ m/^[A-Za-z0-9+\/=]{40}$/); + + $salt = decode_base64 ($salt); + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed, $salt, $iter, $user); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m24410.pm b/tools/test_modules/m24410.pm new file mode 100644 index 000000000..313810a28 --- /dev/null +++ b/tools/test_modules/m24410.pm @@ -0,0 +1,211 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; + +use Crypt::CBC; +use Crypt::PBKDF2; + +sub module_constraints { [[0, 256], [16, 16], [-1, -1], [-1, -1], [-1, -1]] } + +sub module_generate_hash +{ + my $word = shift; + my $salt = shift; + my $cid = shift // random_number (1, 4); + my $iter = shift // 2048; + my $iv = shift; + my $data = shift; + + my $key_len = 0; + + if ($cid == 1) { $key_len = 24; } + elsif ($cid == 2) { $key_len = 16; } + elsif ($cid == 3) { $key_len = 24; } + elsif ($cid == 4) { $key_len = 32; } + + my $kdf = Crypt::PBKDF2->new + ( + hash_class => 'HMACSHA1', + iterations => $iter, + output_len => $key_len + ); + + my $salt_bin = pack ("H*", $salt); + my $iv_bin; + my $data_bin; + + my $key = $kdf->PBKDF2 ($salt_bin, $word); + + my $is_decrypt = defined ($data); + + if ($is_decrypt == 1) + { + $iv_bin = pack ("H*", $iv); + $data_bin = pack ("H*", $data); + + my $dec_bin; + + if ($cid == 1) + { + my $aes = Crypt::CBC->new ({ + cipher => "Crypt::DES_EDE3", + key => $key, + iv => $iv_bin, + keysize => $key_len, + literal_key => 1, + header => "none", + padding => "standard", + }); + + $dec_bin = $aes->decrypt ($data_bin); + } + else + { + my $aes = Crypt::CBC->new ({ + cipher => "Crypt::Rijndael", + key => $key, + iv => $iv_bin, + keysize => $key_len, + literal_key => 1, + header => "none", + padding => "standard", + }); + + $dec_bin = $aes->decrypt ($data_bin); + } + + ## This is a ridiculous check of successfull decryption + ## There are no useable asn1 parsers for perl available + ## We have to rely on a combination of padding check and pattern matching + ## The (minimum) 16 bit should be good enough for a unit test + + if (length ($dec_bin) < length ($data_bin)) + { + if (substr ($dec_bin, 0, 1) eq "\x30") + { + $data_bin = $dec_bin; + } + } + } + else + { + if ($cid == 1) + { + $iv_bin = random_bytes (8); + } + else + { + $iv_bin = random_bytes (16); + } + + $data_bin = pack ("H*", + "308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100b7a2" . + "e4c254c8174219e60d9cce96737a906797b8edb86af8f055f60db7bd298b0d31d7ce97ebeae393d5" . + "0e6da5215b58dcd72f4d3cac9e79b6ccaed7da47d2bd04f6a767f5ab7dc0f58beb6298c1e2358ed6" . + "d3ef441f2326ac5db0027e08ae6c7724ff9a2a220a07e97319b6eff5cd653c7ab8b6ea9f9e89a40a" . + "b856f036acfd39b1e5926964a024de35052de6d3423fe763569f48869c834750b28f09cecdddb54a" . + "5526a2c5159d22d24606a2af6c6f47a5d9c04c454896192b8e7b82cf6f6934a23d3495059cb7e43b" . + "98a20bd5b5782e15d93c8b289838c0a1df82ee429f0708d97aa40d6e75ec57ff12a2714871f241a8" . + "6f6d8d3472b084aeb748da33e2d50203010001028201004afab8dadc1122e5fb7b225dbf4051005f" . + "4bdcf84620019589541ff633ea89b6dbf958fb62ae9226bfeac34c639b3e18077bd935792ba63d5e" . + "352ec2b5be93be57f37a21097f2f06857bceed601ff2041a417f2177b81afb246fd079040af96512" . + "34ca24a1456ac11641c7e319114cff23f59bcc1bfa769a0e9fcdeab98429973e10caf303f2bcb065" . + "f22c1cc259556de8377431237da7082cf03ce8da9530be398022f0171d468d92fcabbe776a5e9cf2" . + "045642868406fd03ab735a70bfec3a951bb3c7a1de0fb3ff63cef23897e4fc3f9c5edf62fd45d058" . + "fedc7d2fb22ec928984a061053a7138ce0417b5512579a92be0775104c0bc911f68a5e8ede298102" . + "818100e4e17e2c752dbf1ad1025a074dc5f9c3c5989d23c84594313373d3e4ed0c0ddd74429ab026" . + "535c5e77549d888835bc94f069ebc5e77fdbd2ddf4c8be6cf777799a6d8d18e2b8cecfc13ab26df8" . + "b71ca3d94c2193c294042fb1025fdab38ba7aaeafebd8dd1f9d78ee67100693e99255dad6b964ebf" . + "b7401a03b67d412fabb33502818100cd65067097e307643df1fc8214db1dd7d09342ef01417a2620" . + "adad87352a58b8fcf07521289da3851623d8d045935fab7ecccc52ba0b86adcb92da76255e00289b" . + "af9aacd936201861b0021249f4ab5e6020db823af7171aef0bbbd02dc94d2489fc0b68500bd1b7d2" . + "81ed69fe4a44384161fe906e49bc91e0362b446ec2c521028180497662d40c2c49b966ba758100a2" . + "799f2f8de369f7bef568b1560cfdde63cf13745c685fff7d2419a1fd83aeade1698cf87956d6a78e" . + "2f55482e683c4ea7432ec1b545e365e9e15f676ada98578b166334bcadce4a56cddd2cd85141d5fd" . + "0e2cdace36b30d613ea1bc2f2aed9cccf4e4536443d334cfb180680eabb73f80c1bd0281803f30fc" . + "b93951a4dd875d62e5968b0f746d7c51147d5b6abc3e4390e6cf4997005af993dfbec23923e1fae7" . + "62b47531f2ee510defc9c3700d1a5bb510b2506856160801db79fc78056850a16285145c80edac4e" . + "3c93ed9f532f067a2303633273b26c340a44ce4e1873107c3da6f9ac616e643ad0aecdcad14a9cff" . + "d4cf0ae76102818100b82528a3dfc595cf9c6a025998491e3b4849c71aa8d1222ddb14af7f82fbe5" . + "169ec3ba18ec28d5a9501e95bc9da72cea99e4cdfdf898f40bec6b28f838243d2f39d7226e0873ed" . + "ee752bcae07639a4bd0eb31be1718c456391630b83ad0e9bf3fa18a645007e64fe59af467ea021f9" . + "e9a0dd759b21cd0b93333a73116abcaa2a" + ); + } + + my $enc_bin; + + if ($cid == 1) + { + my $aes = Crypt::CBC->new ({ + cipher => "Crypt::DES_EDE3", + key => $key, + iv => $iv_bin, + keysize => $key_len, + literal_key => 1, + header => "none", + padding => "standard", + }); + + $enc_bin = $aes->encrypt ($data_bin); + } + else + { + my $aes = Crypt::CBC->new ({ + cipher => "Crypt::Rijndael", + key => $key, + iv => $iv_bin, + keysize => $key_len, + literal_key => 1, + header => "none", + padding => "standard", + }); + + $enc_bin = $aes->encrypt ($data_bin); + } + + my $hash = sprintf ('$PEM$1$%d$%s$%d$%s$%d$%s', $cid, unpack ("H*", $salt_bin), $iter, unpack ("H*", $iv_bin), length ($enc_bin), unpack ("H*", $enc_bin)); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my $idx = index ($line, ':'); + + return unless $idx >= 0; + + my $hash = substr ($line, 0, $idx); + my $word = substr ($line, $idx + 1); + + return unless substr ($hash, 0, 6) eq '$PEM$1'; + + my (undef, $signature, $hid, $cid, $salt, $iter, $iv, undef, $data) = split '\$', $hash; + + return unless defined $signature; + return unless defined $hid; + return unless defined $cid; + return unless defined $salt; + return unless defined $iter; + return unless defined $iv; + return unless defined $data; + + return unless ($signature eq 'PEM'); + return unless ($hid eq '1'); + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed, $salt, $cid, $iter, $iv, $data); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m24420.pm b/tools/test_modules/m24420.pm new file mode 100644 index 000000000..adf084642 --- /dev/null +++ b/tools/test_modules/m24420.pm @@ -0,0 +1,211 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; + +use Crypt::CBC; +use Crypt::PBKDF2; + +sub module_constraints { [[0, 256], [16, 16], [-1, -1], [-1, -1], [-1, -1]] } + +sub module_generate_hash +{ + my $word = shift; + my $salt = shift; + my $cid = shift // random_number (1, 4); + my $iter = shift // 2048; + my $iv = shift; + my $data = shift; + + my $key_len = 0; + + if ($cid == 1) { $key_len = 24; } + elsif ($cid == 2) { $key_len = 16; } + elsif ($cid == 3) { $key_len = 24; } + elsif ($cid == 4) { $key_len = 32; } + + my $kdf = Crypt::PBKDF2->new + ( + hasher => Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA2', 256), + iterations => $iter, + output_len => $key_len + ); + + my $salt_bin = pack ("H*", $salt); + my $iv_bin; + my $data_bin; + + my $key = $kdf->PBKDF2 ($salt_bin, $word); + + my $is_decrypt = defined ($data); + + if ($is_decrypt == 1) + { + $iv_bin = pack ("H*", $iv); + $data_bin = pack ("H*", $data); + + my $dec_bin; + + if ($cid == 1) + { + my $aes = Crypt::CBC->new ({ + cipher => "Crypt::DES_EDE3", + key => $key, + iv => $iv_bin, + keysize => $key_len, + literal_key => 1, + header => "none", + padding => "standard", + }); + + $dec_bin = $aes->decrypt ($data_bin); + } + else + { + my $aes = Crypt::CBC->new ({ + cipher => "Crypt::Rijndael", + key => $key, + iv => $iv_bin, + keysize => $key_len, + literal_key => 1, + header => "none", + padding => "standard", + }); + + $dec_bin = $aes->decrypt ($data_bin); + } + + ## This is a ridiculous check of successfull decryption + ## There are no useable asn1 parsers for perl available + ## We have to rely on a combination of padding check and pattern matching + ## The (minimum) 16 bit should be good enough for a unit test + + if (length ($dec_bin) < length ($data_bin)) + { + if (substr ($dec_bin, 0, 1) eq "\x30") + { + $data_bin = $dec_bin; + } + } + } + else + { + if ($cid == 1) + { + $iv_bin = random_bytes (8); + } + else + { + $iv_bin = random_bytes (16); + } + + $data_bin = pack ("H*", + "308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100b7a2" . + "e4c254c8174219e60d9cce96737a906797b8edb86af8f055f60db7bd298b0d31d7ce97ebeae393d5" . + "0e6da5215b58dcd72f4d3cac9e79b6ccaed7da47d2bd04f6a767f5ab7dc0f58beb6298c1e2358ed6" . + "d3ef441f2326ac5db0027e08ae6c7724ff9a2a220a07e97319b6eff5cd653c7ab8b6ea9f9e89a40a" . + "b856f036acfd39b1e5926964a024de35052de6d3423fe763569f48869c834750b28f09cecdddb54a" . + "5526a2c5159d22d24606a2af6c6f47a5d9c04c454896192b8e7b82cf6f6934a23d3495059cb7e43b" . + "98a20bd5b5782e15d93c8b289838c0a1df82ee429f0708d97aa40d6e75ec57ff12a2714871f241a8" . + "6f6d8d3472b084aeb748da33e2d50203010001028201004afab8dadc1122e5fb7b225dbf4051005f" . + "4bdcf84620019589541ff633ea89b6dbf958fb62ae9226bfeac34c639b3e18077bd935792ba63d5e" . + "352ec2b5be93be57f37a21097f2f06857bceed601ff2041a417f2177b81afb246fd079040af96512" . + "34ca24a1456ac11641c7e319114cff23f59bcc1bfa769a0e9fcdeab98429973e10caf303f2bcb065" . + "f22c1cc259556de8377431237da7082cf03ce8da9530be398022f0171d468d92fcabbe776a5e9cf2" . + "045642868406fd03ab735a70bfec3a951bb3c7a1de0fb3ff63cef23897e4fc3f9c5edf62fd45d058" . + "fedc7d2fb22ec928984a061053a7138ce0417b5512579a92be0775104c0bc911f68a5e8ede298102" . + "818100e4e17e2c752dbf1ad1025a074dc5f9c3c5989d23c84594313373d3e4ed0c0ddd74429ab026" . + "535c5e77549d888835bc94f069ebc5e77fdbd2ddf4c8be6cf777799a6d8d18e2b8cecfc13ab26df8" . + "b71ca3d94c2193c294042fb1025fdab38ba7aaeafebd8dd1f9d78ee67100693e99255dad6b964ebf" . + "b7401a03b67d412fabb33502818100cd65067097e307643df1fc8214db1dd7d09342ef01417a2620" . + "adad87352a58b8fcf07521289da3851623d8d045935fab7ecccc52ba0b86adcb92da76255e00289b" . + "af9aacd936201861b0021249f4ab5e6020db823af7171aef0bbbd02dc94d2489fc0b68500bd1b7d2" . + "81ed69fe4a44384161fe906e49bc91e0362b446ec2c521028180497662d40c2c49b966ba758100a2" . + "799f2f8de369f7bef568b1560cfdde63cf13745c685fff7d2419a1fd83aeade1698cf87956d6a78e" . + "2f55482e683c4ea7432ec1b545e365e9e15f676ada98578b166334bcadce4a56cddd2cd85141d5fd" . + "0e2cdace36b30d613ea1bc2f2aed9cccf4e4536443d334cfb180680eabb73f80c1bd0281803f30fc" . + "b93951a4dd875d62e5968b0f746d7c51147d5b6abc3e4390e6cf4997005af993dfbec23923e1fae7" . + "62b47531f2ee510defc9c3700d1a5bb510b2506856160801db79fc78056850a16285145c80edac4e" . + "3c93ed9f532f067a2303633273b26c340a44ce4e1873107c3da6f9ac616e643ad0aecdcad14a9cff" . + "d4cf0ae76102818100b82528a3dfc595cf9c6a025998491e3b4849c71aa8d1222ddb14af7f82fbe5" . + "169ec3ba18ec28d5a9501e95bc9da72cea99e4cdfdf898f40bec6b28f838243d2f39d7226e0873ed" . + "ee752bcae07639a4bd0eb31be1718c456391630b83ad0e9bf3fa18a645007e64fe59af467ea021f9" . + "e9a0dd759b21cd0b93333a73116abcaa2a" + ); + } + + my $enc_bin; + + if ($cid == 1) + { + my $aes = Crypt::CBC->new ({ + cipher => "Crypt::DES_EDE3", + key => $key, + iv => $iv_bin, + keysize => $key_len, + literal_key => 1, + header => "none", + padding => "standard", + }); + + $enc_bin = $aes->encrypt ($data_bin); + } + else + { + my $aes = Crypt::CBC->new ({ + cipher => "Crypt::Rijndael", + key => $key, + iv => $iv_bin, + keysize => $key_len, + literal_key => 1, + header => "none", + padding => "standard", + }); + + $enc_bin = $aes->encrypt ($data_bin); + } + + my $hash = sprintf ('$PEM$2$%d$%s$%d$%s$%d$%s', $cid, unpack ("H*", $salt_bin), $iter, unpack ("H*", $iv_bin), length ($enc_bin), unpack ("H*", $enc_bin)); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my $idx = index ($line, ':'); + + return unless $idx >= 0; + + my $hash = substr ($line, 0, $idx); + my $word = substr ($line, $idx + 1); + + return unless substr ($hash, 0, 6) eq '$PEM$2'; + + my (undef, $signature, $hid, $cid, $salt, $iter, $iv, undef, $data) = split '\$', $hash; + + return unless defined $signature; + return unless defined $hid; + return unless defined $cid; + return unless defined $salt; + return unless defined $iter; + return unless defined $iv; + return unless defined $data; + + return unless ($signature eq 'PEM'); + return unless ($hid eq '2'); + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed, $salt, $cid, $iter, $iv, $data); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m24500.pm b/tools/test_modules/m24500.pm new file mode 100644 index 000000000..7a93bcd6e --- /dev/null +++ b/tools/test_modules/m24500.pm @@ -0,0 +1,252 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; + +use Crypt::PBKDF2; +use Digest::SHA qw (sha1 sha512); +use Crypt::Mode::ECB; + +sub module_constraints { [[0, 256], [32, 32], [-1, -1], [-1, -1], [-1, -1]] } + +my $AES256_IGE_BLOCK_SIZE = 16; + +# +# Helper functions: +# + +sub exclusive_or +{ + my $in1 = shift; + my $in2 = shift; + + # MIN () function (should always be 16 for us): + # my $len = (length ($in1) <= length ($in2)) ? length ($in2) : length ($in1); + + # padding if input not multiple of block size: + # $in1 .= "\x00" x ($AES256_IGE_BLOCK_SIZE - $len); + # $in2 .= "\x00" x ($AES256_IGE_BLOCK_SIZE - $len); + + my $out = ""; + + for (my $i = 0; $i < $AES256_IGE_BLOCK_SIZE; $i++) # $i < $len + { + $out .= chr (ord (substr ($in1, $i, 1)) ^ ord (substr ($in2, $i, 1))); + } + + return $out; +} + +sub aes256_encrypt_ige +{ + my $key = shift; + my $iv = shift; + my $in = shift; + + my $x_prev = substr ($iv, $AES256_IGE_BLOCK_SIZE, $AES256_IGE_BLOCK_SIZE); + my $y_prev = substr ($iv, 0, $AES256_IGE_BLOCK_SIZE); + + my $m = Crypt::Mode::ECB->new ('AES', 0); + + my $out = ""; + + for (my $i = 0; $i < length ($in); $i += $AES256_IGE_BLOCK_SIZE) + { + my $x = substr ($in, $i, $AES256_IGE_BLOCK_SIZE); + + my $y_xor = exclusive_or ($x, $y_prev); + + my $y_final = $m->encrypt ($y_xor, $key); + # $y_final .= "\x00" x ($AES256_IGE_BLOCK_SIZE - length ($y_final)); + + my $y = exclusive_or ($y_final, $x_prev); + + $x_prev = $x; + $y_prev = $y; + + $out .= $y; + } + + return $out; +} + +sub aes256_decrypt_ige +{ + my $key = shift; + my $iv = shift; + my $in = shift; + + my $x_prev = substr ($iv, 0, $AES256_IGE_BLOCK_SIZE); + my $y_prev = substr ($iv, $AES256_IGE_BLOCK_SIZE, $AES256_IGE_BLOCK_SIZE); + + my $m = Crypt::Mode::ECB->new ('AES', 0); + + my $out = ""; + + for (my $i = 0; $i < length ($in); $i += $AES256_IGE_BLOCK_SIZE) + { + my $x = substr ($in, $i, $AES256_IGE_BLOCK_SIZE); + + my $y_xor = exclusive_or ($x, $y_prev); + + my $y_final = $m->decrypt ($y_xor, $key); + # $y_final .= "\x00" x ($AES256_IGE_BLOCK_SIZE - length ($y_final)); + + my $y = exclusive_or ($y_final, $x_prev); + + $x_prev = $x; + $y_prev = $y; + + $out .= $y; + } + + return $out; +} + +sub module_generate_hash +{ + my $word = shift; + my $salt = shift; + my $iter = shift // 100000; + my $data = shift; + + my $sha512_hash = sha512 ($salt . $word . $salt); + + my $pbkdf = Crypt::PBKDF2->new + ( + hasher => Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA2', 512), + iterations => $iter, + output_len => 136 + ); + + my $authkey = $pbkdf->PBKDF2 ($salt, $sha512_hash); + + my $message = ""; + my $message_key = ""; + + if (defined ($data)) + { + $message = substr ($data, 16); + $message_key = substr ($data, 0, 16); + } + else + { + $message = random_bytes (272); + $message_key = substr (sha1 ($message), 0, 16); + } + + my $data_a = "\x00" x 48; + my $data_b = "\x00" x 48; + my $data_c = "\x00" x 48; + my $data_d = "\x00" x 48; + + substr ($data_a, 0, 16) = $message_key; # memcpy () + substr ($data_b, 16, 16) = $message_key; + substr ($data_c, 32, 16) = $message_key; + substr ($data_d, 0, 16) = $message_key; + + substr ($data_a, 16, 32) = substr ($authkey, 8, 32); + substr ($data_b, 0, 16) = substr ($authkey, 40, 16); + substr ($data_b, 32, 16) = substr ($authkey, 56, 16); + substr ($data_c, 0, 32) = substr ($authkey, 72, 32); + substr ($data_d, 16, 32) = substr ($authkey, 104, 32); + + my $sha1_a = sha1 ($data_a); + my $sha1_b = sha1 ($data_b); + my $sha1_c = sha1 ($data_c); + my $sha1_d = sha1 ($data_d); + + my $aes_key = substr ($sha1_a, 0, 8) . # 8 + + substr ($sha1_b, 8, 12) . # 12 + + substr ($sha1_c, 4, 12); # 12 = 32 + + my $aes_iv = substr ($sha1_a, 8, 12) . # 12 + + substr ($sha1_b, 0, 8) . # 8 + + substr ($sha1_c, 16, 4) . # 4 + + substr ($sha1_d, 0, 8); # 8 = 32 + + my $enc_data = ""; + + if (defined ($data)) + { + # AES256 IGE decrypt: + + my $dec_data = aes256_decrypt_ige ($aes_key, $aes_iv, $message); + + my $h = substr (sha1 ($dec_data), 0, 16); + + if ($h eq $message_key) + { + $enc_data = $data; + } + } + else + { + # AES256 IGE encrypt: + + my $enc_random_data = aes256_encrypt_ige ($aes_key, $aes_iv, $message); + + $enc_data = $message_key . $enc_random_data; + } + + my $hash = sprintf ("\$telegram\$2*%i*%s*%s", $iter, unpack ("H*", $salt), unpack ("H*", $enc_data)); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my $idx = index ($line, ':'); + + return if ($idx == -1); + + my $hash = substr ($line, 0, $idx); + my $word = substr ($line, $idx + 1); + + return unless defined $hash; + return unless defined $word; + + my $signature = substr ($hash, 0, 10); + + return unless ($signature eq "\$telegram\$"); + + my $version = substr ($hash, 10, 1); + + return unless ($version eq "2"); + + my @split = split ('\*', $hash); + + return unless (scalar (@split) == 4); + + shift (@split); + + my $iter = shift (@split); + my $salt = shift (@split); + my $data = shift (@split); + + return unless length ($salt) == 64; + return unless length ($data) == 576; + + return unless ($iter =~ /^[1-9][0-9]*$/); + + return unless ($salt =~ /^[0-9a-fA-F]*$/); + return unless ($data =~ /^[0-9a-fA-F]*$/); + + $salt = pack ("H*", $salt); + $data = pack ("H*", $data); + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed, $salt, $iter, $data); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m24600.pm b/tools/test_modules/m24600.pm new file mode 100644 index 000000000..91954f551 --- /dev/null +++ b/tools/test_modules/m24600.pm @@ -0,0 +1,135 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; + +use Crypt::PBKDF2; +use Crypt::CBC; + +sub module_constraints { [[0, 256], [32, 32], [-1, -1], [-1, -1], [-1, -1]] } + +sub module_generate_hash +{ + my $word = shift; + my $salt = shift; + my $type = shift // 1; #random_number (1, 3); + my $iter = shift // random_number (10000, 20000); + my $iv = shift // random_hex_string (32); + my $enc = shift; + + my $kdf; + + if ($type == 1) + { + $kdf = Crypt::PBKDF2->new + ( + hash_class => 'HMACSHA1', + iterations => $iter, + output_len => 32 + ); + } + elsif ($type == 2) + { + $kdf = Crypt::PBKDF2->new + ( + hasher => Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA2', 256), + iterations => $iter, + output_len => 32 + ); + } + elsif ($type == 3) + { + $kdf = Crypt::PBKDF2->new + ( + hasher => Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA2', 512), + iterations => $iter, + output_len => 32 + ); + } + + my $salt_bin = pack ("H*", $salt); + + my $key = $kdf->PBKDF2 ($salt_bin, $word); + + my $iv_bin = pack ("H*", $iv); + + my $data; + + if (defined $enc) + { + my $aes_cbc = Crypt::CBC->new ({ + cipher => "Crypt::Rijndael", + iv => $iv_bin, + key => $key, + keysize => 32, + literal_key => 1, + header => "none", + padding => "none" + }); + + my $enc_bin = pack ("H*", $enc); + + $data = $aes_cbc->decrypt ($enc_bin); + + if (substr ($data, 0, 12) ne "\x00" x 12) + { + $data = "\xff" x 16; + } + } + else + { + $data = "\x00" x 16; + } + + my $aes_cbc = Crypt::CBC->new ({ + cipher => "Crypt::Rijndael", + iv => $iv_bin, + key => $key, + keysize => 32, + literal_key => 1, + header => "none", + padding => "none" + }); + + my $enc_bin = $aes_cbc->encrypt ($data); + + my $hash = sprintf ("SQLCIPHER*%d*%d*%s*%s*%s", $type, $iter, unpack ("H*", $salt_bin), unpack ("H*", $iv_bin), unpack ("H*", $enc_bin)); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my $idx = index ($line, ':'); + + return unless $idx >= 0; + + my $hash = substr ($line, 0, $idx); + my $word = substr ($line, $idx + 1); + + return unless substr ($hash, 0, 9) eq 'SQLCIPHER'; + + my ($signature, $type, $iter, $salt, $iv, $data) = split '\*', $hash; + + return unless defined $signature; + return unless defined $type; + return unless defined $iter; + return unless defined $salt; + return unless defined $iv; + return unless defined $data; + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed, $salt, $type, $iter, $iv, $data); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m24700.pm b/tools/test_modules/m24700.pm new file mode 100644 index 000000000..47806b512 --- /dev/null +++ b/tools/test_modules/m24700.pm @@ -0,0 +1,49 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; + +use Digest::MD5 qw (md5_hex); +use Digest::MD5 qw (md5); + +sub module_constraints { [[0, 256], [-1, -1], [0, 55], [-1, -1], [-1, -1]] } + +sub module_generate_hash +{ + my $word = shift; + + my $digest1 = md5 ($word); + + my $digest1_sub = substr ($digest1, 0, 5); + + my $digest2 = md5 ($digest1_sub); + + my $digest2_sub = substr ($digest2, 0, 5); + + my $hash = sprintf ("%s", unpack ("H*", $digest2_sub)); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my ($hash, $word) = split (':', $line); + + return unless defined $hash; + return unless defined $word; + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m24800.pm b/tools/test_modules/m24800.pm new file mode 100644 index 000000000..9d63a2c9c --- /dev/null +++ b/tools/test_modules/m24800.pm @@ -0,0 +1,47 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; + +use Digest::SHA1 qw (sha1); +use Digest::HMAC qw (hmac hmac_hex); +use Encode qw (encode decode); +use MIME::Base64; + +sub module_constraints { [[0, 256], [0, 256], [0, 27], [0, 27], [0, 27]] } + +sub module_generate_hash +{ + my $word = shift; + + my $unicode_word = encode ("UTF-16LE", $word); + + my $digest = hmac ($unicode_word, $unicode_word, \&sha1, 64); + + my $hash = sprintf ("%s", encode_base64 ($digest, "")); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my ($hash, $word) = split (':', $line); + + return unless defined $hash; + return unless defined $word; + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m24900.pm b/tools/test_modules/m24900.pm new file mode 100644 index 000000000..4386c951e --- /dev/null +++ b/tools/test_modules/m24900.pm @@ -0,0 +1,58 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; +use MIME::Base64 qw (encode_base64 decode_base64); + +use Digest::MD5 qw (md5); + +sub module_constraints { [[0, 256], [-1, -1], [0, 55], [-1, -1], [-1, -1]] } + +my $itoa62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + +sub module_generate_hash +{ + my $word = shift; + + my $digest = md5 ($word); + + my @chksum; + + for (my $i = 0, my $j = 0; $i < 16; $i += 2, $j += 1) + { + $chksum[$j] = (ord (substr ($digest, $i + 0, 1)) + ord (substr ($digest, $i + 1, 1))) % 62; + +printf ("%d\n", $chksum[$j]); + + $chksum[$j] = substr ($itoa62, $chksum[$j], 1); + } + + my $res = join "", @chksum; + + my $hash = sprintf ("%s", $res); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my ($hash, $word) = split (':', $line); + + return unless defined $hash; + return unless defined $word; + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m25300.pm b/tools/test_modules/m25300.pm new file mode 100644 index 000000000..7f2db420d --- /dev/null +++ b/tools/test_modules/m25300.pm @@ -0,0 +1,72 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +use strict; +use warnings; + +use MIME::Base64 qw (encode_base64 decode_base64); +use Digest::SHA qw (sha512); +use Encode; + +sub module_constraints { [[0, 64], [16, 16], [-1, -1], [-1, -1], [-1, -1]] } + +sub module_generate_hash +{ + my $word = shift; + my $salt = shift; + my $iter = shift // 100000; + + my $tmp = sha512 ($salt . encode ("UTF-16LE", $word)); + + for (my $i = 0; $i < $iter; $i++) + { + my $num32 = pack ("L", $i); + + $tmp = sha512 ($tmp . $num32); + } + + my $salt_b64 = encode_base64 ($salt, ""); + my $digest_b64 = encode_base64 ($tmp, ""); + + my $hash = sprintf ("\$office\$%d\$0\$%d\$%s\$%s", 2016, $iter, $salt_b64, $digest_b64); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my ($hash, $word) = split ":", $line; + + return unless defined $hash; + return unless defined $word; + + my @data = split ('\$', $hash); + + return unless scalar @data == 7; + return unless (shift @data eq 'office'); + return unless (shift @data eq '2016'); + return unless (shift @data eq '0'); + + my $iter = shift @data; + my $salt = shift @data; + my $digest = shift @data; + + return unless defined $iter; + return unless defined $salt; + return unless defined $digest; + + return unless length ($salt) == 24; + return unless length ($digest) == 88; + + my $new_hash = module_generate_hash ($word, $salt, $iter); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m25400.pm b/tools/test_modules/m25400.pm new file mode 100644 index 000000000..4eb3da227 --- /dev/null +++ b/tools/test_modules/m25400.pm @@ -0,0 +1,277 @@ +#!/usr/bin/env perl + +## +## Author......: See docs/credits.txt +## License.....: MIT +## + +# based off m10500 but added the owner password part ($o) to be able to test the edit password +# two TODOs still (now only works if no user password is set): +# 1. TODO use user password as input for md5 of o_digest if no owner password is set +# 2. TODO dynamically add user password including padding to the RC4 input for the computation of the pdf o-value + +# easy test shortcut for debugging +# a=$(echo 1 | tools/test.pl passthrough 10500 | tail -n1); echo $a; echo 1 | ./hashcat --potfile-disable --runtime 400 --hwmon-disable -O -D 2 --backend-vector-width 4 -a 0 -m 10500 $a + +use strict; +use warnings; + +use Crypt::RC4; +use Digest::MD5 qw (md5); + +my $PDF_PADDING = +[ + 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 0x56, + 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, + 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a +]; + +sub module_constraints { [[0, 15], [32, 32], [-1, -1], [-1, -1], [-1, -1]] } + +sub pdf_compute_encryption_key_user +{ + my $word = shift; + my $padding = shift; + my $id = shift; + my $u = shift; + my $o = shift; + my $P = shift; + my $V = shift; + my $R = shift; + my $enc = shift; + + ## start + + my $data; + + $data .= $word; + + $data .= substr ($padding, 0, 32 - length $word); + + $data .= pack ("H*", $o); + $data .= pack ("I", $P); + $data .= pack ("H*", $id); + + if ($R >= 4) + { + if (!$enc) + { + $data .= pack ("I", -1); + } + } + + my $res = md5 ($data); + + if ($R >= 3) + { + for (my $i = 0; $i < 50; $i++) + { + $res = md5 ($res); + } + } + + return $res; +} + + +sub pdf_compute_encryption_key_owner +{ + my $word = shift; + my $padding = shift; + my $id = shift; + my $u = shift; + my $o = shift; + my $P = shift; + my $V = shift; + my $R = shift; + my $enc = shift; + + # TODO use user password as input for md5 of o_digest if no owner password is set + my $data; + $data .= $word; + $data .= substr ($padding, 0, 32 - length $word); + my $o_digest = md5 ($data); + + if ($R >= 3) + { + for (my $i = 0; $i < 50; $i++) + { + $o_digest = md5 ($o_digest); + } + } + + #printf("\$o_digest = %s\n", unpack ("H*", $o_digest)); + + + my $o_key; + if ($R == 2) + { + $o_key = substr($o_digest, 0, 8); # rc4 key is always 5 for revision 2, but for 3 or greather is dependent on the value of the encryption dictionaries length entry + } + else + { + $o_key = substr($o_digest, 0, 16); #length is always 128 bits or 16 bytes + } + #printf("\$o_key = %s\n", unpack ("H*", $o_key)); + + return $o_key; +} + +sub module_generate_hash +{ + my $word = shift; + my $id = shift; + my $u = shift; + my $o = shift; + my $P = shift; + my $V = shift; + my $R = shift; + my $enc = shift; + + if (defined $u == 0) + { + $u = "0" x 64; + } + + my $u_save = $u; + + if (defined $o == 0) + { + $o = "0" x 64; + } + + my $o_save = $u; + + if (defined $R == 0) + { + $R = random_number (3, 4); + } + + if (defined $V == 0) + { + $V = ($R == 3) ? 2 : 4; + } + + if (defined $P == 0) + { + $P = ($R == 3) ? -4 : -1028; + } + + if (defined $enc == 0) + { + $enc = ($R == 3) ? 1 : random_number (0, 1); + } + + my $padding; + + for (my $i = 0; $i < 32; $i++) + { + $padding .= pack ("C", $PDF_PADDING->[$i]); + } + + + ################ USER PASSWORD ################# + my $res = pdf_compute_encryption_key_user($word, $padding, $id, $u, $o, $P, $V, $R, $enc); + + my $digest = md5 ($padding . pack ("H*", $id)); + + my $m = Crypt::RC4->new ($res); + $u = $m->RC4 ($digest); + + my @ress = split "", $res; + + #do xor of rc4 19 times + for (my $x = 1; $x <= 19; $x++) + { + my @xor; + + for (my $i = 0; $i < 16; $i++) + { + $xor[$i] = chr (ord ($ress[$i]) ^ $x); + } + + my $s = join ("", @xor); + + my $m2 = Crypt::RC4->new ($s); + + $u = $m2->RC4 ($u); + } + + + ################ OWNER PASSWORD ################# + my $o_key = pdf_compute_encryption_key_owner($word, $padding, $id, $u, $o, $P, $V, $R, $enc); + my $n = Crypt::RC4->new ($o_key); + $o = $n->RC4(substr ($padding, 0, 32 - length "")); # TODO dynamically add user password including padding to the RC4 input for the computation of the pdf o-value + + #printf("padding_empty_str = %s\n", unpack ("H*", substr ($padding, 0, 32 - length ""))); + + my @ress2 = split "", $o_key; + + if ($R >= 3) + { + #do xor of rc4 19 times + for (my $x = 1; $x <= 19; $x++) + { + my @xor; + + for (my $i = 0; $i < 16; $i++) + { + $xor[$i] = chr (ord ($ress2[$i]) ^ $x); + } + + my $s = join ("", @xor); + + my $n2 = Crypt::RC4->new ($s); + + $o = $n2->RC4 ($o); + } + } + + #printf("\$u = %s\n", unpack ("H*", $u)); + + $u .= substr (pack ("H*", $u_save), 16, 16); + + #printf("\$o = %s\n", unpack ("H*", $o)); + #printf("\$u = %s\n", unpack ("H*", $u)); + + my $hash = sprintf ('$pdf$%d*%d*128*%d*%d*16*%s*32*%s*32*%s', $V, $R, $P, $enc, $id, unpack ("H*", $u), unpack ("H*", $o)); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my ($hash_in, $word) = split ":", $line; + + return unless defined $hash_in; + return unless defined $word; + + my @data = split /\*/, $hash_in; + + return unless scalar @data == 11; + + my $V = shift @data; $V = substr ($V, 5, 1); + my $R = shift @data; + return unless (shift @data eq '128'); # length is always 128 here + my $P = shift @data; + my $enc = shift @data; + return unless (shift @data eq '16'); + my $id = shift @data; + return unless (shift @data eq '32'); + my $u = shift @data; + return unless (shift @data eq '32'); + my $o = shift @data; + + return unless defined $id; + return unless defined $word; + + $word = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word, $id, $u, $o, $P, $V, $R, $enc); + + return ($new_hash, $word); +} + +1; diff --git a/tools/test_modules/m25900.pm b/tools/test_modules/m25900.pm new file mode 100644 index 000000000..a161f662f --- /dev/null +++ b/tools/test_modules/m25900.pm @@ -0,0 +1,144 @@ +#!/usr/bin/env perl + +## +## Author......: Robert Guetzkow +## License.....: MIT +## + +use strict; +use warnings; + +use Crypt::PBKDF2; +use Crypt::Mode::CBC; +use Crypt::Mode::ECB; + +# Details of the protocol design can be found in ISO 22510:2019 and +# application notes published by the KNX Association. + +# ETS 5 allows a maximum of 20 characters in a password. +# The salt is used as Secure Session Identifier, which is 2 Bytes long. +sub module_constraints { [[0, 20], [2, 2], [-1, -1], [-1, -1], [-1, -1]] } + +sub device_authentication_code +{ + my $password = shift; + + my $pbkdf2 = Crypt::PBKDF2->new + ( + hasher => Crypt::PBKDF2->hasher_from_algorithm ("HMACSHA2", 256), + iterations => 65536, + output_len => 16 + ); + + my $device_authentication_code = $pbkdf2->PBKDF2 ("device-authentication-code.1.secure.ip.knx.org", + $password); + + return $device_authentication_code; +} + +sub block_formatting +{ + # Simplified block formatting function, where payload is always empty + my $b0 = shift; + my $associated_data = shift; + my $associated_data_length = pack ("s>", length ($associated_data)); + my $blocks_unpadded = $associated_data_length . $associated_data; + my $pad_len = int ((length ($blocks_unpadded) + 16 - 1) / 16) * 16; + my $blocks_padded = $blocks_unpadded . "\0" x ($pad_len - length ($blocks_unpadded)); + + return $b0 . $blocks_padded; +} + +sub encrypt +{ + # Simplified encryption that only performs steps required for the MAC, not full CCM + my $blocks = shift; + my $nonce = shift; + my $key = shift; + my $iv = "\0" x 16; + + my $aes_cbc = Crypt::Mode::CBC->new ("AES", 0); + my $ciphertext = $aes_cbc->encrypt ($blocks, $key, $iv); + my $y_n = substr ($ciphertext, length ($ciphertext) - 16, 16); + + my $aes_ecb = Crypt::Mode::ECB->new ("AES", 0); + my $s_0 = $aes_ecb->encrypt ($nonce, $key); + + return $y_n ^ $s_0; +} + +sub generate_session_response_mac +{ + my $secure_session_identifier = shift; + my $public_value_xor = shift; + my $key = shift; + + # Constants used for the cryptography in Session_Response frames + my $knx_ip_header = pack ("H*", "061009520038"); + my $b0 = pack ("H*", "00000000000000000000000000000000"); + my $nonce = pack ("H*", "0000000000000000000000000000ff00"); + + my $associated_data = $knx_ip_header . $secure_session_identifier . $public_value_xor; + + my $blocks = block_formatting ($b0, $associated_data); + + return encrypt ($blocks, $nonce, $key); +} + +sub module_generate_hash +{ + my $word = shift; + + # Parameters that would be found in the Session_Request and Session_Response frames + my $secure_session_identifier = shift; + my $public_value_xor = shift // random_bytes (32); + + my $device_authentication_code = device_authentication_code ($word); + + my $mac = generate_session_response_mac ($secure_session_identifier, + $public_value_xor, + $device_authentication_code); + + my $hash = sprintf ("\$knx-ip-secure-device-authentication-code\$*%s*%s*%s", + unpack ("H*", $secure_session_identifier), + unpack ("H*", $public_value_xor), + unpack ("H*", $mac)); + + return $hash; +} + +sub module_verify_hash +{ + my $line = shift; + + my ($hash, $word) = split (':', $line); + + return unless defined $hash; + return unless defined $word; + + my @data = split ('\*', $hash); + + return unless scalar (@data) == 4; + + my $signature = shift @data; + + return unless ($signature eq "\$knx-ip-secure-device-authentication-code\$"); + + my $secure_session_identifier = pack ("H*", shift @data); # 2 Bytes expected (using the "salt" for this purpose) + my $public_value_xor = pack ("H*", shift @data); # 32 Bytes expected (xor of client's and server's public value) + my $mac = pack ("H*", shift @data); # 16 Bytes expected + + return unless (length ($secure_session_identifier) == 2); + return unless (length ($public_value_xor) == 32); + return unless (length ($mac) == 16); + + my $word_packed = pack_if_HEX_notation ($word); + + my $new_hash = module_generate_hash ($word_packed, + $secure_session_identifier, + $public_value_xor); + + return ($new_hash, $word); +} + +1;