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 "types_ocl.c"
20 #define COMPARE_S "check_single_comp4.c"
21 #define COMPARE_M "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))) m11100_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)
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 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
80 challenge = salt_bufs[salt_pos].salt_buf[0];
88 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
89 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
90 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
91 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
95 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
96 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
97 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
98 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
100 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
106 __local u32 l_bin2asc[256];
108 const u32 lid4 = lid * 4;
110 const u32 lid40 = lid4 + 0;
111 const u32 lid41 = lid4 + 1;
112 const u32 lid42 = lid4 + 2;
113 const u32 lid43 = lid4 + 3;
115 const u32 v400 = (lid40 >> 0) & 15;
116 const u32 v401 = (lid40 >> 4) & 15;
117 const u32 v410 = (lid41 >> 0) & 15;
118 const u32 v411 = (lid41 >> 4) & 15;
119 const u32 v420 = (lid42 >> 0) & 15;
120 const u32 v421 = (lid42 >> 4) & 15;
121 const u32 v430 = (lid43 >> 0) & 15;
122 const u32 v431 = (lid43 >> 4) & 15;
124 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
125 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
126 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
127 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
128 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
129 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
130 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
131 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
133 barrier (CLK_LOCAL_MEM_FENCE);
135 if (gid >= gid_max) return;
141 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
143 const u32 pw_r_len = combs_buf[il_pos].pw_len;
145 const u32 pw_len = pw_l_len + pw_r_len;
149 wordr0[0] = combs_buf[il_pos].i[0];
150 wordr0[1] = combs_buf[il_pos].i[1];
151 wordr0[2] = combs_buf[il_pos].i[2];
152 wordr0[3] = combs_buf[il_pos].i[3];
156 wordr1[0] = combs_buf[il_pos].i[4];
157 wordr1[1] = combs_buf[il_pos].i[5];
158 wordr1[2] = combs_buf[il_pos].i[6];
159 wordr1[3] = combs_buf[il_pos].i[7];
175 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
177 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
182 w0_t[0] = salt_buf0[0];
183 w0_t[1] = salt_buf0[1];
184 w0_t[2] = salt_buf0[2];
185 w0_t[3] = salt_buf0[3];
189 w1_t[0] = salt_buf1[0];
190 w1_t[1] = salt_buf1[1];
191 w1_t[2] = salt_buf1[2];
192 w1_t[3] = salt_buf1[3];
212 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, pw_len);
214 const u32 pw_salt_len = pw_len + salt_len;
216 w0_t[0] |= wordl0[0] | wordr0[0];
217 w0_t[1] |= wordl0[1] | wordr0[1];
218 w0_t[2] |= wordl0[2] | wordr0[2];
219 w0_t[3] |= wordl0[3] | wordr0[3];
221 w1_t[0] |= wordl1[0] | wordr1[0];
222 w1_t[1] |= wordl1[1] | wordr1[1];
223 w1_t[2] |= wordl1[2] | wordr1[2];
224 w1_t[3] |= wordl1[3] | wordr1[3];
226 w2_t[0] |= wordl2[0] | wordr2[0];
227 w2_t[1] |= wordl2[1] | wordr2[1];
228 w2_t[2] |= wordl2[2] | wordr2[2];
229 w2_t[3] |= wordl2[3] | wordr2[3];
231 w3_t[0] |= wordl3[0] | wordr3[0];
232 w3_t[1] |= wordl3[0] | wordr3[0];
233 w3_t[2] = pw_salt_len * 8;
245 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
246 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
247 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
248 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
249 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
250 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
251 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
252 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
253 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
254 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
255 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
256 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
257 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
258 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
259 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
260 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
262 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
263 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
264 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
265 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
266 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
267 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
268 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
269 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
270 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
271 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
272 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
273 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
274 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
275 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
276 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
277 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
279 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
280 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
281 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
282 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
283 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
284 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
285 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
286 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
287 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
288 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
289 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
290 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
291 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
292 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
293 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
294 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
296 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
297 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
298 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
299 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
300 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
301 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
302 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
303 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
304 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
305 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
306 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
307 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
308 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
309 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
310 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
311 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
318 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
319 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
320 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
321 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
322 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
323 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
324 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
325 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
326 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
327 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
328 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
329 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
330 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
331 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
332 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
333 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
335 // add the 4 byte challenge here
338 w2_t[1] = 0x00000080;
344 w3_t[2] = (32 + 4) * 8;
348 * md5 ($hash.$challenge)
356 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
357 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
358 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
359 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
360 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
361 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
362 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
363 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
364 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
365 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
366 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
367 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
368 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
369 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
370 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
371 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
373 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
374 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
375 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
376 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
377 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
378 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
379 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
380 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
381 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
382 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
383 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
384 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
385 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
386 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
387 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
388 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
390 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
391 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
392 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
393 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
394 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
395 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
396 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
397 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
398 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
399 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
400 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
401 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
402 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
403 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
404 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
405 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
407 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
408 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
409 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
410 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
411 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
412 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
413 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
414 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
415 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
416 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
417 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
418 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
419 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
420 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
421 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
422 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
433 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_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)
437 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_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)
441 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_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)
447 const u32 lid = get_local_id (0);
453 const u32 gid = get_global_id (0);
457 wordl0[0] = pws[gid].i[ 0];
458 wordl0[1] = pws[gid].i[ 1];
459 wordl0[2] = pws[gid].i[ 2];
460 wordl0[3] = pws[gid].i[ 3];
464 wordl1[0] = pws[gid].i[ 4];
465 wordl1[1] = pws[gid].i[ 5];
466 wordl1[2] = pws[gid].i[ 6];
467 wordl1[3] = pws[gid].i[ 7];
483 const u32 pw_l_len = pws[gid].pw_len;
485 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
487 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
496 challenge = salt_bufs[salt_pos].salt_buf[0];
504 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
505 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
506 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
507 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
511 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
512 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
513 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
514 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
516 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
522 const u32 search[4] =
524 digests_buf[digests_offset].digest_buf[DGST_R0],
525 digests_buf[digests_offset].digest_buf[DGST_R1],
526 digests_buf[digests_offset].digest_buf[DGST_R2],
527 digests_buf[digests_offset].digest_buf[DGST_R3]
534 __local u32 l_bin2asc[256];
536 const u32 lid4 = lid * 4;
538 const u32 lid40 = lid4 + 0;
539 const u32 lid41 = lid4 + 1;
540 const u32 lid42 = lid4 + 2;
541 const u32 lid43 = lid4 + 3;
543 const u32 v400 = (lid40 >> 0) & 15;
544 const u32 v401 = (lid40 >> 4) & 15;
545 const u32 v410 = (lid41 >> 0) & 15;
546 const u32 v411 = (lid41 >> 4) & 15;
547 const u32 v420 = (lid42 >> 0) & 15;
548 const u32 v421 = (lid42 >> 4) & 15;
549 const u32 v430 = (lid43 >> 0) & 15;
550 const u32 v431 = (lid43 >> 4) & 15;
552 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
553 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
554 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
555 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
556 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
557 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
558 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
559 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
561 barrier (CLK_LOCAL_MEM_FENCE);
563 if (gid >= gid_max) return;
569 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
571 const u32 pw_r_len = combs_buf[il_pos].pw_len;
573 const u32 pw_len = pw_l_len + pw_r_len;
577 wordr0[0] = combs_buf[il_pos].i[0];
578 wordr0[1] = combs_buf[il_pos].i[1];
579 wordr0[2] = combs_buf[il_pos].i[2];
580 wordr0[3] = combs_buf[il_pos].i[3];
584 wordr1[0] = combs_buf[il_pos].i[4];
585 wordr1[1] = combs_buf[il_pos].i[5];
586 wordr1[2] = combs_buf[il_pos].i[6];
587 wordr1[3] = combs_buf[il_pos].i[7];
603 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
605 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
610 w0_t[0] = salt_buf0[0];
611 w0_t[1] = salt_buf0[1];
612 w0_t[2] = salt_buf0[2];
613 w0_t[3] = salt_buf0[3];
617 w1_t[0] = salt_buf1[0];
618 w1_t[1] = salt_buf1[1];
619 w1_t[2] = salt_buf1[2];
620 w1_t[3] = salt_buf1[3];
640 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, pw_len);
642 const u32 pw_salt_len = pw_len + salt_len;
644 w0_t[0] |= wordl0[0] | wordr0[0];
645 w0_t[1] |= wordl0[1] | wordr0[1];
646 w0_t[2] |= wordl0[2] | wordr0[2];
647 w0_t[3] |= wordl0[3] | wordr0[3];
649 w1_t[0] |= wordl1[0] | wordr1[0];
650 w1_t[1] |= wordl1[1] | wordr1[1];
651 w1_t[2] |= wordl1[2] | wordr1[2];
652 w1_t[3] |= wordl1[3] | wordr1[3];
654 w2_t[0] |= wordl2[0] | wordr2[0];
655 w2_t[1] |= wordl2[1] | wordr2[1];
656 w2_t[2] |= wordl2[2] | wordr2[2];
657 w2_t[3] |= wordl2[3] | wordr2[3];
659 w3_t[0] |= wordl3[0] | wordr3[0];
660 w3_t[1] |= wordl3[0] | wordr3[0];
661 w3_t[2] = pw_salt_len * 8;
673 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
674 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
675 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
676 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
677 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
678 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
679 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
680 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
681 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
682 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
683 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
684 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
685 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
686 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
687 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
688 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
690 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
691 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
692 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
693 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
694 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
695 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
696 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
697 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
698 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
699 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
700 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
701 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
702 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
703 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
704 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
705 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
707 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
708 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
709 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
710 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
711 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
712 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
713 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
714 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
715 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
716 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
717 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
718 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
719 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
720 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
721 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
722 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
724 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
725 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
726 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
727 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
728 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
729 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
730 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
731 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
732 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
733 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
734 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
735 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
736 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
737 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
738 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
739 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
746 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
747 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
748 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
749 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
750 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
751 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
752 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
753 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
754 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
755 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
756 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
757 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
758 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
759 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
760 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
761 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
763 // add the 4 byte challenge here
766 w2_t[1] = 0x00000080;
772 w3_t[2] = (32 + 4) * 8;
776 * md5 ($hash.$challenge)
784 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
785 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
786 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
787 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
788 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
789 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
790 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
791 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
792 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
793 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
794 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
795 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
796 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
797 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
798 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
799 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
801 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
802 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
803 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
804 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
805 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
806 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
807 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
808 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
809 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
810 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
811 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
812 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
813 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
814 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
815 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
816 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
818 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
819 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
820 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
821 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
822 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
823 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
824 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
825 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
826 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
827 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
828 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
829 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
830 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
831 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
832 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
833 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
835 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
836 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
837 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
838 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
839 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
840 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
841 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
842 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
843 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
844 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
845 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
846 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
847 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
848 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
849 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
850 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
861 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_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)
865 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_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)