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"
19 #include "include/rp_gpu.h"
22 #define COMPARE_S "check_single_comp4.c"
23 #define COMPARE_M "check_multi_comp4.c"
25 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03800_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 rules_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 pw_buf0[0] = pws[gid].i[ 0];
42 pw_buf0[1] = pws[gid].i[ 1];
43 pw_buf0[2] = pws[gid].i[ 2];
44 pw_buf0[3] = pws[gid].i[ 3];
48 pw_buf1[0] = pws[gid].i[ 4];
49 pw_buf1[1] = pws[gid].i[ 5];
50 pw_buf1[2] = pws[gid].i[ 6];
51 pw_buf1[3] = pws[gid].i[ 7];
53 const u32 pw_len = pws[gid].pw_len;
61 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
62 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
63 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
64 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
68 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
69 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
70 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
71 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
87 const u32 salt_len = salt_bufs[salt_pos].salt_len;
93 __local u32 l_bin2asc[256];
95 const u32 lid4 = lid * 4;
97 const u32 lid40 = lid4 + 0;
98 const u32 lid41 = lid4 + 1;
99 const u32 lid42 = lid4 + 2;
100 const u32 lid43 = lid4 + 3;
102 const u32 v400 = (lid40 >> 0) & 15;
103 const u32 v401 = (lid40 >> 4) & 15;
104 const u32 v410 = (lid41 >> 0) & 15;
105 const u32 v411 = (lid41 >> 4) & 15;
106 const u32 v420 = (lid42 >> 0) & 15;
107 const u32 v421 = (lid42 >> 4) & 15;
108 const u32 v430 = (lid43 >> 0) & 15;
109 const u32 v431 = (lid43 >> 4) & 15;
111 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
112 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
113 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
114 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
115 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
116 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
117 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
118 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
120 barrier (CLK_LOCAL_MEM_FENCE);
122 if (gid >= gid_max) return;
128 for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
158 const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w0, w1, pw_len);
193 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
195 w0_t[0] |= salt_buf0[0];
196 w0_t[1] |= salt_buf0[1];
197 w0_t[2] |= salt_buf0[2];
198 w0_t[3] |= salt_buf0[3];
199 w1_t[0] |= salt_buf1[0];
200 w1_t[1] |= salt_buf1[1];
201 w1_t[2] |= salt_buf1[2];
202 w1_t[3] |= salt_buf1[3];
203 w2_t[0] |= salt_buf2[0];
204 w2_t[1] |= salt_buf2[1];
205 w2_t[2] |= salt_buf2[2];
206 w2_t[3] |= salt_buf2[3];
207 w3_t[0] |= salt_buf3[0];
208 w3_t[1] |= salt_buf3[1];
209 w3_t[2] |= salt_buf3[2];
210 w3_t[3] |= salt_buf3[3];
218 s0[0] = salt_buf0[0];
219 s0[1] = salt_buf0[1];
220 s0[2] = salt_buf0[2];
221 s0[3] = salt_buf0[3];
225 s1[0] = salt_buf1[0];
226 s1[1] = salt_buf1[1];
227 s1[2] = salt_buf1[2];
228 s1[3] = salt_buf1[3];
244 switch_buffer_by_offset (s0, s1, s2, s3, salt_len + out_len);
263 const u32 pw_salt_len = salt_len + out_len + salt_len;
265 append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, pw_salt_len);
267 w3_t[2] = pw_salt_len * 8;
278 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
279 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
280 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
281 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
282 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
283 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
284 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
285 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
286 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
287 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
288 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
289 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
290 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
291 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
292 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
293 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
295 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
296 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
297 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
298 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
299 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
300 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
301 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
302 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
303 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
304 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
305 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
306 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
307 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
308 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
309 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
310 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
312 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
313 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
314 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
315 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
316 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
317 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
318 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
319 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
320 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
321 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
322 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
323 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
324 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
325 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
326 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
327 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
329 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
330 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
331 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
332 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
333 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
334 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
335 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
336 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
337 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
338 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
339 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
340 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
341 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
343 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
344 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
345 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
356 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03800_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)
360 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03800_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)
364 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03800_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
370 const u32 lid = get_local_id (0);
376 const u32 gid = get_global_id (0);
380 pw_buf0[0] = pws[gid].i[ 0];
381 pw_buf0[1] = pws[gid].i[ 1];
382 pw_buf0[2] = pws[gid].i[ 2];
383 pw_buf0[3] = pws[gid].i[ 3];
387 pw_buf1[0] = pws[gid].i[ 4];
388 pw_buf1[1] = pws[gid].i[ 5];
389 pw_buf1[2] = pws[gid].i[ 6];
390 pw_buf1[3] = pws[gid].i[ 7];
392 const u32 pw_len = pws[gid].pw_len;
400 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
401 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
402 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
403 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
407 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
408 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
409 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
410 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
426 const u32 salt_len = salt_bufs[salt_pos].salt_len;
432 const u32 search[4] =
434 digests_buf[digests_offset].digest_buf[DGST_R0],
435 digests_buf[digests_offset].digest_buf[DGST_R1],
436 digests_buf[digests_offset].digest_buf[DGST_R2],
437 digests_buf[digests_offset].digest_buf[DGST_R3]
444 __local u32 l_bin2asc[256];
446 const u32 lid4 = lid * 4;
448 const u32 lid40 = lid4 + 0;
449 const u32 lid41 = lid4 + 1;
450 const u32 lid42 = lid4 + 2;
451 const u32 lid43 = lid4 + 3;
453 const u32 v400 = (lid40 >> 0) & 15;
454 const u32 v401 = (lid40 >> 4) & 15;
455 const u32 v410 = (lid41 >> 0) & 15;
456 const u32 v411 = (lid41 >> 4) & 15;
457 const u32 v420 = (lid42 >> 0) & 15;
458 const u32 v421 = (lid42 >> 4) & 15;
459 const u32 v430 = (lid43 >> 0) & 15;
460 const u32 v431 = (lid43 >> 4) & 15;
462 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
463 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
464 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
465 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
466 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
467 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
468 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
469 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
471 barrier (CLK_LOCAL_MEM_FENCE);
473 if (gid >= gid_max) return;
479 for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
509 const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w0, w1, pw_len);
544 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
546 w0_t[0] |= salt_buf0[0];
547 w0_t[1] |= salt_buf0[1];
548 w0_t[2] |= salt_buf0[2];
549 w0_t[3] |= salt_buf0[3];
550 w1_t[0] |= salt_buf1[0];
551 w1_t[1] |= salt_buf1[1];
552 w1_t[2] |= salt_buf1[2];
553 w1_t[3] |= salt_buf1[3];
554 w2_t[0] |= salt_buf2[0];
555 w2_t[1] |= salt_buf2[1];
556 w2_t[2] |= salt_buf2[2];
557 w2_t[3] |= salt_buf2[3];
558 w3_t[0] |= salt_buf3[0];
559 w3_t[1] |= salt_buf3[1];
560 w3_t[2] |= salt_buf3[2];
561 w3_t[3] |= salt_buf3[3];
569 s0[0] = salt_buf0[0];
570 s0[1] = salt_buf0[1];
571 s0[2] = salt_buf0[2];
572 s0[3] = salt_buf0[3];
576 s1[0] = salt_buf1[0];
577 s1[1] = salt_buf1[1];
578 s1[2] = salt_buf1[2];
579 s1[3] = salt_buf1[3];
595 switch_buffer_by_offset (s0, s1, s2, s3, salt_len + out_len);
614 const u32 pw_salt_len = salt_len + out_len + salt_len;
616 append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, pw_salt_len);
618 w3_t[2] = pw_salt_len * 8;
629 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
630 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
631 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
632 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
633 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
634 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
635 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
636 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
637 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
638 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
639 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
640 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
641 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
642 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
643 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
644 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
646 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
647 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
648 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
649 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
650 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
651 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
652 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
653 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
654 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
655 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
656 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
657 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
658 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
659 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
660 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
661 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
663 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
664 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
665 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
666 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
667 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
668 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
669 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
670 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
671 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
672 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
673 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
674 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
675 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
676 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
677 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
678 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
680 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
681 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
682 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
683 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
684 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
685 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
686 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
687 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
688 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
689 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
690 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
691 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
692 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
693 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
694 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
695 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
706 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03800_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)
710 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03800_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)