2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
16 #include "include/kernel_functions.c"
17 #include "OpenCL/types_ocl.c"
18 #include "OpenCL/common.c"
20 #define COMPARE_S "OpenCL/check_single_comp4.c"
21 #define COMPARE_M "OpenCL/check_multi_comp4.c"
23 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
25 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_m04 (__global pw_t *pws, __global kernel_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)
31 const u32 lid = get_local_id (0);
37 const u32 gid = get_global_id (0);
41 wordl0[0] = pws[gid].i[ 0];
42 wordl0[1] = pws[gid].i[ 1];
43 wordl0[2] = pws[gid].i[ 2];
44 wordl0[3] = pws[gid].i[ 3];
48 wordl1[0] = pws[gid].i[ 4];
49 wordl1[1] = pws[gid].i[ 5];
50 wordl1[2] = pws[gid].i[ 6];
51 wordl1[3] = pws[gid].i[ 7];
67 const u32 pw_l_len = pws[gid].pw_len;
69 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
71 append_0x80_2x4 (wordl0, wordl1, pw_l_len);
73 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
82 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
83 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
84 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
85 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
89 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
90 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
91 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
92 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
108 const u32 salt_len = salt_bufs[salt_pos].salt_len;
110 const u32 pw_salt_len = 32 + salt_len;
116 __local u32 l_bin2asc[256];
118 const u32 lid4 = lid * 4;
120 const u32 lid40 = lid4 + 0;
121 const u32 lid41 = lid4 + 1;
122 const u32 lid42 = lid4 + 2;
123 const u32 lid43 = lid4 + 3;
125 const u32 v400 = (lid40 >> 0) & 15;
126 const u32 v401 = (lid40 >> 4) & 15;
127 const u32 v410 = (lid41 >> 0) & 15;
128 const u32 v411 = (lid41 >> 4) & 15;
129 const u32 v420 = (lid42 >> 0) & 15;
130 const u32 v421 = (lid42 >> 4) & 15;
131 const u32 v430 = (lid43 >> 0) & 15;
132 const u32 v431 = (lid43 >> 4) & 15;
134 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
135 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
136 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
137 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
138 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
139 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
140 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
141 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
143 barrier (CLK_LOCAL_MEM_FENCE);
145 if (gid >= gid_max) return;
151 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
153 const u32 pw_r_len = combs_buf[il_pos].pw_len;
155 const u32 pw_len = pw_l_len + pw_r_len;
159 wordr0[0] = combs_buf[il_pos].i[0];
160 wordr0[1] = combs_buf[il_pos].i[1];
161 wordr0[2] = combs_buf[il_pos].i[2];
162 wordr0[3] = combs_buf[il_pos].i[3];
166 wordr1[0] = combs_buf[il_pos].i[4];
167 wordr1[1] = combs_buf[il_pos].i[5];
168 wordr1[2] = combs_buf[il_pos].i[6];
169 wordr1[3] = combs_buf[il_pos].i[7];
185 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
187 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
192 w0[0] = wordl0[0] | wordr0[0];
193 w0[1] = wordl0[1] | wordr0[1];
194 w0[2] = wordl0[2] | wordr0[2];
195 w0[3] = wordl0[3] | wordr0[3];
199 w1[0] = wordl1[0] | wordr1[0];
200 w1[1] = wordl1[1] | wordr1[1];
201 w1[2] = wordl1[2] | wordr1[2];
202 w1[3] = wordl1[3] | wordr1[3];
206 w2[0] = wordl2[0] | wordr2[0];
207 w2[1] = wordl2[1] | wordr2[1];
208 w2[2] = wordl2[2] | wordr2[2];
209 w2[3] = wordl2[3] | wordr2[3];
213 w3[0] = wordl3[0] | wordr3[0];
214 w3[1] = wordl3[1] | wordr3[1];
223 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
224 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
225 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
226 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
227 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
228 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
229 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
230 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
231 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
232 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
233 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
234 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
235 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
236 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
237 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
238 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
240 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
241 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
242 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
243 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
244 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
245 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
246 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
247 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
248 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
249 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
250 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
251 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
252 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
253 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
254 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
255 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
257 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
258 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
259 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
260 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
261 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
262 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
263 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
264 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
265 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
266 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
267 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
268 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
269 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
270 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
271 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
272 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
274 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
275 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
276 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
277 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
278 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
279 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
280 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
281 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
282 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
283 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
284 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
285 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
286 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
287 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
288 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
289 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
301 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
302 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
303 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
304 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
305 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
306 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
307 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
308 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
309 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
310 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
311 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
312 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
313 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
314 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
315 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
316 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
318 w2_t[0] = 0x00000080;
332 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
334 w3_t[2] = pw_salt_len * 8;
336 w0_t[0] |= salt_buf0[0];
337 w0_t[1] |= salt_buf0[1];
338 w0_t[2] |= salt_buf0[2];
339 w0_t[3] |= salt_buf0[3];
340 w1_t[0] |= salt_buf1[0];
341 w1_t[1] |= salt_buf1[1];
342 w1_t[2] |= salt_buf1[2];
343 w1_t[3] |= salt_buf1[3];
344 w2_t[0] |= salt_buf2[0];
345 w2_t[1] |= salt_buf2[1];
346 w2_t[2] |= salt_buf2[2];
347 w2_t[3] |= salt_buf2[3];
348 w3_t[0] |= salt_buf3[0];
349 w3_t[1] |= salt_buf3[1];
350 w3_t[2] |= salt_buf3[2];
351 w3_t[3] |= salt_buf3[3];
362 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
363 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
364 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
365 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
366 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
367 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
368 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
369 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
370 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
371 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
372 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
373 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
374 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
375 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
376 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
377 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
379 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
380 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
381 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
382 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
383 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
384 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
385 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
386 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
387 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
388 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
389 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
390 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
391 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
392 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
393 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
394 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
396 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
397 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
398 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
399 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
400 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
401 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
402 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
403 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
404 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
405 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
406 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
407 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
408 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
409 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
410 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
411 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
413 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
414 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
415 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
416 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
417 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
418 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
419 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
420 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
421 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
422 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
423 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
424 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
425 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
426 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
427 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
428 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
439 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_m08 (__global pw_t *pws, __global kernel_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)
443 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_m16 (__global pw_t *pws, __global kernel_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)
447 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_s04 (__global pw_t *pws, __global kernel_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)
453 const u32 lid = get_local_id (0);
459 const u32 gid = get_global_id (0);
463 wordl0[0] = pws[gid].i[ 0];
464 wordl0[1] = pws[gid].i[ 1];
465 wordl0[2] = pws[gid].i[ 2];
466 wordl0[3] = pws[gid].i[ 3];
470 wordl1[0] = pws[gid].i[ 4];
471 wordl1[1] = pws[gid].i[ 5];
472 wordl1[2] = pws[gid].i[ 6];
473 wordl1[3] = pws[gid].i[ 7];
489 const u32 pw_l_len = pws[gid].pw_len;
491 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
493 append_0x80_2x4 (wordl0, wordl1, pw_l_len);
495 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
504 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
505 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
506 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
507 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
511 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
512 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
513 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
514 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
530 const u32 salt_len = salt_bufs[salt_pos].salt_len;
532 const u32 pw_salt_len = 32 + salt_len;
538 const u32 search[4] =
540 digests_buf[digests_offset].digest_buf[DGST_R0],
541 digests_buf[digests_offset].digest_buf[DGST_R1],
542 digests_buf[digests_offset].digest_buf[DGST_R2],
543 digests_buf[digests_offset].digest_buf[DGST_R3]
550 __local u32 l_bin2asc[256];
552 const u32 lid4 = lid * 4;
554 const u32 lid40 = lid4 + 0;
555 const u32 lid41 = lid4 + 1;
556 const u32 lid42 = lid4 + 2;
557 const u32 lid43 = lid4 + 3;
559 const u32 v400 = (lid40 >> 0) & 15;
560 const u32 v401 = (lid40 >> 4) & 15;
561 const u32 v410 = (lid41 >> 0) & 15;
562 const u32 v411 = (lid41 >> 4) & 15;
563 const u32 v420 = (lid42 >> 0) & 15;
564 const u32 v421 = (lid42 >> 4) & 15;
565 const u32 v430 = (lid43 >> 0) & 15;
566 const u32 v431 = (lid43 >> 4) & 15;
568 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
569 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
570 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
571 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
572 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
573 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
574 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
575 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
577 barrier (CLK_LOCAL_MEM_FENCE);
579 if (gid >= gid_max) return;
585 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
587 const u32 pw_r_len = combs_buf[il_pos].pw_len;
589 const u32 pw_len = pw_l_len + pw_r_len;
593 wordr0[0] = combs_buf[il_pos].i[0];
594 wordr0[1] = combs_buf[il_pos].i[1];
595 wordr0[2] = combs_buf[il_pos].i[2];
596 wordr0[3] = combs_buf[il_pos].i[3];
600 wordr1[0] = combs_buf[il_pos].i[4];
601 wordr1[1] = combs_buf[il_pos].i[5];
602 wordr1[2] = combs_buf[il_pos].i[6];
603 wordr1[3] = combs_buf[il_pos].i[7];
619 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
621 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
626 w0[0] = wordl0[0] | wordr0[0];
627 w0[1] = wordl0[1] | wordr0[1];
628 w0[2] = wordl0[2] | wordr0[2];
629 w0[3] = wordl0[3] | wordr0[3];
633 w1[0] = wordl1[0] | wordr1[0];
634 w1[1] = wordl1[1] | wordr1[1];
635 w1[2] = wordl1[2] | wordr1[2];
636 w1[3] = wordl1[3] | wordr1[3];
640 w2[0] = wordl2[0] | wordr2[0];
641 w2[1] = wordl2[1] | wordr2[1];
642 w2[2] = wordl2[2] | wordr2[2];
643 w2[3] = wordl2[3] | wordr2[3];
647 w3[0] = wordl3[0] | wordr3[0];
648 w3[1] = wordl3[1] | wordr3[1];
657 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
658 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
659 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
660 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
661 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
662 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
663 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
664 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
665 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
666 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
667 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
668 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
669 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
670 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
671 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
672 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
674 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
675 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
676 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
677 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
678 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
679 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
680 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
681 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
682 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
683 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
684 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
685 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
686 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
687 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
688 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
689 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
691 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
692 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
693 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
694 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
695 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
696 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
697 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
698 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
699 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
700 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
701 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
702 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
703 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
704 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
705 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
706 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
708 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
709 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
710 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
711 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
712 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
713 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
714 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
715 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
716 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
717 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
718 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
719 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
720 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
721 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
722 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
723 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
735 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
736 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
737 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
738 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
739 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
740 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
741 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
742 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
743 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
744 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
745 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
746 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
747 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
748 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
749 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
750 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
752 w2_t[0] = 0x00000080;
766 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
768 w3_t[2] = pw_salt_len * 8;
770 w0_t[0] |= salt_buf0[0];
771 w0_t[1] |= salt_buf0[1];
772 w0_t[2] |= salt_buf0[2];
773 w0_t[3] |= salt_buf0[3];
774 w1_t[0] |= salt_buf1[0];
775 w1_t[1] |= salt_buf1[1];
776 w1_t[2] |= salt_buf1[2];
777 w1_t[3] |= salt_buf1[3];
778 w2_t[0] |= salt_buf2[0];
779 w2_t[1] |= salt_buf2[1];
780 w2_t[2] |= salt_buf2[2];
781 w2_t[3] |= salt_buf2[3];
782 w3_t[0] |= salt_buf3[0];
783 w3_t[1] |= salt_buf3[1];
784 w3_t[2] |= salt_buf3[2];
785 w3_t[3] |= salt_buf3[3];
796 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
797 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
798 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
799 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
800 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
801 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
802 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
803 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
804 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
805 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
806 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
807 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
808 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
809 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
810 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
811 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
813 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
814 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
815 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
816 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
817 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
818 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
819 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
820 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
821 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
822 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
823 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
824 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
825 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
826 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
827 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
828 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
830 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
831 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
832 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
833 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
834 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
835 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
836 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
837 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
838 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
839 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
840 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
841 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
842 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
843 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
844 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
845 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
847 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
848 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
849 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
850 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
851 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
852 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
853 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
854 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
855 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
856 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
857 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
858 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
859 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
860 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
861 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
862 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
873 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_s08 (__global pw_t *pws, __global kernel_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)
877 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_s16 (__global pw_t *pws, __global kernel_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)