2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
28 #include "include/kernel_functions.c"
29 #include "types_amd.c"
30 #include "common_amd.c"
33 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
34 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
38 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
39 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
42 static void md5_transform (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[4])
68 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
69 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
70 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
71 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
72 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
73 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
74 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
75 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
76 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
77 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
78 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
79 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
80 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
81 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
82 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
83 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
85 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
86 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
87 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
88 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
89 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
90 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
91 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
92 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
93 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
94 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
95 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
96 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
97 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
98 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
99 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
100 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
102 MD5_STEP (MD5_H1, a, b, c, d, w5_t, MD5C20, MD5S20);
103 MD5_STEP (MD5_H2, d, a, b, c, w8_t, MD5C21, MD5S21);
104 MD5_STEP (MD5_H1, c, d, a, b, wb_t, MD5C22, MD5S22);
105 MD5_STEP (MD5_H2, b, c, d, a, we_t, MD5C23, MD5S23);
106 MD5_STEP (MD5_H1, a, b, c, d, w1_t, MD5C24, MD5S20);
107 MD5_STEP (MD5_H2, d, a, b, c, w4_t, MD5C25, MD5S21);
108 MD5_STEP (MD5_H1, c, d, a, b, w7_t, MD5C26, MD5S22);
109 MD5_STEP (MD5_H2, b, c, d, a, wa_t, MD5C27, MD5S23);
110 MD5_STEP (MD5_H1, a, b, c, d, wd_t, MD5C28, MD5S20);
111 MD5_STEP (MD5_H2, d, a, b, c, w0_t, MD5C29, MD5S21);
112 MD5_STEP (MD5_H1, c, d, a, b, w3_t, MD5C2a, MD5S22);
113 MD5_STEP (MD5_H2, b, c, d, a, w6_t, MD5C2b, MD5S23);
114 MD5_STEP (MD5_H1, a, b, c, d, w9_t, MD5C2c, MD5S20);
115 MD5_STEP (MD5_H2, d, a, b, c, wc_t, MD5C2d, MD5S21);
116 MD5_STEP (MD5_H1, c, d, a, b, wf_t, MD5C2e, MD5S22);
117 MD5_STEP (MD5_H2, b, c, d, a, w2_t, MD5C2f, MD5S23);
119 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
120 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
121 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
122 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
123 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
124 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
125 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
126 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
127 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
128 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
129 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
130 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
131 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
132 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
133 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
134 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
142 static void hmac_md5_pad (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x ipad[4], u32x opad[4])
144 w0[0] = w0[0] ^ 0x36363636;
145 w0[1] = w0[1] ^ 0x36363636;
146 w0[2] = w0[2] ^ 0x36363636;
147 w0[3] = w0[3] ^ 0x36363636;
148 w1[0] = w1[0] ^ 0x36363636;
149 w1[1] = w1[1] ^ 0x36363636;
150 w1[2] = w1[2] ^ 0x36363636;
151 w1[3] = w1[3] ^ 0x36363636;
152 w2[0] = w2[0] ^ 0x36363636;
153 w2[1] = w2[1] ^ 0x36363636;
154 w2[2] = w2[2] ^ 0x36363636;
155 w2[3] = w2[3] ^ 0x36363636;
156 w3[0] = w3[0] ^ 0x36363636;
157 w3[1] = w3[1] ^ 0x36363636;
158 w3[2] = w3[2] ^ 0x36363636;
159 w3[3] = w3[3] ^ 0x36363636;
166 md5_transform (w0, w1, w2, w3, ipad);
168 w0[0] = w0[0] ^ 0x6a6a6a6a;
169 w0[1] = w0[1] ^ 0x6a6a6a6a;
170 w0[2] = w0[2] ^ 0x6a6a6a6a;
171 w0[3] = w0[3] ^ 0x6a6a6a6a;
172 w1[0] = w1[0] ^ 0x6a6a6a6a;
173 w1[1] = w1[1] ^ 0x6a6a6a6a;
174 w1[2] = w1[2] ^ 0x6a6a6a6a;
175 w1[3] = w1[3] ^ 0x6a6a6a6a;
176 w2[0] = w2[0] ^ 0x6a6a6a6a;
177 w2[1] = w2[1] ^ 0x6a6a6a6a;
178 w2[2] = w2[2] ^ 0x6a6a6a6a;
179 w2[3] = w2[3] ^ 0x6a6a6a6a;
180 w3[0] = w3[0] ^ 0x6a6a6a6a;
181 w3[1] = w3[1] ^ 0x6a6a6a6a;
182 w3[2] = w3[2] ^ 0x6a6a6a6a;
183 w3[3] = w3[3] ^ 0x6a6a6a6a;
190 md5_transform (w0, w1, w2, w3, opad);
193 static void hmac_md5_run (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x ipad[4], u32x opad[4], u32x digest[4])
200 md5_transform (w0, w1, w2, w3, digest);
216 w3[2] = (64 + 16) * 8;
224 md5_transform (w0, w1, w2, w3, digest);
227 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00060_m04 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __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_scryptV_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
233 const u32 lid = get_local_id (0);
239 const u32 gid = get_global_id (0);
241 if (gid >= gid_max) return;
245 wordl0[0] = pws[gid].i[ 0];
246 wordl0[1] = pws[gid].i[ 1];
247 wordl0[2] = pws[gid].i[ 2];
248 wordl0[3] = pws[gid].i[ 3];
252 wordl1[0] = pws[gid].i[ 4];
253 wordl1[1] = pws[gid].i[ 5];
254 wordl1[2] = pws[gid].i[ 6];
255 wordl1[3] = pws[gid].i[ 7];
271 const u32 pw_l_len = pws[gid].pw_len;
273 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
275 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
284 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
285 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
286 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
287 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
291 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
292 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
293 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
294 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
302 w0_t[0] = salt_buf0[0];
303 w0_t[1] = salt_buf0[1];
304 w0_t[2] = salt_buf0[2];
305 w0_t[3] = salt_buf0[3];
309 w1_t[0] = salt_buf1[0];
310 w1_t[1] = salt_buf1[1];
311 w1_t[2] = salt_buf1[2];
312 w1_t[3] = salt_buf1[3];
331 hmac_md5_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
337 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
339 const u32 pw_r_len = combs_buf[il_pos].pw_len;
341 const u32 pw_len = pw_l_len + pw_r_len;
345 wordr0[0] = combs_buf[il_pos].i[0];
346 wordr0[1] = combs_buf[il_pos].i[1];
347 wordr0[2] = combs_buf[il_pos].i[2];
348 wordr0[3] = combs_buf[il_pos].i[3];
352 wordr1[0] = combs_buf[il_pos].i[4];
353 wordr1[1] = combs_buf[il_pos].i[5];
354 wordr1[2] = combs_buf[il_pos].i[6];
355 wordr1[3] = combs_buf[il_pos].i[7];
371 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
373 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
378 w0[0] = wordl0[0] | wordr0[0];
379 w0[1] = wordl0[1] | wordr0[1];
380 w0[2] = wordl0[2] | wordr0[2];
381 w0[3] = wordl0[3] | wordr0[3];
385 w1[0] = wordl1[0] | wordr1[0];
386 w1[1] = wordl1[1] | wordr1[1];
387 w1[2] = wordl1[2] | wordr1[2];
388 w1[3] = wordl1[3] | wordr1[3];
392 w2[0] = wordl2[0] | wordr2[0];
393 w2[1] = wordl2[1] | wordr2[1];
394 w2[2] = wordl2[2] | wordr2[2];
395 w2[3] = wordl2[3] | wordr2[3];
399 w3[0] = wordl3[0] | wordr3[0];
400 w3[1] = wordl3[1] | wordr3[1];
404 append_0x80_4 (w0, w1, w2, w3, pw_len);
420 w3_t[2] = (64 + pw_len) * 8;
425 hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
427 const u32x r0 = digest[0];
428 const u32x r1 = digest[3];
429 const u32x r2 = digest[2];
430 const u32x r3 = digest[1];
432 #include VECT_COMPARE_M
436 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00060_m08 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __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_scryptV_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
440 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00060_m16 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __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_scryptV_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
444 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00060_s04 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __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_scryptV_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
450 const u32 lid = get_local_id (0);
456 const u32 gid = get_global_id (0);
458 if (gid >= gid_max) return;
462 wordl0[0] = pws[gid].i[ 0];
463 wordl0[1] = pws[gid].i[ 1];
464 wordl0[2] = pws[gid].i[ 2];
465 wordl0[3] = pws[gid].i[ 3];
469 wordl1[0] = pws[gid].i[ 4];
470 wordl1[1] = pws[gid].i[ 5];
471 wordl1[2] = pws[gid].i[ 6];
472 wordl1[3] = pws[gid].i[ 7];
488 const u32 pw_l_len = pws[gid].pw_len;
490 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
492 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
501 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
502 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
503 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
504 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
508 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
509 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
510 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
511 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
519 w0_t[0] = salt_buf0[0];
520 w0_t[1] = salt_buf0[1];
521 w0_t[2] = salt_buf0[2];
522 w0_t[3] = salt_buf0[3];
526 w1_t[0] = salt_buf1[0];
527 w1_t[1] = salt_buf1[1];
528 w1_t[2] = salt_buf1[2];
529 w1_t[3] = salt_buf1[3];
548 hmac_md5_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
554 const u32 search[4] =
556 digests_buf[digests_offset].digest_buf[DGST_R0],
557 digests_buf[digests_offset].digest_buf[DGST_R1],
558 digests_buf[digests_offset].digest_buf[DGST_R2],
559 digests_buf[digests_offset].digest_buf[DGST_R3]
566 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
568 const u32 pw_r_len = combs_buf[il_pos].pw_len;
570 const u32 pw_len = pw_l_len + pw_r_len;
574 wordr0[0] = combs_buf[il_pos].i[0];
575 wordr0[1] = combs_buf[il_pos].i[1];
576 wordr0[2] = combs_buf[il_pos].i[2];
577 wordr0[3] = combs_buf[il_pos].i[3];
581 wordr1[0] = combs_buf[il_pos].i[4];
582 wordr1[1] = combs_buf[il_pos].i[5];
583 wordr1[2] = combs_buf[il_pos].i[6];
584 wordr1[3] = combs_buf[il_pos].i[7];
600 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
602 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
607 w0[0] = wordl0[0] | wordr0[0];
608 w0[1] = wordl0[1] | wordr0[1];
609 w0[2] = wordl0[2] | wordr0[2];
610 w0[3] = wordl0[3] | wordr0[3];
614 w1[0] = wordl1[0] | wordr1[0];
615 w1[1] = wordl1[1] | wordr1[1];
616 w1[2] = wordl1[2] | wordr1[2];
617 w1[3] = wordl1[3] | wordr1[3];
621 w2[0] = wordl2[0] | wordr2[0];
622 w2[1] = wordl2[1] | wordr2[1];
623 w2[2] = wordl2[2] | wordr2[2];
624 w2[3] = wordl2[3] | wordr2[3];
628 w3[0] = wordl3[0] | wordr3[0];
629 w3[1] = wordl3[1] | wordr3[1];
633 append_0x80_4 (w0, w1, w2, w3, pw_len);
649 w3_t[2] = (64 + pw_len) * 8;
654 hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
656 const u32x r0 = digest[0];
657 const u32x r1 = digest[3];
658 const u32x r2 = digest[2];
659 const u32x r3 = digest[1];
661 #include VECT_COMPARE_S
665 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00060_s08 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __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_scryptV_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
669 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00060_s16 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __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_scryptV_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)