DES with partial plain text
#11
yeah, it could work... but also the kernel would need to loop over these 256*256 combinations (16 bits) = 65536

which of course would imply a kernel runtime of 65536 times longer Sad

That means hashcat could get very laggy, non-interactive.

a change like this might work, with latest github master (i.e. just replace 2 bytes in the kernel directly):
Code:
diff --git a/OpenCL/m14000_a3-pure.cl b/OpenCL/m14000_a3-pure.cl
index 50bf0834..b02f7179 100644
--- a/OpenCL/m14000_a3-pure.cl
+++ b/OpenCL/m14000_a3-pure.cl
@@ -10,6 +10,7 @@
#include "inc_types.h"
#include "inc_platform.cl"
#include "inc_common.cl"
+#include "inc_cipher_des.h"
#endif

#define COMPARE_S "inc_comp_single_bs.cl"
@@ -1767,429 +1768,443 @@ 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];
-
-  // salt1 first, because this is a 64 bit value actually
-
-  #define d00 (((salt1 >>  0) & 1) ? -1 : 0)
-  #define d01 (((salt1 >>  1) & 1) ? -1 : 0)
-  #define d02 (((salt1 >>  2) & 1) ? -1 : 0)
-  #define d03 (((salt1 >>  3) & 1) ? -1 : 0)
-  #define d04 (((salt1 >>  4) & 1) ? -1 : 0)
-  #define d05 (((salt1 >>  5) & 1) ? -1 : 0)
-  #define d06 (((salt1 >>  6) & 1) ? -1 : 0)
-  #define d07 (((salt1 >>  7) & 1) ? -1 : 0)
-  #define d08 (((salt1 >>  8) & 1) ? -1 : 0)
-  #define d09 (((salt1 >>  9) & 1) ? -1 : 0)
-  #define d10 (((salt1 >> 10) & 1) ? -1 : 0)
-  #define d11 (((salt1 >> 11) & 1) ? -1 : 0)
-  #define d12 (((salt1 >> 12) & 1) ? -1 : 0)
-  #define d13 (((salt1 >> 13) & 1) ? -1 : 0)
-  #define d14 (((salt1 >> 14) & 1) ? -1 : 0)
-  #define d15 (((salt1 >> 15) & 1) ? -1 : 0)
-  #define d16 (((salt1 >> 16) & 1) ? -1 : 0)
-  #define d17 (((salt1 >> 17) & 1) ? -1 : 0)
-  #define d18 (((salt1 >> 18) & 1) ? -1 : 0)
-  #define d19 (((salt1 >> 19) & 1) ? -1 : 0)
-  #define d20 (((salt1 >> 20) & 1) ? -1 : 0)
-  #define d21 (((salt1 >> 21) & 1) ? -1 : 0)
-  #define d22 (((salt1 >> 22) & 1) ? -1 : 0)
-  #define d23 (((salt1 >> 23) & 1) ? -1 : 0)
-  #define d24 (((salt1 >> 24) & 1) ? -1 : 0)
-  #define d25 (((salt1 >> 25) & 1) ? -1 : 0)
-  #define d26 (((salt1 >> 26) & 1) ? -1 : 0)
-  #define d27 (((salt1 >> 27) & 1) ? -1 : 0)
-  #define d28 (((salt1 >> 28) & 1) ? -1 : 0)
-  #define d29 (((salt1 >> 29) & 1) ? -1 : 0)
-  #define d30 (((salt1 >> 30) & 1) ? -1 : 0)
-  #define d31 (((salt1 >> 31) & 1) ? -1 : 0)
-  #define d32 (((salt0 >>  0) & 1) ? -1 : 0)
-  #define d33 (((salt0 >>  1) & 1) ? -1 : 0)
-  #define d34 (((salt0 >>  2) & 1) ? -1 : 0)
-  #define d35 (((salt0 >>  3) & 1) ? -1 : 0)
-  #define d36 (((salt0 >>  4) & 1) ? -1 : 0)
-  #define d37 (((salt0 >>  5) & 1) ? -1 : 0)
-  #define d38 (((salt0 >>  6) & 1) ? -1 : 0)
-  #define d39 (((salt0 >>  7) & 1) ? -1 : 0)
-  #define d40 (((salt0 >>  8) & 1) ? -1 : 0)
-  #define d41 (((salt0 >>  9) & 1) ? -1 : 0)
-  #define d42 (((salt0 >> 10) & 1) ? -1 : 0)
-  #define d43 (((salt0 >> 11) & 1) ? -1 : 0)
-  #define d44 (((salt0 >> 12) & 1) ? -1 : 0)
-  #define d45 (((salt0 >> 13) & 1) ? -1 : 0)
-  #define d46 (((salt0 >> 14) & 1) ? -1 : 0)
-  #define d47 (((salt0 >> 15) & 1) ? -1 : 0)
-  #define d48 (((salt0 >> 16) & 1) ? -1 : 0)
-  #define d49 (((salt0 >> 17) & 1) ? -1 : 0)
-  #define d50 (((salt0 >> 18) & 1) ? -1 : 0)
-  #define d51 (((salt0 >> 19) & 1) ? -1 : 0)
-  #define d52 (((salt0 >> 20) & 1) ? -1 : 0)
-  #define d53 (((salt0 >> 21) & 1) ? -1 : 0)
-  #define d54 (((salt0 >> 22) & 1) ? -1 : 0)
-  #define d55 (((salt0 >> 23) & 1) ? -1 : 0)
-  #define d56 (((salt0 >> 24) & 1) ? -1 : 0)
-  #define d57 (((salt0 >> 25) & 1) ? -1 : 0)
-  #define d58 (((salt0 >> 26) & 1) ? -1 : 0)
-  #define d59 (((salt0 >> 27) & 1) ? -1 : 0)
-  #define d60 (((salt0 >> 28) & 1) ? -1 : 0)
-  #define d61 (((salt0 >> 29) & 1) ? -1 : 0)
-  #define d62 (((salt0 >> 30) & 1) ? -1 : 0)
-  #define d63 (((salt0 >> 31) & 1) ? -1 : 0)
-
-  u32 D00 = d00;
-  u32 D01 = d01;
-  u32 D02 = d02;
-  u32 D03 = d03;
-  u32 D04 = d04;
-  u32 D05 = d05;
-  u32 D06 = d06;
-  u32 D07 = d07;
-  u32 D08 = d08;
-  u32 D09 = d09;
-  u32 D10 = d10;
-  u32 D11 = d11;
-  u32 D12 = d12;
-  u32 D13 = d13;
-  u32 D14 = d14;
-  u32 D15 = d15;
-  u32 D16 = d16;
-  u32 D17 = d17;
-  u32 D18 = d18;
-  u32 D19 = d19;
-  u32 D20 = d20;
-  u32 D21 = d21;
-  u32 D22 = d22;
-  u32 D23 = d23;
-  u32 D24 = d24;
-  u32 D25 = d25;
-  u32 D26 = d26;
-  u32 D27 = d27;
-  u32 D28 = d28;
-  u32 D29 = d29;
-  u32 D30 = d30;
-  u32 D31 = d31;
-  u32 D32 = d32;
-  u32 D33 = d33;
-  u32 D34 = d34;
-  u32 D35 = d35;
-  u32 D36 = d36;
-  u32 D37 = d37;
-  u32 D38 = d38;
-  u32 D39 = d39;
-  u32 D40 = d40;
-  u32 D41 = d41;
-  u32 D42 = d42;
-  u32 D43 = d43;
-  u32 D44 = d44;
-  u32 D45 = d45;
-  u32 D46 = d46;
-  u32 D47 = d47;
-  u32 D48 = d48;
-  u32 D49 = d49;
-  u32 D50 = d50;
-  u32 D51 = d51;
-  u32 D52 = d52;
-  u32 D53 = d53;
-  u32 D54 = d54;
-  u32 D55 = d55;
-  u32 D56 = d56;
-  u32 D57 = d57;
-  u32 D58 = d58;
-  u32 D59 = d59;
-  u32 D60 = d60;
-  u32 D61 = d61;
-  u32 D62 = d62;
-  u32 D63 = d63;
+  const u32 salt0_raw = salt_bufs[salt_pos].salt_buf[0];
+  const u32 salt1_raw = salt_bufs[salt_pos].salt_buf[1];

-  /**
-   * base
-   */
-
-  const u32 w0 = pws[gid].i[0];
-  const u32 w1 = pws[gid].i[1];
-
-  #define K00 (((w0 >> ( 0 + 7)) & 1) ? -1 : 0)
-  #define K01 (((w0 >> ( 0 + 6)) & 1) ? -1 : 0)
-  #define K02 (((w0 >> ( 0 + 5)) & 1) ? -1 : 0)
-  #define K03 (((w0 >> ( 0 + 4)) & 1) ? -1 : 0)
-  #define K04 (((w0 >> ( 0 + 3)) & 1) ? -1 : 0)
-  #define K05 (((w0 >> ( 0 + 2)) & 1) ? -1 : 0)
-  #define K06 (((w0 >> ( 0 + 1)) & 1) ? -1 : 0)
-  #define K07 (((w0 >> ( 8 + 7)) & 1) ? -1 : 0)
-  #define K08 (((w0 >> ( 8 + 6)) & 1) ? -1 : 0)
-  #define K09 (((w0 >> ( 8 + 5)) & 1) ? -1 : 0)
-  #define K10 (((w0 >> ( 8 + 4)) & 1) ? -1 : 0)
-  #define K11 (((w0 >> ( 8 + 3)) & 1) ? -1 : 0)
-  #define K12 (((w0 >> ( 8 + 2)) & 1) ? -1 : 0)
-  #define K13 (((w0 >> ( 8 + 1)) & 1) ? -1 : 0)
-  #define K14 (((w0 >> (16 + 7)) & 1) ? -1 : 0)
-  #define K15 (((w0 >> (16 + 6)) & 1) ? -1 : 0)
-  #define K16 (((w0 >> (16 + 5)) & 1) ? -1 : 0)
-  #define K17 (((w0 >> (16 + 4)) & 1) ? -1 : 0)
-  #define K18 (((w0 >> (16 + 3)) & 1) ? -1 : 0)
-  #define K19 (((w0 >> (16 + 2)) & 1) ? -1 : 0)
-  #define K20 (((w0 >> (16 + 1)) & 1) ? -1 : 0)
-  #define K21 (((w0 >> (24 + 7)) & 1) ? -1 : 0)
-  #define K22 (((w0 >> (24 + 6)) & 1) ? -1 : 0)
-  #define K23 (((w0 >> (24 + 5)) & 1) ? -1 : 0)
-  #define K24 (((w0 >> (24 + 4)) & 1) ? -1 : 0)
-  #define K25 (((w0 >> (24 + 3)) & 1) ? -1 : 0)
-  #define K26 (((w0 >> (24 + 2)) & 1) ? -1 : 0)
-  #define K27 (((w0 >> (24 + 1)) & 1) ? -1 : 0)
-  #define K28 (((w1 >> ( 0 + 7)) & 1) ? -1 : 0)
-  #define K29 (((w1 >> ( 0 + 6)) & 1) ? -1 : 0)
-  #define K30 (((w1 >> ( 0 + 5)) & 1) ? -1 : 0)
-  #define K31 (((w1 >> ( 0 + 4)) & 1) ? -1 : 0)
-  #define K32 (((w1 >> ( 0 + 3)) & 1) ? -1 : 0)
-  #define K33 (((w1 >> ( 0 + 2)) & 1) ? -1 : 0)
-  #define K34 (((w1 >> ( 0 + 1)) & 1) ? -1 : 0)
-  #define K35 (((w1 >> ( 8 + 7)) & 1) ? -1 : 0)
-  #define K36 (((w1 >> ( 8 + 6)) & 1) ? -1 : 0)
-  #define K37 (((w1 >> ( 8 + 5)) & 1) ? -1 : 0)
-  #define K38 (((w1 >> ( 8 + 4)) & 1) ? -1 : 0)
-  #define K39 (((w1 >> ( 8 + 3)) & 1) ? -1 : 0)
-  #define K40 (((w1 >> ( 8 + 2)) & 1) ? -1 : 0)
-  #define K41 (((w1 >> ( 8 + 1)) & 1) ? -1 : 0)
-  #define K42 (((w1 >> (16 + 7)) & 1) ? -1 : 0)
-  #define K43 (((w1 >> (16 + 6)) & 1) ? -1 : 0)
-  #define K44 (((w1 >> (16 + 5)) & 1) ? -1 : 0)
-  #define K45 (((w1 >> (16 + 4)) & 1) ? -1 : 0)
-  #define K46 (((w1 >> (16 + 3)) & 1) ? -1 : 0)
-  #define K47 (((w1 >> (16 + 2)) & 1) ? -1 : 0)
-  #define K48 (((w1 >> (16 + 1)) & 1) ? -1 : 0)
-  #define K49 (((w1 >> (24 + 7)) & 1) ? -1 : 0)
-  #define K50 (((w1 >> (24 + 6)) & 1) ? -1 : 0)
-  #define K51 (((w1 >> (24 + 5)) & 1) ? -1 : 0)
-  #define K52 (((w1 >> (24 + 4)) & 1) ? -1 : 0)
-  #define K53 (((w1 >> (24 + 3)) & 1) ? -1 : 0)
-  #define K54 (((w1 >> (24 + 2)) & 1) ? -1 : 0)
-  #define K55 (((w1 >> (24 + 1)) & 1) ? -1 : 0)
-
-  /**
-   * inner loop
-   */
+  // we modify the salt like this: salt0 remains and salt1 is ????xxxx (byte swapped)

