2 * Authors.....: Jens Steube <jens.steube@gmail.com>
3 * Gabriele Gristina <matrix@hashcat.net>
4 * magnum <john.magnum@hushmail.com>
13 #include "inc_vendor.cl"
14 #include "inc_hash_constants.h"
15 #include "inc_hash_functions.cl"
16 #include "inc_types.cl"
17 #include "inc_common.cl"
18 #include "inc_simd.cl"
20 __constant u32 lotus_magic_table[256] =
22 0xbd, 0x56, 0xea, 0xf2, 0xa2, 0xf1, 0xac, 0x2a,
23 0xb0, 0x93, 0xd1, 0x9c, 0x1b, 0x33, 0xfd, 0xd0,
24 0x30, 0x04, 0xb6, 0xdc, 0x7d, 0xdf, 0x32, 0x4b,
25 0xf7, 0xcb, 0x45, 0x9b, 0x31, 0xbb, 0x21, 0x5a,
26 0x41, 0x9f, 0xe1, 0xd9, 0x4a, 0x4d, 0x9e, 0xda,
27 0xa0, 0x68, 0x2c, 0xc3, 0x27, 0x5f, 0x80, 0x36,
28 0x3e, 0xee, 0xfb, 0x95, 0x1a, 0xfe, 0xce, 0xa8,
29 0x34, 0xa9, 0x13, 0xf0, 0xa6, 0x3f, 0xd8, 0x0c,
30 0x78, 0x24, 0xaf, 0x23, 0x52, 0xc1, 0x67, 0x17,
31 0xf5, 0x66, 0x90, 0xe7, 0xe8, 0x07, 0xb8, 0x60,
32 0x48, 0xe6, 0x1e, 0x53, 0xf3, 0x92, 0xa4, 0x72,
33 0x8c, 0x08, 0x15, 0x6e, 0x86, 0x00, 0x84, 0xfa,
34 0xf4, 0x7f, 0x8a, 0x42, 0x19, 0xf6, 0xdb, 0xcd,
35 0x14, 0x8d, 0x50, 0x12, 0xba, 0x3c, 0x06, 0x4e,
36 0xec, 0xb3, 0x35, 0x11, 0xa1, 0x88, 0x8e, 0x2b,
37 0x94, 0x99, 0xb7, 0x71, 0x74, 0xd3, 0xe4, 0xbf,
38 0x3a, 0xde, 0x96, 0x0e, 0xbc, 0x0a, 0xed, 0x77,
39 0xfc, 0x37, 0x6b, 0x03, 0x79, 0x89, 0x62, 0xc6,
40 0xd7, 0xc0, 0xd2, 0x7c, 0x6a, 0x8b, 0x22, 0xa3,
41 0x5b, 0x05, 0x5d, 0x02, 0x75, 0xd5, 0x61, 0xe3,
42 0x18, 0x8f, 0x55, 0x51, 0xad, 0x1f, 0x0b, 0x5e,
43 0x85, 0xe5, 0xc2, 0x57, 0x63, 0xca, 0x3d, 0x6c,
44 0xb4, 0xc5, 0xcc, 0x70, 0xb2, 0x91, 0x59, 0x0d,
45 0x47, 0x20, 0xc8, 0x4f, 0x58, 0xe0, 0x01, 0xe2,
46 0x16, 0x38, 0xc4, 0x6f, 0x3b, 0x0f, 0x65, 0x46,
47 0xbe, 0x7e, 0x2d, 0x7b, 0x82, 0xf9, 0x40, 0xb5,
48 0x1d, 0x73, 0xf8, 0xeb, 0x26, 0xc7, 0x87, 0x97,
49 0x25, 0x54, 0xb1, 0x28, 0xaa, 0x98, 0x9d, 0xa5,
50 0x64, 0x6d, 0x7a, 0xd4, 0x10, 0x81, 0x44, 0xef,
51 0x49, 0xd6, 0xae, 0x2e, 0xdd, 0x76, 0x5c, 0x2f,
52 0xa7, 0x1c, 0xc9, 0x09, 0x69, 0x9a, 0x83, 0xcf,
53 0x29, 0x39, 0xb9, 0xe9, 0x4c, 0xff, 0x43, 0xab,
57 #define BOX1(S,i) (S)[(i)]
59 #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1])
61 #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3])
63 #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7])
65 #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf])
68 void lotus_mix (u32x *in, __local u32 *s_lotus_magic_table)
72 for (int i = 0; i < 18; i++)
76 for (int j = 0; j < 12; j++)
81 p = (p + s--) & 0xff; p = ((tmp_in >> 0) & 0xff) ^ BOX1 (s_lotus_magic_table, p); tmp_out |= p << 0;
82 p = (p + s--) & 0xff; p = ((tmp_in >> 8) & 0xff) ^ BOX1 (s_lotus_magic_table, p); tmp_out |= p << 8;
83 p = (p + s--) & 0xff; p = ((tmp_in >> 16) & 0xff) ^ BOX1 (s_lotus_magic_table, p); tmp_out |= p << 16;
84 p = (p + s--) & 0xff; p = ((tmp_in >> 24) & 0xff) ^ BOX1 (s_lotus_magic_table, p); tmp_out |= p << 24;
91 void lotus_transform_password (u32x in[4], u32x out[4], __local u32 *s_lotus_magic_table)
93 u32x t = out[3] >> 24;
100 for (int i = 0; i < 4; i++)
102 t ^= (in[i] >> 0) & 0xff; c = BOX1 (s_lotus_magic_table, t); out[i] ^= c << 0; t = ((out[i] >> 0) & 0xff);
103 t ^= (in[i] >> 8) & 0xff; c = BOX1 (s_lotus_magic_table, t); out[i] ^= c << 8; t = ((out[i] >> 8) & 0xff);
104 t ^= (in[i] >> 16) & 0xff; c = BOX1 (s_lotus_magic_table, t); out[i] ^= c << 16; t = ((out[i] >> 16) & 0xff);
105 t ^= (in[i] >> 24) & 0xff; c = BOX1 (s_lotus_magic_table, t); out[i] ^= c << 24; t = ((out[i] >> 24) & 0xff);
109 void pad (u32 w[4], const u32 len)
111 const u32 val = 16 - len;
113 const u32 mask1 = val << 24;
115 const u32 mask2 = val << 16
118 const u32 mask3 = val << 8
122 const u32 mask4 = val << 0
129 case 0: w[0] = mask4;
134 case 1: w[0] |= mask3;
139 case 2: w[0] |= mask2;
144 case 3: w[0] |= mask1;
149 case 4: w[1] = mask4;
153 case 5: w[1] |= mask3;
157 case 6: w[1] |= mask2;
161 case 7: w[1] |= mask1;
165 case 8: w[2] = mask4;
168 case 9: w[2] |= mask3;
171 case 10: w[2] |= mask2;
174 case 11: w[2] |= mask1;
177 case 12: w[3] = mask4;
179 case 13: w[3] |= mask3;
181 case 14: w[3] |= mask2;
183 case 15: w[3] |= mask1;
188 void mdtransform_norecalc (u32x state[4], u32x block[4], __local u32 *s_lotus_magic_table)
200 x[ 8] = state[0] ^ block[0];
201 x[ 9] = state[1] ^ block[1];
202 x[10] = state[2] ^ block[2];
203 x[11] = state[3] ^ block[3];
205 lotus_mix (x, s_lotus_magic_table);
213 void mdtransform (u32x state[4], u32x checksum[4], u32x block[4], __local u32 *s_lotus_magic_table)
215 mdtransform_norecalc (state, block, s_lotus_magic_table);
217 lotus_transform_password (block, checksum, s_lotus_magic_table);
220 void domino_big_md (const u32x saved_key[4], const u32 size, u32x state[4], __local u32 *s_lotus_magic_table)
229 mdtransform (state, checksum, saved_key, s_lotus_magic_table);
231 mdtransform_norecalc (state, checksum, s_lotus_magic_table);
234 void m08600m (__local u32 *s_lotus_magic_table, u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset)
240 const u32 gid = get_global_id (0);
241 const u32 lid = get_local_id (0);
247 pad (&w[ 0], pw_len);
255 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
257 const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
259 const u32x w0lr = w0l | w0r;
275 domino_big_md (w_t, pw_len, state, s_lotus_magic_table);
277 COMPARE_M_SIMD (state[0], state[1], state[2], state[3]);
281 void m08600s (__local u32 *s_lotus_magic_table, u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset)
287 const u32 gid = get_global_id (0);
288 const u32 lid = get_local_id (0);
300 const u32 search[4] =
302 digests_buf[digests_offset].digest_buf[DGST_R0],
303 digests_buf[digests_offset].digest_buf[DGST_R1],
304 digests_buf[digests_offset].digest_buf[DGST_R2],
305 digests_buf[digests_offset].digest_buf[DGST_R3]
314 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
316 const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
318 const u32x w0lr = w0l | w0r;
334 domino_big_md (w_t, pw_len, state, s_lotus_magic_table);
336 COMPARE_S_SIMD (state[0], state[1], state[2], state[3]);
340 __kernel void m08600_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
346 const u32 gid = get_global_id (0);
347 const u32 lid = get_local_id (0);
348 const u32 lsz = get_local_size (0);
354 __local u32 s_lotus_magic_table[256];
356 for (u32 i = lid; i < 256; i += lsz)
358 s_lotus_magic_table[i] = lotus_magic_table[i];
361 barrier (CLK_LOCAL_MEM_FENCE);
363 if (gid >= gid_max) return;
371 w[ 0] = pws[gid].i[ 0];
372 w[ 1] = pws[gid].i[ 1];
373 w[ 2] = pws[gid].i[ 2];
374 w[ 3] = pws[gid].i[ 3];
388 const u32 pw_len = pws[gid].pw_len;
394 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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
397 __kernel void m08600_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
403 const u32 gid = get_global_id (0);
404 const u32 lid = get_local_id (0);
405 const u32 lsz = get_local_size (0);
411 __local u32 s_lotus_magic_table[256];
413 for (u32 i = lid; i < 256; i += lsz)
415 s_lotus_magic_table[i] = lotus_magic_table[i];
418 barrier (CLK_LOCAL_MEM_FENCE);
420 if (gid >= gid_max) return;
428 w[ 0] = pws[gid].i[ 0];
429 w[ 1] = pws[gid].i[ 1];
430 w[ 2] = pws[gid].i[ 2];
431 w[ 3] = pws[gid].i[ 3];
432 w[ 4] = pws[gid].i[ 4];
433 w[ 5] = pws[gid].i[ 5];
434 w[ 6] = pws[gid].i[ 6];
435 w[ 7] = pws[gid].i[ 7];
445 const u32 pw_len = pws[gid].pw_len;
451 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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
454 __kernel void m08600_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
460 const u32 gid = get_global_id (0);
461 const u32 lid = get_local_id (0);
462 const u32 lsz = get_local_size (0);
468 __local u32 s_lotus_magic_table[256];
470 for (u32 i = lid; i < 256; i += lsz)
472 s_lotus_magic_table[i] = lotus_magic_table[i];
475 barrier (CLK_LOCAL_MEM_FENCE);
477 if (gid >= gid_max) return;
485 w[ 0] = pws[gid].i[ 0];
486 w[ 1] = pws[gid].i[ 1];
487 w[ 2] = pws[gid].i[ 2];
488 w[ 3] = pws[gid].i[ 3];
489 w[ 4] = pws[gid].i[ 4];
490 w[ 5] = pws[gid].i[ 5];
491 w[ 6] = pws[gid].i[ 6];
492 w[ 7] = pws[gid].i[ 7];
493 w[ 8] = pws[gid].i[ 8];
494 w[ 9] = pws[gid].i[ 9];
495 w[10] = pws[gid].i[10];
496 w[11] = pws[gid].i[11];
497 w[12] = pws[gid].i[12];
498 w[13] = pws[gid].i[13];
499 w[14] = pws[gid].i[14];
500 w[15] = pws[gid].i[15];
502 const u32 pw_len = pws[gid].pw_len;
508 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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
511 __kernel void m08600_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
517 const u32 gid = get_global_id (0);
518 const u32 lid = get_local_id (0);
519 const u32 lsz = get_local_size (0);
525 __local u32 s_lotus_magic_table[256];
527 for (u32 i = lid; i < 256; i += lsz)
529 s_lotus_magic_table[i] = lotus_magic_table[i];
532 barrier (CLK_LOCAL_MEM_FENCE);
534 if (gid >= gid_max) return;
542 w[ 0] = pws[gid].i[ 0];
543 w[ 1] = pws[gid].i[ 1];
544 w[ 2] = pws[gid].i[ 2];
545 w[ 3] = pws[gid].i[ 3];
559 const u32 pw_len = pws[gid].pw_len;
565 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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
568 __kernel void m08600_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
574 const u32 gid = get_global_id (0);
575 const u32 lid = get_local_id (0);
576 const u32 lsz = get_local_size (0);
582 __local u32 s_lotus_magic_table[256];
584 for (u32 i = lid; i < 256; i += lsz)
586 s_lotus_magic_table[i] = lotus_magic_table[i];
589 barrier (CLK_LOCAL_MEM_FENCE);
591 if (gid >= gid_max) return;
599 w[ 0] = pws[gid].i[ 0];
600 w[ 1] = pws[gid].i[ 1];
601 w[ 2] = pws[gid].i[ 2];
602 w[ 3] = pws[gid].i[ 3];
603 w[ 4] = pws[gid].i[ 4];
604 w[ 5] = pws[gid].i[ 5];
605 w[ 6] = pws[gid].i[ 6];
606 w[ 7] = pws[gid].i[ 7];
616 const u32 pw_len = pws[gid].pw_len;
622 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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
625 __kernel void m08600_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
631 const u32 gid = get_global_id (0);
632 const u32 lid = get_local_id (0);
633 const u32 lsz = get_local_size (0);
639 __local u32 s_lotus_magic_table[256];
641 for (u32 i = lid; i < 256; i += lsz)
643 s_lotus_magic_table[i] = lotus_magic_table[i];
646 barrier (CLK_LOCAL_MEM_FENCE);
648 if (gid >= gid_max) return;
656 w[ 0] = pws[gid].i[ 0];
657 w[ 1] = pws[gid].i[ 1];
658 w[ 2] = pws[gid].i[ 2];
659 w[ 3] = pws[gid].i[ 3];
660 w[ 4] = pws[gid].i[ 4];
661 w[ 5] = pws[gid].i[ 5];
662 w[ 6] = pws[gid].i[ 6];
663 w[ 7] = pws[gid].i[ 7];
664 w[ 8] = pws[gid].i[ 8];
665 w[ 9] = pws[gid].i[ 9];
666 w[10] = pws[gid].i[10];
667 w[11] = pws[gid].i[11];
668 w[12] = pws[gid].i[12];
669 w[13] = pws[gid].i[13];
670 w[14] = pws[gid].i[14];
671 w[15] = pws[gid].i[15];
673 const u32 pw_len = pws[gid].pw_len;
679 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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);