2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "include/constants.h"
11 #include "include/kernel_vendor.h"
18 #include "include/kernel_functions.c"
19 #include "OpenCL/types_ocl.c"
20 #include "OpenCL/common.c"
21 #include "OpenCL/simd.c"
23 __kernel void m03800_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)
29 const u32 gid = get_global_id (0);
30 const u32 lid = get_local_id (0);
31 const u32 lsz = get_local_size (0);
40 pws0[0] = pws[gid].i[0];
41 pws0[1] = pws[gid].i[1];
42 pws0[2] = pws[gid].i[2];
43 pws0[3] = pws[gid].i[3];
44 pws1[0] = pws[gid].i[4];
45 pws1[1] = pws[gid].i[5];
46 pws1[2] = pws[gid].i[6];
47 pws1[3] = pws[gid].i[7];
49 const u32 pw_l_len = pws[gid].pw_len;
57 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
58 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
59 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
60 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
64 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
65 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
66 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
67 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
83 const u32 salt_len = salt_bufs[salt_pos].salt_len;
89 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos += VECT_SIZE)
91 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
93 const u32x pw_len = pw_l_len + pw_r_len;
95 u32x wordr0[4] = { 0 };
96 u32x wordr1[4] = { 0 };
97 u32x wordr2[4] = { 0 };
98 u32x wordr3[4] = { 0 };
100 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
101 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
102 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
103 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
104 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
105 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
106 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
107 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
109 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
111 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
116 w0[0] = wordl0[0] | wordr0[0];
117 w0[1] = wordl0[1] | wordr0[1];
118 w0[2] = wordl0[2] | wordr0[2];
119 w0[3] = wordl0[3] | wordr0[3];
123 w1[0] = wordl1[0] | wordr1[0];
124 w1[1] = wordl1[1] | wordr1[1];
125 w1[2] = wordl1[2] | wordr1[2];
126 w1[3] = wordl1[3] | wordr1[3];
130 w2[0] = wordl2[0] | wordr2[0];
131 w2[1] = wordl2[1] | wordr2[1];
132 w2[2] = wordl2[2] | wordr2[2];
133 w2[3] = wordl2[3] | wordr2[3];
137 w3[0] = wordl3[0] | wordr3[0];
138 w3[1] = wordl3[1] | wordr3[1];
174 switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, salt_len);
176 w0_t[0] |= salt_buf0[0];
177 w0_t[1] |= salt_buf0[1];
178 w0_t[2] |= salt_buf0[2];
179 w0_t[3] |= salt_buf0[3];
180 w1_t[0] |= salt_buf1[0];
181 w1_t[1] |= salt_buf1[1];
182 w1_t[2] |= salt_buf1[2];
183 w1_t[3] |= salt_buf1[3];
184 w2_t[0] |= salt_buf2[0];
185 w2_t[1] |= salt_buf2[1];
186 w2_t[2] |= salt_buf2[2];
187 w2_t[3] |= salt_buf2[3];
188 w3_t[0] |= salt_buf3[0];
189 w3_t[1] |= salt_buf3[1];
190 w3_t[2] |= salt_buf3[2];
191 w3_t[3] |= salt_buf3[3];
199 s0[0] = salt_buf0[0];
200 s0[1] = salt_buf0[1];
201 s0[2] = salt_buf0[2];
202 s0[3] = salt_buf0[3];
206 s1[0] = salt_buf1[0];
207 s1[1] = salt_buf1[1];
208 s1[2] = salt_buf1[2];
209 s1[3] = salt_buf1[3];
225 switch_buffer_by_offset_le (s0, s1, s2, s3, salt_len + pw_len);
244 const u32 pw_salt_len = salt_len + pw_len + salt_len;
246 append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, pw_salt_len);
248 w3_t[2] = pw_salt_len * 8;
259 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
260 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
261 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
262 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
263 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
264 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
265 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
266 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
267 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
268 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
269 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
270 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
271 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
272 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
273 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
274 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
276 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
277 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
278 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
279 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
280 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
281 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
282 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
283 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
284 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
285 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
286 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
287 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
288 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
289 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
290 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
291 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
293 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
294 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
295 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
296 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
297 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
298 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
299 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
300 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
301 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
302 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
303 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
304 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
305 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
306 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
307 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
308 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
310 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
311 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
312 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
313 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
314 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
315 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
316 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
317 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
318 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
319 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
320 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
321 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
322 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
324 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
325 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
326 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
327 COMPARE_M_SIMD (a, d, c, b);
331 __kernel void m03800_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)
335 __kernel void m03800_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)
339 __kernel void m03800_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)
345 const u32 gid = get_global_id (0);
346 const u32 lid = get_local_id (0);
347 const u32 lsz = get_local_size (0);
356 pws0[0] = pws[gid].i[0];
357 pws0[1] = pws[gid].i[1];
358 pws0[2] = pws[gid].i[2];
359 pws0[3] = pws[gid].i[3];
360 pws1[0] = pws[gid].i[4];
361 pws1[1] = pws[gid].i[5];
362 pws1[2] = pws[gid].i[6];
363 pws1[3] = pws[gid].i[7];
365 const u32 pw_l_len = pws[gid].pw_len;
373 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
374 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
375 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
376 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
380 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
381 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
382 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
383 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
399 const u32 salt_len = salt_bufs[salt_pos].salt_len;
405 const u32 search[4] =
407 digests_buf[digests_offset].digest_buf[DGST_R0],
408 digests_buf[digests_offset].digest_buf[DGST_R1],
409 digests_buf[digests_offset].digest_buf[DGST_R2],
410 digests_buf[digests_offset].digest_buf[DGST_R3]
417 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos += VECT_SIZE)
419 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
421 const u32x pw_len = pw_l_len + pw_r_len;
423 u32x wordr0[4] = { 0 };
424 u32x wordr1[4] = { 0 };
425 u32x wordr2[4] = { 0 };
426 u32x wordr3[4] = { 0 };
428 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
429 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
430 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
431 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
432 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
433 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
434 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
435 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
437 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
439 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
444 w0[0] = wordl0[0] | wordr0[0];
445 w0[1] = wordl0[1] | wordr0[1];
446 w0[2] = wordl0[2] | wordr0[2];
447 w0[3] = wordl0[3] | wordr0[3];
451 w1[0] = wordl1[0] | wordr1[0];
452 w1[1] = wordl1[1] | wordr1[1];
453 w1[2] = wordl1[2] | wordr1[2];
454 w1[3] = wordl1[3] | wordr1[3];
458 w2[0] = wordl2[0] | wordr2[0];
459 w2[1] = wordl2[1] | wordr2[1];
460 w2[2] = wordl2[2] | wordr2[2];
461 w2[3] = wordl2[3] | wordr2[3];
465 w3[0] = wordl3[0] | wordr3[0];
466 w3[1] = wordl3[1] | wordr3[1];
502 switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, salt_len);
504 w0_t[0] |= salt_buf0[0];
505 w0_t[1] |= salt_buf0[1];
506 w0_t[2] |= salt_buf0[2];
507 w0_t[3] |= salt_buf0[3];
508 w1_t[0] |= salt_buf1[0];
509 w1_t[1] |= salt_buf1[1];
510 w1_t[2] |= salt_buf1[2];
511 w1_t[3] |= salt_buf1[3];
512 w2_t[0] |= salt_buf2[0];
513 w2_t[1] |= salt_buf2[1];
514 w2_t[2] |= salt_buf2[2];
515 w2_t[3] |= salt_buf2[3];
516 w3_t[0] |= salt_buf3[0];
517 w3_t[1] |= salt_buf3[1];
518 w3_t[2] |= salt_buf3[2];
519 w3_t[3] |= salt_buf3[3];
527 s0[0] = salt_buf0[0];
528 s0[1] = salt_buf0[1];
529 s0[2] = salt_buf0[2];
530 s0[3] = salt_buf0[3];
534 s1[0] = salt_buf1[0];
535 s1[1] = salt_buf1[1];
536 s1[2] = salt_buf1[2];
537 s1[3] = salt_buf1[3];
553 switch_buffer_by_offset_le (s0, s1, s2, s3, salt_len + pw_len);
572 const u32 pw_salt_len = salt_len + pw_len + salt_len;
574 append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, pw_salt_len);
576 w3_t[2] = pw_salt_len * 8;
587 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
588 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
589 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
590 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
591 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
592 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
593 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
594 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
595 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
596 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
597 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
598 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
599 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
600 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
601 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
602 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
604 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
605 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
606 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
607 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
608 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
609 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
610 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
611 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
612 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
613 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
614 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
615 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
616 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
617 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
618 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
619 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
621 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
622 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
623 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
624 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
625 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
626 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
627 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
628 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
629 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
630 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
631 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
632 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
633 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
634 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
635 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
636 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
638 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
639 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
640 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
641 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
642 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
643 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
644 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
645 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
646 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
647 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
648 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
649 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
650 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
651 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
652 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
653 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
654 COMPARE_S_SIMD (a, d, c, b);
658 __kernel void m03800_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)
662 __kernel void m03800_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)