-  for (u32 il_pos = 0; il_pos < il_cnt; il_pos += 32)
+  for (int i = 0; i <= 0xffff; i++)
   {
-    u32 k00 = K00;
-    u32 k01 = K01;
-    u32 k02 = K02;
-    u32 k03 = K03;
-    u32 k04 = K04;
-    u32 k05 = K05;
-    u32 k06 = K06;
-    u32 k07 = K07;
-    u32 k08 = K08;
-    u32 k09 = K09;
-    u32 k10 = K10;
-    u32 k11 = K11;
-    u32 k12 = K12;
-    u32 k13 = K13;
-    u32 k14 = K14;
-    u32 k15 = K15;
-    u32 k16 = K16;
-    u32 k17 = K17;
-    u32 k18 = K18;
-    u32 k19 = K19;
-    u32 k20 = K20;
-    u32 k21 = K21;
-    u32 k22 = K22;
-    u32 k23 = K23;
-    u32 k24 = K24;
-    u32 k25 = K25;
-    u32 k26 = K26;
-    u32 k27 = K27;
-
-    const u32 pc_pos = il_pos / 32;
-
-    k00 |= words_buf_s[pc_pos].b[ 0];
-    k01 |= words_buf_s[pc_pos].b[ 1];
-    k02 |= words_buf_s[pc_pos].b[ 2];
-    k03 |= words_buf_s[pc_pos].b[ 3];
-    k04 |= words_buf_s[pc_pos].b[ 4];
-    k05 |= words_buf_s[pc_pos].b[ 5];
-    k06 |= words_buf_s[pc_pos].b[ 6];
-    k07 |= words_buf_s[pc_pos].b[ 7];
-    k08 |= words_buf_s[pc_pos].b[ 8];
-    k09 |= words_buf_s[pc_pos].b[ 9];
-    k10 |= words_buf_s[pc_pos].b[10];
-    k11 |= words_buf_s[pc_pos].b[11];
-    k12 |= words_buf_s[pc_pos].b[12];
-    k13 |= words_buf_s[pc_pos].b[13];
-    k14 |= words_buf_s[pc_pos].b[14];
-    k15 |= words_buf_s[pc_pos].b[15];
-    k16 |= words_buf_s[pc_pos].b[16];
-    k17 |= words_buf_s[pc_pos].b[17];
-    k18 |= words_buf_s[pc_pos].b[18];
-    k19 |= words_buf_s[pc_pos].b[19];
-    k20 |= words_buf_s[pc_pos].b[20];
-    k21 |= words_buf_s[pc_pos].b[21];
-    k22 |= words_buf_s[pc_pos].b[22];
-    k23 |= words_buf_s[pc_pos].b[23];
-    k24 |= words_buf_s[pc_pos].b[24];
-    k25 |= words_buf_s[pc_pos].b[25];
-    k26 |= words_buf_s[pc_pos].b[26];
-    k27 |= words_buf_s[pc_pos].b[27];
-
-    DES
-    (
-      k00, k01, k02, k03, k04, k05, k06,
-      k07, k08, k09, k10, k11, k12, k13,
-      k14, k15, k16, k17, k18, k19, k20,
-      k21, k22, k23, k24, k25, k26, k27,
-      K28, K29, K30, K31, K32, K33, K34,
-      K35, K36, K37, K38, K39, K40, K41,
-      K42, K43, K44, K45, K46, K47, K48,
-      K49, K50, K51, K52, K53, K54, K55,
-      &D00, &D01, &D02, &D03, &D04, &D05, &D06, &D07,
-      &D08, &D09, &D10, &D11, &D12, &D13, &D14, &D15,
-      &D16, &D17, &D18, &D19, &D20, &D21, &D22, &D23,
-      &D24, &D25, &D26, &D27, &D28, &D29, &D30, &D31,
-      &D32, &D33, &D34, &D35, &D36, &D37, &D38, &D39,
-      &D40, &D41, &D42, &D43, &D44, &D45, &D46, &D47,
-      &D48, &D49, &D50, &D51, &D52, &D53, &D54, &D55,
-      &D56, &D57, &D58, &D59, &D60, &D61, &D62, &D63
-    );
-
-    u32 out[64];
-
-    out[ 0] = D00;
-    out[ 1] = D01;
-    out[ 2] = D02;
-    out[ 3] = D03;
-    out[ 4] = D04;
-    out[ 5] = D05;
-    out[ 6] = D06;
-    out[ 7] = D07;
-    out[ 8] = D08;
-    out[ 9] = D09;
-    out[10] = D10;
-    out[11] = D11;
-    out[12] = D12;
-    out[13] = D13;
-    out[14] = D14;
-    out[15] = D15;
-    out[16] = D16;
-    out[17] = D17;
-    out[18] = D18;
-    out[19] = D19;
-    out[20] = D20;
-    out[21] = D21;
-    out[22] = D22;
-    out[23] = D23;
-    out[24] = D24;
-    out[25] = D25;
-    out[26] = D26;
-    out[27] = D27;
-    out[28] = D28;
-    out[29] = D29;
-    out[30] = D30;
-    out[31] = D31;
-    out[32] = D32;
-    out[33] = D33;
-    out[34] = D34;
-    out[35] = D35;
-    out[36] = D36;
-    out[37] = D37;
-    out[38] = D38;
-    out[39] = D39;
-    out[40] = D40;
-    out[41] = D41;
-    out[42] = D42;
-    out[43] = D43;
-    out[44] = D44;
-    out[45] = D45;
-    out[46] = D46;
-    out[47] = D47;
-    out[48] = D48;
-    out[49] = D49;
-    out[50] = D50;
-    out[51] = D51;
-    out[52] = D52;
-    out[53] = D53;
-    out[54] = D54;
-    out[55] = D55;
-    out[56] = D56;
-    out[57] = D57;
-    out[58] = D58;
-    out[59] = D59;
-    out[60] = D60;
-    out[61] = D61;
-    out[62] = D62;
-    out[63] = D63;
-
-    if (digests_cnt < 16)
+    // modify salt1 at index (counting from 0) 2 and 3 (byte_swapped):
+
+    u32 salt0 = salt0_raw;
+    u32 salt1 = salt1_raw & 0xffff0000; // 2 bytes remain
+
+    salt1 |= i;
+
+    DES_IP (salt0, salt1);
+
+    // salt1 first, because this is a 64 bit value actually
+
+    #define d00 (((salt1 >>  0) & 1) ? -1 : 0)
+    #define d01 (((salt1 >>  1) & 1) ? -1 : 0)
+    #define d02 (((salt1 >>  2) & 1) ? -1 : 0)
+    #define d03 (((salt1 >>  3) & 1) ? -1 : 0)
+    #define d04 (((salt1 >>  4) & 1) ? -1 : 0)
+    #define d05 (((salt1 >>  5) & 1) ? -1 : 0)
+    #define d06 (((salt1 >>  6) & 1) ? -1 : 0)
+    #define d07 (((salt1 >>  7) & 1) ? -1 : 0)
+    #define d08 (((salt1 >>  8) & 1) ? -1 : 0)
+    #define d09 (((salt1 >>  9) & 1) ? -1 : 0)
+    #define d10 (((salt1 >> 10) & 1) ? -1 : 0)
+    #define d11 (((salt1 >> 11) & 1) ? -1 : 0)
+    #define d12 (((salt1 >> 12) & 1) ? -1 : 0)
+    #define d13 (((salt1 >> 13) & 1) ? -1 : 0)
+    #define d14 (((salt1 >> 14) & 1) ? -1 : 0)
+    #define d15 (((salt1 >> 15) & 1) ? -1 : 0)
+    #define d16 (((salt1 >> 16) & 1) ? -1 : 0)
+    #define d17 (((salt1 >> 17) & 1) ? -1 : 0)
+    #define d18 (((salt1 >> 18) & 1) ? -1 : 0)
+    #define d19 (((salt1 >> 19) & 1) ? -1 : 0)
+    #define d20 (((salt1 >> 20) & 1) ? -1 : 0)
+    #define d21 (((salt1 >> 21) & 1) ? -1 : 0)
+    #define d22 (((salt1 >> 22) & 1) ? -1 : 0)
+    #define d23 (((salt1 >> 23) & 1) ? -1 : 0)
+    #define d24 (((salt1 >> 24) & 1) ? -1 : 0)
+    #define d25 (((salt1 >> 25) & 1) ? -1 : 0)
+    #define d26 (((salt1 >> 26) & 1) ? -1 : 0)
+    #define d27 (((salt1 >> 27) & 1) ? -1 : 0)
+    #define d28 (((salt1 >> 28) & 1) ? -1 : 0)
+    #define d29 (((salt1 >> 29) & 1) ? -1 : 0)
+    #define d30 (((salt1 >> 30) & 1) ? -1 : 0)
+    #define d31 (((salt1 >> 31) & 1) ? -1 : 0)
+    #define d32 (((salt0 >>  0) & 1) ? -1 : 0)
+    #define d33 (((salt0 >>  1) & 1) ? -1 : 0)
+    #define d34 (((salt0 >>  2) & 1) ? -1 : 0)
+    #define d35 (((salt0 >>  3) & 1) ? -1 : 0)
+    #define d36 (((salt0 >>  4) & 1) ? -1 : 0)
+    #define d37 (((salt0 >>  5) & 1) ? -1 : 0)
+    #define d38 (((salt0 >>  6) & 1) ? -1 : 0)
+    #define d39 (((salt0 >>  7) & 1) ? -1 : 0)
+    #define d40 (((salt0 >>  8) & 1) ? -1 : 0)
+    #define d41 (((salt0 >>  9) & 1) ? -1 : 0)
+    #define d42 (((salt0 >> 10) & 1) ? -1 : 0)
+    #define d43 (((salt0 >> 11) & 1) ? -1 : 0)
+    #define d44 (((salt0 >> 12) & 1) ? -1 : 0)
+    #define d45 (((salt0 >> 13) & 1) ? -1 : 0)
+    #define d46 (((salt0 >> 14) & 1) ? -1 : 0)
+    #define d47 (((salt0 >> 15) & 1) ? -1 : 0)
+    #define d48 (((salt0 >> 16) & 1) ? -1 : 0)
+    #define d49 (((salt0 >> 17) & 1) ? -1 : 0)
+    #define d50 (((salt0 >> 18) & 1) ? -1 : 0)
+    #define d51 (((salt0 >> 19) & 1) ? -1 : 0)
+    #define d52 (((salt0 >> 20) & 1) ? -1 : 0)
+    #define d53 (((salt0 >> 21) & 1) ? -1 : 0)
+    #define d54 (((salt0 >> 22) & 1) ? -1 : 0)
+    #define d55 (((salt0 >> 23) & 1) ? -1 : 0)
+    #define d56 (((salt0 >> 24) & 1) ? -1 : 0)
+    #define d57 (((salt0 >> 25) & 1) ? -1 : 0)
+    #define d58 (((salt0 >> 26) & 1) ? -1 : 0)
+    #define d59 (((salt0 >> 27) & 1) ? -1 : 0)
+    #define d60 (((salt0 >> 28) & 1) ? -1 : 0)
+    #define d61 (((salt0 >> 29) & 1) ? -1 : 0)
+    #define d62 (((salt0 >> 30) & 1) ? -1 : 0)
+    #define d63 (((salt0 >> 31) & 1) ? -1 : 0)
+
+    u32 D00 = d00;
+    u32 D01 = d01;
+    u32 D02 = d02;
+    u32 D03 = d03;
+    u32 D04 = d04;
+    u32 D05 = d05;
+    u32 D06 = d06;
+    u32 D07 = d07;
+    u32 D08 = d08;
+    u32 D09 = d09;
+    u32 D10 = d10;
+    u32 D11 = d11;
+    u32 D12 = d12;
+    u32 D13 = d13;
+    u32 D14 = d14;
+    u32 D15 = d15;
+    u32 D16 = d16;
+    u32 D17 = d17;
+    u32 D18 = d18;
+    u32 D19 = d19;
+    u32 D20 = d20;
+    u32 D21 = d21;
+    u32 D22 = d22;
+    u32 D23 = d23;
+    u32 D24 = d24;
+    u32 D25 = d25;
+    u32 D26 = d26;
+    u32 D27 = d27;
+    u32 D28 = d28;
+    u32 D29 = d29;
+    u32 D30 = d30;
+    u32 D31 = d31;
+    u32 D32 = d32;
+    u32 D33 = d33;
+    u32 D34 = d34;
+    u32 D35 = d35;
+    u32 D36 = d36;
+    u32 D37 = d37;
+    u32 D38 = d38;
+    u32 D39 = d39;
+    u32 D40 = d40;
+    u32 D41 = d41;
+    u32 D42 = d42;
+    u32 D43 = d43;
+    u32 D44 = d44;
+    u32 D45 = d45;
+    u32 D46 = d46;
+    u32 D47 = d47;
+    u32 D48 = d48;
+    u32 D49 = d49;
+    u32 D50 = d50;
+    u32 D51 = d51;
+    u32 D52 = d52;
+    u32 D53 = d53;
+    u32 D54 = d54;
+    u32 D55 = d55;
+    u32 D56 = d56;
+    u32 D57 = d57;
+    u32 D58 = d58;
+    u32 D59 = d59;
+    u32 D60 = d60;
+    u32 D61 = d61;
+    u32 D62 = d62;
+    u32 D63 = d63;
+
+    /**
+     * base
+     */
+
+    const u32 w0 = pws[gid].i[0];
+    const u32 w1 = pws[gid].i[1];
+
+    #define K00 (((w0 >> ( 0 + 7)) & 1) ? -1 : 0)
+    #define K01 (((w0 >> ( 0 + 6)) & 1) ? -1 : 0)
+    #define K02 (((w0 >> ( 0 + 5)) & 1) ? -1 : 0)
+    #define K03 (((w0 >> ( 0 + 4)) & 1) ? -1 : 0)
+    #define K04 (((w0 >> ( 0 + 3)) & 1) ? -1 : 0)
+    #define K05 (((w0 >> ( 0 + 2)) & 1) ? -1 : 0)
+    #define K06 (((w0 >> ( 0 + 1)) & 1) ? -1 : 0)
+    #define K07 (((w0 >> ( 8 + 7)) & 1) ? -1 : 0)
+    #define K08 (((w0 >> ( 8 + 6)) & 1) ? -1 : 0)
+    #define K09 (((w0 >> ( 8 + 5)) & 1) ? -1 : 0)
+    #define K10 (((w0 >> ( 8 + 4)) & 1) ? -1 : 0)
+    #define K11 (((w0 >> ( 8 + 3)) & 1) ? -1 : 0)
+    #define K12 (((w0 >> ( 8 + 2)) & 1) ? -1 : 0)
+    #define K13 (((w0 >> ( 8 + 1)) & 1) ? -1 : 0)
+    #define K14 (((w0 >> (16 + 7)) & 1) ? -1 : 0)
+    #define K15 (((w0 >> (16 + 6)) & 1) ? -1 : 0)
+    #define K16 (((w0 >> (16 + 5)) & 1) ? -1 : 0)
+    #define K17 (((w0 >> (16 + 4)) & 1) ? -1 : 0)
+    #define K18 (((w0 >> (16 + 3)) & 1) ? -1 : 0)
+    #define K19 (((w0 >> (16 + 2)) & 1) ? -1 : 0)
+    #define K20 (((w0 >> (16 + 1)) & 1) ? -1 : 0)
+    #define K21 (((w0 >> (24 + 7)) & 1) ? -1 : 0)
+    #define K22 (((w0 >> (24 + 6)) & 1) ? -1 : 0)
+    #define K23 (((w0 >> (24 + 5)) & 1) ? -1 : 0)
+    #define K24 (((w0 >> (24 + 4)) & 1) ? -1 : 0)
+    #define K25 (((w0 >> (24 + 3)) & 1) ? -1 : 0)
+    #define K26 (((w0 >> (24 + 2)) & 1) ? -1 : 0)
+    #define K27 (((w0 >> (24 + 1)) & 1) ? -1 : 0)
+    #define K28 (((w1 >> ( 0 + 7)) & 1) ? -1 : 0)
+    #define K29 (((w1 >> ( 0 + 6)) & 1) ? -1 : 0)
+    #define K30 (((w1 >> ( 0 + 5)) & 1) ? -1 : 0)
+    #define K31 (((w1 >> ( 0 + 4)) & 1) ? -1 : 0)
+    #define K32 (((w1 >> ( 0 + 3)) & 1) ? -1 : 0)
+    #define K33 (((w1 >> ( 0 + 2)) & 1) ? -1 : 0)
+    #define K34 (((w1 >> ( 0 + 1)) & 1) ? -1 : 0)
+    #define K35 (((w1 >> ( 8 + 7)) & 1) ? -1 : 0)
+    #define K36 (((w1 >> ( 8 + 6)) & 1) ? -1 : 0)
+    #define K37 (((w1 >> ( 8 + 5)) & 1) ? -1 : 0)
+    #define K38 (((w1 >> ( 8 + 4)) & 1) ? -1 : 0)
+    #define K39 (((w1 >> ( 8 + 3)) & 1) ? -1 : 0)
+    #define K40 (((w1 >> ( 8 + 2)) & 1) ? -1 : 0)
+    #define K41 (((w1 >> ( 8 + 1)) & 1) ? -1 : 0)
+    #define K42 (((w1 >> (16 + 7)) & 1) ? -1 : 0)
+    #define K43 (((w1 >> (16 + 6)) & 1) ? -1 : 0)
+    #define K44 (((w1 >> (16 + 5)) & 1) ? -1 : 0)
+    #define K45 (((w1 >> (16 + 4)) & 1) ? -1 : 0)
+    #define K46 (((w1 >> (16 + 3)) & 1) ? -1 : 0)
+    #define K47 (((w1 >> (16 + 2)) & 1) ? -1 : 0)
+    #define K48 (((w1 >> (16 + 1)) & 1) ? -1 : 0)
+    #define K49 (((w1 >> (24 + 7)) & 1) ? -1 : 0)
+    #define K50 (((w1 >> (24 + 6)) & 1) ? -1 : 0)
+    #define K51 (((w1 >> (24 + 5)) & 1) ? -1 : 0)
+    #define K52 (((w1 >> (24 + 4)) & 1) ? -1 : 0)
+    #define K53 (((w1 >> (24 + 3)) & 1) ? -1 : 0)
+    #define K54 (((w1 >> (24 + 2)) & 1) ? -1 : 0)
+    #define K55 (((w1 >> (24 + 1)) & 1) ? -1 : 0)
+
+    /**
+     * inner loop
+     */
+
+    for (u32 il_pos = 0; il_pos < il_cnt; il_pos += 32)
     {
-      for (u32 d = 0; d < digests_cnt; d++)
+      u32 k00 = K00;
+      u32 k01 = K01;
+      u32 k02 = K02;
+      u32 k03 = K03;
+      u32 k04 = K04;
+      u32 k05 = K05;
+      u32 k06 = K06;
+      u32 k07 = K07;
+      u32 k08 = K08;
+      u32 k09 = K09;
+      u32 k10 = K10;
+      u32 k11 = K11;
+      u32 k12 = K12;
+      u32 k13 = K13;
+      u32 k14 = K14;
+      u32 k15 = K15;
+      u32 k16 = K16;
+      u32 k17 = K17;
+      u32 k18 = K18;
+      u32 k19 = K19;
+      u32 k20 = K20;
+      u32 k21 = K21;
+      u32 k22 = K22;
+      u32 k23 = K23;
+      u32 k24 = K24;
+      u32 k25 = K25;
+      u32 k26 = K26;
+      u32 k27 = K27;
+
+      const u32 pc_pos = il_pos / 32;
+
+      k00 |= words_buf_s[pc_pos].b[ 0];
+      k01 |= words_buf_s[pc_pos].b[ 1];
+      k02 |= words_buf_s[pc_pos].b[ 2];
+      k03 |= words_buf_s[pc_pos].b[ 3];
+      k04 |= words_buf_s[pc_pos].b[ 4];
+      k05 |= words_buf_s[pc_pos].b[ 5];
+      k06 |= words_buf_s[pc_pos].b[ 6];
+      k07 |= words_buf_s[pc_pos].b[ 7];
+      k08 |= words_buf_s[pc_pos].b[ 8];
+      k09 |= words_buf_s[pc_pos].b[ 9];
+      k10 |= words_buf_s[pc_pos].b[10];
+      k11 |= words_buf_s[pc_pos].b[11];
+      k12 |= words_buf_s[pc_pos].b[12];
+      k13 |= words_buf_s[pc_pos].b[13];
+      k14 |= words_buf_s[pc_pos].b[14];
+      k15 |= words_buf_s[pc_pos].b[15];
+      k16 |= words_buf_s[pc_pos].b[16];
+      k17 |= words_buf_s[pc_pos].b[17];
+      k18 |= words_buf_s[pc_pos].b[18];
+      k19 |= words_buf_s[pc_pos].b[19];
+      k20 |= words_buf_s[pc_pos].b[20];
+      k21 |= words_buf_s[pc_pos].b[21];
+      k22 |= words_buf_s[pc_pos].b[22];
+      k23 |= words_buf_s[pc_pos].b[23];
+      k24 |= words_buf_s[pc_pos].b[24];
+      k25 |= words_buf_s[pc_pos].b[25];
+      k26 |= words_buf_s[pc_pos].b[26];
+      k27 |= words_buf_s[pc_pos].b[27];
+
+      DES
+      (
+        k00, k01, k02, k03, k04, k05, k06,
+        k07, k08, k09, k10, k11, k12, k13,
+        k14, k15, k16, k17, k18, k19, k20,
+        k21, k22, k23, k24, k25, k26, k27,
+        K28, K29, K30, K31, K32, K33, K34,
+        K35, K36, K37, K38, K39, K40, K41,
+        K42, K43, K44, K45, K46, K47, K48,
+        K49, K50, K51, K52, K53, K54, K55,
+        &D00, &D01, &D02, &D03, &D04, &D05, &D06, &D07,
+        &D08, &D09, &D10, &D11, &D12, &D13, &D14, &D15,
+        &D16, &D17, &D18, &D19, &D20, &D21, &D22, &D23,
+        &D24, &D25, &D26, &D27, &D28, &D29, &D30, &D31,
+        &D32, &D33, &D34, &D35, &D36, &D37, &D38, &D39,
+        &D40, &D41, &D42, &D43, &D44, &D45, &D46, &D47,
+        &D48, &D49, &D50, &D51, &D52, &D53, &D54, &D55,
+        &D56, &D57, &D58, &D59, &D60, &D61, &D62, &D63
+      );
+
+      u32 out[64];
+
+      out[ 0] = D00;
+      out[ 1] = D01;
+      out[ 2] = D02;
+      out[ 3] = D03;
+      out[ 4] = D04;
+      out[ 5] = D05;
+      out[ 6] = D06;
+      out[ 7] = D07;
+      out[ 8] = D08;
+      out[ 9] = D09;
+      out[10] = D10;
+      out[11] = D11;
+      out[12] = D12;
+      out[13] = D13;
+      out[14] = D14;
+      out[15] = D15;
+      out[16] = D16;
+      out[17] = D17;
+      out[18] = D18;
+      out[19] = D19;
+      out[20] = D20;
+      out[21] = D21;
+      out[22] = D22;
+      out[23] = D23;
+      out[24] = D24;
+      out[25] = D25;
+      out[26] = D26;
+      out[27] = D27;
+      out[28] = D28;
+      out[29] = D29;
+      out[30] = D30;
+      out[31] = D31;
+      out[32] = D32;
+      out[33] = D33;
+      out[34] = D34;
+      out[35] = D35;
+      out[36] = D36;
+      out[37] = D37;
+      out[38] = D38;
+      out[39] = D39;
+      out[40] = D40;
+      out[41] = D41;
+      out[42] = D42;
+      out[43] = D43;
+      out[44] = D44;
+      out[45] = D45;
+      out[46] = D46;
+      out[47] = D47;
+      out[48] = D48;
+      out[49] = D49;
+      out[50] = D50;
+      out[51] = D51;
+      out[52] = D52;
+      out[53] = D53;
+      out[54] = D54;
+      out[55] = D55;
+      out[56] = D56;
+      out[57] = D57;
+      out[58] = D58;
+      out[59] = D59;
+      out[60] = D60;
+      out[61] = D61;
+      out[62] = D62;
+      out[63] = D63;
+
+      if (digests_cnt < 16)
       {
-        const u32 final_hash_pos = digests_offset + d;
+        for (u32 d = 0; d < digests_cnt; d++)
+        {
+          const u32 final_hash_pos = digests_offset + d;

-        if (hashes_shown[final_hash_pos]) continue;
+          if (hashes_shown[final_hash_pos]) continue;

-        u32 search[2];
+          u32 search[2];

-        search[0] = digests_buf[final_hash_pos].digest_buf[DGST_R0];
-        search[1] = digests_buf[final_hash_pos].digest_buf[DGST_R1];
+          search[0] = digests_buf[final_hash_pos].digest_buf[DGST_R0];
+          search[1] = digests_buf[final_hash_pos].digest_buf[DGST_R1];

-        u32 tmpResult = 0;
+          u32 tmpResult = 0;

-        #ifdef _unroll
-        #pragma unroll
-        #endif
-        for (int i = 0; i < 32; i++)
-        {
-          const u32 b0 = -((search[0] >> i) & 1);
-          const u32 b1 = -((search[1] >> i) & 1);
+          #ifdef _unroll
+          #pragma unroll
+          #endif
+          for (int i = 0; i < 32; i++)
+          {
+            const u32 b0 = -((search[0] >> i) & 1);
+            const u32 b1 = -((search[1] >> i) & 1);

-          tmpResult |= out[ 0 + i] ^ b0;
-          tmpResult |= out[32 + i] ^ b1;
-        }
+            tmpResult |= out[ 0 + i] ^ b0;
+            tmpResult |= out[32 + i] ^ b1;
+          }

-        if (tmpResult == 0xffffffff) continue;
+          if (tmpResult == 0xffffffff) continue;

-        const u32 slice = ffz (tmpResult);
+          const u32 slice = ffz (tmpResult);

-        const u32 r0 = search[0];
-        const u32 r1 = search[1];
-        const u32 r2 = 0;
-        const u32 r3 = 0;
+          const u32 r0 = search[0];
+          const u32 r1 = search[1];
+          const u32 r2 = 0;
+          const u32 r3 = 0;

-        #ifdef KERNEL_STATIC
-        #include COMPARE_M
-        #endif
+          #ifdef KERNEL_STATIC
+          #include COMPARE_M
+          #endif
+        }
       }
-    }
-    else
-    {
-      u32 out0[32];
-      u32 out1[32];
-
-      #ifdef _unroll
-      #pragma unroll
-      #endif
-      for (int i = 0; i < 32; i++)
+      else
       {
-        out0[i] = out[ 0 + i];
-        out1[i] = out[32 + i];
-      }
+        u32 out0[32];
+        u32 out1[32];

-      transpose32c (out0);
-      transpose32c (out1);
+        #ifdef _unroll
+        #pragma unroll
+        #endif
+        for (int i = 0; i < 32; i++)
+        {
+          out0[i] = out[ 0 + i];
+          out1[i] = out[32 + i];
+        }

-      #ifdef _unroll
-      #pragma unroll
-      #endif
-      for (int slice = 0; slice < 32; slice++)
-      {
-        const u32 r0 = out0[slice];
-        const u32 r1 = out1[slice];
-        const u32 r2 = 0;
-        const u32 r3 = 0;
+        transpose32c (out0);
+        transpose32c (out1);

-        #ifdef KERNEL_STATIC
-        #include COMPARE_M
+        #ifdef _unroll
+        #pragma unroll
         #endif
+        for (int slice = 0; slice < 32; slice++)
+        {
+          const u32 r0 = out0[slice];
+          const u32 r1 = out1[slice];
+          const u32 r2 = 0;
+          const u32 r3 = 0;
+
+          #ifdef KERNEL_STATIC
+          #include COMPARE_M
+          #endif
+        }
       }
     }
   }
