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"
24 #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i)])
26 #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
28 #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
30 #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
32 #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf])
35 __kernel void m04800_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
41 const u32 gid = get_global_id (0);
42 const u32 lid = get_local_id (0);
44 if (gid >= gid_max) return;
53 pw_buf0[0] = pws[gid].i[0];
54 pw_buf0[1] = pws[gid].i[1];
55 pw_buf0[2] = pws[gid].i[2];
56 pw_buf0[3] = pws[gid].i[3];
57 pw_buf1[0] = pws[gid].i[4];
58 pw_buf1[1] = pws[gid].i[5];
59 pw_buf1[2] = pws[gid].i[6];
60 pw_buf1[3] = pws[gid].i[7];
62 const u32 pw_l_len = pws[gid].pw_len;
70 salt_buf[0] = salt_bufs[salt_pos].salt_buf[0];
71 salt_buf[1] = salt_bufs[salt_pos].salt_buf[1];
72 salt_buf[2] = salt_bufs[salt_pos].salt_buf[2];
73 salt_buf[3] = salt_bufs[salt_pos].salt_buf[3];
74 salt_buf[4] = salt_bufs[salt_pos].salt_buf[4];
76 const u32 salt_len = salt_bufs[salt_pos].salt_len;
82 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
84 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
86 const u32x pw_len = pw_l_len + pw_r_len;
88 const u32x pw_salt_len = pw_len + salt_len;
91 * concat password candidate
94 u32x wordl0[4] = { 0 };
95 u32x wordl1[4] = { 0 };
96 u32x wordl2[4] = { 0 };
97 u32x wordl3[4] = { 0 };
99 wordl0[0] = pw_buf0[0];
100 wordl0[1] = pw_buf0[1];
101 wordl0[2] = pw_buf0[2];
102 wordl0[3] = pw_buf0[3];
103 wordl1[0] = pw_buf1[0];
104 wordl1[1] = pw_buf1[1];
105 wordl1[2] = pw_buf1[2];
106 wordl1[3] = pw_buf1[3];
108 u32x wordr0[4] = { 0 };
109 u32x wordr1[4] = { 0 };
110 u32x wordr2[4] = { 0 };
111 u32x wordr3[4] = { 0 };
113 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
114 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
115 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
116 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
117 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
118 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
119 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
120 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
122 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
124 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
128 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
136 w0[0] = wordl0[0] | wordr0[0];
137 w0[1] = wordl0[1] | wordr0[1];
138 w0[2] = wordl0[2] | wordr0[2];
139 w0[3] = wordl0[3] | wordr0[3];
140 w1[0] = wordl1[0] | wordr1[0];
141 w1[1] = wordl1[1] | wordr1[1];
142 w1[2] = wordl1[2] | wordr1[2];
143 w1[3] = wordl1[3] | wordr1[3];
144 w2[0] = wordl2[0] | wordr2[0];
145 w2[1] = wordl2[1] | wordr2[1];
146 w2[2] = wordl2[2] | wordr2[2];
147 w2[3] = wordl2[3] | wordr2[3];
148 w3[0] = wordl3[0] | wordr3[0];
149 w3[1] = wordl3[1] | wordr3[1];
150 w3[2] = wordl3[2] | wordr3[2];
151 w3[3] = wordl3[3] | wordr3[3];
179 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, pw_len);
202 switch_buffer_by_offset_le (w0, w1, w2, w3, 1);
204 w0[0] |= salt_buf[4];
206 w3[2] = pw_salt_len * 8;
218 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
219 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
220 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
221 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
222 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
223 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
224 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
225 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
226 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
227 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
228 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
229 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
230 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
231 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
232 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
233 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
235 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
236 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
237 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
238 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
239 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
240 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
241 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
242 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
243 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
244 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
245 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
246 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
247 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
248 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
249 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
250 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
252 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
253 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
254 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
255 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
256 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
257 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
258 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
259 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
260 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
261 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
262 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
263 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
264 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
265 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
266 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
267 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
269 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
270 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
271 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
272 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
273 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
274 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
275 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
276 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
277 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
278 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
279 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
280 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
281 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
282 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
283 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
284 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
286 COMPARE_M_SIMD (a, d, c, b);
290 __kernel void m04800_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
294 __kernel void m04800_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
298 __kernel void m04800_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
304 const u32 gid = get_global_id (0);
305 const u32 lid = get_local_id (0);
307 if (gid >= gid_max) return;
316 pw_buf0[0] = pws[gid].i[0];
317 pw_buf0[1] = pws[gid].i[1];
318 pw_buf0[2] = pws[gid].i[2];
319 pw_buf0[3] = pws[gid].i[3];
320 pw_buf1[0] = pws[gid].i[4];
321 pw_buf1[1] = pws[gid].i[5];
322 pw_buf1[2] = pws[gid].i[6];
323 pw_buf1[3] = pws[gid].i[7];
325 const u32 pw_l_len = pws[gid].pw_len;
333 salt_buf[0] = salt_bufs[salt_pos].salt_buf[0];
334 salt_buf[1] = salt_bufs[salt_pos].salt_buf[1];
335 salt_buf[2] = salt_bufs[salt_pos].salt_buf[2];
336 salt_buf[3] = salt_bufs[salt_pos].salt_buf[3];
337 salt_buf[4] = salt_bufs[salt_pos].salt_buf[4];
339 const u32 salt_len = salt_bufs[salt_pos].salt_len;
345 const u32 search[4] =
347 digests_buf[digests_offset].digest_buf[DGST_R0],
348 digests_buf[digests_offset].digest_buf[DGST_R1],
349 digests_buf[digests_offset].digest_buf[DGST_R2],
350 digests_buf[digests_offset].digest_buf[DGST_R3]
357 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
359 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
361 const u32x pw_len = pw_l_len + pw_r_len;
363 const u32x pw_salt_len = pw_len + salt_len;
366 * concat password candidate
369 u32x wordl0[4] = { 0 };
370 u32x wordl1[4] = { 0 };
371 u32x wordl2[4] = { 0 };
372 u32x wordl3[4] = { 0 };
374 wordl0[0] = pw_buf0[0];
375 wordl0[1] = pw_buf0[1];
376 wordl0[2] = pw_buf0[2];
377 wordl0[3] = pw_buf0[3];
378 wordl1[0] = pw_buf1[0];
379 wordl1[1] = pw_buf1[1];
380 wordl1[2] = pw_buf1[2];
381 wordl1[3] = pw_buf1[3];
383 u32x wordr0[4] = { 0 };
384 u32x wordr1[4] = { 0 };
385 u32x wordr2[4] = { 0 };
386 u32x wordr3[4] = { 0 };
388 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
389 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
390 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
391 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
392 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
393 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
394 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
395 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
397 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
399 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
403 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
411 w0[0] = wordl0[0] | wordr0[0];
412 w0[1] = wordl0[1] | wordr0[1];
413 w0[2] = wordl0[2] | wordr0[2];
414 w0[3] = wordl0[3] | wordr0[3];
415 w1[0] = wordl1[0] | wordr1[0];
416 w1[1] = wordl1[1] | wordr1[1];
417 w1[2] = wordl1[2] | wordr1[2];
418 w1[3] = wordl1[3] | wordr1[3];
419 w2[0] = wordl2[0] | wordr2[0];
420 w2[1] = wordl2[1] | wordr2[1];
421 w2[2] = wordl2[2] | wordr2[2];
422 w2[3] = wordl2[3] | wordr2[3];
423 w3[0] = wordl3[0] | wordr3[0];
424 w3[1] = wordl3[1] | wordr3[1];
425 w3[2] = wordl3[2] | wordr3[2];
426 w3[3] = wordl3[3] | wordr3[3];
454 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, pw_len);
477 switch_buffer_by_offset_le (w0, w1, w2, w3, 1);
479 w0[0] |= salt_buf[4];
481 w3[2] = pw_salt_len * 8;
493 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
494 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
495 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
496 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
497 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
498 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
499 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
500 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
501 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
502 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
503 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
504 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
505 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
506 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
507 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
508 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
510 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
511 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
512 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
513 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
514 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
515 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
516 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
517 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
518 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
519 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
520 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
521 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
522 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
523 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
524 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
525 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
527 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
528 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
529 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
530 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
531 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
532 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
533 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
534 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
535 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
536 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
537 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
538 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
539 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
540 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
541 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
542 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
544 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
545 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
546 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
547 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
548 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
549 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
550 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
551 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
552 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
553 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
554 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
555 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
556 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
558 if (MATCHES_NONE_VS (a, search[0])) continue;
560 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
561 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
562 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
564 COMPARE_S_SIMD (a, d, c, b);
568 __kernel void m04800_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
572 __kernel void m04800_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)