@@ -2208,445 +2223,459 @@ 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];
-
-  // salt1 first, because this is a 64 bit value actually
-
-  #define d00 (((salt1 >>  0) & 1) ? -1 : 0)
-  #define d01 (((salt1 >>  1) & 1) ? -1 : 0)
-  #define d02 (((salt1 >>  2) & 1) ? -1 : 0)
-  #define d03 (((salt1 >>  3) & 1) ? -1 : 0)
-  #define d04 (((salt1 >>  4) & 1) ? -1 : 0)
-  #define d05 (((salt1 >>  5) & 1) ? -1 : 0)
-  #define d06 (((salt1 >>  6) & 1) ? -1 : 0)
-  #define d07 (((salt1 >>  7) & 1) ? -1 : 0)
-  #define d08 (((salt1 >>  8) & 1) ? -1 : 0)
-  #define d09 (((salt1 >>  9) & 1) ? -1 : 0)
-  #define d10 (((salt1 >> 10) & 1) ? -1 : 0)
-  #define d11 (((salt1 >> 11) & 1) ? -1 : 0)
-  #define d12 (((salt1 >> 12) & 1) ? -1 : 0)
-  #define d13 (((salt1 >> 13) & 1) ? -1 : 0)
-  #define d14 (((salt1 >> 14) & 1) ? -1 : 0)
-  #define d15 (((salt1 >> 15) & 1) ? -1 : 0)
-  #define d16 (((salt1 >> 16) & 1) ? -1 : 0)
-  #define d17 (((salt1 >> 17) & 1) ? -1 : 0)
-  #define d18 (((salt1 >> 18) & 1) ? -1 : 0)
-  #define d19 (((salt1 >> 19) & 1) ? -1 : 0)
-  #define d20 (((salt1 >> 20) & 1) ? -1 : 0)
-  #define d21 (((salt1 >> 21) & 1) ? -1 : 0)
-  #define d22 (((salt1 >> 22) & 1) ? -1 : 0)
-  #define d23 (((salt1 >> 23) & 1) ? -1 : 0)
-  #define d24 (((salt1 >> 24) & 1) ? -1 : 0)
-  #define d25 (((salt1 >> 25) & 1) ? -1 : 0)
-  #define d26 (((salt1 >> 26) & 1) ? -1 : 0)
-  #define d27 (((salt1 >> 27) & 1) ? -1 : 0)
-  #define d28 (((salt1 >> 28) & 1) ? -1 : 0)
-  #define d29 (((salt1 >> 29) & 1) ? -1 : 0)
-  #define d30 (((salt1 >> 30) & 1) ? -1 : 0)
-  #define d31 (((salt1 >> 31) & 1) ? -1 : 0)
-  #define d32 (((salt0 >>  0) & 1) ? -1 : 0)
-  #define d33 (((salt0 >>  1) & 1) ? -1 : 0)
-  #define d34 (((salt0 >>  2) & 1) ? -1 : 0)
-  #define d35 (((salt0 >>  3) & 1) ? -1 : 0)
-  #define d36 (((salt0 >>  4) & 1) ? -1 : 0)
-  #define d37 (((salt0 >>  5) & 1) ? -1 : 0)
-  #define d38 (((salt0 >>  6) & 1) ? -1 : 0)
-  #define d39 (((salt0 >>  7) & 1) ? -1 : 0)
-  #define d40 (((salt0 >>  8) & 1) ? -1 : 0)
-  #define d41 (((salt0 >>  9) & 1) ? -1 : 0)
-  #define d42 (((salt0 >> 10) & 1) ? -1 : 0)
-  #define d43 (((salt0 >> 11) & 1) ? -1 : 0)
-  #define d44 (((salt0 >> 12) & 1) ? -1 : 0)
-  #define d45 (((salt0 >> 13) & 1) ? -1 : 0)
-  #define d46 (((salt0 >> 14) & 1) ? -1 : 0)
-  #define d47 (((salt0 >> 15) & 1) ? -1 : 0)
-  #define d48 (((salt0 >> 16) & 1) ? -1 : 0)
-  #define d49 (((salt0 >> 17) & 1) ? -1 : 0)
-  #define d50 (((salt0 >> 18) & 1) ? -1 : 0)
-  #define d51 (((salt0 >> 19) & 1) ? -1 : 0)
-  #define d52 (((salt0 >> 20) & 1) ? -1 : 0)
-  #define d53 (((salt0 >> 21) & 1) ? -1 : 0)
-  #define d54 (((salt0 >> 22) & 1) ? -1 : 0)
-  #define d55 (((salt0 >> 23) & 1) ? -1 : 0)
-  #define d56 (((salt0 >> 24) & 1) ? -1 : 0)
-  #define d57 (((salt0 >> 25) & 1) ? -1 : 0)
-  #define d58 (((salt0 >> 26) & 1) ? -1 : 0)
-  #define d59 (((salt0 >> 27) & 1) ? -1 : 0)
-  #define d60 (((salt0 >> 28) & 1) ? -1 : 0)
-  #define d61 (((salt0 >> 29) & 1) ? -1 : 0)
-  #define d62 (((salt0 >> 30) & 1) ? -1 : 0)
-  #define d63 (((salt0 >> 31) & 1) ? -1 : 0)
-
-  u32 D00 = d00;
-  u32 D01 = d01;
-  u32 D02 = d02;
-  u32 D03 = d03;
-  u32 D04 = d04;
-  u32 D05 = d05;
-  u32 D06 = d06;
-  u32 D07 = d07;
-  u32 D08 = d08;
-  u32 D09 = d09;
-  u32 D10 = d10;
-  u32 D11 = d11;
-  u32 D12 = d12;
-  u32 D13 = d13;
-  u32 D14 = d14;
-  u32 D15 = d15;
-  u32 D16 = d16;
-  u32 D17 = d17;
-  u32 D18 = d18;
-  u32 D19 = d19;
-  u32 D20 = d20;
-  u32 D21 = d21;
-  u32 D22 = d22;
-  u32 D23 = d23;
-  u32 D24 = d24;
-  u32 D25 = d25;
-  u32 D26 = d26;
-  u32 D27 = d27;
-  u32 D28 = d28;
-  u32 D29 = d29;
-  u32 D30 = d30;
-  u32 D31 = d31;
-  u32 D32 = d32;
-  u32 D33 = d33;
-  u32 D34 = d34;
-  u32 D35 = d35;
-  u32 D36 = d36;
-  u32 D37 = d37;
-  u32 D38 = d38;
-  u32 D39 = d39;
-  u32 D40 = d40;
-  u32 D41 = d41;
-  u32 D42 = d42;
-  u32 D43 = d43;
-  u32 D44 = d44;
-  u32 D45 = d45;
-  u32 D46 = d46;
-  u32 D47 = d47;
-  u32 D48 = d48;
-  u32 D49 = d49;
-  u32 D50 = d50;
-  u32 D51 = d51;
-  u32 D52 = d52;
-  u32 D53 = d53;
-  u32 D54 = d54;
-  u32 D55 = d55;
-  u32 D56 = d56;
-  u32 D57 = d57;
-  u32 D58 = d58;
-  u32 D59 = d59;
-  u32 D60 = d60;
-  u32 D61 = d61;
-  u32 D62 = d62;
-  u32 D63 = d63;
-
-  /**
-   * digest
-   */
+  const u32 salt0_raw = salt_bufs[salt_pos].salt_buf[0];
+  const u32 salt1_raw = salt_bufs[salt_pos].salt_buf[1];

-  const u32 s0 = digests_buf[0].digest_buf[0];
-  const u32 s1 = digests_buf[0].digest_buf[1];
-
-  const u32 S00 = (((s0 >>  0) & 1) ? -1 : 0);
-  const u32 S01 = (((s0 >>  1) & 1) ? -1 : 0);
-  const u32 S02 = (((s0 >>  2) & 1) ? -1 : 0);
-  const u32 S03 = (((s0 >>  3) & 1) ? -1 : 0);
-  const u32 S04 = (((s0 >>  4) & 1) ? -1 : 0);
-  const u32 S05 = (((s0 >>  5) & 1) ? -1 : 0);
-  const u32 S06 = (((s0 >>  6) & 1) ? -1 : 0);
-  const u32 S07 = (((s0 >>  7) & 1) ? -1 : 0);
-  const u32 S08 = (((s0 >>  8) & 1) ? -1 : 0);
-  const u32 S09 = (((s0 >>  9) & 1) ? -1 : 0);
-  const u32 S10 = (((s0 >> 10) & 1) ? -1 : 0);
-  const u32 S11 = (((s0 >> 11) & 1) ? -1 : 0);
-  const u32 S12 = (((s0 >> 12) & 1) ? -1 : 0);
-  const u32 S13 = (((s0 >> 13) & 1) ? -1 : 0);
-  const u32 S14 = (((s0 >> 14) & 1) ? -1 : 0);
-  const u32 S15 = (((s0 >> 15) & 1) ? -1 : 0);
-  const u32 S16 = (((s0 >> 16) & 1) ? -1 : 0);
-  const u32 S17 = (((s0 >> 17) & 1) ? -1 : 0);
-  const u32 S18 = (((s0 >> 18) & 1) ? -1 : 0);
-  const u32 S19 = (((s0 >> 19) & 1) ? -1 : 0);
-  const u32 S20 = (((s0 >> 20) & 1) ? -1 : 0);
-  const u32 S21 = (((s0 >> 21) & 1) ? -1 : 0);
-  const u32 S22 = (((s0 >> 22) & 1) ? -1 : 0);
-  const u32 S23 = (((s0 >> 23) & 1) ? -1 : 0);
-  const u32 S24 = (((s0 >> 24) & 1) ? -1 : 0);
-  const u32 S25 = (((s0 >> 25) & 1) ? -1 : 0);
-  const u32 S26 = (((s0 >> 26) & 1) ? -1 : 0);
-  const u32 S27 = (((s0 >> 27) & 1) ? -1 : 0);
-  const u32 S28 = (((s0 >> 28) & 1) ? -1 : 0);
-  const u32 S29 = (((s0 >> 29) & 1) ? -1 : 0);
-  const u32 S30 = (((s0 >> 30) & 1) ? -1 : 0);
-  const u32 S31 = (((s0 >> 31) & 1) ? -1 : 0);
-  const u32 S32 = (((s1 >>  0) & 1) ? -1 : 0);
-  const u32 S33 = (((s1 >>  1) & 1) ? -1 : 0);
-  const u32 S34 = (((s1 >>  2) & 1) ? -1 : 0);
-  const u32 S35 = (((s1 >>  3) & 1) ? -1 : 0);
-  const u32 S36 = (((s1 >>  4) & 1) ? -1 : 0);
-  const u32 S37 = (((s1 >>  5) & 1) ? -1 : 0);
-  const u32 S38 = (((s1 >>  6) & 1) ? -1 : 0);
-  const u32 S39 = (((s1 >>  7) & 1) ? -1 : 0);
-  const u32 S40 = (((s1 >>  8) & 1) ? -1 : 0);
-  const u32 S41 = (((s1 >>  9) & 1) ? -1 : 0);
-  const u32 S42 = (((s1 >> 10) & 1) ? -1 : 0);
-  const u32 S43 = (((s1 >> 11) & 1) ? -1 : 0);
-  const u32 S44 = (((s1 >> 12) & 1) ? -1 : 0);
-  const u32 S45 = (((s1 >> 13) & 1) ? -1 : 0);
-  const u32 S46 = (((s1 >> 14) & 1) ? -1 : 0);
-  const u32 S47 = (((s1 >> 15) & 1) ? -1 : 0);
-  const u32 S48 = (((s1 >> 16) & 1) ? -1 : 0);
-  const u32 S49 = (((s1 >> 17) & 1) ? -1 : 0);
-  const u32 S50 = (((s1 >> 18) & 1) ? -1 : 0);
-  const u32 S51 = (((s1 >> 19) & 1) ? -1 : 0);
-  const u32 S52 = (((s1 >> 20) & 1) ? -1 : 0);
-  const u32 S53 = (((s1 >> 21) & 1) ? -1 : 0);
-  const u32 S54 = (((s1 >> 22) & 1) ? -1 : 0);
-  const u32 S55 = (((s1 >> 23) & 1) ? -1 : 0);
-  const u32 S56 = (((s1 >> 24) & 1) ? -1 : 0);
-  const u32 S57 = (((s1 >> 25) & 1) ? -1 : 0);
-  const u32 S58 = (((s1 >> 26) & 1) ? -1 : 0);
-  const u32 S59 = (((s1 >> 27) & 1) ? -1 : 0);
-  const u32 S60 = (((s1 >> 28) & 1) ? -1 : 0);
-  const u32 S61 = (((s1 >> 29) & 1) ? -1 : 0);
-  const u32 S62 = (((s1 >> 30) & 1) ? -1 : 0);
-  const u32 S63 = (((s1 >> 31) & 1) ? -1 : 0);
+  // we modify the salt like this: salt0 remains and salt1 is ????xxxx (byte swapped)

-  /**
-   * base
-   */
-
-  const u32 w0 = pws[gid].i[0];
-  const u32 w1 = pws[gid].i[1];
-
-  #define K00 (((w0 >> ( 0 + 7)) & 1) ? -1 : 0)
-  #define K01 (((w0 >> ( 0 + 6)) & 1) ? -1 : 0)
-  #define K02 (((w0 >> ( 0 + 5)) & 1) ? -1 : 0)
-  #define K03 (((w0 >> ( 0 + 4)) & 1) ? -1 : 0)
-  #define K04 (((w0 >> ( 0 + 3)) & 1) ? -1 : 0)
-  #define K05 (((w0 >> ( 0 + 2)) & 1) ? -1 : 0)
-  #define K06 (((w0 >> ( 0 + 1)) & 1) ? -1 : 0)
-  #define K07 (((w0 >> ( 8 + 7)) & 1) ? -1 : 0)
-  #define K08 (((w0 >> ( 8 + 6)) & 1) ? -1 : 0)
-  #define K09 (((w0 >> ( 8 + 5)) & 1) ? -1 : 0)
-  #define K10 (((w0 >> ( 8 + 4)) & 1) ? -1 : 0)
-  #define K11 (((w0 >> ( 8 + 3)) & 1) ? -1 : 0)
-  #define K12 (((w0 >> ( 8 + 2)) & 1) ? -1 : 0)
-  #define K13 (((w0 >> ( 8 + 1)) & 1) ? -1 : 0)
-  #define K14 (((w0 >> (16 + 7)) & 1) ? -1 : 0)
-  #define K15 (((w0 >> (16 + 6)) & 1) ? -1 : 0)
-  #define K16 (((w0 >> (16 + 5)) & 1) ? -1 : 0)
-  #define K17 (((w0 >> (16 + 4)) & 1) ? -1 : 0)
-  #define K18 (((w0 >> (16 + 3)) & 1) ? -1 : 0)
-  #define K19 (((w0 >> (16 + 2)) & 1) ? -1 : 0)
-  #define K20 (((w0 >> (16 + 1)) & 1) ? -1 : 0)
-  #define K21 (((w0 >> (24 + 7)) & 1) ? -1 : 0)
-  #define K22 (((w0 >> (24 + 6)) & 1) ? -1 : 0)
-  #define K23 (((w0 >> (24 + 5)) & 1) ? -1 : 0)
-  #define K24 (((w0 >> (24 + 4)) & 1) ? -1 : 0)
-  #define K25 (((w0 >> (24 + 3)) & 1) ? -1 : 0)
-  #define K26 (((w0 >> (24 + 2)) & 1) ? -1 : 0)
-  #define K27 (((w0 >> (24 + 1)) & 1) ? -1 : 0)
-  #define K28 (((w1 >> ( 0 + 7)) & 1) ? -1 : 0)
-  #define K29 (((w1 >> ( 0 + 6)) & 1) ? -1 : 0)
-  #define K30 (((w1 >> ( 0 + 5)) & 1) ? -1 : 0)
-  #define K31 (((w1 >> ( 0 + 4)) & 1) ? -1 : 0)
-  #define K32 (((w1 >> ( 0 + 3)) & 1) ? -1 : 0)
-  #define K33 (((w1 >> ( 0 + 2)) & 1) ? -1 : 0)
-  #define K34 (((w1 >> ( 0 + 1)) & 1) ? -1 : 0)
-  #define K35 (((w1 >> ( 8 + 7)) & 1) ? -1 : 0)
-  #define K36 (((w1 >> ( 8 + 6)) & 1) ? -1 : 0)
-  #define K37 (((w1 >> ( 8 + 5)) & 1) ? -1 : 0)
-  #define K38 (((w1 >> ( 8 + 4)) & 1) ? -1 : 0)
-  #define K39 (((w1 >> ( 8 + 3)) & 1) ? -1 : 0)
-  #define K40 (((w1 >> ( 8 + 2)) & 1) ? -1 : 0)
-  #define K41 (((w1 >> ( 8 + 1)) & 1) ? -1 : 0)
-  #define K42 (((w1 >> (16 + 7)) & 1) ? -1 : 0)
-  #define K43 (((w1 >> (16 + 6)) & 1) ? -1 : 0)
-  #define K44 (((w1 >> (16 + 5)) & 1) ? -1 : 0)
-  #define K45 (((w1 >> (16 + 4)) & 1) ? -1 : 0)
-  #define K46 (((w1 >> (16 + 3)) & 1) ? -1 : 0)
-  #define K47 (((w1 >> (16 + 2)) & 1) ? -1 : 0)
-  #define K48 (((w1 >> (16 + 1)) & 1) ? -1 : 0)
-  #define K49 (((w1 >> (24 + 7)) & 1) ? -1 : 0)
-  #define K50 (((w1 >> (24 + 6)) & 1) ? -1 : 0)
-  #define K51 (((w1 >> (24 + 5)) & 1) ? -1 : 0)
-  #define K52 (((w1 >> (24 + 4)) & 1) ? -1 : 0)
-  #define K53 (((w1 >> (24 + 3)) & 1) ? -1 : 0)
-  #define K54 (((w1 >> (24 + 2)) & 1) ? -1 : 0)
-  #define K55 (((w1 >> (24 + 1)) & 1) ? -1 : 0)
-
-  /**
-   * inner loop
-   */
-
-  for (u32 il_pos = 0; il_pos < il_cnt; il_pos += 32)
+  for (int i = 0; i <= 0xffff; i++)
   {
-    u32 k00 = K00;
-    u32 k01 = K01;
-    u32 k02 = K02;
-    u32 k03 = K03;
-    u32 k04 = K04;
-    u32 k05 = K05;
-    u32 k06 = K06;
-    u32 k07 = K07;
-    u32 k08 = K08;
-    u32 k09 = K09;
-    u32 k10 = K10;
-    u32 k11 = K11;
-    u32 k12 = K12;
-    u32 k13 = K13;
-    u32 k14 = K14;
-    u32 k15 = K15;
-    u32 k16 = K16;
-    u32 k17 = K17;
-    u32 k18 = K18;
-    u32 k19 = K19;
-    u32 k20 = K20;
-    u32 k21 = K21;
-    u32 k22 = K22;
-    u32 k23 = K23;
-    u32 k24 = K24;
-    u32 k25 = K25;
-    u32 k26 = K26;
-    u32 k27 = K27;
-
-    const u32 pc_pos = il_pos / 32;
-
-    k00 |= words_buf_s[pc_pos].b[ 0];
-    k01 |= words_buf_s[pc_pos].b[ 1];
-    k02 |= words_buf_s[pc_pos].b[ 2];
-    k03 |= words_buf_s[pc_pos].b[ 3];
-    k04 |= words_buf_s[pc_pos].b[ 4];
-    k05 |= words_buf_s[pc_pos].b[ 5];
-    k06 |= words_buf_s[pc_pos].b[ 6];
-    k07 |= words_buf_s[pc_pos].b[ 7];
-    k08 |= words_buf_s[pc_pos].b[ 8];
-    k09 |= words_buf_s[pc_pos].b[ 9];
-    k10 |= words_buf_s[pc_pos].b[10];
-    k11 |= words_buf_s[pc_pos].b[11];
-    k12 |= words_buf_s[pc_pos].b[12];
-    k13 |= words_buf_s[pc_pos].b[13];
-    k14 |= words_buf_s[pc_pos].b[14];
-    k15 |= words_buf_s[pc_pos].b[15];
-    k16 |= words_buf_s[pc_pos].b[16];
-    k17 |= words_buf_s[pc_pos].b[17];
-    k18 |= words_buf_s[pc_pos].b[18];
-    k19 |= words_buf_s[pc_pos].b[19];
-    k20 |= words_buf_s[pc_pos].b[20];
-    k21 |= words_buf_s[pc_pos].b[21];
-    k22 |= words_buf_s[pc_pos].b[22];
-    k23 |= words_buf_s[pc_pos].b[23];
-    k24 |= words_buf_s[pc_pos].b[24];
-    k25 |= words_buf_s[pc_pos].b[25];
-    k26 |= words_buf_s[pc_pos].b[26];
-    k27 |= words_buf_s[pc_pos].b[27];
-
-    DES
-    (
-      k00, k01, k02, k03, k04, k05, k06,
-      k07, k08, k09, k10, k11, k12, k13,
-      k14, k15, k16, k17, k18, k19, k20,
-      k21, k22, k23, k24, k25, k26, k27,
-      K28, K29, K30, K31, K32, K33, K34,
-      K35, K36, K37, K38, K39, K40, K41,
-      K42, K43, K44, K45, K46, K47, K48,
-      K49, K50, K51, K52, K53, K54, K55,
-      &D00, &D01, &D02, &D03, &D04, &D05, &D06, &D07,
-      &D08, &D09, &D10, &D11, &D12, &D13, &D14, &D15,
-      &D16, &D17, &D18, &D19, &D20, &D21, &D22, &D23,
-      &D24, &D25, &D26, &D27, &D28, &D29, &D30, &D31,
-      &D32, &D33, &D34, &D35, &D36, &D37, &D38, &D39,
-      &D40, &D41, &D42, &D43, &D44, &D45, &D46, &D47,
-      &D48, &D49, &D50, &D51, &D52, &D53, &D54, &D55,
-      &D56, &D57, &D58, &D59, &D60, &D61, &D62, &D63
-    );
-
-    u32 tmpResult = 0;
-
-    tmpResult |= D00 ^ S00;
-    tmpResult |= D01 ^ S01;
-    tmpResult |= D02 ^ S02;
-    tmpResult |= D03 ^ S03;
-    tmpResult |= D04 ^ S04;
-    tmpResult |= D05 ^ S05;
-    tmpResult |= D06 ^ S06;
-    tmpResult |= D07 ^ S07;
-    tmpResult |= D08 ^ S08;
-    tmpResult |= D09 ^ S09;
-    tmpResult |= D10 ^ S10;
-    tmpResult |= D11 ^ S11;
-    tmpResult |= D12 ^ S12;
-    tmpResult |= D13 ^ S13;
-    tmpResult |= D14 ^ S14;
-    tmpResult |= D15 ^ S15;
-
-    if (tmpResult == 0xffffffff) continue;
-
-    tmpResult |= D16 ^ S16;
-    tmpResult |= D17 ^ S17;
-    tmpResult |= D18 ^ S18;
-    tmpResult |= D19 ^ S19;
-    tmpResult |= D20 ^ S20;
-    tmpResult |= D21 ^ S21;
-    tmpResult |= D22 ^ S22;
-    tmpResult |= D23 ^ S23;
-    tmpResult |= D24 ^ S24;
-    tmpResult |= D25 ^ S25;
-    tmpResult |= D26 ^ S26;
-    tmpResult |= D27 ^ S27;
-    tmpResult |= D28 ^ S28;
-    tmpResult |= D29 ^ S29;
-    tmpResult |= D30 ^ S30;
-    tmpResult |= D31 ^ S31;
-
-    if (tmpResult == 0xffffffff) continue;
-
-    tmpResult |= D32 ^ S32;
-    tmpResult |= D33 ^ S33;
-    tmpResult |= D34 ^ S34;
-    tmpResult |= D35 ^ S35;
-    tmpResult |= D36 ^ S36;
-    tmpResult |= D37 ^ S37;
-    tmpResult |= D38 ^ S38;
-    tmpResult |= D39 ^ S39;
-    tmpResult |= D40 ^ S40;
-    tmpResult |= D41 ^ S41;
-    tmpResult |= D42 ^ S42;
-    tmpResult |= D43 ^ S43;
-    tmpResult |= D44 ^ S44;
-    tmpResult |= D45 ^ S45;
-    tmpResult |= D46 ^ S46;
-    tmpResult |= D47 ^ S47;
-
-    if (tmpResult == 0xffffffff) continue;
-
-    tmpResult |= D48 ^ S48;
-    tmpResult |= D49 ^ S49;
-    tmpResult |= D50 ^ S50;
-    tmpResult |= D51 ^ S51;
-    tmpResult |= D52 ^ S52;
-    tmpResult |= D53 ^ S53;
-    tmpResult |= D54 ^ S54;
-    tmpResult |= D55 ^ S55;
-    tmpResult |= D56 ^ S56;
-    tmpResult |= D57 ^ S57;
-    tmpResult |= D58 ^ S58;
-    tmpResult |= D59 ^ S59;
-    tmpResult |= D60 ^ S60;
-    tmpResult |= D61 ^ S61;
-    tmpResult |= D62 ^ S62;
-    tmpResult |= D63 ^ S63;
-
-    if (tmpResult == 0xffffffff) continue;
-
-    const u32 slice = ffz (tmpResult);
-
-    #ifdef KERNEL_STATIC
-    #include COMPARE_S
-    #endif
+    // modify salt1 at index (counting from 0) 2 and 3 (byte_swapped):
+
+    u32 salt0 = salt0_raw;
+    u32 salt1 = salt1_raw & 0xffff0000; // 2 bytes remain
+
+    salt1 |= i;
+
+    DES_IP (salt0, salt1);
+
+    // salt1 first, because this is a 64 bit value actually
+
+    #define d00 (((salt1 >>  0) & 1) ? -1 : 0)
+    #define d01 (((salt1 >>  1) & 1) ? -1 : 0)
+    #define d02 (((salt1 >>  2) & 1) ? -1 : 0)
+    #define d03 (((salt1 >>  3) & 1) ? -1 : 0)
+    #define d04 (((salt1 >>  4) & 1) ? -1 : 0)
+    #define d05 (((salt1 >>  5) & 1) ? -1 : 0)
+    #define d06 (((salt1 >>  6) & 1) ? -1 : 0)
+    #define d07 (((salt1 >>  7) & 1) ? -1 : 0)
+    #define d08 (((salt1 >>  8) & 1) ? -1 : 0)
+    #define d09 (((salt1 >>  9) & 1) ? -1 : 0)
+    #define d10 (((salt1 >> 10) & 1) ? -1 : 0)
+    #define d11 (((salt1 >> 11) & 1) ? -1 : 0)
+    #define d12 (((salt1 >> 12) & 1) ? -1 : 0)
+    #define d13 (((salt1 >> 13) & 1) ? -1 : 0)
+    #define d14 (((salt1 >> 14) & 1) ? -1 : 0)
+    #define d15 (((salt1 >> 15) & 1) ? -1 : 0)
+    #define d16 (((salt1 >> 16) & 1) ? -1 : 0)
+    #define d17 (((salt1 >> 17) & 1) ? -1 : 0)
+    #define d18 (((salt1 >> 18) & 1) ? -1 : 0)
+    #define d19 (((salt1 >> 19) & 1) ? -1 : 0)
+    #define d20 (((salt1 >> 20) & 1) ? -1 : 0)
+    #define d21 (((salt1 >> 21) & 1) ? -1 : 0)
+    #define d22 (((salt1 >> 22) & 1) ? -1 : 0)
+    #define d23 (((salt1 >> 23) & 1) ? -1 : 0)
+    #define d24 (((salt1 >> 24) & 1) ? -1 : 0)
+    #define d25 (((salt1 >> 25) & 1) ? -1 : 0)
+    #define d26 (((salt1 >> 26) & 1) ? -1 : 0)
+    #define d27 (((salt1 >> 27) & 1) ? -1 : 0)
+    #define d28 (((salt1 >> 28) & 1) ? -1 : 0)
+    #define d29 (((salt1 >> 29) & 1) ? -1 : 0)
+    #define d30 (((salt1 >> 30) & 1) ? -1 : 0)
+    #define d31 (((salt1 >> 31) & 1) ? -1 : 0)
+    #define d32 (((salt0 >>  0) & 1) ? -1 : 0)
+    #define d33 (((salt0 >>  1) & 1) ? -1 : 0)
+    #define d34 (((salt0 >>  2) & 1) ? -1 : 0)
+    #define d35 (((salt0 >>  3) & 1) ? -1 : 0)
+    #define d36 (((salt0 >>  4) & 1) ? -1 : 0)
+    #define d37 (((salt0 >>  5) & 1) ? -1 : 0)
+    #define d38 (((salt0 >>  6) & 1) ? -1 : 0)
+    #define d39 (((salt0 >>  7) & 1) ? -1 : 0)
+    #define d40 (((salt0 >>  8) & 1) ? -1 : 0)
+    #define d41 (((salt0 >>  9) & 1) ? -1 : 0)
+    #define d42 (((salt0 >> 10) & 1) ? -1 : 0)
+    #define d43 (((salt0 >> 11) & 1) ? -1 : 0)
+    #define d44 (((salt0 >> 12) & 1) ? -1 : 0)
+    #define d45 (((salt0 >> 13) & 1) ? -1 : 0)
+    #define d46 (((salt0 >> 14) & 1) ? -1 : 0)
+    #define d47 (((salt0 >> 15) & 1) ? -1 : 0)
+    #define d48 (((salt0 >> 16) & 1) ? -1 : 0)
+    #define d49 (((salt0 >> 17) & 1) ? -1 : 0)
+    #define d50 (((salt0 >> 18) & 1) ? -1 : 0)
+    #define d51 (((salt0 >> 19) & 1) ? -1 : 0)
+    #define d52 (((salt0 >> 20) & 1) ? -1 : 0)
+    #define d53 (((salt0 >> 21) & 1) ? -1 : 0)
+    #define d54 (((salt0 >> 22) & 1) ? -1 : 0)
+    #define d55 (((salt0 >> 23) & 1) ? -1 : 0)
+    #define d56 (((salt0 >> 24) & 1) ? -1 : 0)
+    #define d57 (((salt0 >> 25) & 1) ? -1 : 0)
+    #define d58 (((salt0 >> 26) & 1) ? -1 : 0)
+    #define d59 (((salt0 >> 27) & 1) ? -1 : 0)
+    #define d60 (((salt0 >> 28) & 1) ? -1 : 0)
+    #define d61 (((salt0 >> 29) & 1) ? -1 : 0)
+    #define d62 (((salt0 >> 30) & 1) ? -1 : 0)
+    #define d63 (((salt0 >> 31) & 1) ? -1 : 0)
+
+    u32 D00 = d00;
+    u32 D01 = d01;
+    u32 D02 = d02;
+    u32 D03 = d03;
+    u32 D04 = d04;
+    u32 D05 = d05;
+    u32 D06 = d06;
+    u32 D07 = d07;
+    u32 D08 = d08;
+    u32 D09 = d09;
+    u32 D10 = d10;
+    u32 D11 = d11;
+    u32 D12 = d12;
+    u32 D13 = d13;
+    u32 D14 = d14;
+    u32 D15 = d15;
+    u32 D16 = d16;
+    u32 D17 = d17;
+    u32 D18 = d18;
+    u32 D19 = d19;
+    u32 D20 = d20;
+    u32 D21 = d21;
+    u32 D22 = d22;
+    u32 D23 = d23;
+    u32 D24 = d24;
+    u32 D25 = d25;
+    u32 D26 = d26;
+    u32 D27 = d27;
+    u32 D28 = d28;
+    u32 D29 = d29;
+    u32 D30 = d30;
+    u32 D31 = d31;
+    u32 D32 = d32;
+    u32 D33 = d33;
+    u32 D34 = d34;
+    u32 D35 = d35;
+    u32 D36 = d36;
+    u32 D37 = d37;
+    u32 D38 = d38;
+    u32 D39 = d39;
+    u32 D40 = d40;
+    u32 D41 = d41;
+    u32 D42 = d42;
+    u32 D43 = d43;
+    u32 D44 = d44;
+    u32 D45 = d45;
+    u32 D46 = d46;
+    u32 D47 = d47;
+    u32 D48 = d48;
+    u32 D49 = d49;
+    u32 D50 = d50;
+    u32 D51 = d51;
+    u32 D52 = d52;
+    u32 D53 = d53;
+    u32 D54 = d54;
+    u32 D55 = d55;
+    u32 D56 = d56;
+    u32 D57 = d57;
+    u32 D58 = d58;
+    u32 D59 = d59;
+    u32 D60 = d60;
+    u32 D61 = d61;
+    u32 D62 = d62;
+    u32 D63 = d63;
+
+    /**
+     * digest
+     */
+
+    const u32 s0 = digests_buf[0].digest_buf[0];
+    const u32 s1 = digests_buf[0].digest_buf[1];
+
+    const u32 S00 = (((s0 >>  0) & 1) ? -1 : 0);
+    const u32 S01 = (((s0 >>  1) & 1) ? -1 : 0);
+    const u32 S02 = (((s0 >>  2) & 1) ? -1 : 0);
+    const u32 S03 = (((s0 >>  3) & 1) ? -1 : 0);
+    const u32 S04 = (((s0 >>  4) & 1) ? -1 : 0);
+    const u32 S05 = (((s0 >>  5) & 1) ? -1 : 0);
+    const u32 S06 = (((s0 >>  6) & 1) ? -1 : 0);
+    const u32 S07 = (((s0 >>  7) & 1) ? -1 : 0);
+    const u32 S08 = (((s0 >>  8) & 1) ? -1 : 0);
+    const u32 S09 = (((s0 >>  9) & 1) ? -1 : 0);
+    const u32 S10 = (((s0 >> 10) & 1) ? -1 : 0);
+    const u32 S11 = (((s0 >> 11) & 1) ? -1 : 0);
+    const u32 S12 = (((s0 >> 12) & 1) ? -1 : 0);
+    const u32 S13 = (((s0 >> 13) & 1) ? -1 : 0);
+    const u32 S14 = (((s0 >> 14) & 1) ? -1 : 0);
+    const u32 S15 = (((s0 >> 15) & 1) ? -1 : 0);
+    const u32 S16 = (((s0 >> 16) & 1) ? -1 : 0);
+    const u32 S17 = (((s0 >> 17) & 1) ? -1 : 0);
+    const u32 S18 = (((s0 >> 18) & 1) ? -1 : 0);
+    const u32 S19 = (((s0 >> 19) & 1) ? -1 : 0);
+    const u32 S20 = (((s0 >> 20) & 1) ? -1 : 0);
+    const u32 S21 = (((s0 >> 21) & 1) ? -1 : 0);
+    const u32 S22 = (((s0 >> 22) & 1) ? -1 : 0);
+    const u32 S23 = (((s0 >> 23) & 1) ? -1 : 0);
+    const u32 S24 = (((s0 >> 24) & 1) ? -1 : 0);
+    const u32 S25 = (((s0 >> 25) & 1) ? -1 : 0);
+    const u32 S26 = (((s0 >> 26) & 1) ? -1 : 0);
+    const u32 S27 = (((s0 >> 27) & 1) ? -1 : 0);
+    const u32 S28 = (((s0 >> 28) & 1) ? -1 : 0);
+    const u32 S29 = (((s0 >> 29) & 1) ? -1 : 0);
+    const u32 S30 = (((s0 >> 30) & 1) ? -1 : 0);
+    const u32 S31 = (((s0 >> 31) & 1) ? -1 : 0);
+    const u32 S32 = (((s1 >>  0) & 1) ? -1 : 0);
+    const u32 S33 = (((s1 >>  1) & 1) ? -1 : 0);
+    const u32 S34 = (((s1 >>  2) & 1) ? -1 : 0);
+    const u32 S35 = (((s1 >>  3) & 1) ? -1 : 0);
+    const u32 S36 = (((s1 >>  4) & 1) ? -1 : 0);
+    const u32 S37 = (((s1 >>  5) & 1) ? -1 : 0);
+    const u32 S38 = (((s1 >>  6) & 1) ? -1 : 0);
+    const u32 S39 = (((s1 >>  7) & 1) ? -1 : 0);
+    const u32 S40 = (((s1 >>  8) & 1) ? -1 : 0);
+    const u32 S41 = (((s1 >>  9) & 1) ? -1 : 0);
+    const u32 S42 = (((s1 >> 10) & 1) ? -1 : 0);
+    const u32 S43 = (((s1 >> 11) & 1) ? -1 : 0);
+    const u32 S44 = (((s1 >> 12) & 1) ? -1 : 0);
+    const u32 S45 = (((s1 >> 13) & 1) ? -1 : 0);
+    const u32 S46 = (((s1 >> 14) & 1) ? -1 : 0);
+    const u32 S47 = (((s1 >> 15) & 1) ? -1 : 0);
+    const u32 S48 = (((s1 >> 16) & 1) ? -1 : 0);
+    const u32 S49 = (((s1 >> 17) & 1) ? -1 : 0);
+    const u32 S50 = (((s1 >> 18) & 1) ? -1 : 0);
+    const u32 S51 = (((s1 >> 19) & 1) ? -1 : 0);
+    const u32 S52 = (((s1 >> 20) & 1) ? -1 : 0);
+    const u32 S53 = (((s1 >> 21) & 1) ? -1 : 0);
+    const u32 S54 = (((s1 >> 22) & 1) ? -1 : 0);
+    const u32 S55 = (((s1 >> 23) & 1) ? -1 : 0);
+    const u32 S56 = (((s1 >> 24) & 1) ? -1 : 0);
+    const u32 S57 = (((s1 >> 25) & 1) ? -1 : 0);
+    const u32 S58 = (((s1 >> 26) & 1) ? -1 : 0);
+    const u32 S59 = (((s1 >> 27) & 1) ? -1 : 0);
+    const u32 S60 = (((s1 >> 28) & 1) ? -1 : 0);
+    const u32 S61 = (((s1 >> 29) & 1) ? -1 : 0);
+    const u32 S62 = (((s1 >> 30) & 1) ? -1 : 0);
+    const u32 S63 = (((s1 >> 31) & 1) ? -1 : 0);
+
+    /**
+     * base
+     */
+
+    const u32 w0 = pws[gid].i[0];
+    const u32 w1 = pws[gid].i[1];
+
+    #define K00 (((w0 >> ( 0 + 7)) & 1) ? -1 : 0)
+    #define K01 (((w0 >> ( 0 + 6)) & 1) ? -1 : 0)
+    #define K02 (((w0 >> ( 0 + 5)) & 1) ? -1 : 0)
+    #define K03 (((w0 >> ( 0 + 4)) & 1) ? -1 : 0)
+    #define K04 (((w0 >> ( 0 + 3)) & 1) ? -1 : 0)
+    #define K05 (((w0 >> ( 0 + 2)) & 1) ? -1 : 0)
+    #define K06 (((w0 >> ( 0 + 1)) & 1) ? -1 : 0)
+    #define K07 (((w0 >> ( 8 + 7)) & 1) ? -1 : 0)
+    #define K08 (((w0 >> ( 8 + 6)) & 1) ? -1 : 0)
+    #define K09 (((w0 >> ( 8 + 5)) & 1) ? -1 : 0)
+    #define K10 (((w0 >> ( 8 + 4)) & 1) ? -1 : 0)
+    #define K11 (((w0 >> ( 8 + 3)) & 1) ? -1 : 0)
+    #define K12 (((w0 >> ( 8 + 2)) & 1) ? -1 : 0)
+    #define K13 (((w0 >> ( 8 + 1)) & 1) ? -1 : 0)
+    #define K14 (((w0 >> (16 + 7)) & 1) ? -1 : 0)
+    #define K15 (((w0 >> (16 + 6)) & 1) ? -1 : 0)
+    #define K16 (((w0 >> (16 + 5)) & 1) ? -1 : 0)
+    #define K17 (((w0 >> (16 + 4)) & 1) ? -1 : 0)
+    #define K18 (((w0 >> (16 + 3)) & 1) ? -1 : 0)
+    #define K19 (((w0 >> (16 + 2)) & 1) ? -1 : 0)
+    #define K20 (((w0 >> (16 + 1)) & 1) ? -1 : 0)
+    #define K21 (((w0 >> (24 + 7)) & 1) ? -1 : 0)
+    #define K22 (((w0 >> (24 + 6)) & 1) ? -1 : 0)
+    #define K23 (((w0 >> (24 + 5)) & 1) ? -1 : 0)
+    #define K24 (((w0 >> (24 + 4)) & 1) ? -1 : 0)
+    #define K25 (((w0 >> (24 + 3)) & 1) ? -1 : 0)
+    #define K26 (((w0 >> (24 + 2)) & 1) ? -1 : 0)
+    #define K27 (((w0 >> (24 + 1)) & 1) ? -1 : 0)
+    #define K28 (((w1 >> ( 0 + 7)) & 1) ? -1 : 0)
+    #define K29 (((w1 >> ( 0 + 6)) & 1) ? -1 : 0)
+    #define K30 (((w1 >> ( 0 + 5)) & 1) ? -1 : 0)
+    #define K31 (((w1 >> ( 0 + 4)) & 1) ? -1 : 0)
+    #define K32 (((w1 >> ( 0 + 3)) & 1) ? -1 : 0)
+    #define K33 (((w1 >> ( 0 + 2)) & 1) ? -1 : 0)
+    #define K34 (((w1 >> ( 0 + 1)) & 1) ? -1 : 0)
+    #define K35 (((w1 >> ( 8 + 7)) & 1) ? -1 : 0)
+    #define K36 (((w1 >> ( 8 + 6)) & 1) ? -1 : 0)
+    #define K37 (((w1 >> ( 8 + 5)) & 1) ? -1 : 0)
+    #define K38 (((w1 >> ( 8 + 4)) & 1) ? -1 : 0)
+    #define K39 (((w1 >> ( 8 + 3)) & 1) ? -1 : 0)
+    #define K40 (((w1 >> ( 8 + 2)) & 1) ? -1 : 0)
+    #define K41 (((w1 >> ( 8 + 1)) & 1) ? -1 : 0)
+    #define K42 (((w1 >> (16 + 7)) & 1) ? -1 : 0)
+    #define K43 (((w1 >> (16 + 6)) & 1) ? -1 : 0)
+    #define K44 (((w1 >> (16 + 5)) & 1) ? -1 : 0)
+    #define K45 (((w1 >> (16 + 4)) & 1) ? -1 : 0)
+    #define K46 (((w1 >> (16 + 3)) & 1) ? -1 : 0)
+    #define K47 (((w1 >> (16 + 2)) & 1) ? -1 : 0)
+    #define K48 (((w1 >> (16 + 1)) & 1) ? -1 : 0)
+    #define K49 (((w1 >> (24 + 7)) & 1) ? -1 : 0)
+    #define K50 (((w1 >> (24 + 6)) & 1) ? -1 : 0)
+    #define K51 (((w1 >> (24 + 5)) & 1) ? -1 : 0)
+    #define K52 (((w1 >> (24 + 4)) & 1) ? -1 : 0)
+    #define K53 (((w1 >> (24 + 3)) & 1) ? -1 : 0)
+    #define K54 (((w1 >> (24 + 2)) & 1) ? -1 : 0)
+    #define K55 (((w1 >> (24 + 1)) & 1) ? -1 : 0)
+
+    /**
+     * inner loop
+     */
+
+    for (u32 il_pos = 0; il_pos < il_cnt; il_pos += 32)
+    {
+      u32 k00 = K00;
+      u32 k01 = K01;
+      u32 k02 = K02;
+      u32 k03 = K03;
+      u32 k04 = K04;
+      u32 k05 = K05;
+      u32 k06 = K06;
+      u32 k07 = K07;
+      u32 k08 = K08;
+      u32 k09 = K09;
+      u32 k10 = K10;
+      u32 k11 = K11;
+      u32 k12 = K12;
+      u32 k13 = K13;
+      u32 k14 = K14;
+      u32 k15 = K15;
+      u32 k16 = K16;
+      u32 k17 = K17;
+      u32 k18 = K18;
+      u32 k19 = K19;
+      u32 k20 = K20;
+      u32 k21 = K21;
+      u32 k22 = K22;
+      u32 k23 = K23;
+      u32 k24 = K24;
+      u32 k25 = K25;
+      u32 k26 = K26;
+      u32 k27 = K27;
+
+      const u32 pc_pos = il_pos / 32;
+
+      k00 |= words_buf_s[pc_pos].b[ 0];
+      k01 |= words_buf_s[pc_pos].b[ 1];
+      k02 |= words_buf_s[pc_pos].b[ 2];
+      k03 |= words_buf_s[pc_pos].b[ 3];
+      k04 |= words_buf_s[pc_pos].b[ 4];
+      k05 |= words_buf_s[pc_pos].b[ 5];
+      k06 |= words_buf_s[pc_pos].b[ 6];
+      k07 |= words_buf_s[pc_pos].b[ 7];
+      k08 |= words_buf_s[pc_pos].b[ 8];
+      k09 |= words_buf_s[pc_pos].b[ 9];
+      k10 |= words_buf_s[pc_pos].b[10];
+      k11 |= words_buf_s[pc_pos].b[11];
+      k12 |= words_buf_s[pc_pos].b[12];
+      k13 |= words_buf_s[pc_pos].b[13];
+      k14 |= words_buf_s[pc_pos].b[14];
+      k15 |= words_buf_s[pc_pos].b[15];
+      k16 |= words_buf_s[pc_pos].b[16];
+      k17 |= words_buf_s[pc_pos].b[17];
+      k18 |= words_buf_s[pc_pos].b[18];
+      k19 |= words_buf_s[pc_pos].b[19];
+      k20 |= words_buf_s[pc_pos].b[20];
+      k21 |= words_buf_s[pc_pos].b[21];
+      k22 |= words_buf_s[pc_pos].b[22];
+      k23 |= words_buf_s[pc_pos].b[23];
+      k24 |= words_buf_s[pc_pos].b[24];
+      k25 |= words_buf_s[pc_pos].b[25];
+      k26 |= words_buf_s[pc_pos].b[26];
+      k27 |= words_buf_s[pc_pos].b[27];
+
+      DES
+      (
+        k00, k01, k02, k03, k04, k05, k06,
+        k07, k08, k09, k10, k11, k12, k13,
+        k14, k15, k16, k17, k18, k19, k20,
+        k21, k22, k23, k24, k25, k26, k27,
+        K28, K29, K30, K31, K32, K33, K34,
+        K35, K36, K37, K38, K39, K40, K41,
+        K42, K43, K44, K45, K46, K47, K48,
+        K49, K50, K51, K52, K53, K54, K55,
+        &D00, &D01, &D02, &D03, &D04, &D05, &D06, &D07,
+        &D08, &D09, &D10, &D11, &D12, &D13, &D14, &D15,
+        &D16, &D17, &D18, &D19, &D20, &D21, &D22, &D23,
+        &D24, &D25, &D26, &D27, &D28, &D29, &D30, &D31,
+        &D32, &D33, &D34, &D35, &D36, &D37, &D38, &D39,
+        &D40, &D41, &D42, &D43, &D44, &D45, &D46, &D47,
+        &D48, &D49, &D50, &D51, &D52, &D53, &D54, &D55,
+        &D56, &D57, &D58, &D59, &D60, &D61, &D62, &D63
+      );
+
+      u32 tmpResult = 0;
+
+      tmpResult |= D00 ^ S00;
+      tmpResult |= D01 ^ S01;
+      tmpResult |= D02 ^ S02;
+      tmpResult |= D03 ^ S03;
+      tmpResult |= D04 ^ S04;
+      tmpResult |= D05 ^ S05;
+      tmpResult |= D06 ^ S06;
+      tmpResult |= D07 ^ S07;
+      tmpResult |= D08 ^ S08;
+      tmpResult |= D09 ^ S09;
+      tmpResult |= D10 ^ S10;
+      tmpResult |= D11 ^ S11;
+      tmpResult |= D12 ^ S12;
+      tmpResult |= D13 ^ S13;
+      tmpResult |= D14 ^ S14;
+      tmpResult |= D15 ^ S15;
+
+      if (tmpResult == 0xffffffff) continue;
+
+      tmpResult |= D16 ^ S16;
+      tmpResult |= D17 ^ S17;
+      tmpResult |= D18 ^ S18;
+      tmpResult |= D19 ^ S19;
+      tmpResult |= D20 ^ S20;
+      tmpResult |= D21 ^ S21;
+      tmpResult |= D22 ^ S22;
+      tmpResult |= D23 ^ S23;
+      tmpResult |= D24 ^ S24;
+      tmpResult |= D25 ^ S25;
+      tmpResult |= D26 ^ S26;
+      tmpResult |= D27 ^ S27;
+      tmpResult |= D28 ^ S28;
+      tmpResult |= D29 ^ S29;
+      tmpResult |= D30 ^ S30;
+      tmpResult |= D31 ^ S31;
+
+      if (tmpResult == 0xffffffff) continue;
+
+      tmpResult |= D32 ^ S32;
+      tmpResult |= D33 ^ S33;
+      tmpResult |= D34 ^ S34;
+      tmpResult |= D35 ^ S35;
+      tmpResult |= D36 ^ S36;
+      tmpResult |= D37 ^ S37;
+      tmpResult |= D38 ^ S38;
+      tmpResult |= D39 ^ S39;
+      tmpResult |= D40 ^ S40;
+      tmpResult |= D41 ^ S41;
+      tmpResult |= D42 ^ S42;
+      tmpResult |= D43 ^ S43;
+      tmpResult |= D44 ^ S44;
+      tmpResult |= D45 ^ S45;
+      tmpResult |= D46 ^ S46;
+      tmpResult |= D47 ^ S47;
+
+      if (tmpResult == 0xffffffff) continue;
+
+      tmpResult |= D48 ^ S48;
+      tmpResult |= D49 ^ S49;
+      tmpResult |= D50 ^ S50;
+      tmpResult |= D51 ^ S51;
+      tmpResult |= D52 ^ S52;
+      tmpResult |= D53 ^ S53;
+      tmpResult |= D54 ^ S54;
+      tmpResult |= D55 ^ S55;
+      tmpResult |= D56 ^ S56;
+      tmpResult |= D57 ^ S57;
+      tmpResult |= D58 ^ S58;
+      tmpResult |= D59 ^ S59;
+      tmpResult |= D60 ^ S60;
+      tmpResult |= D61 ^ S61;
+      tmpResult |= D62 ^ S62;
+      tmpResult |= D63 ^ S63;
+
+      if (tmpResult == 0xffffffff) continue;
+
+      const u32 slice = ffz (tmpResult);
+
+      #ifdef KERNEL_STATIC
+      #include COMPARE_S
+      #endif
+    }
   }
}
diff --git a/src/autotune.c b/src/autotune.c
index 0af2d384..d3618640 100644
--- a/src/autotune.c
+++ b/src/autotune.c
@@ -195,7 +195,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
     {
       double exec_msec = try_run (hashcat_ctx, device_param, kernel_accel_min, kernel_loops_min);

-      if (exec_msec > 2000)
+      if (exec_msec > 15000)
       {
         event_log_error (hashcat_ctx, "Kernel minimum runtime larger than default TDR");

you would need to know how to apply patches (git apply a.diff) and also be able to compile hashcat from source (after patching it !) , but also be aware that you need to remove the old/wrong cached kernels that do not loop ( rm -r kernels/ ).

The format of the hashes could then just be 53b325182924b356:1412781000003178
e.g. you could use 0000 (5th and 6th byte of the salt) at that specific position (or actually any other 4 valid hexadecimal characters like ffff, it doesn't really matter because these 2 bytes are replaced in the kernel) .


apply the patch like this:
Code:
git clone https://github.com/hashcat/hashcat hashcat_modified_des
cd hashcat_modified_des/
make clean
git checkout 671317e
wget https://pastebin.com/raw/6r1DtrQB
base64 -d 6r1DtrQB > des.diff
git apply des.diff
make
./hashcat -m 14000 -b
Reply
#12
Thanks HEAPS for that, You know your stuff Smile

I will give it a go and let you know as it might be useful for others that need a partial match with DES.

I am reasonably familiar with Git and the patching process, and should be simple.

Thanks again!
Reply